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 name error
[sfa.git]
/
sfa
/
plc
/
network.py
diff --git
a/sfa/plc/network.py
b/sfa/plc/network.py
index
d8f0c1d
..
71f0bd1
100644
(file)
--- a/
sfa/plc/network.py
+++ b/
sfa/plc/network.py
@@
-347,6
+347,7
@@
class Network:
try:
val = self.sites[id]
except:
try:
val = self.sites[id]
except:
+ self.api.logger.error("Invalid RSpec: site ID %s not found" % id )
raise InvalidRSpec("site ID %s not found" % id)
return val
raise InvalidRSpec("site ID %s not found" % id)
return val
@@
-566,8
+567,12
@@
class Network:
"""
tmp = []
for node in api.plshell.GetNodes(api.plauth, {'peer_id': None}):
"""
tmp = []
for node in api.plshell.GetNodes(api.plauth, {'peer_id': None}):
- t = node['node_id'], Node(self, node)
- tmp.append(t)
+ try:
+ t = node['node_id'], Node(self, node)
+ tmp.append(t)
+ except:
+ self.api.logger.error("Failed to add node %s (%s) to RSpec" % (node['hostname'], node['node_id']))
+
return dict(tmp)
def get_ifaces(self, api):
return dict(tmp)
def get_ifaces(self, api):