Modified slab import script to create authorities only if it doesn't exist.
[sfa.git] / sfa / client / sfiListNodes.py
1 #! /usr/bin/env python
2
3 import sys
4 from sfa.client.sfi_commands import Commands
5 from sfa.rspecs.rspec import RSpec 
6
7 command = Commands(usage="%prog [options]",
8                    description="List all nodes in the RSpec. " + 
9                    "Use this to display the list of nodes on which it is " + 
10                    "possible to create a slice.")
11 command.prep()
12
13 if command.opts.infile:
14     rspec = RSpec(command.opts.infile)
15     nodes = rspec.version.get_nodes()
16     if command.opts.outfile:
17         sys.stdout = open(command.opts.outfile, 'w')
18     
19     for node in nodes:
20         print node
21
22
23
24