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:
50c9360
)
fix bug in get_rspec when trying to get the rspec for a slice that doesnt exist
author
Tony Mack
<tmack@cs.princeton.edu>
Wed, 1 Apr 2009 15:11:07 +0000
(15:11 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Wed, 1 Apr 2009 15:11:07 +0000
(15:11 +0000)
geni/aggregate.py
patch
|
blob
|
history
diff --git
a/geni/aggregate.py
b/geni/aggregate.py
index
b94e572
..
4b9f8a3
100644
(file)
--- a/
geni/aggregate.py
+++ b/
geni/aggregate.py
@@
-263,8
+263,12
@@
class Aggregate(GeniServer):
elif type in ['slice']:
slicename = hrn_to_pl_slicename(hrn)
slices = self.shell.GetSlices(self.auth, [slicename])
elif type in ['slice']:
slicename = hrn_to_pl_slicename(hrn)
slices = self.shell.GetSlices(self.auth, [slicename])
- node_ids = slices[0]['node_ids']
- nodes = self.shell.GetNodes(self.auth, node_ids)
+ if not slices:
+ nodes = []
+ else:
+ slice = slices[0]
+ node_ids = slice['node_ids']
+ nodes = self.shell.GetNodes(self.auth, node_ids)
# Filter out whitelisted nodes
public_nodes = lambda n: n.has_key('slice_ids_whitelist') and not n['slice_ids_whitelist']
# Filter out whitelisted nodes
public_nodes = lambda n: n.has_key('slice_ids_whitelist') and not n['slice_ids_whitelist']