X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=clientbin%2FsfiListLinks.py;h=d84b9427c8db5ac8bab2ad8274a609bdd21bd07a;hb=4a9e6751f9f396f463932133b9d62fc925a99ef6;hp=a4720ca12bb55e72f5f4ac671b610cca0609eaa1;hpb=cedf37c8661ec0b05349274962bf2db9cfa6a24d;p=sfa.git diff --git a/clientbin/sfiListLinks.py b/clientbin/sfiListLinks.py index a4720ca1..d84b9427 100755 --- a/clientbin/sfiListLinks.py +++ b/clientbin/sfiListLinks.py @@ -3,11 +3,11 @@ import sys from sfa.client.sfi_commands import Commands from sfa.rspecs.rspec import RSpec -from sfa.util.xrn import Xrn +from sfa.util.xrn import Xrn command = Commands(usage="%prog [options]", - description="List all links in the RSpec. " + - "Use this to display the list of available links. " ) + description="List all links in the RSpec. " + + "Use this to display the list of available links. ") command.prep() if command.opts.infile: @@ -15,12 +15,8 @@ if command.opts.infile: links = rspec.version.get_links() if command.opts.outfile: sys.stdout = open(command.opts.outfile, 'w') - + for link in links: ifname1 = Xrn(link['interface1']['component_id']).get_leaf() ifname2 = Xrn(link['interface2']['component_id']).get_leaf() - print "%s %s" % (ifname1, ifname2) - - - - + print("%s %s" % (ifname1, ifname2))