def _ml2_md_extend_address_scope_dict(self, result, address_scope): session = patch_neutron.get_current_session() with session.begin(subtransactions=True): if self.refresh_address_scope_db_obj: session.refresh(address_scope) self.extension_manager.extend_address_scope_dict( session, address_scope, result)
def _ml2_md_extend_subnetpool_dict(self, result, subnetpooldb): session = patch_neutron.get_current_session() with session.begin(subtransactions=True): if self.refresh_subnetpool_db_obj: session.refresh(subnetpooldb) self.extension_manager.extend_subnetpool_dict( session, subnetpooldb, result)
def _ml2_md_extend_port_dict(result, portdb): plugin = directory.get_plugin() session = patch_neutron.get_current_session() # REVISIT: Check if transaction begin is still # required here, and if so, if reader pattern # can be used instead (will require getting the # current context) with session.begin(subtransactions=True): plugin.extension_manager.extend_port_dict(session, portdb, result)
def _ml2_md_extend_address_scope_dict(result, address_scope): plugin = directory.get_plugin() session = patch_neutron.get_current_session() # REVISIT: Check if transaction begin is still # required here, and if so, if reader pattern # can be used instead (will require getting the # current context) with session.begin(subtransactions=True): plugin.extension_manager.extend_address_scope_dict( session, address_scope, result)
def _ml2_md_extend_network_dict(self, result, netdb): session = patch_neutron.get_current_session() with session.begin(subtransactions=True): if self.refresh_network_db_obj: # In deployment it has been observed that the subnet # backref is sometimes stale inside the driver's # extend_network_dict. The call to refresh below # ensures the backrefs and other attributes are # not stale. session.refresh(netdb) self.extension_manager.extend_network_dict(session, netdb, result)
def _extend_router_dict_bulk_apic(routers, _): LOG.debug("APIC AIM L3 Plugin bulk extending router dict: %s", routers) if not routers: return plugin = directory.get_plugin(constants.L3) session = patch_neutron.get_current_session() try: plugin._md.extend_router_dict_bulk(session, routers) plugin._include_router_extn_attr_bulk(session, routers) except Exception: with excutils.save_and_reraise_exception(): LOG.exception("APIC AIM _extend_router_dict_bulk failed")
def _ml2_md_extend_address_scope_dict_bulk(results, _): plugin = directory.get_plugin() session = patch_neutron.get_current_session() with session.begin(subtransactions=True): plugin.extension_manager.extend_address_scope_dict_bulk(session, results)
def _ml2_md_extend_address_scope_dict_bulk(results, _): plugin = directory.get_plugin() session = patch_neutron.get_current_session() with session.begin(subtransactions=True): plugin.extension_manager.extend_address_scope_dict_bulk( session, results)