From 3641286cd5b19f23b58c8de795c20695379fdbfc Mon Sep 17 00:00:00 2001 From: Boxiang Zhu Date: Wed, 24 Aug 2022 11:21:20 +0800 Subject: [PATCH] fix: Set bool as string for bootable and multiattach Set bool as string for bootable and multiattach query params. The cinder client only accept truth value for api as query params. Change-Id: Id26a0233c2ffc2d4165e96cab37c62c77fbefb24 --- skyline_apiserver/api/v1/extension.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/skyline_apiserver/api/v1/extension.py b/skyline_apiserver/api/v1/extension.py index de109dd..1a3642e 100644 --- a/skyline_apiserver/api/v1/extension.py +++ b/skyline_apiserver/api/v1/extension.py @@ -592,16 +592,14 @@ async def list_volumes( else: sort = ",".join(sort_keys) - # If bootable is false, it is ineffective, due to existed issue of community - # https://bugs.launchpad.net/python-cinderclient/+bug/1925737 search_opts = { "with_count": True, "name": name, - "multiattach": multiattach, + "multiattach": str(multiattach) if multiattach is not None else multiattach, "status": status, "all_tenants": all_projects, "project_id": project_id, - "bootable": bootable, + "bootable": str(bootable) if bootable is not None else bootable, "id": uuid, } # if not is_admin, cinder will ignore the all_projects query param.