git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
store slice_urn in sliver_allocation table
[sfa.git]
/
sfa
/
storage
/
model.py
diff --git
a/sfa/storage/model.py
b/sfa/storage/model.py
index
1535297
..
3f600d4
100644
(file)
--- a/
sfa/storage/model.py
+++ b/
sfa/storage/model.py
@@
-317,6
+317,7
@@
class SliverAllocation(Base,AlchemyObj):
sliver_id = Column(String, primary_key=True)
client_id = Column(String)
component_id = Column(String)
sliver_id = Column(String, primary_key=True)
client_id = Column(String)
component_id = Column(String)
+ slice_urn = Column(String)
allocation_state = Column(String)
def __init__(self, **kwds):
allocation_state = Column(String)
def __init__(self, **kwds):
@@
-326,6
+327,8
@@
class SliverAllocation(Base,AlchemyObj):
self.client_id = kwds['client_id']
if 'component_id' in kwds:
self.component_id = kwds['component_id']
self.client_id = kwds['client_id']
if 'component_id' in kwds:
self.component_id = kwds['component_id']
+ if 'slice_urn' in kwds:
+ self.slice_urn = kwds['slice_urn']
if 'allocation_state' in kwds:
self.allocation_state = kwds['allocation_state']
if 'allocation_state' in kwds:
self.allocation_state = kwds['allocation_state']
@@
-389,6
+392,7
@@
class SliverAllocation(Base,AlchemyObj):
record.sliver_id = self.sliver_id
record.client_id = self.client_id
record.component_id = self.component_id
record.sliver_id = self.sliver_id
record.client_id = self.client_id
record.component_id = self.component_id
+ record.slice_urn = self.slice_urn
record.allocation_state = self.allocation_state
dbsession.commit()
record.allocation_state = self.allocation_state
dbsession.commit()