change ci from base-on-pod to base-on-scenario (in progress) 15/16815/2
authorrexlee8776 <limingjiang@huawei.com>
Wed, 13 Jul 2016 08:08:09 +0000 (08:08 +0000)
committerrexlee8776 <limingjiang@huawei.com>
Fri, 15 Jul 2016 02:50:27 +0000 (02:50 +0000)
1. first need to change in yardstick
2. then change in releng to modify the input parameter

JIRA: YARDSTICK-299

Change-Id: I3d707721acbc1d63be34da4e98138f845dc93466
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
14 files changed:
tests/opnfv/test_cases/opnfv_yardstick_tc027.yaml
tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml [new file with mode: 0644]
tests/unit/cmd/commands/test_task.py
yardstick/cmd/commands/task.py

index dc86c5e..ccdcaeb 100644 (file)
@@ -28,6 +28,7 @@ scenarios:
 precondition:
   installer_type: compass
   deploy_scenarios: os-nosdn
+  pod_name: huawei-pod1
 
 context:
   type: Node
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml
new file mode 100644 (file)
index 0000000..50167b8
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-nosdn-kvm-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml
new file mode 100644 (file)
index 0000000..81427ad
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-nosdn-kvm_ovs-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml
new file mode 100644 (file)
index 0000000..d5f7bf8
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-nosdn-nofeature-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml
new file mode 100644 (file)
index 0000000..2eafd27
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-nosdn-ovs-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml
new file mode 100644 (file)
index 0000000..21d2ebf
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-ocl-nofeature-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml
new file mode 100644 (file)
index 0000000..8038906
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl_l2-bgpvpn-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml
new file mode 100644 (file)
index 0000000..c80b394
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl_l2-nofeature-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml
new file mode 100644 (file)
index 0000000..9799a2d
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl_l2-sfc-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml
new file mode 100644 (file)
index 0000000..112b70c
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl_l3-nofeature-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml
new file mode 100644 (file)
index 0000000..e2d348c
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-onos-nofeature-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml
new file mode 100644 (file)
index 0000000..9ea5f13
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-onos-sfc-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+  file_name: opnfv_yardstick_tc002.yaml
+-
+  file_name: opnfv_yardstick_tc005.yaml
+-
+  file_name: opnfv_yardstick_tc010.yaml
+-
+  file_name: opnfv_yardstick_tc011.yaml
+-
+  file_name: opnfv_yardstick_tc012.yaml
+-
+  file_name: opnfv_yardstick_tc014.yaml
+-
+  file_name: opnfv_yardstick_tc037.yaml
index 5b404c4..ccb0f2a 100644 (file)
@@ -62,11 +62,12 @@ class TaskCommandsTestCase(unittest.TestCase):
         cfg = \
             {'precondition':
                  {'installer_type': 'compass',
-                  'deploy_scenarios': 'os-nosdn'
+                  'deploy_scenarios': 'os-nosdn',
+                  'pod_name': 'huawei-pod1'
                  }
             }
 
         t = task.TaskParser('/opt')
-        mock_os.environ.get.side_effect = ['compass', 'os-nosdn']
+        mock_os.environ.get.side_effect = ['compass', 'os-nosdn', 'huawei-pod1']
         result = t._check_precondition(cfg)
         self.assertTrue(result)
index 2bc5abe..587f624 100644 (file)
@@ -282,8 +282,17 @@ class TaskParser(object):
             precondition = cfg["precondition"]
             installer_type = precondition.get("installer_type", None)
             deploy_scenarios = precondition.get("deploy_scenarios", None)
+            tc_fit_pods = precondition.get("pod_name", None)
             installer_type_env = os.environ.get('INSTALL_TYPE', None)
             deploy_scenario_env = os.environ.get('DEPLOY_SCENARIO', None)
+            pod_name_env = os.environ.get('NODE_NAME', None)
+
+            LOG.info("installer_type: %s, installer_type_env: %s",
+                     installer_type, installer_type_env)
+            LOG.info("deploy_scenarios: %s, deploy_scenario_env: %s",
+                     deploy_scenarios, deploy_scenario_env)
+            LOG.info("tc_fit_pods: %s, pod_name_env: %s",
+                     tc_fit_pods, pod_name_env)
             if installer_type and installer_type_env:
                 if installer_type_env not in installer_type:
                     return False
@@ -293,6 +302,9 @@ class TaskParser(object):
                     if deploy_scenario_env.startswith(deploy_scenario):
                         return True
                 return False
+            if tc_fit_pods and pod_name_env:
+                if pod_name_env not in tc_fit_pods:
+                    return False
         return True