]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Install deepsea from packages instead of source ses5-deepsea-pr-test
authorKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Mon, 4 Dec 2017 17:18:01 +0000 (18:18 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Mon, 4 Dec 2017 22:38:52 +0000 (23:38 +0100)
qa/tasks/deepsea.py

index 1e16038eabcb4f4a9abf3d87560b94166d637340..52c29067c468c578e599727f5027d5e0d666ac42 100644 (file)
@@ -75,17 +75,21 @@ class DeepSea(Task):
             if key not in config or not config[key]:
                 config[key] = default_value
 
-        _check_config_key('repo', 'https://github.com/SUSE/DeepSea.git')
+        _check_config_key('repo', '')
         _check_config_key('branch', 'master')
 
         log.debug("Munged config is {}".format(config))
 
         # prepare the list of commands to be executed on the master node
         self.exec_cmd = []
+        qa='DeepSea/qa'
+        if self.config['repo'] is '':
+            qa = '/usr/lib/deepsea/qa'
+
         assert len(self.config["exec"]) > 0, \
             'deepsea exec list must have at least one element'
         for cmd in self.config["exec"]:
-            self.exec_cmd.append('cd DeepSea/qa ; ' + cmd)
+            self.exec_cmd.append('cd %s ; %s' % (qa, cmd))
 
         # determine the role id of the master role
         if(misc.num_instances_of_type(self.cluster, 'master') != 1):
@@ -104,6 +108,20 @@ class DeepSea(Task):
     def setup(self):
         super(DeepSea, self).setup()
 
+        if self.config["repo"] is '':
+            self.salt.master_remote.run(args=[
+                'sudo',
+                'zypper',
+                '--non-interactive',
+                'install',
+                'deepsea',
+                'deepsea-qa'
+                ])
+        else:
+            self.make_install()
+        self.setup_salt()
+
+    def make_install(self):
         self.log.info("DeepSea repo: {}".format(self.config["repo"]))
         self.log.info("DeepSea branch: {}".format(self.config["branch"]))
 
@@ -151,7 +169,9 @@ class DeepSea(Task):
             '--no-recommends',
             run.Raw('$(rpmspec --requires -q -v DeepSea/deepsea.spec | grep manual | awk \'{print $2}\')')
             ])
+        self.setup_salt()
 
+    def setup_salt(self):
         self.log.info("listing minion keys...")
         self.salt.master_remote.run(args = ['sudo', 'salt-key', '-L'])