X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Fomf%2Fwilabt_node.py;h=f9b118f45674053ab0a65ced575505c38a3e9d69;hb=6285ca51026efb69642eea9dfc7c480e722d84a9;hp=0918c3f8b9b21af7031c06132e1788da19ee805f;hpb=a55b5cf0818ced6ab8dc3e88fad7f6616675e826;p=nepi.git diff --git a/src/nepi/resources/omf/wilabt_node.py b/src/nepi/resources/omf/wilabt_node.py index 0918c3f8..f9b118f4 100644 --- a/src/nepi/resources/omf/wilabt_node.py +++ b/src/nepi/resources/omf/wilabt_node.py @@ -3,9 +3,8 @@ # Copyright (C) 2013 INRIA # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation; # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,7 +18,7 @@ from nepi.execution.attribute import Attribute, Flags, Types from nepi.execution.resource import ResourceManager, clsinit_copy, \ - ResourceState, reschedule_delay + ResourceState from nepi.resources.omf.node import OMFNode from nepi.util.sfaapi import SFAAPIFactory from nepi.util.execfuncs import lexec @@ -35,10 +34,10 @@ import datetime @clsinit_copy class WilabtSfaNode(OMFNode): - _rtype = "WilabtSfaNode" + _rtype = "wilabt::sfa::Node" _help = "Controls a Wilabt host accessible using a SSH key " \ "and provisioned using SFA" - _backend = "omf" + _platform = "omf" @classmethod def _register_attributes(cls): @@ -445,23 +444,23 @@ class WilabtSfaNode(OMFNode): def fail_discovery(self): msg = "Discovery failed. No candidates found for node" self.error(msg) - raise RuntimeError, msg + raise RuntimeError(msg) def fail_node_not_alive(self, host=None): msg = "Node %s not alive" % host - raise RuntimeError, msg + raise RuntimeError(msg) def fail_node_not_available(self, host): msg = "Some nodes not available for provisioning" - raise RuntimeError, msg + raise RuntimeError(msg) def fail_not_enough_nodes(self): msg = "Not enough nodes available for provisioning" - raise RuntimeError, msg + raise RuntimeError(msg) def fail_sfaapi(self): msg = "Failing while trying to instanciate the SFA API." - raise RuntimeError, msg + raise RuntimeError(msg) def valid_connection(self, guid): # TODO: Validate!