git://git.onelab.eu
/
plstackapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51367cd
)
fix error when creating slice using sliceplus object
author
Scott Baker
<smbaker@gmail.com>
Mon, 19 Jan 2015 16:43:50 +0000
(08:43 -0800)
committer
Scott Baker
<smbaker@gmail.com>
Mon, 19 Jan 2015 16:43:50 +0000
(08:43 -0800)
planetstack/core/xoslib/objects/sliceplus.py
patch
|
blob
|
history
diff --git
a/planetstack/core/xoslib/objects/sliceplus.py
b/planetstack/core/xoslib/objects/sliceplus.py
index
cd86fce
..
7e9836c
100644
(file)
--- a/
planetstack/core/xoslib/objects/sliceplus.py
+++ b/
planetstack/core/xoslib/objects/sliceplus.py
@@
-131,6
+131,11
@@
class SlicePlus(Slice, PlusObjectMixin):
def save_site_allocation(self, noAct = False, reset=False):
print "save_site_allocation, reset=",reset
+ if (not self._site_allocation):
+ # Must be a sliver that was just created, and has not site_allocation
+ # field.
+ return
+
all_slice_slivers = self.slivers.all()
for site_name in self._site_allocation.keys():
desired_allocation = self._site_allocation[site_name]