X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=clientbin%2FsfiListLinks.py;h=67e603d1efad2d1f965cf1306d24aaff02626613;hb=8e558be62ca1e048cedb76d6036d1acbfa827bd4;hp=a4720ca12bb55e72f5f4ac671b610cca0609eaa1;hpb=1db1a879ffde8991aa95dd80142d555551655e88;p=sfa.git diff --git a/clientbin/sfiListLinks.py b/clientbin/sfiListLinks.py index a4720ca1..67e603d1 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) - - - -