From: Tony Mack Date: Sat, 1 Dec 2012 02:16:42 +0000 (-0500) Subject: added set_allocations() and delete_allocations() X-Git-Tag: sfa-3.0-0~75 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=867d1db7373df4a85422e2461866c98ad362b711 added set_allocations() and delete_allocations() --- diff --git a/sfa/storage/model.py b/sfa/storage/model.py index 972040e6..e490251b 100644 --- a/sfa/storage/model.py +++ b/sfa/storage/model.py @@ -316,9 +316,11 @@ class SliverAllocation(Base,AlchemyObj): sliver_id = Column(String, primary_key=True) allocation_state = Column(String) - def __init__(self, sliver_id, allocation_state): - self.sliver_id = sliver_id - self.allocation_state = allocation_state + def __init__(self, **kwds): + if 'sliver_id' in kwds: + self.sliver_id = kwds['sliver_id'] + if 'allocation_state' in kwds: + self.allocation_state = kwds['allocation_state'] def __repr__(self): result = "