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:
a8f5108
)
throw error if no nodes in site
author
Scott Baker
<smbaker@gmail.com>
Wed, 14 Jan 2015 00:28:05 +0000
(16:28 -0800)
committer
Scott Baker
<smbaker@gmail.com>
Wed, 14 Jan 2015 00:28:05 +0000
(16:28 -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
7aa6112
..
bbab060
100644
(file)
--- a/
planetstack/core/xoslib/objects/sliceplus.py
+++ b/
planetstack/core/xoslib/objects/sliceplus.py
@@
-96,6
+96,7
@@
class SlicePlus(Slice, PlusObjectMixin):
super(SlicePlus, self).save(*args, **kwargs)
if self._update_site_allocation:
+ self.save_site_allocation(noAct=True)
self.save_site_allocation()
def save_site_allocation(self, noAct = False):
@@
-124,8
+125,7
@@
class SlicePlus(Slice, PlusObjectMixin):
nodes = self.get_site_node_allocation([site])
if (not nodes):
- print "XXX no nodes in site", site_name
- continue
+ raise ValueError("no nodes in site %s" % site_name)
while (len(slivers) < desired_allocation):
# pick the least allocated node