summaryrefslogtreecommitdiffstats
path: root/cns-libs
diff options
context:
space:
mode:
authorSri Vignesh <sselvan@redhat.com>2018-12-17 15:19:05 +0530
committerSri Vignesh <sselvan@redhat.com>2019-01-08 12:13:50 +0530
commitc3663d0f3445d6fc2e56f767dd1b31c8e94464cb (patch)
tree3986486a50eb44c9a08d121286530503dddf0743 /cns-libs
parent1da6c1971696f92f1b2ad80e22b35f07984ab379 (diff)
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 <sselvan@redhat.com>
Diffstat (limited to 'cns-libs')
-rw-r--r--cns-libs/cnslibs/common/heketi_ops.py6
1 files changed, 3 insertions, 3 deletions
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.