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
Reviewed: https:/ /review. openstack. org/537283 /git.openstack. org/cgit/ openstack/ python- ironicclient/ commit/ ?id=677a4d82358 ac453744716952f 6227bd6534f352
Committed: https:/
Submitter: Zuul
Branch: master
commit 677a4d82358ac45 3744716952f6227 bd6534f352
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 \ 3b5d-4673- b6c1-832c10e4fe cf --mode 1
set c42f9bf8-
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: I1bfe6d203c5420 f06c8d7ead48725 0da1847e103
Closes-Bug: #1745099