X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=clientbin%2FsfiListLinks.py;fp=clientbin%2FsfiListLinks.py;h=67e603d1efad2d1f965cf1306d24aaff02626613;hp=a4720ca12bb55e72f5f4ac671b610cca0609eaa1;hb=04a3f20dc71bf8b3f96b1e3172623aa346a638a7;hpb=c1c136b3042a24604823c6da135308b7c031c234 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) - - - -