X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Fplanetlab%2Fsfa_node.py;h=81783cddace6a7ca92c1a48951345259745f1b13;hb=039fbd9629d7570d4c175a5448d24badcd0f3aba;hp=a8bad10370ac37efccf325fcbaab0506401d6adc;hpb=c01d40579e6d77f12327072dec0fb82c41676bb0;p=nepi.git diff --git a/src/nepi/resources/planetlab/sfa_node.py b/src/nepi/resources/planetlab/sfa_node.py index a8bad103..81783cdd 100644 --- a/src/nepi/resources/planetlab/sfa_node.py +++ b/src/nepi/resources/planetlab/sfa_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 @@ -17,9 +16,11 @@ # # Author: Lucia Guevgeozian +from __future__ import print_function + from nepi.execution.attribute import Attribute, Flags, Types from nepi.execution.resource import ResourceManager, clsinit_copy, \ - ResourceState, reschedule_delay + ResourceState from nepi.resources.linux.node import LinuxNode from nepi.util.sfaapi import SFAAPIFactory from nepi.util.execfuncs import lexec @@ -36,10 +37,10 @@ import datetime @clsinit_copy class PlanetlabSfaNode(LinuxNode): - _rtype = "PlanetlabSfaNode" + _rtype = "planetlab::sfa::Node" _help = "Controls a PlanetLab host accessible using a SSH key " \ "and provisioned using SFA" - _backend = "planetlab" + _platform = "planetlab" @classmethod def _register_attributes(cls): @@ -530,10 +531,10 @@ class PlanetlabSfaNode(LinuxNode): # and perform ping to check that is really alive if not self._blacklisted(host_hrn): if not self._reserved(host_hrn): - print self.sfaapi._reserved ,self.guid + print(self.sfaapi._reserved ,self.guid) for hostname, hrn in nodes.iteritems(): if host_hrn == hrn: - print 'hostname' ,hostname + print('hostname' ,hostname) ping_ok = self._do_ping(hostname) if not ping_ok: