3 from PLC.Faults import *
4 from PLC.Method import Method
5 from PLC.Parameter import Parameter, Mixed
6 from PLC.KeyTypes import KeyType, KeyTypes
7 from PLC.Auth import Auth
9 class DeleteKeyType(Method):
13 WARNING: This will cause the deletion of all keys of this type.
15 Returns 1 if successful, faults otherwise.
22 KeyType.fields['key_type']
25 returns = Parameter(int, '1 if successful')
28 def call(self, auth, name):
29 key_types = KeyTypes(self.api, [name])
31 raise PLCInvalidArgument, "No such key type"
32 key_type = key_types[0]