From c3663d0f3445d6fc2e56f767dd1b31c8e94464cb Mon Sep 17 00:00:00 2001 From: Sri Vignesh Date: Mon, 17 Dec 2018 15:19:05 +0530 Subject: Fix setting of gluster volume options in "heketi_volume_create" func "heketi-cli" requires quotes for "--gluster-volume-options" arg. Without it command will fail. So, add missing quotes to make it work. Change-Id: I17fddfe653dceaa3c6b56f2a473ca7798de02698 Signed-off-by: Sri Vignesh --- cns-libs/cnslibs/common/heketi_ops.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cns-libs') diff --git a/cns-libs/cnslibs/common/heketi_ops.py b/cns-libs/cnslibs/common/heketi_ops.py index c13c8582..3b547d07 100644 --- a/cns-libs/cnslibs/common/heketi_ops.py +++ b/cns-libs/cnslibs/common/heketi_ops.py @@ -62,7 +62,7 @@ def heketi_volume_create(heketi_client_node, heketi_server_url, size, Returns: dict: volume create info on success, only cli option is specified without --json option, then it returns raw string output. - Tuple (ret, out, err): if raw_cli_output is True + Tuple (ret, out, err): if raw_cli_output is True. Raises: exceptions.ExecutionError when error occurs and raw_cli_output is False @@ -91,7 +91,7 @@ def heketi_volume_create(heketi_client_node, heketi_server_url, size, durability_arg = ("--durability %s" % kwargs.get("durability") if kwargs.get("durability") else "") gid_arg = "--gid %d" % int(kwargs.get("gid")) if kwargs.get("gid") else "" - gluster_volume_options_arg = ("--gluster-volume-options %s" + gluster_volume_options_arg = ("--gluster-volume-options '%s'" % kwargs.get("gluster_volume_options") if kwargs.get("gluster_volume_options") else "") @@ -1434,7 +1434,7 @@ def get_heketi_metrics(heketi_client_node, heketi_server_url, Args: - heketi_client_node (str) : Node where we want to run our commands. - - heketi_server_url (str) : This is a heketi server url + - heketi_server_url (str) : This is a heketi server url. - prometheus_format (bool) : control the format of output by default it is False, So it will parse prometheus format into python dict. If we need prometheus format we have to set it True. -- cgit