summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/gluster_base_class.py')
-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 73a6c4c..97a9fe3 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