4 from sfa.util.rspecHelper import RSpec, Commands
6 command = Commands(usage="%prog [options] [node1 node2...]",
7 description="Delete sliver attributes from the RSpec. " +
8 "This command reads in an RSpec and outputs a modified " +
9 "RSpec. Use this to remove attributes from nodes " +
10 "in your slice. If no nodes are specified, the " +
11 "attributes will be removed from ALL nodes.",
12 epilog="NOTE: Only admins can actually set these " +
13 "attributes, with the exception of --delegations")
14 command.add_nodefile_option()
15 command.add_attribute_options()
18 attrs = command.get_attribute_dict()
20 print >> sys.stderr, name, attrs[name]
21 for value in attrs[name]:
24 command.rspec.remove_default_sliver_attribute(name, value)
26 print >> sys.stderr, "FAILED: on all nodes: %s=%s" % (name, value)
28 for node in command.nodes:
30 command.rspec.remove_sliver_attribute(node, name, value)
32 print >> sys.stderr, "FAILED: on node %s: %s=%s" % (node, name, value)