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:
6594eca
)
raise exception if there are no slivers
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 26 Dec 2011 04:42:17 +0000
(23:42 -0500)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 26 Dec 2011 04:42:17 +0000
(23:42 -0500)
sfa/plc/pldriver.py
patch
|
blob
|
history
diff --git
a/sfa/plc/pldriver.py
b/sfa/plc/pldriver.py
index
e153894
..
3f01e7f
100644
(file)
--- a/
sfa/plc/pldriver.py
+++ b/
sfa/plc/pldriver.py
@@
-625,6
+625,10
@@
class PlDriver (Driver):
# report about the local nodes only
nodes = self.shell.GetNodes({'node_id':slice['node_ids'],'peer_id':None},
['node_id', 'hostname', 'site_id', 'boot_state', 'last_contact'])
+
+ if len(nodes) == 0:
+ raise SliverDoesNotExist("You have not allocated any slivers here")
+
site_ids = [node['site_id'] for node in nodes]
result = {}