summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/testing/user/userguide/index.rst2
-rw-r--r--docs/testing/user/userguide/network.rst16
-rw-r--r--docs/testing/user/userguide/network_testcase_description.rst (renamed from legacy/docs/_testcase_description.rst)9
-rw-r--r--resources/ansible_roles/openstack/defaults/main.yml1
-rw-r--r--resources/ansible_roles/openstack/tasks/main.yml11
-rw-r--r--resources/ansible_roles/openstack/templates/hosts.j217
-rw-r--r--resources/ansible_roles/openstack/templates/ssh.cfg.j211
7 files changed, 62 insertions, 5 deletions
diff --git a/docs/testing/user/userguide/index.rst b/docs/testing/user/userguide/index.rst
index 262ddd70..e05a5e90 100644
--- a/docs/testing/user/userguide/index.rst
+++ b/docs/testing/user/userguide/index.rst
@@ -18,3 +18,5 @@ QTIP User Guide
web.rst
compute.rst
storage.rst
+ network.rst
+ network_testcase_description.rst
diff --git a/docs/testing/user/userguide/network.rst b/docs/testing/user/userguide/network.rst
new file mode 100644
index 00000000..095ad281
--- /dev/null
+++ b/docs/testing/user/userguide/network.rst
@@ -0,0 +1,16 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) 2018 ZTE Corp.
+
+
+********************************
+Network Performance Benchmarking
+********************************
+
+
+Getting started
+===============
+
+
+Metrics
+-------
diff --git a/legacy/docs/_testcase_description.rst b/docs/testing/user/userguide/network_testcase_description.rst
index d60ca949..accf17a6 100644
--- a/legacy/docs/_testcase_description.rst
+++ b/docs/testing/user/userguide/network_testcase_description.rst
@@ -1,8 +1,8 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) 2018 ZTE Corp.
.. Template to be used for test case descriptions in QTIP Project.
- Write one .rst per test case.
- Borrowed Heavily from Yardstick
- Upload the .rst for the test case in /docs/ directory.
- Review in Gerrit.
+
Test Case Description
=====================
@@ -43,4 +43,3 @@ Test Case Description
+--------------+------+----------------------------------+--------------------+
|test verdict | expected behavior, or SLA, pass/fail criteria |
+--------------+--------------------------------------------------------------+
-
diff --git a/resources/ansible_roles/openstack/defaults/main.yml b/resources/ansible_roles/openstack/defaults/main.yml
index 830def62..261504ea 100644
--- a/resources/ansible_roles/openstack/defaults/main.yml
+++ b/resources/ansible_roles/openstack/defaults/main.yml
@@ -16,3 +16,4 @@ temp_dir: /tmp/qtip
flavor_name: qtip_flavor
stack_name: qtip_stack
image_name: qtip_image
+ansible_user: ubuntu
diff --git a/resources/ansible_roles/openstack/tasks/main.yml b/resources/ansible_roles/openstack/tasks/main.yml
index ed043831..6fabfb01 100644
--- a/resources/ansible_roles/openstack/tasks/main.yml
+++ b/resources/ansible_roles/openstack/tasks/main.yml
@@ -84,3 +84,14 @@
flavor: "{{ flavor_name }}"
keypair: QtipKey
external_network: "{{ external_network }}"
+ register: stack
+
+- name: generating inventory file
+ template:
+ src: hosts.j2
+ dest: ./hosts
+
+- name: generating ssh.cfg
+ template:
+ src: ssh.cfg.j2
+ dest: ./ssh.cfg
diff --git a/resources/ansible_roles/openstack/templates/hosts.j2 b/resources/ansible_roles/openstack/templates/hosts.j2
new file mode 100644
index 00000000..6756d2a2
--- /dev/null
+++ b/resources/ansible_roles/openstack/templates/hosts.j2
@@ -0,0 +1,17 @@
+localhost ansible_connection=local
+
+[SUT:children]
+compute
+
+[node-groups:children]
+compute
+
+[node-groups:vars]
+ansible_ssh_common_args=-F ./ssh.cfg
+
+[compute]
+{% for item in stack.stack.outputs %}
+{% if item.output_key == 'instance_ip' %}
+{{item.output_value}}
+{% endif %}
+{% endfor %}
diff --git a/resources/ansible_roles/openstack/templates/ssh.cfg.j2 b/resources/ansible_roles/openstack/templates/ssh.cfg.j2
new file mode 100644
index 00000000..c0a1f94e
--- /dev/null
+++ b/resources/ansible_roles/openstack/templates/ssh.cfg.j2
@@ -0,0 +1,11 @@
+# Connect to target node
+
+{% for item in stack.stack.outputs %}
+{% if item.output_key == 'instance_ip' %}
+Host {{ item.output_value }}
+ HostName {{ item.output_value }}
+ User {{ ansible_user }}
+ IdentityFile {{ temp_dir }}/QtipKey
+{% endif %}
+
+{% endfor %}