remove sliver allocation record when deleting slivers
[sfa.git] / sfa / planetlab / pldriver.py
index df4bb5f..248bab1 100644 (file)
@@ -700,14 +700,12 @@ class PlDriver (Driver):
             constraint = SliverAllocation.sliver_id.in_(sliver_ids)
             cur_sliver_allocations = dbsession.query(SliverAllocation).filter(constraint)
             for sliver_allocation in cur_sliver_allocations:
-                sliver_allocation.allocation_state = 'geni_unallocated'
+                dbsession.delete(sliver_allocation)
             dbsession.commit()
         finally:
             if peer:
                 self.shell.BindObjectToPeer('slice', slice_id, peer, slice['peer_slice_id'])
 
-        
-
         # prepare return struct
         geni_slivers = []
         for node_id in node_ids: