On force-down action API, its forced_down parameter is defined as
parameter_types.boolean which allows string values like 'True',
'False', etc. However the API code didn't contain bool_from_string
call which converts string value to boolean value. In addition,
the parameter is defined as BooleanField in the service object.
So if the string value is passed on forced_down parameter, HTTP
500 error happaned. This patch fixes this problem by adding
bool_from_string call.
Closes-Bug: #1697497
Change-Id: Ifca579d1bb43ece190c633b3ea1ffa476daf6e34
(cherry picked from commit d0d7fc3a19dba48fa988b995db620e0da066381a)
Reviewed: https:/ /review. openstack. org/473843 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=9bc7db594ff 8b15c3e6711f9a3 430fbb43ea66e1
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 9bc7db594ff8b15 c3e6711f9a3430f bb43ea66e1
Author: Ken'ichi Ohmichi <email address hidden>
Date: Mon Jun 12 12:37:20 2017 -0700
Add bool_from_string for force-down action
On force-down action API, its forced_down parameter is defined as types.boolean which allows string values like 'True', from_string call.
parameter_
'False', etc. However the API code didn't contain bool_from_string
call which converts string value to boolean value. In addition,
the parameter is defined as BooleanField in the service object.
So if the string value is passed on forced_down parameter, HTTP
500 error happaned. This patch fixes this problem by adding
bool_
Closes-Bug: #1697497
Change-Id: Ifca579d1bb43ec e190c633b3ea1ff a476daf6e34 fa988b995db620e 0da066381a)
(cherry picked from commit d0d7fc3a19dba48