'Get the default external network for the deployment.'

def _get_default_external_network(self, context):

    default_external_networks = net_obj.ExternalNetwork.get_objects(context, is_default=True)
    if (not default_external_networks):
        LOG.error(_LE('Unable    to    find    default    external    network    for    deployment,    please    create/assign    one    to    allow    auto-allocation    to    work    correctly.'))
        raise exceptions.AutoAllocationFailure(reason=_('No    default    router:external    network'))
    if (len(default_external_networks) > 1):
        LOG.error(_LE("Multiple    external    default    networks    detected.    Network    %s    is    true    'default'."), default_external_networks[0]['network_id'])
    return default_external_networks[0].network_id
