X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fcore%2Fxoslib%2Fobjects%2Fsliceplus.py;fp=planetstack%2Fcore%2Fxoslib%2Fobjects%2Fsliceplus.py;h=bbab060a5400e6852b4cf6808791d103515f3492;hb=b1e77033834890dbf62b822bbf48f241c16b3d12;hp=7aa6112a7b2407d7eb7ad42e47e30a238d2a207b;hpb=a8f51083a554b27676f0b194a67cd7b123962998;p=plstackapi.git diff --git a/planetstack/core/xoslib/objects/sliceplus.py b/planetstack/core/xoslib/objects/sliceplus.py index 7aa6112..bbab060 100644 --- 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