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 DeleteKeyType(Method):
11 WARNING: This will cause the deletion of all keys of this type.
13 Returns 1 if successful, faults otherwise.
20 KeyType.fields['key_type']
23 returns = Parameter(int, '1 if successful')
26 def call(self, auth, name):
27 key_types = KeyTypes(self.api, [name])
29 raise PLCInvalidArgument("No such key type")
30 key_type = key_types[0]