summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glustolibs-gluster/glustolibs/gluster/gluster_base_class.py14
-rw-r--r--tests/gluster_basic_georep_config.yml110
2 files changed, 124 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
diff --git a/tests/gluster_basic_georep_config.yml b/tests/gluster_basic_georep_config.yml
new file mode 100644
index 0000000..644e743
--- /dev/null
+++ b/tests/gluster_basic_georep_config.yml
@@ -0,0 +1,110 @@
+log_file: /var/log/tests/gluster_tests.log
+log_level: DEBUG
+
+# 'servers' is list of Hostnames/IP's of servers in the cluster.
+# This section has to be defined.
+servers:
+ - server-vm1
+ - server-vm2
+ - server-vm3
+ - server-vm4
+ - server-vm5
+ - server-vm6
+
+# 'slaves' is list of Hostnames/IP's of slave
+# servers in the cluster.
+# This section has to be defined.
+slaves:
+ - server-vm1
+ - server-vm2
+ - server-vm3
+ - server-vm4
+ - server-vm5
+ - server-vm6
+
+# 'clients' is list of Hostnames/IP's of clients in the cluster.
+# This section has to be defined.
+clients:
+ - client-vm1
+ - client-vm2
+
+# 'servers_info' is info about each server in the cluster.
+# each server_info is a dict with 'Hostname/IP' of the server as key.
+# The info should contain the host(Hostname/IP) of server, devices to use
+# for creating bricks, brick_root i.e dirname of brick mount point.
+# Note: Use the same Hostname/IP used in the above 'servers' section.
+# This section has to be defined.
+
+servers_info:
+ server-vm1: &server1
+ host: server-vm1
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm2: &server2
+ host: server-vm2
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm3: &server3
+ host: server-vm3
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm4: &server4
+ host: server-vm4
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm5: &server5
+ host: server-vm5
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm6: &server6
+ host: server-vm6
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+
+# 'slaves_info' is info about each slave
+# server in the cluster.
+# each slave_server_info is a dict with 'Hostname/IP'
+# of the server as key.
+# The info should contain the host(Hostname/IP) of server, devices to use
+# for creating bricks, brick_root i.e dirname of brick mount point.
+# Note: Use the same Hostname/IP used in the above 'slaves'
+# section.
+# This section has to be defined.
+
+slaves_info:
+ server-vm1: &server1
+ host: server-vm1
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm2: &server2
+ host: server-vm2
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm3: &server3
+ host: server-vm3
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm4: &server4
+ host: server-vm4
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm5: &server5
+ host: server-vm5
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+ server-vm6: &server6
+ host: server-vm6
+ devices: ["/dev/vdb", "/dev/vdc", "/dev/vdd", "/dev/vde"]
+ brick_root: "/bricks"
+
+# 'clients_info' is info about each client in the cluster.
+# each client_info is a dict with 'Hostname/IP' of the client as key.
+# The info should contain the host(Hostname/IP) of client, platform(Linux or
+# Windows), super_user name(Admin/Administrator/* in case of windows or root/*
+# in case of linux).
+# This section has to be defined.
+clients_info:
+ client-vm1: &client1
+ host: client-vm1
+ client-vm2: &client2
+ host: client-vm2