git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ccd6b82
)
now uses new RSpec libraries
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 25 Apr 2011 19:51:09 +0000
(15:51 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 25 Apr 2011 19:51:09 +0000
(15:51 -0400)
sfa/client/sfiListNodes.py
patch
|
blob
|
history
diff --git
a/sfa/client/sfiListNodes.py
b/sfa/client/sfiListNodes.py
index
df14fe3
..
0c629c8
100755
(executable)
--- a/
sfa/client/sfiListNodes.py
+++ b/
sfa/client/sfiListNodes.py
@@
-1,7
+1,9
@@
#! /usr/bin/env python
import sys
#! /usr/bin/env python
import sys
-from sfa.util.rspecHelper import RSpec, Commands
+#from sfa.util.rspecHelper import RSpec, Commands
+from sfa.client.sfi_commands import Commands
+from sfa.rspecs.rspec_parser import parse_rspec
command = Commands(usage="%prog [options]",
description="List all nodes in the RSpec. " +
command = Commands(usage="%prog [options]",
description="List all nodes in the RSpec. " +
@@
-9,9
+11,15
@@
command = Commands(usage="%prog [options]",
"possible to create a slice.")
command.prep()
"possible to create a slice.")
command.prep()
-nodes = command.rspec.get_node_list()
-for node in nodes:
- print node
+if command.opts.infile:
+ rspec = parse_rspec(command.opts.infile)
+ nodes = rspec.get_nodes()
+ if command.opts.outfile:
+ sys.stdout = open(command.opts.outfile, 'w')
+
+ for node in nodes:
+ print node
+