X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fdummy%2Fdummyslices.py;h=7ab94ba276a404de805c95accce08d0f98b7ba40;hb=b06115f40a6fc7403a9a2f47a08fb2520509ea00;hp=dddf1a662882eeb131d316cf4cf5efcc019c7662;hpb=bd37ef89eeabf6cead7be45d26129814cbbe76cd;p=sfa.git diff --git a/sfa/dummy/dummyslices.py b/sfa/dummy/dummyslices.py index dddf1a66..7ab94ba2 100644 --- a/sfa/dummy/dummyslices.py +++ b/sfa/dummy/dummyslices.py @@ -8,7 +8,6 @@ from sfa.util.xrn import Xrn, get_leaf, get_authority, urn_to_hrn from sfa.rspecs.rspec import RSpec from sfa.storage.model import SliverAllocation -from sfa.storage.alchemy import dbsession from sfa.dummy.dummyxrn import DummyXrn, hrn_to_dummy_slicename @@ -107,11 +106,12 @@ class DummySlices: component_id=component_id, slice_urn = slice_urn, allocation_state='geni_allocated') - record.sync() + record.sync(self.driver.api.dbsession()) return resulting_nodes - def verify_slice(self, slice_hrn, slice_record, expiration, options={}): + def verify_slice(self, slice_hrn, slice_record, expiration, options=None): + if options is None: options={} slicename = hrn_to_dummy_slicename(slice_hrn) parts = slicename.split("_") login_base = parts[0] @@ -131,7 +131,8 @@ class DummySlices: return slice - def verify_users(self, slice_hrn, slice_record, users, options={}): + def verify_users(self, slice_hrn, slice_record, users, options=None): + if options is None: options={} slice_name = hrn_to_dummy_slicename(slice_hrn) users_by_email = {} for user in users: @@ -163,7 +164,8 @@ class DummySlices: pass - def verify_keys(self, old_users, new_users, options={}): + def verify_keys(self, old_users, new_users, options=None): + if options is None: options={} # existing keys existing_keys = [] for user in old_users: