-attrs = command.get_attribute_dict()
-for name in attrs:
- print >> sys.stderr, name, attrs[name]
- for value in attrs[name]:
- if not command.nodes:
- try:
- command.rspec.remove_default_sliver_attribute(name, value)
- except:
- print >> sys.stderr, "FAILED: on all nodes: %s=%s" % (name, value)
+if command.opts.infile:
+ attrs = command.get_attribute_dict()
+ rspec = RSpec(command.opts.infile)
+ nodes = []
+ if command.opts.nodefile:
+ f = open(command.opts.nodefile, "r")
+ nodes = f.read().split()
+ f.close()
+
+
+ for name in attrs:
+ print >> sys.stderr, name, attrs[name]
+ for value in attrs[name]:
+ if not nodes:
+ try:
+ rspec.version.remove_default_sliver_attribute(name, value)
+ except:
+ logger.log_exc("sfiDeleteAttribute FAILED on all nodes: %s=%s" % (name, value))