git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix case of Sfav1Sliver
[sfa.git]
/
sfa
/
client
/
sfiListNodes.py
diff --git
a/sfa/client/sfiListNodes.py
b/sfa/client/sfiListNodes.py
index
305bf25
..
3de1657
100755
(executable)
--- a/
sfa/client/sfiListNodes.py
+++ b/
sfa/client/sfiListNodes.py
@@
-2,7
+2,8
@@
import sys
from sfa.client.sfi_commands import Commands
import sys
from sfa.client.sfi_commands import Commands
-from sfa.rspecs.rspec_parser import parse_rspec
+from sfa.rspecs.rspec import RSpec
+from sfa.util.plxrn import xrn_to_hostname
command = Commands(usage="%prog [options]",
description="List all nodes in the RSpec. " +
command = Commands(usage="%prog [options]",
description="List all nodes in the RSpec. " +
@@
-11,13
+12,17
@@
command = Commands(usage="%prog [options]",
command.prep()
if command.opts.infile:
command.prep()
if command.opts.infile:
- rspec =
parse_rs
pec(command.opts.infile)
- nodes = rspec.get_nodes()
+ rspec =
RS
pec(command.opts.infile)
+ nodes = rspec.
version.
get_nodes()
if command.opts.outfile:
sys.stdout = open(command.opts.outfile, 'w')
for node in nodes:
if command.opts.outfile:
sys.stdout = open(command.opts.outfile, 'w')
for node in nodes:
- print node
+ hostname = None
+ if node.get('component_id'):
+ hostname = xrn_to_hostname(node['component_id'])
+ if hostname:
+ print hostname