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
some odd code was obviously broken, it was using a str variable and then
[sfa.git]
/
clientbin
/
sfiListSlivers.py
diff --git
a/clientbin/sfiListSlivers.py
b/clientbin/sfiListSlivers.py
index
c9611d0
..
83edd3c
100755
(executable)
--- a/
clientbin/sfiListSlivers.py
+++ b/
clientbin/sfiListSlivers.py
@@
-1,4
+1,4
@@
-#!
/usr/bin/env python
+#!
/usr/bin/env python3
import sys
from sfa.client.sfi_commands import Commands
import sys
from sfa.client.sfi_commands import Commands
@@
-8,8
+8,8
@@
from sfa.rspecs.rspec import RSpec
from sfa.planetlab.plxrn import xrn_to_hostname
command = Commands(usage="%prog [options]",
from sfa.planetlab.plxrn import xrn_to_hostname
command = Commands(usage="%prog [options]",
- description="List all slivers in the RSpec. " +
- "Use this to display the list of nodes belonging to " +
+ description="List all slivers in the RSpec. " +
+ "Use this to display the list of nodes belonging to " +
"the slice.")
command.add_show_attributes_option()
command.prep()
"the slice.")
command.add_show_attributes_option()
command.prep()
@@
-17,23
+17,21
@@
command.prep()
if command.opts.infile:
rspec = RSpec(command.opts.infile)
nodes = rspec.version.get_nodes_with_slivers()
if command.opts.infile:
rspec = RSpec(command.opts.infile)
nodes = rspec.version.get_nodes_with_slivers()
-
+
if command.opts.showatt:
defaults = rspec.version.get_default_sliver_attributes()
if defaults:
if command.opts.showatt:
defaults = rspec.version.get_default_sliver_attributes()
if defaults:
- print
"ALL NODES"
+ print
("ALL NODES")
for (name, value) in defaults:
for (name, value) in defaults:
- print
" %s: %s" % (name, value)
+ print
(" %s: %s" % (name, value))
for node in nodes:
hostname = None
if node.get('component_id'):
hostname = xrn_to_hostname(node['component_id'])
if hostname:
for node in nodes:
hostname = None
if node.get('component_id'):
hostname = xrn_to_hostname(node['component_id'])
if hostname:
- print
hostname
+ print
(hostname)
if command.opts.showatt:
atts = rspec.version.get_sliver_attributes(hostname)
for (name, value) in atts:
if command.opts.showatt:
atts = rspec.version.get_sliver_attributes(hostname)
for (name, value) in atts:
- print " %s: %s" % (name, value)
-
-
+ print(" %s: %s" % (name, value))