'Find UUID of single external network for this agent.'

def _fetch_external_net_id(self, force=False):

    if self.conf.gateway_external_network_id:
        return self.conf.gateway_external_network_id
    if (not self.conf.external_network_bridge):
        return
    if ((not force) and self.target_ex_net_id):
        return self.target_ex_net_id
    try:
        self.target_ex_net_id = self.plugin_rpc.get_external_network_id(self.context)
        return self.target_ex_net_id
    except oslo_messaging.RemoteError as e:
        with excutils.save_and_reraise_exception() as ctx:
            if (e.exc_type == 'TooManyExternalNetworks'):
                ctx.reraise = False
                msg = _("The    'gateway_external_network_id'    option    must    be    configured    for    this    agent    as    Neutron    has    more    than    one    external    network.")
                raise Exception(msg)
