Merge "Add the way to deploy InfluxDB and Grafana locally to userguide"
authorliang gao <jean.gaoliang@huawei.com>
Thu, 18 Aug 2016 11:30:52 +0000 (11:30 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Thu, 18 Aug 2016 11:30:52 +0000 (11:30 +0000)
14 files changed:
docs/userguide/03-list-of-tcs.rst
docs/userguide/opnfv_yardstick_tc075.rst
plugin/CI/storperf.yaml
setup.py
tests/ci/docker/yardstick-ci/Dockerfile
tests/ci/prepare_env.sh
tests/ci/scp_storperf_admin-rc.sh [new file with mode: 0644]
tests/ci/yardstick-verify
tests/opnfv/test_cases/opnfv_yardstick_tc002.yaml
tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml
tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml [new file with mode: 0644]
tests/unit/test_ssh.py
yardstick/ssh.py

index 96e5297..7e8c854 100644 (file)
@@ -49,6 +49,7 @@ Generic NFVI Test Case Descriptions
    opnfv_yardstick_tc070.rst
    opnfv_yardstick_tc071.rst
    opnfv_yardstick_tc072.rst
+   opnfv_yardstick_tc075.rst
 
 OPNFV Feature Test Cases
 ========================
index cbc3c2e..a6ff344 100644 (file)
@@ -9,31 +9,28 @@ Yardstick Test Case Description TC075
 
 
 +-----------------------------------------------------------------------------+
-|Network Capacity and Scale Testing                                                                                      |
+|Network Capacity and Scale Testing                                           |
 |                                                                             |
 +--------------+--------------------------------------------------------------+
 |test case id  | OPNFV_YARDSTICK_TC075_Network_Capacity_and_Scale_testing     |
-|              |                                                                                                                         |
+|              |                                                              |
 +--------------+--------------------------------------------------------------+
 |metric        | Number of connections, Number of frames sent/received        |
 |              |                                                              |
 +--------------+--------------------------------------------------------------+
-|test purpose  | To evaluate the network capacity and scale with regards to   | 
-|              | connections and frmaes.                                                                         | 
-|              |                                                              |
+|test purpose  | To evaluate the network capacity and scale with regards to   |
+|              | connections and frmaes.                                      |
 |              |                                                              |
 +--------------+--------------------------------------------------------------+
 |configuration | file: opnfv_yardstick_tc075.yaml                             |
 |              |                                                              |
-|              | There is no additional configuration to be set for this TC.  | 
-|              |                                                              |
+|              | There is no additional configuration to be set for this TC.  |
 |              |                                                              |
 +--------------+--------------------------------------------------------------+
 |test tool     | netstar                                                      |
 |              |                                                              |
-|              | Netstat is normally part of any Linux distribution, hence it | 
-|              | doesn't need to be installed.                                | 
-|              |                                                              |
+|              | Netstat is normally part of any Linux distribution, hence it |
+|              | doesn't need to be installed.                                |
 |              |                                                              |
 +--------------+--------------------------------------------------------------+
 |references    | Netstat man page                                             |
@@ -41,8 +38,7 @@ Yardstick Test Case Description TC075
 |              | ETSI-NFV-TST001                                              |
 |              |                                                              |
 +--------------+--------------------------------------------------------------+
-|applicability | This test case is mainly for evaluating network performance. | 
-|              |                                                              |
+|applicability | This test case is mainly for evaluating network performance. |
 |              |                                                              |
 +--------------+--------------------------------------------------------------+
 |pre_test      | Each pod node must have netstat included in it.              |
@@ -58,7 +54,7 @@ Yardstick Test Case Description TC075
 |              | Result: Logs are stored.                                     |
 |              |                                                              |
 +--------------+--------------------------------------------------------------+
-|test verdict  | None. Number of connections and frames are fetched and       | 
+|test verdict  | None. Number of connections and frames are fetched and       |
 |              | stored.                                                      |
 |              |                                                              |
 +--------------+--------------------------------------------------------------+
index 4407ddf..65ebe51 100644 (file)
@@ -8,6 +8,6 @@ plugins:
   name: storperf
 
 deployment:
-  ip: local
+  ip: 192.168.200.1
   user: root
   password: root
index 3503738..a2131cf 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -11,6 +11,7 @@ setup(
             'benchmark/scenarios/availability/*.yaml',
             'benchmark/scenarios/availability/attacker/*.yaml',
             'benchmark/scenarios/availability/ha_tools/*.bash',
+            'benchmark/scenarios/availability/ha_tools/*/*.bash',
             'benchmark/scenarios/availability/attacker/scripts/*.bash',
             'benchmark/scenarios/availability/monitor/*.yaml',
             'benchmark/scenarios/availability/monitor/script_tools/*.bash',
index 684f471..da755d1 100644 (file)
@@ -20,6 +20,7 @@ ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
 
 RUN apt-get update && apt-get install -y \
     wget \
+    expect \
     curl \
     git \
     sshpass \
index 35118b1..cb83d9c 100755 (executable)
@@ -56,6 +56,9 @@ export EXTERNAL_NETWORK INSTALLER_TYPE DEPLOY_TYPE NODE_NAME
 # Prepare a admin-rc file for StorPerf integration
 $YARDSTICK_REPO_DIR/tests/ci/prepare_storperf_admin-rc.sh
 
+# copy a admin-rc file for StorPerf integration to the deployment location
+expect $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_admin-rc.sh
+
 # Fetching id_rsa file from jump_server..."
 verify_connectivity() {
     local ip=$1
diff --git a/tests/ci/scp_storperf_admin-rc.sh b/tests/ci/scp_storperf_admin-rc.sh
new file mode 100644 (file)
index 0000000..fd94aaa
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/expect
+set timeout 30
+
+spawn scp -o StrictHostKeyChecking=no /root/storperf_admin-rc root@192.168.200.1:/root/storperf_admin-rc
+expect "root@192.168.200.1's password: "
+send "root\r"
+interact
index bdb9100..7345e0e 100755 (executable)
@@ -133,8 +133,21 @@ install_storperf()
             exit 1
         fi
 
+    fi
+}
+
+remove_storperf()
+{
+    # remove Storper from huawei-pod1
+    if [ "$NODE_NAME" == "huawei-pod1" ]; then
         echo
-        echo "========== Installed storperf container =========="
+        echo "========== Removing storperf =========="
+
+        if ! yardstick -d plugin remove plugin/CI/storperf.yaml; then
+            echo "Remove storperf plugin FAILED";
+            exit 1
+        fi
+
     fi
 }
 
@@ -422,6 +435,7 @@ main()
 
     install_storperf
     run_test
+    remove_storperf
 }
 
 main
index c0cff7d..1942bb5 100644 (file)
@@ -13,7 +13,7 @@ scenarios:
 
   runner:
     type: Duration
-    duration: 600
+    duration: 60
     interval: 10
 
   sla:
index d506ccc..6dda2d4 100644 (file)
@@ -4,7 +4,7 @@
 
 schema: "yardstick:task:0.1"
 {% set public_network = public_network or "ext-net" %}
-{% set StorPerf_ip = StorPerf_ip or "192.168.200.2" %}
+{% set StorPerf_ip = StorPerf_ip or "192.168.200.1" %}
 scenarios:
 -
   type: StorPerf
index 024fb69..ebe7a05 100644 (file)
@@ -102,12 +102,13 @@ test_cases:
         pod: huawei-pod1
     task_args:
         huawei-pod1: '{"public_network": "ext-net",
-        "StorPerf_ip": "192.168.200.2"}'
+        "StorPerf_ip": "192.168.200.1"}'
 -
-       file_name: opnfv_yardstick_tc075.yaml
+    file_name: opnfv_yardstick_tc075.yaml
     constraint:
         installer: compass
         pod: huawei-pod1
     task_args:
         huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
         "host": "node1.LF"}'
+
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml
new file mode 100644 (file)
index 0000000..dadcb2f
--- /dev/null
@@ -0,0 +1,54 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl_l2-moon-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
+-
+  file_name: opnfv_yardstick_tc055.yaml
+  constraint:
+      installer: compass
+      pod: huawei-pod1
+  task_args:
+      huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+      "host": "node5.yardstick-TC055"}'
+-
+  file_name: opnfv_yardstick_tc063.yaml
+  constraint:
+      installer: compass
+      pod: huawei-pod1
+  task_args:
+      huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+      "host": "node5.yardstick-TC063"}'
+-
+  file_name: opnfv_yardstick_tc069.yaml
+-
+  file_name: opnfv_yardstick_tc070.yaml
+-
+  file_name: opnfv_yardstick_tc071.yaml
+-
+  file_name: opnfv_yardstick_tc072.yaml
+-
+  file_name: opnfv_yardstick_tc075.yaml
+  constraint:
+      installer: compass
+      pod: huawei-pod1
+  task_args:
+      huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+      "host": "node1.LF"}'
index 574da03..a270524 100644 (file)
@@ -108,7 +108,9 @@ class SSHTestCase(unittest.TestCase):
             mock.call.set_missing_host_key_policy("autoadd"),
             mock.call.connect("example.net", username="admin",
                               port=22, pkey="key", key_filename=None,
-                              password=None, timeout=1),
+                              password=None,
+                              allow_agent=False, look_for_keys=False,
+                              timeout=1),
         ]
         self.assertEqual(client_calls, client.mock_calls)
 
index 2816a1c..cf890df 100644 (file)
@@ -121,7 +121,9 @@ class SSH(object):
             self._client.connect(self.host, username=self.user,
                                  port=self.port, pkey=self.pkey,
                                  key_filename=self.key_filename,
-                                 password=self.password, timeout=1)
+                                 password=self.password,
+                                 allow_agent=False, look_for_keys=False,
+                                 timeout=1)
             return self._client
         except Exception as e:
             message = ("Exception %(exception_type)s was raised "