aggregate_update is broken after conversion to optional args

Bug #1673789 reported by Dan Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Medium
Dan Smith
Newton
Fix Committed
Medium
Matt Riedemann
Ocata
Fix Committed
Medium
Matt Riedemann

Bug Description

In change I778ab7ec54a376c60f19dcc89fe62fcab6e59e42, we moved availability_zone and name to be optional arguments instead of required, positional ones. Due to name clashes in the argument parser, these did not work. For example:

    # nova aggregate-update --name newagg testagg
    .....
    ERROR (BadRequest): Invalid input for field/attribute aggregate.
    Value: {}. {} is not valid under any of the given schemas (HTTP 400) (Request-ID: req-36e35205-6b10-4de3-8270-66b89e0ef1b7)

This is due to the name clash between --name and name in the args object.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/447009

Changed in python-novaclient:
assignee: nobody → Dan Smith (danms)
status: New → In Progress
Matt Riedemann (mriedem)
Changed in python-novaclient:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/447082

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

Reviewed: https://review.openstack.org/447009
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=20f00553d0d8ed791105d5f7fc8798b9ac6a6a53
Submitter: Jenkins
Branch: master

commit 20f00553d0d8ed791105d5f7fc8798b9ac6a6a53
Author: Dan Smith <email address hidden>
Date: Fri Mar 17 07:11:38 2017 -0700

    Fix aggregate_update name and availability_zone clash

    The name and availability_zone arguments to aggregate update were
    replaced by optional parameters in change
    I778ab7ec54a376c60f19dcc89fe62fcab6e59e42. However, the '--name' and
    'name' arguments in the parser would conflict, resulting in only the
    deprecated argument working. Thus, attempting to update the name
    on an aggregate using --name would end up doing a PUT with no new
    name provided.

    Note that there were unit tests for this, but they were not catching
    this problem. So, this removes those tests and adds functional tests
    to poke it.

    Change-Id: Ifef6fdc1a737dd219712a4525d4e34afd3fbd80c
    Closes-Bug: #1673789

Changed in python-novaclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (stable/ocata)

Reviewed: https://review.openstack.org/447082
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=983f7211a872a5be9698d7c57fda41020765a64a
Submitter: Jenkins
Branch: stable/ocata

commit 983f7211a872a5be9698d7c57fda41020765a64a
Author: Dan Smith <email address hidden>
Date: Fri Mar 17 07:11:38 2017 -0700

    Fix aggregate_update name and availability_zone clash

    The name and availability_zone arguments to aggregate update were
    replaced by optional parameters in change
    I778ab7ec54a376c60f19dcc89fe62fcab6e59e42. However, the '--name' and
    'name' arguments in the parser would conflict, resulting in only the
    deprecated argument working. Thus, attempting to update the name
    on an aggregate using --name would end up doing a PUT with no new
    name provided.

    Note that there were unit tests for this, but they were not catching
    this problem. So, this removes those tests and adds functional tests
    to poke it.

    Change-Id: Ifef6fdc1a737dd219712a4525d4e34afd3fbd80c
    Closes-Bug: #1673789
    (cherry picked from commit 20f00553d0d8ed791105d5f7fc8798b9ac6a6a53)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-novaclient 8.0.0

This issue was fixed in the openstack/python-novaclient 8.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-novaclient 7.1.1

This issue was fixed in the openstack/python-novaclient 7.1.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/507816

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (stable/newton)

Reviewed: https://review.openstack.org/507816
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=41aeb89cae68a0e2ce03a248226488d4ba2ea8af
Submitter: Jenkins
Branch: stable/newton

commit 41aeb89cae68a0e2ce03a248226488d4ba2ea8af
Author: Dan Smith <email address hidden>
Date: Fri Mar 17 07:11:38 2017 -0700

    Fix aggregate_update name and availability_zone clash

    The name and availability_zone arguments to aggregate update were
    replaced by optional parameters in change
    I778ab7ec54a376c60f19dcc89fe62fcab6e59e42. However, the '--name' and
    'name' arguments in the parser would conflict, resulting in only the
    deprecated argument working. Thus, attempting to update the name
    on an aggregate using --name would end up doing a PUT with no new
    name provided.

    Note that there were unit tests for this, but they were not catching
    this problem. So, this removes those tests and adds functional tests
    to poke it.

    Change-Id: Ifef6fdc1a737dd219712a4525d4e34afd3fbd80c
    Closes-Bug: #1673789
    (cherry picked from commit 20f00553d0d8ed791105d5f7fc8798b9ac6a6a53)
    (cherry picked from commit 983f7211a872a5be9698d7c57fda41020765a64a)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-novaclient 6.0.2

This issue was fixed in the openstack/python-novaclient 6.0.2 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.