4 from sfa.client.sfi_commands import Commands
5 from sfa.rspecs.rspec_parser import parse_rspec
7 command = Commands(usage="%prog [options]",
8 description="List all slivers in the RSpec. " +
9 "Use this to display the list of nodes belonging to " +
11 command.add_show_attributes_option()
14 if command.opts.infile:
15 rspec = parse_rspec(command.opts.infile)
16 nodes = rspec.get_nodes_with_slivers()
18 if command.opts.showatt:
19 defaults = rspec.get_default_sliver_attributes()
22 for (name, value) in defaults:
23 print " %s: %s" % (name, value)
27 if command.opts.showatt:
28 atts = rspec.get_sliver_attributes(node)
29 for (name, value) in atts:
30 print " %s: %s" % (name, value)