git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
693051c
)
fix bug in set_allocations
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Sat, 1 Dec 2012 03:42:37 +0000
(22:42 -0500)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Sat, 1 Dec 2012 03:42:37 +0000
(22:42 -0500)
sfa/storage/model.py
patch
|
blob
|
history
diff --git
a/sfa/storage/model.py
b/sfa/storage/model.py
index
e490251
..
5495800
100644
(file)
--- a/
sfa/storage/model.py
+++ b/
sfa/storage/model.py
@@
-334,7
+334,7
@@
class SliverAllocation(Base,AlchemyObj):
return state
@staticmethod
return state
@staticmethod
- def set_allocations(s
elf, s
liver_ids, state):
+ def set_allocations(sliver_ids, state):
from sfa.storage.alchemy import dbsession
if not isinstance(sliver_ids, list):
sliver_ids = [sliver_ids]
from sfa.storage.alchemy import dbsession
if not isinstance(sliver_ids, list):
sliver_ids = [sliver_ids]
@@
-344,7
+344,7
@@
class SliverAllocation(Base,AlchemyObj):
sliver_ids_found = []
for sliver_allocation in sliver_allocations:
sliver_allocation.allocation_state = state
sliver_ids_found = []
for sliver_allocation in sliver_allocations:
sliver_allocation.allocation_state = state
- sliver_ids_found
= sliver_allocation.sliver_id
+ sliver_ids_found
.append(sliver_allocation.sliver_id)
# Some states may not have been updated becuase no sliver allocation state record
# exists for the sliver. Insert new allocation records for these slivers and set
# Some states may not have been updated becuase no sliver allocation state record
# exists for the sliver. Insert new allocation records for these slivers and set
@@
-356,7
+356,7
@@
class SliverAllocation(Base,AlchemyObj):
dbsession.commit()
@staticmethod
dbsession.commit()
@staticmethod
- def delete_allocations(s
elf, s
liver_ids):
+ def delete_allocations(sliver_ids):
from sfa.storage.alchemy import dbsession
if not isinstance(sliver_ids, list):
sliver_ids = [sliver_ids]
from sfa.storage.alchemy import dbsession
if not isinstance(sliver_ids, list):
sliver_ids = [sliver_ids]