diff options
author | Abhishek Kekane <akekane@redhat.com> | 2020-04-08 17:11:18 +0000 |
---|---|---|
committer | Abhishek Kekane <akekane@redhat.com> | 2020-04-08 20:45:20 +0000 |
commit | 5a4385073b24d6555de6c5f057e6c499b67eb542 (patch) | |
tree | 5a694361d9099c02205da82082cff39db3fd1b99 /glanceclient/v2/images.py | |
parent | 85ae209d2a954ccfcbd351158a09a5718ceb6473 (diff) | |
download | python-glanceclient-5a4385073b24d6555de6c5f057e6c499b67eb542.tar.gz |
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
(cherry picked from commit dff5c881bdbc7f0cf03d88e974ae4234cb646aa1)
Diffstat (limited to 'glanceclient/v2/images.py')
-rw-r--r-- | glanceclient/v2/images.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py index 1e8e621..c062cb8 100644 --- a/glanceclient/v2/images.py +++ b/glanceclient/v2/images.py @@ -335,13 +335,13 @@ class Controller(object): if stores: data['stores'] = stores if allow_failure: - data['all_stores_must_succeed'] = 'false' + data['all_stores_must_succeed'] = False if backend is not None: headers['x-image-meta-store'] = backend if all_stores: - data['all_stores'] = 'true' + data['all_stores'] = True if allow_failure: - data['all_stores_must_succeed'] = 'false' + data['all_stores_must_succeed'] = False if uri: if method == 'web-download': |