summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster
diff options
context:
space:
mode:
authorRoch-elle <rallan@redhat.com>2019-04-08 16:15:57 +0530
committerAkarsha Rai <akrai@redhat.com>2019-04-12 09:33:30 +0000
commit5da0ed332456f237458991321fa08d950c3296e7 (patch)
tree115eeab6a87b6ca44e3bb1c11001a63490f4e40d /glustolibs-gluster/glustolibs/gluster
parentd93888ca2a94fe27dc2da9830683c42842a87e5d (diff)
Modificatons to base class to include slave info
Added new config file for georep Change-Id: I544ee35f8cd6a2f2ed744f72caa28fa4fd63e5b3 Signed-off-by: Roch-elle <rallan@redhat.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/gluster_base_class.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
index 73a6c4c1e..97a9fe365 100644
--- a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
+++ b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
@@ -443,6 +443,16 @@ class GlusterBaseClass(unittest.TestCase):
else:
raise ConfigError("'servers' not defined in the global config")
+ # Get all slaves
+ cls.slaves = None
+ if 'slaves' in g.config and g.config['slaves']:
+ cls.slaves = g.config['slaves']
+ # Set mnode_slave : Node on which slave commands are executed
+ cls.mnode_slave = cls.slaves[0]
+ # Slave IP's
+ cls.slaves_ip = []
+ cls.slaves_ip = cls.get_ip_from_hostname(cls.slaves)
+
# Get all clients
cls.all_clients = None
if 'clients' in g.config and g.config['clients']:
@@ -458,6 +468,10 @@ class GlusterBaseClass(unittest.TestCase):
else:
raise ConfigError("'servers_info' not defined in the global "
"config")
+ # Get all slaves info
+ cls.all_slaves_info = None
+ if 'slaves_info' in g.config and g.config['slaves_info']:
+ cls.all_slaves_info = g.config['slaves_info']
# All clients_info
cls.all_clients_info = None