Comment 24 for bug 1327406

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/101724
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=46e88320e6e6231550f3e2b40312c51f55e059f5
Submitter: Jenkins
Branch: master

commit 46e88320e6e6231550f3e2b40312c51f55e059f5
Author: Mike Spreitzer <email address hidden>
Date: Sun Jun 22 02:09:17 2014 +0000

    Made unassigned networks visible in flat networking

    This change fixes a bug in Nova's
    GET /v2/{tenant_id}/os-networks

    The doc
    http://docs.openstack.org/api/openstack-compute/2/content/GET_os-networks-v2_ListNetworks__v2__tenant_id__os-networks_ext-os-networks.html
    says that "Lists networks that are available to the tenant".

    When invoked by a non-admin user it was returning only networks
    assigned to the user's tenant. But in flat and flat DHCP nova
    networking, networks CAN NOT be assigned to tenants --- thus a
    non-admin user would get zero networks from this operation.

    The fix was to make this operation conditionally use an option already
    present in the lower-level code to "allow_none" when fetching the list
    of networks, meaning to include networks whose project_id field in the
    DB held "none" (meaning the network is not assigned to a tenant). The
    condition under which this is done is that the Nova configuration
    option named network_manager contains the string
    "'nova.network.manager.Flat" --- which is true for flat and flat DHCP
    nova networking and false for VLAN nova networking.

    Change-Id: I64c5a3f31c912cca6b5b9987152ba7a9b3f5987d
    Closes-Bug: #1327406