X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=clientbin%2FsfiListNodes.py;h=81684bf81fd1bdf6f072bde1f16f863e5751256c;hb=78e5fb75e3793ae9dfce7f1bbd4a2b0f27b7ecc6;hp=17cb3414a3f6106dc656527785902b0c5628f7d6;hpb=1db1a879ffde8991aa95dd80142d555551655e88;p=sfa.git diff --git a/clientbin/sfiListNodes.py b/clientbin/sfiListNodes.py index 17cb3414..81684bf8 100755 --- a/clientbin/sfiListNodes.py +++ b/clientbin/sfiListNodes.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/env python3 import sys @@ -6,11 +6,11 @@ from sfa.client.sfi_commands import Commands from sfa.rspecs.rspec import RSpec -from sfa.planetlab.plxrn import xrn_to_hostname +from sfa.planetlab.plxrn import xrn_to_hostname command = Commands(usage="%prog [options]", - description="List all nodes in the RSpec. " + - "Use this to display the list of nodes on which it is " + + description="List all nodes in the RSpec. " + + "Use this to display the list of nodes on which it is " + "possible to create a slice.") command.prep() @@ -19,14 +19,10 @@ if command.opts.infile: nodes = rspec.version.get_nodes() if command.opts.outfile: sys.stdout = open(command.opts.outfile, 'w') - + for node in nodes: hostname = None if node.get('component_id'): hostname = xrn_to_hostname(node['component_id']) if hostname: - print hostname - - - - + print(hostname)