def _get_external_network_dict(self, context, port_db):
if port_db.device_owner == DEVICE_OWNER_ROUTER_GW:<EOL><INDENT>network = self._core_plugin.get_network(context,<EOL>port_db.network_id)<EOL><DEDENT>else:<EOL><INDENT>router = self.l3_plugin.get_router(context,<EOL>port_db.device_id)<EOL>ext_gw_info = router.get(EXTERNAL_GW_INFO)<EOL>if not ext_gw_info:<EOL><INDENT>return {}, None<EOL><DEDENT>network = self._core_plugin.get_network(context,<EOL>ext_gw_info['<STR_LIT>'])<EOL><DEDENT>external_network = self.get_ext_net_name(network['<STR_LIT:name>'])<EOL>transit_net = self.transit_nets_cfg.get(<EOL>external_network) or self._default_ext_dict<EOL>transit_net['<STR_LIT>'] = external_network<EOL>return transit_net, network<EOL>
Get external network information

        Get the information about the external network,
        so that it can be used to create the hidden port,
        subnet, and network.