From d4301046c0ecd9eb5d62eeedcaa9c1a9a729737c Mon Sep 17 00:00:00 2001 From: Matt Fischer Date: Mon, 10 Oct 2016 17:41:29 -0600 Subject: [PATCH] Allow boolean values to pass through to glance When uploading an image it is necessary to set flags such as protected=True. Currently the code blindly converts everything to a string leading to errors. This change will allow booleans to pass through unmolested. Change-Id: Ib0e230cf9c52500973ac2e7636f3dc607c1e8089 --- shade/openstackcloud.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shade/openstackcloud.py b/shade/openstackcloud.py index 95f961f34..f80e1c1a4 100644 --- a/shade/openstackcloud.py +++ b/shade/openstackcloud.py @@ -2931,6 +2931,8 @@ class OpenStackCloud(object): else: if v is None: ret[k] = None + elif isinstance(v, bool): + ret[k] = v else: ret[k] = str(v) ret.update(meta)