]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cbt.py: add support for client_endpoints 28522/head
authorNeha Ojha <nojha@redhat.com>
Wed, 12 Jun 2019 00:33:53 +0000 (00:33 +0000)
committerNeha Ojha <nojha@redhat.com>
Wed, 12 Jun 2019 22:36:12 +0000 (22:36 +0000)
Note that this will only work for librbdfio for now.

Signed-off-by: Neha Ojha <nojha@redhat.com>
qa/tasks/cbt.py

index 9f8520f8cc539c17be55e77b3e80ecd671bbfb4c..e3f35a5b35ba6c64b6af1e991dff46867cd9d2bd 100644 (file)
@@ -46,9 +46,9 @@ class CBT(Task):
 
         benchmark_config = self.config.get('benchmarks')
         benchmark_type = benchmark_config.keys()[0]
-        if benchmark_type == 'librbdfio':
+        if benchmark_type in ['librbdfio', 'fio']:
           testdir = misc.get_testdir(self.ctx)
-          benchmark_config['librbdfio']['cmd_path'] = os.path.join(testdir, 'fio/fio')
+          benchmark_config[benchmark_type]['cmd_path'] = os.path.join(testdir, 'fio/fio')
         if benchmark_type == 'cosbench':
             # create cosbench_dir and cosbench_xml_dir
             testdir = misc.get_testdir(self.ctx)
@@ -62,10 +62,12 @@ class CBT(Task):
             ips = [host for (host, port) in
                    (remote.ssh.get_transport().getpeername() for (remote, role_list) in remotes_and_roles)]
             benchmark_config['cosbench']['auth'] = "username=cosbench:operator;password=intel2012;url=http://%s:80/auth/v1.0;retry=9" %(ips[0])
+        client_endpoints_config = self.config.get('client_endpoints', None)
 
         return dict(
             cluster=cluster_config,
             benchmarks=benchmark_config,
+            client_endpoints = client_endpoints_config,
             )
 
     def install_dependencies(self):
@@ -82,7 +84,7 @@ class CBT(Task):
         benchmark_type = self.cbt_config.get('benchmarks').keys()[0]
         self.log.info('benchmark: %s', benchmark_type)
 
-        if benchmark_type == 'librbdfio':
+        if benchmark_type in ['librbdfio', 'fio']:
             # install fio
             testdir = misc.get_testdir(self.ctx)
             self.first_mon.run(
@@ -226,7 +228,7 @@ class CBT(Task):
             ]
         )
         benchmark_type = self.cbt_config.get('benchmarks').keys()[0]
-        if benchmark_type == 'librbdfio':
+        if benchmark_type in ['librbdfio', 'fio']:
             self.first_mon.run(
                 args=[
                     'rm', '--one-file-system', '-rf', '--',