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