diff --git a/neutron_taas/db/taas_db.py b/neutron_taas/db/taas_db.py index 12fc3b19..f39737ab 100644 --- a/neutron_taas/db/taas_db.py +++ b/neutron_taas/db/taas_db.py @@ -161,8 +161,8 @@ class Taas_db_Mixin(taas_extension.TaasPluginBase): return ns_data = { - 'physical_network': ns['physical_network'], - 'network_type': ns['network_type'] + 'physical_network': ns[1], + 'network_type': ns[2] } return ns_data diff --git a/neutron_taas/tests/unit/db/test_taas_db.py b/neutron_taas/tests/unit/db/test_taas_db.py index d97d0f9e..a7b658d2 100644 --- a/neutron_taas/tests/unit/db/test_taas_db.py +++ b/neutron_taas/tests/unit/db/test_taas_db.py @@ -60,54 +60,54 @@ class TaaSDbTestCase(testlib_api.SqlTestCase): def _get_tap_service(self, tap_service_id): """Helper method to retrieve tap service.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.get_tap_service(self.ctx, tap_service_id) def _get_tap_services(self): """Helper method to retrieve all tap services.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.get_tap_services(self.ctx) def _create_tap_service(self, tap_service): """Helper method to create tap service.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.create_tap_service(self.ctx, tap_service) def _update_tap_service(self, tap_service_id, tap_service): """Helper method to update tap service.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.update_tap_service(self.ctx, tap_service_id, tap_service) def _delete_tap_service(self, tap_service_id): """Helper method to delete tap service.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.delete_tap_service(self.ctx, tap_service_id) def _get_tap_flow(self, tap_flow_id): """Helper method to retrieve tap flow.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.get_tap_flow(self.ctx, tap_flow_id) def _get_tap_flows(self): """Helper method to retrieve all tap flows.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.get_tap_flows(self.ctx) def _create_tap_flow(self, tap_flow): """Helper method to create tap flow.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.create_tap_flow(self.ctx, tap_flow) def _update_tap_flow(self, tap_flow_id, tap_flow): """Helper method to update tap flow.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.update_tap_flow(self.ctx, tap_flow_id, tap_flow) def _delete_tap_flow(self, tap_flow_id): """Helper method to delete tap flow.""" - with self.ctx.session.begin(subtransactions=True): + with self.ctx.session.begin(): return self.mixin.delete_tap_flow(self.ctx, tap_flow_id) def test_tap_service_get(self):