2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.KeyTypes import KeyType, KeyTypes
6 from PLC.Auth import Auth
8 class AddKeyType(Method):
12 Returns 1 if successful, faults otherwise.
19 KeyType.fields['key_type']
22 returns = Parameter(int, '1 if successful')
25 def call(self, auth, name):
26 key_type = KeyType(self.api)
27 key_type['key_type'] = name
28 key_type.sync(insert = True)