2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.PCUTypes import PCUType, PCUTypes
6 from PLC.Auth import Auth
8 class DeletePCUType(Method):
12 Returns 1 if successful, faults otherwise.
19 PCUType.fields['pcu_type_id']
22 returns = Parameter(int, '1 if successful')
25 def call(self, auth, pcu_type_id):
26 pcu_types = PCUTypes(self.api, [pcu_type_id])
28 raise PLCInvalidArgument, "No such pcu type"
30 pcu_type = pcu_types[0]
32 self.event_objects = {'PCUType': [pcu_type['pcu_type_id']]}