Pass --all-stores, --allow-failure as bool to API

Newly added command line options --all-stores, --allow-failure are boolean
but we are passing it as a string to glance API. This will cause problem if
those parameters are not converted to boolean at API side.

Passing these parameters as boolean instead of string to API.

Change-Id: I8d4eab9241fc9bb24bc40b47bf18d63c86a97d77
Closes-Bug: #1871674
This commit is contained in:
Abhishek Kekane
2020-04-08 17:11:18 +00:00
parent 00bc25eece
commit dff5c881bd
+3 -3
View File
@@ -335,13 +335,13 @@ class Controller(object):
if stores: if stores:
data['stores'] = stores data['stores'] = stores
if allow_failure: if allow_failure:
data['all_stores_must_succeed'] = 'false' data['all_stores_must_succeed'] = False
if backend is not None: if backend is not None:
headers['x-image-meta-store'] = backend headers['x-image-meta-store'] = backend
if all_stores: if all_stores:
data['all_stores'] = 'true' data['all_stores'] = True
if allow_failure: if allow_failure:
data['all_stores_must_succeed'] = 'false' data['all_stores_must_succeed'] = False
if uri: if uri:
if method == 'web-download': if method == 'web-download':