1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.KeyTypes import KeyType, KeyTypes
5 from PLC.Auth import Auth
7 class AddKeyType(Method):
11 Returns 1 if successful, faults otherwise.
18 KeyType.fields['key_type']
21 returns = Parameter(int, '1 if successful')
24 object_type = 'KeyType'
26 def call(self, auth, name):
27 key_type = KeyType(self.api)
28 key_type['key_type'] = name
29 key_type.sync(insert = True)