X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FRebootNodeWithPCU.py;h=ba9f30805e57d2ae398c725fa56a64f94ae2dc54;hb=3b44c0228c26dc43d985185afc225caa5f48c1fb;hp=2126a2efa4cd6ee5f830e5661c3c7a5e17f6c845;hpb=997c5bbe5b0576ae8c9c8d52a80dab1dcecf615a;p=plcapi.git diff --git a/PLC/Methods/RebootNodeWithPCU.py b/PLC/Methods/RebootNodeWithPCU.py index 2126a2e..ba9f308 100644 --- a/PLC/Methods/RebootNodeWithPCU.py +++ b/PLC/Methods/RebootNodeWithPCU.py @@ -42,7 +42,7 @@ class RebootNodeWithPCU(Method): # Get account information nodes = Nodes(self.api, [node_id_or_hostname]) if not nodes: - raise PLCInvalidArgument, "No such node" + raise PLCInvalidArgument("No such node") if testrun is None: testrun = False @@ -56,17 +56,17 @@ class RebootNodeWithPCU(Method): # member of the site at which the node is located. if 'admin' not in self.caller['roles']: if node['site_id'] not in self.caller['site_ids']: - raise PLCPermissionDenied, "Not allowed to reboot nodes from specified site" + raise PLCPermissionDenied("Not allowed to reboot nodes from specified site") # Verify that the node has pcus associated with it. pcus = PCUs(self.api, {'pcu_id' : node['pcu_ids']} ) if not pcus: - raise PLCInvalidArgument, "No PCUs associated with Node" + raise PLCInvalidArgument("No PCUs associated with Node") pcu = pcus[0] if not external_dependency: - raise PLCNotImplemented, "Could not load external module to attempt reboot" + raise PLCNotImplemented("Could not load external module to attempt reboot") # model, hostname, port, # i = pcu['node_ids'].index(node['node_id'])