summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJilju Joy <jijoy@redhat.com>2019-06-22 11:18:10 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-09-20 07:59:24 +0000
commit4ce909b825305b2bbc41c666e95e55c4ceceb002 (patch)
treed4a61b06c5539c00851c22291a8f02480535b1e1
parent08798cdb0ae27495c99c93d7686a15331ff243c4 (diff)
Removing redundant method 'run_refresh_config'
The method 'refresh_config' can be used instead of 'run_refresh_config' Change-Id: I6c70b4dff1fd4531fdf6eaa4f044d2d1992d8151 Signed-off-by: Jilju Joy <jijoy@redhat.com>
-rw-r--r--glustolibs-gluster/glustolibs/gluster/nfs_ganesha_ops.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/nfs_ganesha_ops.py b/glustolibs-gluster/glustolibs/gluster/nfs_ganesha_ops.py
index 476db2d..3e53ec2 100644
--- a/glustolibs-gluster/glustolibs/gluster/nfs_ganesha_ops.py
+++ b/glustolibs-gluster/glustolibs/gluster/nfs_ganesha_ops.py
@@ -282,57 +282,6 @@ def unexport_nfs_ganesha_volume(mnode, volname):
return g.run(mnode, cmd)
-def run_refresh_config(mnode, volname):
- """Runs refresh config on nfs ganesha volume.
-
- Args:
- mnode (str): Node in which refresh config command will
- be executed.
- volname (str): volume name
-
- Returns:
- bool : True on successfully running refresh config on
- nfs-ganesha volume. False otherwise
-
- Example:
- run_refresh_config("abc.com", volname)
- """
-
- conf_file = "nfs_ganesha_refresh_config.jinja"
- gdeploy_config_file = GDEPLOY_CONF_DIR + conf_file
-
- tmp_gdeploy_config_file = ("/tmp/" + os.path.splitext(conf_file)[0] +
- ".conf")
-
- values_to_substitute_in_template = {'server': mnode,
- 'volname': volname}
-
- ret = g.render_template(gdeploy_config_file,
- values_to_substitute_in_template,
- tmp_gdeploy_config_file)
- if not ret:
- g.log.error("Failed to substitute values in %s file"
- % tmp_gdeploy_config_file)
- return False
-
- cmd = "gdeploy -c " + tmp_gdeploy_config_file
- retcode, stdout, stderr = g.run_local(cmd)
- if retcode != 0:
- g.log.error("Failed to execute gdeploy cmd %s for running "
- "refresh config on nfs ganesha volume" % cmd)
- g.log.error("gdeploy console output for running refresh config "
- "on nfs ganesha volume: %s" % stderr)
-
- return False
-
- g.log.info("gdeploy output for running refresh config "
- "on nfs ganesha volume: %s" % stdout)
-
- # Removing the gdeploy conf file from /tmp
- os.remove(tmp_gdeploy_config_file)
- return True
-
-
def update_volume_export_configuration(mnode, volname, config_to_update):
"""Updates volume export configuration and runs
refresh config for the volume.