Correct checking of swift_enabled service param

The checking of swift_enabled service parameter should be against value
instead of against object. The incorrect checking produced false
positive, as a result Ceph-backed Swift could not be activated.

Closes-Bug: 1796912
Change-Id: I712221f882437f92f1f08e22d5db2265258ccc9e
Signed-off-by: Jack Ding <jack.ding@windriver.com>
This commit is contained in:
Jack Ding 2018-10-10 13:39:36 -04:00
parent 5416d396d9
commit 76724fe4d2

View File

@ -588,7 +588,7 @@ class SBApiHelper(object):
service=constants.SERVICE_TYPE_SWIFT,
section=constants.SERVICE_PARAM_SECTION_SWIFT_CONFIG,
name=constants.SERVICE_PARAM_NAME_SWIFT_SERVICE_ENABLED)
if swift_enabled:
if swift_enabled.value.lower() == 'true':
raise wsme.exc.ClientSideError(
"Swift is already enabled through service parameter.")
except exception.SysinvException: