summaryrefslogtreecommitdiff
path: root/novaclient/v2/servers.py
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2020-04-08 09:57:41 +0100
committerStephen Finucane <stephenfin@redhat.com>2020-04-08 17:27:33 +0100
commitea092b29880e71f0ba2d8e1eb93a9cf73edee2a2 (patch)
tree9380571295753ddc46901f75f0d98eb86d37e2e9 /novaclient/v2/servers.py
parentd712c0fbc7a320f6eea4f8741f2f8d6e517a6507 (diff)
downloadpython-novaclient-ea092b29880e71f0ba2d8e1eb93a9cf73edee2a2.tar.gz
Make 'server list --config-drive' a boolean option
Instead of passing through whatever the user provides and exposing this bug in the REST API, simply make the opt a boolean one in expectation of a day where the API issues have been resolved. This also introduces machinery necessary to use more of these types of opts in the future. Change-Id: I9033540ac65ac0ee7337f16bdd002060652092ea Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'novaclient/v2/servers.py')
-rw-r--r--novaclient/v2/servers.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/novaclient/v2/servers.py b/novaclient/v2/servers.py
index 42184345..7768ef7a 100644
--- a/novaclient/v2/servers.py
+++ b/novaclient/v2/servers.py
@@ -893,12 +893,11 @@ class ServerManager(base.BootingManagerWithFind):
if isinstance(val, str):
val = val.encode('utf-8')
qparams[opt] = val
- # NOTE(gibi): After we fixing bug 1871409 and cleaning up the API
- # inconsistency around config_drive we can make the
- # config_drive filter a boolean filter. But until that we
- # simply pass through any value to the API even empty string.
+ # NOTE(gibi): The False value won't actually do anything until we
+ # fix bug 1871409 and clean up the API inconsistency, but we do it
+ # in preparation for that (hopefully backportable) fix
if opt == 'config_drive' and val is not None:
- qparams[opt] = val
+ qparams[opt] = str(val)
detail = ""
if detailed: