X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FDeletePCU.py;h=caff26be8d8af01520b1b7c856929bd08a592f6d;hb=be959d0158ffaff6d50158269f03ba7f2c1da56f;hp=01382b12d59ff7feb3d66129665186bcebf4297a;hpb=e347fc823bbba9d88a3fddf07d5c21024dfd1e55;p=plcapi.git diff --git a/PLC/Methods/DeletePCU.py b/PLC/Methods/DeletePCU.py index 01382b1..caff26b 100644 --- a/PLC/Methods/DeletePCU.py +++ b/PLC/Methods/DeletePCU.py @@ -1,3 +1,5 @@ +# $Id$ +# $URL$ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed @@ -22,6 +24,7 @@ class DeletePCU(Method): returns = Parameter(int, '1 if successful') + def call(self, auth, pcu_id): # Get associated PCU details pcus = PCUs(self.api, [pcu_id]) @@ -35,4 +38,8 @@ class DeletePCU(Method): pcu.delete() + # Logging variables + self.event_objects = {'PCU': [pcu['pcu_id']]} + self.message = 'PCU %d deleted' % pcu['pcu_id'] + return 1