Replace is_valid_boolstr with strutils.bool_from_string method
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Rajesh Tailor |
Bug Description
Replace is_valid_boolstr with strutils.
to remove code duplication. Also remove is_valid_boolstr method from cinder/utils module.
At some places in code where strutils.
unnecessary checking of basestring or bool type is also done.
Need to refactor that piece of code and remove unnecessary checking,
as strutils.
accordingly boolean after taking default params into consideration as well.
for eg.:
Example: admin_actions.
if isinstance(
try:
except ValueError:
elif not isinstance(
raise exc.HTTPBadRequest(
should be
try:
force_
except ValueError:
msg = _("Invalid value '%s' for force_host_copy.") % force_host_copy
raise exc.HTTPBadRequ
Changed in cinder: | |
assignee: | nobody → Rajesh Tailor (rajesh-tailor) |
Changed in cinder: | |
status: | In Progress → Fix Committed |
Changed in cinder: | |
milestone: | none → liberty-2 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | liberty-2 → 7.0.0 |
Fix proposed to branch: master /review. openstack. org/187470
Review: https:/