X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FDeletePCU.py;h=50adb889ad3f0bde12ee5c8d81ab1597332ff4cf;hb=d316abf4bdb070ea1acf6be4b262c86a055b6ac2;hp=4b50a3f3f03574eaf41345bd0a5c8ae033434618;hpb=1f8c38dd1357c93e4be8d94456b7274a591d2db4;p=plcapi.git diff --git a/PLC/Methods/DeletePCU.py b/PLC/Methods/DeletePCU.py index 4b50a3f..50adb88 100644 --- a/PLC/Methods/DeletePCU.py +++ b/PLC/Methods/DeletePCU.py @@ -22,9 +22,12 @@ class DeletePCU(Method): returns = Parameter(int, '1 if successful') + event_type = 'Delete' + object_type = 'PCU' + def call(self, auth, pcu_id): # Get associated PCU details - pcus = PCUs(self.api, [pcu_id]).values() + pcus = PCUs(self.api, [pcu_id]) if not pcus: raise PLCInvalidArgument, "No such PCU" pcu = pcus[0] @@ -34,5 +37,6 @@ class DeletePCU(Method): raise PLCPermissionDenied, "Not allowed to update that PCU" pcu.delete() + self.object_ids = [pcu['pcu_id']] return 1