Stop leveraging on neutron plugins and extra 34/70334/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Sun, 14 Jun 2020 13:11:00 +0000 (15:11 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sun, 14 Jun 2020 13:13:37 +0000 (15:13 +0200)
Neutron leverages on the upstream Rally task in Stein and newer.
Leveraging on the upstream task may fix the side effects which
sometimes occured on Vmtp and Shaker [1] and filled better the CNTT
model.

[1] https://build.opnfv.org/ci/view/functest/job/functest-hunter-daily/574/

Change-Id: I5ee2e3a3ca956cf57365bf4579534177e87dc08b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/benchmarking/Dockerfile
functest/opnfv_tests/openstack/rally/rally.py

index 06bd2b6..3550ae3 100644 (file)
@@ -23,12 +23,13 @@ RUN apk --no-cache add --update libxml2 libxslt && \
     update-requirements -s --source /src/openstack-requirements /src/vmtp/ && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
         /src/vmtp && \
-    mkdir -p /home/opnfv/functest/data/rally/neutron && \
+    mkdir -p /home/opnfv/functest/data/rally/neutron/rally-jobs && \
     git init /src/neutron && \
     (cd /src/neutron && \
         git fetch --tags https://opendev.org/openstack/neutron.git $OPENSTACK_TAG && \
         git checkout FETCH_HEAD) && \
-    cp -r /src/neutron/rally-jobs /home/opnfv/functest/data/rally/neutron/rally-jobs && \
+    sed "s/NeutronTrunks.create_and_list_trunk_subports/NeutronTrunks.create_and_list_trunks/g" \
+        /src/neutron/rally-jobs/task-neutron.yaml > /home/opnfv/functest/data/rally/neutron/rally-jobs/task-neutron.yaml && \
     rm -r upper-constraints.txt upper-constraints.opnfv.txt /src/vmtp /src/neutron && \
     apk del .build-deps
 COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
index 505ab5f..0304094 100644 (file)
@@ -799,26 +799,10 @@ class RallyJobs(RallyBase):
         with open(result_file_name, 'w') as fname:
             template.dump(cases, fname)
 
-    @staticmethod
-    def _remove_plugins_extra():
-        inst_dir = getattr(config.CONF, 'dir_rally_inst')
-        try:
-            shutil.rmtree(os.path.join(inst_dir, 'plugins'))
-            shutil.rmtree(os.path.join(inst_dir, 'extra'))
-        except Exception:  # pylint: disable=broad-except
-            pass
-
     def prepare_task(self, test_name):
         """Prepare resources for test run."""
-        self._remove_plugins_extra()
         jobs_dir = os.path.join(
             getattr(config.CONF, 'dir_rally_data'), test_name, 'rally-jobs')
-        inst_dir = getattr(config.CONF, 'dir_rally_inst')
-        shutil.copytree(os.path.join(jobs_dir, 'plugins'),
-                        os.path.join(inst_dir, 'plugins'))
-        shutil.copytree(os.path.join(jobs_dir, 'extra'),
-                        os.path.join(inst_dir, 'extra'))
-
         task_name = self.task_yaml.get(test_name).get("task")
         task = os.path.join(jobs_dir, task_name)
         if not os.path.exists(task):
@@ -832,7 +816,3 @@ class RallyJobs(RallyBase):
         self.run_cmd = (["rally", "task", "start", "--tag", test_name,
                          "--task", task_file_name])
         return True
-
-    def clean(self):
-        self._remove_plugins_extra()
-        super(RallyJobs, self).clean()