Remove check if set_extra_attr_value is run in the transaction
We moved all our code to the new enginefacade already so we don't use nested transactions at all thus we don't need that check anymore. Partially-Implements blueprint: enginefacade-switch Change-Id: I957151a7cac4285926864029c844efd76b052c5b
This commit is contained in:
parent
08ff64034e
commit
ce19fc9493
@ -54,10 +54,6 @@ class ExtraAttributesMixin(object):
|
||||
router_db['extra_attributes'] = new
|
||||
|
||||
def set_extra_attr_value(self, context, router_db, key, value):
|
||||
if not context.session.is_active:
|
||||
raise RuntimeError(_("set_extra_attr_value cannot be called "
|
||||
"out of a transaction."))
|
||||
|
||||
# set a single value explicitly
|
||||
if key in get_attr_info():
|
||||
info = get_attr_info()[key]
|
||||
|
@ -628,11 +628,6 @@ class ExtraAttributesMixinTestCase(testlib_api.SqlTestCase):
|
||||
self.mixin.set_extra_attr_value(self.ctx, self.router,
|
||||
'bad', 'value')
|
||||
|
||||
def test_set_attrs_and_extend_no_transaction(self):
|
||||
with testtools.ExpectedException(RuntimeError):
|
||||
self.mixin.set_extra_attr_value(self.ctx, self.router,
|
||||
'ha_vr_id', 99)
|
||||
|
||||
def test__extend_extra_router_dict_defaults(self):
|
||||
rdict = {}
|
||||
self.mixin._extend_extra_router_dict(rdict, self.router)
|
||||
|
Loading…
Reference in New Issue
Block a user