From faf920ac1da391167eb4e4335afef16d07ce5b0a Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 20 Aug 2024 10:10:33 -0400 Subject: [PATCH] Fix bug where force_flag is a string --- api-daemon/pvcapid/flaskapi.py | 2 +- api-daemon/pvcapid/helper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api-daemon/pvcapid/flaskapi.py b/api-daemon/pvcapid/flaskapi.py index e2673132..fc042d59 100755 --- a/api-daemon/pvcapid/flaskapi.py +++ b/api-daemon/pvcapid/flaskapi.py @@ -6061,7 +6061,7 @@ class API_Storage_Ceph_Volume_Root(Resource): reqargs.get("pool", None), reqargs.get("volume", None), reqargs.get("size", None), - reqargs.get("force", False), + bool(strtobool(reqargs.get("force", "False"))), ) diff --git a/api-daemon/pvcapid/helper.py b/api-daemon/pvcapid/helper.py index fde22756..90a1550c 100755 --- a/api-daemon/pvcapid/helper.py +++ b/api-daemon/pvcapid/helper.py @@ -1969,7 +1969,7 @@ def ceph_volume_list(zkhandler, pool=None, limit=None, is_fuzzy=True): @ZKConnection(config) -def ceph_volume_add(zkhandler, pool, name, size, force_flag): +def ceph_volume_add(zkhandler, pool, name, size, force_flag=False): """ Add a Ceph RBD volume to the PVC Ceph storage cluster. """