c8e769aa7d630e1dcbccfa51da5286bf8c20114b
[sfa.git] / sfa / client / sfiDeleteSliver.py
1 #! /usr/bin/env python
2
3 import sys
4 from sfa.util.rspecHelper import RSpec, Commands
5
6 command = Commands(usage="%prog [options] node1 node2...",
7                    description="Delete slivers from the RSpec. " +
8                    "This command reads in an RSpec and outputs a modified " +
9                    "RSpec. Use this to remove nodes from your slice.")
10 command.add_nodefile_option()
11 command.prep()
12
13 for node in command.nodes:
14     try:
15         command.rspec.remove_sliver(node)
16     except:
17         print >> sys.stderr, "FAILED: %s" % node
18
19 print command.rspec
20     
21
22