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/473842 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=586ed0ff1ef c7a2b0fb36031f6 cacef1e26faf05
Committed: https:/
Submitter: Jenkins
Branch: stable/ocata
commit 586ed0ff1efc7a2 b0fb36031f6cace f1e26faf05
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