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:
331c6f9
)
now ues new rspec libraries
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 28 Apr 2011 18:28:41 +0000
(14:28 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 28 Apr 2011 18:28:41 +0000
(14:28 -0400)
sfa/client/sfiListSlivers.py
patch
|
blob
|
history
diff --git
a/sfa/client/sfiListSlivers.py
b/sfa/client/sfiListSlivers.py
index
685521c
..
08173ec
100755
(executable)
--- a/
sfa/client/sfiListSlivers.py
+++ b/
sfa/client/sfiListSlivers.py
@@
-1,7
+1,8
@@
#! /usr/bin/env python
import sys
#! /usr/bin/env python
import sys
-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 slivers in the RSpec. " +
command = Commands(usage="%prog [options]",
description="List all slivers in the RSpec. " +
@@
-10,19
+11,22
@@
command = Commands(usage="%prog [options]",
command.add_show_attributes_option()
command.prep()
command.add_show_attributes_option()
command.prep()
-nodes = command.rspec.get_sliver_list()
-if command.opts.showatt:
- defaults = command.rspec.get_default_sliver_attributes()
- if defaults:
- print "ALL NODES"
- for (name, value) in defaults:
- print " %s: %s" % (name, value)
-
-for node in nodes:
- print node
+if command.opts.infile:
+ rspec = parse_rspec(command.opts.infile)
+ nodes = rspec.get_nodes_with_slivers()
+
if command.opts.showatt:
if command.opts.showatt:
- atts = command.rspec.get_sliver_attributes(node)
- for (name, value) in atts:
- print " %s: %s" % (name, value)
+ defaults = rspec.get_default_sliver_attributes()
+ if defaults:
+ print "ALL NODES"
+ for (name, value) in defaults:
+ print " %s: %s" % (name, value)
+
+ for node in nodes:
+ print node
+ if command.opts.showatt:
+ atts = rspec.get_sliver_attributes(node)
+ for (name, value) in atts:
+ print " %s: %s" % (name, value)