cluster-template-update doesn't work for "labels"

Bug #1659189 reported by yatin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-magnumclient
Fix Released
Undecided
M V P Nitesh

Bug Description

Reproduction step:-
1) create a cluster-template
2) magnum cluster-template-update <cluster-template name or id> replace labels="key1=val1"

Error:-'ERROR: A dict is required in field labels, not a unicode'

The labels should be allowed to update:

magnum cluster-template-create handles(creating a dict from key value pair because magnum api expects a Dict for labels) using magnum.common.utils.handle_labels but magnum-cluster-update doesn't care for labels(creating a dict from key, value pairs)

M V P Nitesh (m-nitesh)
Changed in python-magnumclient:
assignee: nobody → M V P Nitesh (m-nitesh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-magnumclient (master)

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

Changed in python-magnumclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-magnumclient (master)

Reviewed: https://review.openstack.org/496136
Committed: https://git.openstack.org/cgit/openstack/python-magnumclient/commit/?id=c165071ff8fee67adbc6bf9acee0368cdebf5503
Submitter: Zuul
Branch: master

commit c165071ff8fee67adbc6bf9acee0368cdebf5503
Author: M V P Nitesh <email address hidden>
Date: Tue Aug 22 13:00:57 2017 +0530

    Now cluster-template-update works for "labels"

    Now we are handling the label values converting them as a dictionary.
    But as magnum-api only accepts the input as string. We are converting
    the dictionary into string and passing to magnum-api. It is parsing
    the string to dictionary and storing the label value a dictionary.

    Change-Id: I2cec19e24c6dd32e209ca65a26a2f1999d8289e0
    Depends-on: I4d64da78dc4ed4d5599533b54861b65bce609c28
    Closes-Bug: #1659189

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/547979

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

Reviewed: https://review.openstack.org/547979
Committed: https://git.openstack.org/cgit/openstack/python-magnumclient/commit/?id=7ed2d75de362d4b0495a3666d4124c73cef28ddf
Submitter: Zuul
Branch: stable/queens

commit 7ed2d75de362d4b0495a3666d4124c73cef28ddf
Author: M V P Nitesh <email address hidden>
Date: Tue Aug 22 13:00:57 2017 +0530

    Now cluster-template-update works for "labels"

    Now we are handling the label values converting them as a dictionary.
    But as magnum-api only accepts the input as string. We are converting
    the dictionary into string and passing to magnum-api. It is parsing
    the string to dictionary and storing the label value a dictionary.

    Change-Id: I2cec19e24c6dd32e209ca65a26a2f1999d8289e0
    Depends-on: I4d64da78dc4ed4d5599533b54861b65bce609c28
    Closes-Bug: #1659189
    (cherry picked from commit c165071ff8fee67adbc6bf9acee0368cdebf5503)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-magnumclient 2.9.0

This issue was fixed in the openstack/python-magnumclient 2.9.0 release.

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

This issue was fixed in the openstack/python-magnumclient 2.10.0 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.