Comment 2 for bug 1745099

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

Reviewed: https://review.openstack.org/537283
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=677a4d82358ac453744716952f6227bd6534f352
Submitter: Zuul
Branch: master

commit 677a4d82358ac453744716952f6227bd6534f352
Author: Kaifeng Wang <email address hidden>
Date: Wed Jan 24 15:10:15 2018 +0800

    Can not set portgroup mode as a number

    When creating portgroup, mode accepts a string or a number, e.g.:
    active-backup or 1.

    While setting new mode for an existing portgroup will raise an error, if
    the mode is passed as a number:

        # openstack --os-baremetal-api-version 1.26 baremetal port group \
        set c42f9bf8-3b5d-4673-b6c1-832c10e4fecf --mode 1
        Invalid input for field/attribute mode. Value: '1'. Wrong type. Expected
        '<type 'unicode'>', got '<type 'int'>' (HTTP 400)

    This patch add quotes to mode string to avoid unwanted conversion.

    Change-Id: I1bfe6d203c5420f06c8d7ead487250da1847e103
    Closes-Bug: #1745099