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:
1a4eb1b
)
fix bug in AddSlice call
author
Tony Mack
<tmack@cs.princeton.edu>
Tue, 16 Jun 2009 15:14:05 +0000
(15:14 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Tue, 16 Jun 2009 15:14:05 +0000
(15:14 +0000)
geni/util/slices.py
patch
|
blob
|
history
diff --git
a/geni/util/slices.py
b/geni/util/slices.py
index
f60c23b
..
595bc28
100644
(file)
--- a/
geni/util/slices.py
+++ b/
geni/util/slices.py
@@
-155,8
+155,13
@@
class Slices(SimpleStorage):
site_id = self.api.plshell.AddSite(self.api.plauth, site)
else:
site = sites[0]
site_id = self.api.plshell.AddSite(self.api.plauth, site)
else:
site = sites[0]
-
- self.api.plshell.AddSlice(self.api.plauth, slice)
+
+ slice_fields = {}
+ slice_keys = ['name', 'url', 'description']
+ for key in slice_keys:
+ if key in slice and slice[key]:
+ slice_fields[key] = slice[key]
+ self.api.plshell.AddSlice(self.api.plauth, slice_fields)
# get the list of valid slice users from the registry and make
# they are added to the slice
# get the list of valid slice users from the registry and make
# they are added to the slice