X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FDeletePCUProtocolType.py;h=1ff162be64300742106a8102182d7728ad27b3c1;hb=475ee53aaaa011ba14a34af34d3340257d6f9d59;hp=cd6fb56962ab54bd3aff4f8d623ff9660df07545;hpb=77e4f177dfee85705c36298c3230b2e4a3e73467;p=plcapi.git diff --git a/PLC/Methods/DeletePCUProtocolType.py b/PLC/Methods/DeletePCUProtocolType.py index cd6fb56..1ff162b 100644 --- a/PLC/Methods/DeletePCUProtocolType.py +++ b/PLC/Methods/DeletePCUProtocolType.py @@ -1,4 +1,3 @@ -# $Id$ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed @@ -9,7 +8,7 @@ class DeletePCUProtocolType(Method): """ Deletes a PCU protocol type. - Returns 1 if successful, faults otherwise. + Returns 1 if successful, faults otherwise. """ roles = ['admin'] @@ -20,7 +19,7 @@ class DeletePCUProtocolType(Method): ] returns = Parameter(int, '1 if successful') - + def call(self, auth, protocol_type_id): protocol_types = PCUProtocolTypes(self.api, [protocol_type_id]) @@ -29,6 +28,6 @@ class DeletePCUProtocolType(Method): protocol_type = protocol_types[0] protocol_type.delete() - self.event_objects = {'PCUProtocolType': [protocol_type['pcu_protocol_type_id']]} + self.event_objects = {'PCUProtocolType': [protocol_type['pcu_protocol_type_id']]} return 1