Comment 2 for bug 1545199

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

Reviewed: https://review.openstack.org/279378
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d38aeade9db7169955b4524a5fc8d814067dec15
Submitter: Jenkins
Branch: master

commit d38aeade9db7169955b4524a5fc8d814067dec15
Author: Armando Migliaccio <email address hidden>
Date: Thu Feb 11 20:56:20 2016 -0800

    Preserve subnet_create behavior in presence of subnet pools

    The development of the auto_allocate extension, which relies on subnet
    pools, revealed some discrepancies in the behavior of the subnet_create
    API: if a user specifies a cidr on subnet_create like he/she is used
    to, the API outcome changes in presence of default subnetpools. For
    instance the command 'neutron subnet-create network <cidr>' returns a
    subnet associated to a pool, if a default pool exists, but it does not
    otherwise. At the same time, attempting to create a subnet without
    passing any detail but the ip version also behaves unexpectedly
    depending on the state of the system.

    Whilst this could be considered convenient in some circumstances,
    it is problematic for a couple of reasons: a) it breaks a well defined
    contract (backward compat of the subnet-create command), and b) it
    leads to ambiguity of the API.

    This patch restores the semantic of the subnet_create API where it is
    mandatory to specify CIDR/IP version regardless of the conditions
    under which the request is issued. On the other hand, associating
    subnets to subnet pools will have to be more prescriptive, and
    require the user to explicitly state his/her intentions when creating
    the subnet: if a user does want a subnet (CIDR) to belong to a subnet
    pool, he/she will have to state so, either by specifying a subnetpool
    name/uuid, or by asking for a default one.

    This will be tackled as a follow-up, especially in order to address the
    needs of prefix delegation which currently rely on the ambiguous
    behavior that this patch is fixing.

    Closes-bug: 1545199

    DocImpact: subnetpools can be used to simplify IPAM, and can be specified
    during subnet creation.

    Change-Id: Idf516ed9db24d779742cdff0584b48182a8502d6