3 from PLC.Faults import *
4 from PLC.Method import Method
5 from PLC.Parameter import Parameter, Mixed
6 from PLC.PCUTypes import PCUType, PCUTypes
7 from PLC.Auth import Auth
9 class DeletePCUType(Method):
13 Returns 1 if successful, faults otherwise.
20 PCUType.fields['pcu_type_id']
23 returns = Parameter(int, '1 if successful')
26 def call(self, auth, pcu_type_id):
27 pcu_types = PCUTypes(self.api, [pcu_type_id])
29 raise PLCInvalidArgument, "No such pcu type"
31 pcu_type = pcu_types[0]
33 self.event_objects = {'PCUType': [pcu_type['pcu_type_id']]}