X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fclient%2FsfiListSlivers.py;fp=sfa%2Fclient%2FsfiListSlivers.py;h=685521ca34e2965490d562f172a05c318d1824d3;hb=338710533f2d8474ec56522e714b97e9a438f6c1;hp=0000000000000000000000000000000000000000;hpb=9a638a1b62460a8aa5cbdfa25d3a99a79b6f1d5f;p=sfa.git diff --git a/sfa/client/sfiListSlivers.py b/sfa/client/sfiListSlivers.py new file mode 100755 index 00000000..685521ca --- /dev/null +++ b/sfa/client/sfiListSlivers.py @@ -0,0 +1,28 @@ +#! /usr/bin/env python + +import sys +from sfa.util.rspecHelper import RSpec, Commands + +command = Commands(usage="%prog [options]", + description="List all slivers in the RSpec. " + + "Use this to display the list of nodes belonging to " + + "the slice.") +command.add_show_attributes_option() +command.prep() + +nodes = command.rspec.get_sliver_list() +if command.opts.showatt: + defaults = command.rspec.get_default_sliver_attributes() + if defaults: + print "ALL NODES" + for (name, value) in defaults: + print " %s: %s" % (name, value) + +for node in nodes: + print node + if command.opts.showatt: + atts = command.rspec.get_sliver_attributes(node) + for (name, value) in atts: + print " %s: %s" % (name, value) + +