describe should return an empty rspec instead of an error if there are not allocated...
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 5 Dec 2012 18:22:50 +0000 (13:22 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 5 Dec 2012 18:22:50 +0000 (13:22 -0500)
sfa/openstack/osaggregate.py
sfa/planetlab/plaggregate.py

index 8a48fe2..066e7e4 100644 (file)
@@ -71,9 +71,6 @@ class OSAggregate:
         tenant_name = OSXrn(xrn=urns[0], type='slice').get_tenant_name()
         self.driver.shell.nova_manager.connect(tenant=tenant_name)
         instances = self.get_instances(urns)
-        if len(instances) == 0:
-            raise SliverDoesNotExist("You have not allocated any slivers here")
-
         # lookup the sliver allocations
         sliver_ids = [sliver['sliver_id'] for sliver in slivers]
         constraint = SliverAllocation.sliver_id.in_(sliver_ids)
index 7cb9ad6..e55a293 100644 (file)
@@ -354,8 +354,6 @@ class PlAggregate:
         # get slivers
         geni_slivers = []
         slivers = self.get_slivers(urns, options) 
-        if len(slivers) == 0:
-            raise SliverDoesNotExist("You have not allocated any slivers here for %s" % str(urns))
         rspec.xml.set('expires',  datetime_to_string(utcparse(slivers[0]['expires'])))
 
         # lookup the sliver allocations