From 78907f61c7dca0b7981e179693fd7acf54b6c821 Mon Sep 17 00:00:00 2001 From: kshithijiyer Date: Mon, 6 Jan 2020 18:44:50 +0530 Subject: [lib] Adding geo-rep params in gluster_base_class.py Adding params in gluster_base_class.py to store value of root user's password and non-root user's name, group and password. sync_method will be mentioned inside the testcase as there are testcases which are only specific to one of the sync type and it doesn't make sense to add it in the config file. Instead we'll write testcase as shown below: ``` class georeptestcase(baseclass): run_chmod_with_changelog_crawl(sync_type): # Steps of the testcase test_chmod_with_changelog_crawl_rsync(): # Calling function with rsync as sync_type. run_chmod_with_changelog_crawl('rsync') test_chmod_with_changelog_crawl_tarssh(): # Calling function with tarssh as sync_type. run_chmod_with_changelog_crawl('tarssh') ``` Change-Id: Ie65f542e76bfbee89ac2914bdcd086e1bd08dfdb Signed-off-by: kshithijiyer --- glustolibs-gluster/glustolibs/gluster/gluster_base_class.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'glustolibs-gluster') diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py index a8b737f04..87ab97008 100644 --- a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py +++ b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py @@ -553,6 +553,17 @@ class GlusterBaseClass(TestCase): cls.num_of_nfs_ganesha_nodes = None cls.vips = [] + # Geo-rep Cluster information + try: + cls.geo_rep_info = (g.config['gluster']['geo_rep'] + ['cluster_config']) + except KeyError: + cls.geo_rep_info = {} + cls.geo_rep_info['root']['password'] = '' + cls.geo_rep_info['user']['name'] = '' + cls.geo_rep_info['user']['password'] = '' + cls.geo_rep_info['user']['group'] = '' + # Defining default volume_types configuration. cls.default_volume_type_config = { 'replicated': { -- cgit