aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.coveragerc27
-rw-r--r--docs/development/design/apidocs/index.rst (renamed from docs/apidocs/index.rst)0
-rw-r--r--docs/development/design/apidocs/qtip_restful_api.rst (renamed from docs/apidocs/qtip_restful_api.rst)0
-rw-r--r--docs/development/design/compute_QPI.rst (renamed from docs/designspec/compute_QPI.rst)0
-rw-r--r--docs/development/design/dashboard.rst (renamed from docs/designspec/dashboard.rst)0
-rw-r--r--docs/development/design/index.rst (renamed from docs/designspec/index.rst)0
-rw-r--r--docs/development/design/integration_with_yardstick.rst (renamed from docs/designspec/integration_with_yardstick.rst)0
-rw-r--r--docs/development/overview/.gitkeep (renamed from qtip/api/cmd/__init__.py)0
-rw-r--r--docs/development/requirement/.gitkeep (renamed from tests/unit/__init__.py)0
-rw-r--r--docs/release/configguide/configuration.rst (renamed from docs/configguide/configuration.rst)0
-rw-r--r--docs/release/configguide/index.rst (renamed from docs/configguide/index.rst)0
-rw-r--r--docs/release/installation/.gitkeep (renamed from tests/unit/cli/__init__.py)0
-rw-r--r--docs/release/release-notes/brahmaputra.rst (renamed from docs/releasenotes/brahmaputra.rst)0
-rw-r--r--docs/release/release-notes/index.rst (renamed from docs/releasenotes/index.rst)0
-rw-r--r--docs/release/scenarios/.gitkeep (renamed from tests/unit/collector/transformer/__init__.py)0
-rw-r--r--docs/release/userguide/_01-compute.rst (renamed from docs/userguide/_01-compute.rst)0
-rw-r--r--docs/release/userguide/_02-network.rst (renamed from docs/userguide/_02-network.rst)0
-rw-r--r--docs/release/userguide/_03-storage.rst (renamed from docs/userguide/_03-storage.rst)0
-rw-r--r--docs/release/userguide/_testcase_description.rst (renamed from docs/userguide/_testcase_description.rst)0
-rw-r--r--docs/release/userguide/annex.rst (renamed from docs/userguide/annex.rst)0
-rw-r--r--docs/release/userguide/benchmark-suites.rst (renamed from docs/userguide/benchmark-suites.rst)0
-rw-r--r--docs/release/userguide/index.rst (renamed from docs/userguide/index.rst)0
-rw-r--r--docs/release/userguide/introduction.rst (renamed from docs/userguide/introduction.rst)0
-rw-r--r--docs/testing/.gitkeep (renamed from tests/unit/loader/__init__.py)0
-rw-r--r--legacy/__init__.py8
-rw-r--r--legacy/api/cmd/__init__.py (renamed from tests/unit/runner/__init__.py)0
-rw-r--r--legacy/api/cmd/server.py (renamed from qtip/api/cmd/server.py)0
-rw-r--r--legacy/api/handler/job_handler.py8
-rw-r--r--legacy/api/model/job_model.py8
-rw-r--r--legacy/api/router/mapper.py10
-rw-r--r--legacy/api/router/mapper.py.orig19
-rw-r--r--legacy/assets/perftest/common/git_proxy_pbook.yaml8
-rw-r--r--legacy/assets/perftest/common/sys_info_pbook.yaml42
-rw-r--r--legacy/assets/perftest/common/sys_proxy_pbook.yaml8
-rw-r--r--legacy/assets/perftest/dhrystone.yaml8
-rw-r--r--legacy/assets/perftest/dpi.yaml8
-rw-r--r--legacy/assets/perftest/etc/info_collect.py8
-rw-r--r--legacy/assets/perftest/fio.yaml8
-rw-r--r--legacy/assets/perftest/iperf.yaml8
-rw-r--r--legacy/assets/perftest/ramspeed.yaml8
-rw-r--r--legacy/assets/perftest/ssl.yaml8
-rw-r--r--legacy/assets/perftest/whetstone.yaml8
-rw-r--r--legacy/assets/suite/compute.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/dhrystone_bm.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/dhrystone_vm.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/dpi_bm.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/dpi_vm.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/ramspeed_bm.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/ramspeed_vm.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/ssl_bm.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/ssl_vm.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/whetstone_bm.yaml8
-rw-r--r--legacy/assets/testplan/default/compute/whetstone_vm.yaml8
-rw-r--r--legacy/assets/testplan/default/network/iperf_bm.yaml8
-rw-r--r--legacy/assets/testplan/default/network/iperf_vm.yaml8
-rw-r--r--legacy/assets/testplan/default/network/iperf_vm_2.yaml8
-rw-r--r--legacy/assets/testplan/default/storage/fio_bm.yaml8
-rw-r--r--legacy/assets/testplan/default/storage/fio_vm.yaml8
-rw-r--r--legacy/config/SampleHeat.yaml8
-rw-r--r--legacy/data/schema/test_bm_schema.yaml8
-rw-r--r--legacy/data/schema/test_vm_schema.yaml8
-rw-r--r--legacy/data/test.yml8
-rw-r--r--legacy/data/testplan/bm_ping.yaml8
-rw-r--r--legacy/data/testplan/bm_with_proxy.yaml8
-rw-r--r--legacy/data/testplan/bm_without_proxy.yaml8
-rw-r--r--legacy/data/testplan/vm.yaml8
-rw-r--r--legacy/data/testplan/vm_error.yaml8
-rw-r--r--legacy/docs/download/sample_config.yaml (renamed from docs/download/sample_config.yaml)8
-rw-r--r--legacy/docs/overview/index.rst (renamed from docs/overview/index.rst)0
-rw-r--r--legacy/docs/overview/overview.rst (renamed from docs/overview/overview.rst)0
-rw-r--r--legacy/scripts/ref_results/compute_benchmarks_indices.py8
-rw-r--r--legacy/scripts/ref_results/index_calculation.py8
-rw-r--r--legacy/scripts/ref_results/network_benchmarks_indices.py8
-rw-r--r--legacy/scripts/ref_results/result_accum.py8
-rw-r--r--legacy/scripts/ref_results/storage_benchmarks_indices.py8
-rw-r--r--legacy/tests/api/test_server.py8
-rw-r--r--legacy/tests/cli_test.py8
-rw-r--r--legacy/tests/create_zones_test.py8
-rw-r--r--legacy/tests/driver_test.py8
-rw-r--r--legacy/tests/functional/yaml_schema_test.py8
-rw-r--r--legacy/tests/helper/perftest.yaml8
-rw-r--r--legacy/tests/helper/suite.yaml8
-rw-r--r--legacy/tests/helper/version.yaml8
-rw-r--r--legacy/tests/spawn_vm_test.py8
-rw-r--r--legacy/utils/dashboard/pushtoDB.py8
-rw-r--r--legacy/utils/report/get_indices.py8
-rw-r--r--legacy/utils/report/get_results.py8
-rw-r--r--legacy/utils/report/qtip_graph.py8
-rw-r--r--legacy/utils/report/qtip_report.py8
-rw-r--r--legacy/utils/transform/dpi_transform.py8
-rw-r--r--legacy/utils/transform/final_report.py8
-rw-r--r--[-rwxr-xr-x]legacy/utils/transform/fio_transform.py8
-rw-r--r--legacy/utils/transform/iperf_transform.py8
-rw-r--r--legacy/utils/transform/ramspeed_transform.py8
-rw-r--r--legacy/utils/transform/ssl_transform.py8
-rw-r--r--legacy/utils/transform/ubench_transform.py8
-rw-r--r--opt/infra/roles/docker/handlers/main.yml8
-rw-r--r--opt/infra/roles/docker/tasks/main.yml8
-rw-r--r--opt/infra/roles/elk/tasks/main.yml8
-rw-r--r--opt/infra/roles/mongo/tasks/main.yml8
-rw-r--r--opt/infra/roles/nginx/defaults/main.yml8
-rw-r--r--opt/infra/roles/nginx/handlers/main.yml8
-rw-r--r--opt/infra/roles/nginx/tasks/main.yml8
-rw-r--r--opt/infra/roles/qtip/tasks/main.yml8
-rw-r--r--opt/infra/roles/testapi/tasks/main.yml8
-rw-r--r--opt/infra/roles/user/defaults/main.yml8
-rw-r--r--opt/infra/roles/user/tasks/main.yml8
-rw-r--r--opt/infra/test.yml8
-rw-r--r--qtip/base/error.py16
-rw-r--r--qtip/cli/commands/cmd_plan.py5
-rw-r--r--qtip/collector/parser/grep.py5
-rw-r--r--qtip/driver/ansible/__init__.py0
-rw-r--r--qtip/driver/ansible/ansible.py (renamed from qtip/driver/ansible.py)2
-rw-r--r--qtip/driver/ansible/playbook/bwn_ng.yaml23
-rw-r--r--qtip/driver/ansible/playbook/inxi.yaml23
-rw-r--r--qtip/driver/ansible/playbook/prepare_env.yaml42
-rw-r--r--qtip/driver/ansible/playbook/top.yaml10
-rw-r--r--qtip/loader/file.py4
-rw-r--r--qtip/loader/yaml_file.py4
-rw-r--r--qtip/runner/__init__.py12
-rw-r--r--qtip/util/dev.py (renamed from tests/__init__.py)13
-rw-r--r--qtip/util/formula.py6
-rw-r--r--setup.cfg2
-rw-r--r--test-requirements.txt4
-rw-r--r--tests/data/benchmarks/QPI/compute.yaml8
-rw-r--r--tests/data/benchmarks/QPI/fake_qpi.yaml8
-rw-r--r--tests/data/benchmarks/metric/dhrystone.yaml8
-rw-r--r--tests/data/benchmarks/metric/dpi.yaml8
-rw-r--r--tests/data/benchmarks/metric/fake-metric.yaml8
-rw-r--r--tests/data/benchmarks/metric/ramspeed.yaml8
-rw-r--r--tests/data/benchmarks/metric/ssl.yaml8
-rw-r--r--tests/data/benchmarks/metric/whetstone.yaml8
-rw-r--r--tests/data/benchmarks/plan/compute.yaml46
-rw-r--r--tests/data/benchmarks/plan/doctor.yaml8
-rw-r--r--tests/data/external/sysinfo/bwm-dump.log24
-rwxr-xr-xtests/data/external/sysinfo/inxi.log20
-rw-r--r--tests/data/external/sysinfo/top.log452
-rw-r--r--tests/data/yaml/invalid.yaml8
-rw-r--r--tests/data/yaml/with_name.yaml8
-rw-r--r--tests/data/yaml/without_name.yaml8
-rw-r--r--tests/unit/base/error_test.py48
-rw-r--r--tests/unit/cli/cmd_metric_test.py (renamed from tests/unit/cli/test_metric.py)0
-rw-r--r--tests/unit/cli/cmd_plan_test.py (renamed from tests/unit/cli/test_plan.py)0
-rw-r--r--tests/unit/cli/cmd_qpi_test.py (renamed from tests/unit/cli/test_qpi.py)0
-rw-r--r--tests/unit/cli/options_test.py (renamed from tests/unit/cli/test_options.py)0
-rw-r--r--tests/unit/collector/grep_test.py4
-rw-r--r--tests/unit/loader/metric_test.py6
-rw-r--r--tests/unit/loader/plan_test.py5
-rw-r--r--tests/unit/loader/qpi_test.py5
-rw-r--r--tests/unit/loader/yaml_file_test.py4
-rw-r--r--tests/unit/util/dev_test.py32
-rw-r--r--third-party/License/.gitrepo11
-rw-r--r--third-party/License/README.md10
-rwxr-xr-xthird-party/License/add_license.sh180
-rw-r--r--tox.ini2
155 files changed, 1734 insertions, 96 deletions
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 00000000..dfaeae60
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,27 @@
+# .coveragerc to control coverage.py
+
+[run]
+branch = True
+source =
+ qtip
+
+[report]
+# Regexes for lines to exclude from consideration
+exclude_lines =
+ # Have to re-enable the standard pragma
+ pragma: no cover
+
+ # Don't complain about missing debug-only code:
+ def __repr__
+ if self\.debug
+
+ # Don't complain if tests don't hit defensive assertion code:
+ raise AssertionError
+ raise NotImplementedError
+
+ # Don't complain if non-runnable code isn't run:
+ if 0:
+ if __name__ == .__main__.:
+
+ignore_errors = True
+
diff --git a/docs/apidocs/index.rst b/docs/development/design/apidocs/index.rst
index 241a2680..241a2680 100644
--- a/docs/apidocs/index.rst
+++ b/docs/development/design/apidocs/index.rst
diff --git a/docs/apidocs/qtip_restful_api.rst b/docs/development/design/apidocs/qtip_restful_api.rst
index 06c01292..06c01292 100644
--- a/docs/apidocs/qtip_restful_api.rst
+++ b/docs/development/design/apidocs/qtip_restful_api.rst
diff --git a/docs/designspec/compute_QPI.rst b/docs/development/design/compute_QPI.rst
index 2e5aa87c..2e5aa87c 100644
--- a/docs/designspec/compute_QPI.rst
+++ b/docs/development/design/compute_QPI.rst
diff --git a/docs/designspec/dashboard.rst b/docs/development/design/dashboard.rst
index 60c4720d..60c4720d 100644
--- a/docs/designspec/dashboard.rst
+++ b/docs/development/design/dashboard.rst
diff --git a/docs/designspec/index.rst b/docs/development/design/index.rst
index b6dd0c01..b6dd0c01 100644
--- a/docs/designspec/index.rst
+++ b/docs/development/design/index.rst
diff --git a/docs/designspec/integration_with_yardstick.rst b/docs/development/design/integration_with_yardstick.rst
index a8298d6f..a8298d6f 100644
--- a/docs/designspec/integration_with_yardstick.rst
+++ b/docs/development/design/integration_with_yardstick.rst
diff --git a/qtip/api/cmd/__init__.py b/docs/development/overview/.gitkeep
index e69de29b..e69de29b 100644
--- a/qtip/api/cmd/__init__.py
+++ b/docs/development/overview/.gitkeep
diff --git a/tests/unit/__init__.py b/docs/development/requirement/.gitkeep
index e69de29b..e69de29b 100644
--- a/tests/unit/__init__.py
+++ b/docs/development/requirement/.gitkeep
diff --git a/docs/configguide/configuration.rst b/docs/release/configguide/configuration.rst
index 78e96492..78e96492 100644
--- a/docs/configguide/configuration.rst
+++ b/docs/release/configguide/configuration.rst
diff --git a/docs/configguide/index.rst b/docs/release/configguide/index.rst
index d5e05d63..d5e05d63 100644
--- a/docs/configguide/index.rst
+++ b/docs/release/configguide/index.rst
diff --git a/tests/unit/cli/__init__.py b/docs/release/installation/.gitkeep
index e69de29b..e69de29b 100644
--- a/tests/unit/cli/__init__.py
+++ b/docs/release/installation/.gitkeep
diff --git a/docs/releasenotes/brahmaputra.rst b/docs/release/release-notes/brahmaputra.rst
index 92fafd80..92fafd80 100644
--- a/docs/releasenotes/brahmaputra.rst
+++ b/docs/release/release-notes/brahmaputra.rst
diff --git a/docs/releasenotes/index.rst b/docs/release/release-notes/index.rst
index 5d045388..5d045388 100644
--- a/docs/releasenotes/index.rst
+++ b/docs/release/release-notes/index.rst
diff --git a/tests/unit/collector/transformer/__init__.py b/docs/release/scenarios/.gitkeep
index e69de29b..e69de29b 100644
--- a/tests/unit/collector/transformer/__init__.py
+++ b/docs/release/scenarios/.gitkeep
diff --git a/docs/userguide/_01-compute.rst b/docs/release/userguide/_01-compute.rst
index 56be5488..56be5488 100644
--- a/docs/userguide/_01-compute.rst
+++ b/docs/release/userguide/_01-compute.rst
diff --git a/docs/userguide/_02-network.rst b/docs/release/userguide/_02-network.rst
index 00fe5b0a..00fe5b0a 100644
--- a/docs/userguide/_02-network.rst
+++ b/docs/release/userguide/_02-network.rst
diff --git a/docs/userguide/_03-storage.rst b/docs/release/userguide/_03-storage.rst
index b1490432..b1490432 100644
--- a/docs/userguide/_03-storage.rst
+++ b/docs/release/userguide/_03-storage.rst
diff --git a/docs/userguide/_testcase_description.rst b/docs/release/userguide/_testcase_description.rst
index d60ca949..d60ca949 100644
--- a/docs/userguide/_testcase_description.rst
+++ b/docs/release/userguide/_testcase_description.rst
diff --git a/docs/userguide/annex.rst b/docs/release/userguide/annex.rst
index e8bf5555..e8bf5555 100644
--- a/docs/userguide/annex.rst
+++ b/docs/release/userguide/annex.rst
diff --git a/docs/userguide/benchmark-suites.rst b/docs/release/userguide/benchmark-suites.rst
index 84d1c647..84d1c647 100644
--- a/docs/userguide/benchmark-suites.rst
+++ b/docs/release/userguide/benchmark-suites.rst
diff --git a/docs/userguide/index.rst b/docs/release/userguide/index.rst
index 4be3e498..4be3e498 100644
--- a/docs/userguide/index.rst
+++ b/docs/release/userguide/index.rst
diff --git a/docs/userguide/introduction.rst b/docs/release/userguide/introduction.rst
index 3147f0aa..3147f0aa 100644
--- a/docs/userguide/introduction.rst
+++ b/docs/release/userguide/introduction.rst
diff --git a/tests/unit/loader/__init__.py b/docs/testing/.gitkeep
index e69de29b..e69de29b 100644
--- a/tests/unit/loader/__init__.py
+++ b/docs/testing/.gitkeep
diff --git a/legacy/__init__.py b/legacy/__init__.py
index e69de29b..48893ae6 100644
--- a/legacy/__init__.py
+++ b/legacy/__init__.py
@@ -0,0 +1,8 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
diff --git a/tests/unit/runner/__init__.py b/legacy/api/cmd/__init__.py
index e69de29b..e69de29b 100644
--- a/tests/unit/runner/__init__.py
+++ b/legacy/api/cmd/__init__.py
diff --git a/qtip/api/cmd/server.py b/legacy/api/cmd/server.py
index eea45ad3..eea45ad3 100644
--- a/qtip/api/cmd/server.py
+++ b/legacy/api/cmd/server.py
diff --git a/legacy/api/handler/job_handler.py b/legacy/api/handler/job_handler.py
index b75da5ff..4ecc1cee 100644
--- a/legacy/api/handler/job_handler.py
+++ b/legacy/api/handler/job_handler.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import threading
from copy import copy
diff --git a/legacy/api/model/job_model.py b/legacy/api/model/job_model.py
index f7eb9fda..73baf660 100644
--- a/legacy/api/model/job_model.py
+++ b/legacy/api/model/job_model.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
from flask_restful import fields
from flask_restful_swagger import swagger
diff --git a/legacy/api/router/mapper.py b/legacy/api/router/mapper.py
index 8839f3f5..470d18e2 100644
--- a/legacy/api/router/mapper.py
+++ b/legacy/api/router/mapper.py
@@ -1,4 +1,12 @@
-from legacy.api.handler import Job, JobList
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+from legacy.api.handler.job_handler import Job, JobList
mappers = [
diff --git a/legacy/api/router/mapper.py.orig b/legacy/api/router/mapper.py.orig
new file mode 100644
index 00000000..1acb40b5
--- /dev/null
+++ b/legacy/api/router/mapper.py.orig
@@ -0,0 +1,19 @@
+<<<<<<< HEAD
+from legacy.api.handler.job_handler import Job, JobList
+=======
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+from legacy.api.handler import Job, JobList
+>>>>>>> 615b529... Add licence header according to OPNFV contribution guidelines[1] by script[2]
+
+
+mappers = [
+ (JobList, '/api/v1.0/jobs'),
+ (Job, '/api/v1.0/jobs/<string:id>'),
+]
diff --git a/legacy/assets/perftest/common/git_proxy_pbook.yaml b/legacy/assets/perftest/common/git_proxy_pbook.yaml
index 5cb6f450..e190162b 100644
--- a/legacy/assets/perftest/common/git_proxy_pbook.yaml
+++ b/legacy/assets/perftest/common/git_proxy_pbook.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
#git
- name: set git proxy(http)
shell: "git config --global http.proxy {{ http_proxy }}"
diff --git a/legacy/assets/perftest/common/sys_info_pbook.yaml b/legacy/assets/perftest/common/sys_info_pbook.yaml
deleted file mode 100644
index 5c2d8f79..00000000
--- a/legacy/assets/perftest/common/sys_info_pbook.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
- - name: Epel Release install when CentOS
- shell: sudo yum install epel-release -y
- when: ansible_os_family == "RedHat"
-
- - name: Inxi install when CentOS
- shell: sudo yum install inxi -y
- when: ansible_os_family == "RedHat"
-
- - name: Software Properties Common
- shell: sudo apt-get install software-properties-common -y
- when: ansible_os_family == "Debian"
-
- - name: adding trusty-backport main repo
- shell: sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse"
- when: ansible_os_family == "Debian"
-
- - name: adding trusty main repo
- shell: sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse"
- when: ansible_os_family == "Debian"
-
- - name: system info collection tool install when Ubuntu
- shell: sudo apt-get update && apt-get install inxi -y
- when: ansible_os_family == "Debian"
-
- - name: Install ansible copy dependencies if remote host has selinux enabled
- shell: sudo yum install libselinux-python -y
- when: ansible_os_family == "RedHat"
-
- - name: Install ansiblle copy dependencies if remote host has selinux enaled
- shell: sudo apt-get install python-selinux -y
- when: ansible_os_family == "Debian"
-
- - name: system_info script copy
- copy: src=../etc/info_collect.py dest={{home_dir.stdout}}/qtip_result/
-
- - name: collecting system informaton for non-network test cases
- shell: cd $HOME/qtip_result && sudo python info_collect.py c
- when: not network
-
- - name: collecting system information for network test cases
- shell: cd $HOME/qtip_result && sudo python info_collect.py n
- when: network
diff --git a/legacy/assets/perftest/common/sys_proxy_pbook.yaml b/legacy/assets/perftest/common/sys_proxy_pbook.yaml
index bf4a8ccb..543285e3 100644
--- a/legacy/assets/perftest/common/sys_proxy_pbook.yaml
+++ b/legacy/assets/perftest/common/sys_proxy_pbook.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
#env
- name: insert shell proxy http
lineinfile: dest=/etc/profile.d/proxy.sh state=present create=yes owner=root group=root mode=0644 regexp="export http_proxy={{ http_proxy }}"
diff --git a/legacy/assets/perftest/dhrystone.yaml b/legacy/assets/perftest/dhrystone.yaml
index 896aadfc..dd098c5e 100644
--- a/legacy/assets/perftest/dhrystone.yaml
+++ b/legacy/assets/perftest/dhrystone.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- hosts: localhost
connection: local
gather_facts: no
diff --git a/legacy/assets/perftest/dpi.yaml b/legacy/assets/perftest/dpi.yaml
index 2a10bef6..55a5dcb5 100644
--- a/legacy/assets/perftest/dpi.yaml
+++ b/legacy/assets/perftest/dpi.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- hosts: localhost
connection: local
gather_facts: no
diff --git a/legacy/assets/perftest/etc/info_collect.py b/legacy/assets/perftest/etc/info_collect.py
index 3fc35d5a..3dbe55c2 100644
--- a/legacy/assets/perftest/etc/info_collect.py
+++ b/legacy/assets/perftest/etc/info_collect.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import os
import pickle
import json
diff --git a/legacy/assets/perftest/fio.yaml b/legacy/assets/perftest/fio.yaml
index 0da9407d..e6d1072d 100644
--- a/legacy/assets/perftest/fio.yaml
+++ b/legacy/assets/perftest/fio.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- hosts: localhost
connection: local
gather_facts: no
diff --git a/legacy/assets/perftest/iperf.yaml b/legacy/assets/perftest/iperf.yaml
index a1755f7c..6654c556 100644
--- a/legacy/assets/perftest/iperf.yaml
+++ b/legacy/assets/perftest/iperf.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- hosts: localhost
connection: local
gather_facts: no
diff --git a/legacy/assets/perftest/ramspeed.yaml b/legacy/assets/perftest/ramspeed.yaml
index 83ecd8bf..835d517a 100644
--- a/legacy/assets/perftest/ramspeed.yaml
+++ b/legacy/assets/perftest/ramspeed.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- hosts: localhost
connection: local
gather_facts: no
diff --git a/legacy/assets/perftest/ssl.yaml b/legacy/assets/perftest/ssl.yaml
index 6002bfff..db77a724 100644
--- a/legacy/assets/perftest/ssl.yaml
+++ b/legacy/assets/perftest/ssl.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- hosts: localhost
connection: local
gather_facts: no
diff --git a/legacy/assets/perftest/whetstone.yaml b/legacy/assets/perftest/whetstone.yaml
index d6eae85f..0037ded3 100644
--- a/legacy/assets/perftest/whetstone.yaml
+++ b/legacy/assets/perftest/whetstone.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- hosts: localhost
connection: local
gather_facts: no
diff --git a/legacy/assets/suite/compute.yaml b/legacy/assets/suite/compute.yaml
index 197d5720..ead194a4 100644
--- a/legacy/assets/suite/compute.yaml
+++ b/legacy/assets/suite/compute.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
QPI: compute
description: sample performance index of computing
diff --git a/legacy/assets/testplan/default/compute/dhrystone_bm.yaml b/legacy/assets/testplan/default/compute/dhrystone_bm.yaml
index 64741537..54f27fb6 100644
--- a/legacy/assets/testplan/default/compute/dhrystone_bm.yaml
+++ b/legacy/assets/testplan/default/compute/dhrystone_bm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: dhrystone
diff --git a/legacy/assets/testplan/default/compute/dhrystone_vm.yaml b/legacy/assets/testplan/default/compute/dhrystone_vm.yaml
index 8f5a4165..06377bea 100644
--- a/legacy/assets/testplan/default/compute/dhrystone_vm.yaml
+++ b/legacy/assets/testplan/default/compute/dhrystone_vm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: dhrystone
host: virtualmachine_1, virtualmachine_2
diff --git a/legacy/assets/testplan/default/compute/dpi_bm.yaml b/legacy/assets/testplan/default/compute/dpi_bm.yaml
index 14cb6d0d..deb6a874 100644
--- a/legacy/assets/testplan/default/compute/dpi_bm.yaml
+++ b/legacy/assets/testplan/default/compute/dpi_bm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: dpi
host: machine_1,machine_2
diff --git a/legacy/assets/testplan/default/compute/dpi_vm.yaml b/legacy/assets/testplan/default/compute/dpi_vm.yaml
index 10e86993..4fb16842 100644
--- a/legacy/assets/testplan/default/compute/dpi_vm.yaml
+++ b/legacy/assets/testplan/default/compute/dpi_vm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: dpi
1Run : virtualmachine_1, virtualmachine_2
diff --git a/legacy/assets/testplan/default/compute/ramspeed_bm.yaml b/legacy/assets/testplan/default/compute/ramspeed_bm.yaml
index ed8fc700..c758c18d 100644
--- a/legacy/assets/testplan/default/compute/ramspeed_bm.yaml
+++ b/legacy/assets/testplan/default/compute/ramspeed_bm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: ramspeed
host: machine_1, machine_2
diff --git a/legacy/assets/testplan/default/compute/ramspeed_vm.yaml b/legacy/assets/testplan/default/compute/ramspeed_vm.yaml
index a6a4363f..5f7ab831 100644
--- a/legacy/assets/testplan/default/compute/ramspeed_vm.yaml
+++ b/legacy/assets/testplan/default/compute/ramspeed_vm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: ramspeed
host: virtualmachine_1, virtualmachine_2
diff --git a/legacy/assets/testplan/default/compute/ssl_bm.yaml b/legacy/assets/testplan/default/compute/ssl_bm.yaml
index cc5a8903..bb2ee64a 100644
--- a/legacy/assets/testplan/default/compute/ssl_bm.yaml
+++ b/legacy/assets/testplan/default/compute/ssl_bm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: ssl
host: machine_1,machine_2
diff --git a/legacy/assets/testplan/default/compute/ssl_vm.yaml b/legacy/assets/testplan/default/compute/ssl_vm.yaml
index 37824896..ca18393b 100644
--- a/legacy/assets/testplan/default/compute/ssl_vm.yaml
+++ b/legacy/assets/testplan/default/compute/ssl_vm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: ssl
host: virtualmachine_1, virtualmachine_2
diff --git a/legacy/assets/testplan/default/compute/whetstone_bm.yaml b/legacy/assets/testplan/default/compute/whetstone_bm.yaml
index 3c128b60..1d3add50 100644
--- a/legacy/assets/testplan/default/compute/whetstone_bm.yaml
+++ b/legacy/assets/testplan/default/compute/whetstone_bm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: whetstone
host: machine_1, machine_2
diff --git a/legacy/assets/testplan/default/compute/whetstone_vm.yaml b/legacy/assets/testplan/default/compute/whetstone_vm.yaml
index 0f1e8748..4e0e1d80 100644
--- a/legacy/assets/testplan/default/compute/whetstone_vm.yaml
+++ b/legacy/assets/testplan/default/compute/whetstone_vm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: whetstone
host: virtualmachine_1, virtualmachine_1
diff --git a/legacy/assets/testplan/default/network/iperf_bm.yaml b/legacy/assets/testplan/default/network/iperf_bm.yaml
index 3aa8310d..3b10a383 100644
--- a/legacy/assets/testplan/default/network/iperf_bm.yaml
+++ b/legacy/assets/testplan/default/network/iperf_bm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: iperf
topology: Client and Server on different baremetal Compute nodes
diff --git a/legacy/assets/testplan/default/network/iperf_vm.yaml b/legacy/assets/testplan/default/network/iperf_vm.yaml
index 49bf13ad..e42dc0bb 100644
--- a/legacy/assets/testplan/default/network/iperf_vm.yaml
+++ b/legacy/assets/testplan/default/network/iperf_vm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: iperf
topology: Client and Server on ONE compute
diff --git a/legacy/assets/testplan/default/network/iperf_vm_2.yaml b/legacy/assets/testplan/default/network/iperf_vm_2.yaml
index c5b94715..8a1d1a0d 100644
--- a/legacy/assets/testplan/default/network/iperf_vm_2.yaml
+++ b/legacy/assets/testplan/default/network/iperf_vm_2.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: iperf
topology: Client and Server on two different compute nodes
diff --git a/legacy/assets/testplan/default/storage/fio_bm.yaml b/legacy/assets/testplan/default/storage/fio_bm.yaml
index d0001ea2..d226b1af 100644
--- a/legacy/assets/testplan/default/storage/fio_bm.yaml
+++ b/legacy/assets/testplan/default/storage/fio_bm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: fio
host: machine_1, machine_2
diff --git a/legacy/assets/testplan/default/storage/fio_vm.yaml b/legacy/assets/testplan/default/storage/fio_vm.yaml
index 0e7f121b..b1cf3142 100644
--- a/legacy/assets/testplan/default/storage/fio_vm.yaml
+++ b/legacy/assets/testplan/default/storage/fio_vm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: fio
host: virtualmachine_1, virtualmachine_2
diff --git a/legacy/config/SampleHeat.yaml b/legacy/config/SampleHeat.yaml
index a42cdb79..05f4c0b5 100644
--- a/legacy/config/SampleHeat.yaml
+++ b/legacy/config/SampleHeat.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
heat_template_version: 2015-04-30
description: >
diff --git a/legacy/data/schema/test_bm_schema.yaml b/legacy/data/schema/test_bm_schema.yaml
index a7c27e3f..af97da70 100644
--- a/legacy/data/schema/test_bm_schema.yaml
+++ b/legacy/data/schema/test_bm_schema.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
type: map
mapping:
Scenario:
diff --git a/legacy/data/schema/test_vm_schema.yaml b/legacy/data/schema/test_vm_schema.yaml
index 524f8fe4..ca632e50 100644
--- a/legacy/data/schema/test_vm_schema.yaml
+++ b/legacy/data/schema/test_vm_schema.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
type: map
mapping:
Scenario:
diff --git a/legacy/data/test.yml b/legacy/data/test.yml
index 270e86fd..d27bce3c 100644
--- a/legacy/data/test.yml
+++ b/legacy/data/test.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- hosts: sample_group_name
tasks:
- name: just an uname
diff --git a/legacy/data/testplan/bm_ping.yaml b/legacy/data/testplan/bm_ping.yaml
index 41d696e2..39c05aad 100644
--- a/legacy/data/testplan/bm_ping.yaml
+++ b/legacy/data/testplan/bm_ping.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: dhrystone
diff --git a/legacy/data/testplan/bm_with_proxy.yaml b/legacy/data/testplan/bm_with_proxy.yaml
index 1d73300b..ef9e651e 100644
--- a/legacy/data/testplan/bm_with_proxy.yaml
+++ b/legacy/data/testplan/bm_with_proxy.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: dhrystone
diff --git a/legacy/data/testplan/bm_without_proxy.yaml b/legacy/data/testplan/bm_without_proxy.yaml
index a9ae3b71..8a1f3b05 100644
--- a/legacy/data/testplan/bm_without_proxy.yaml
+++ b/legacy/data/testplan/bm_without_proxy.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: dhrystone
diff --git a/legacy/data/testplan/vm.yaml b/legacy/data/testplan/vm.yaml
index 4c8453ca..9ba13b30 100644
--- a/legacy/data/testplan/vm.yaml
+++ b/legacy/data/testplan/vm.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
benchmark: iperf
topology: Client and Server on ONE compute
diff --git a/legacy/data/testplan/vm_error.yaml b/legacy/data/testplan/vm_error.yaml
index f13d3a00..d5cd6df6 100644
--- a/legacy/data/testplan/vm_error.yaml
+++ b/legacy/data/testplan/vm_error.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
Scenario:
topology: Client and Server on ONE compute
server : virtualmachine_1
diff --git a/docs/download/sample_config.yaml b/legacy/docs/download/sample_config.yaml
index 13f6d3fe..72c16bf4 100644
--- a/docs/download/sample_config.yaml
+++ b/legacy/docs/download/sample_config.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
## This is a sample Config.yaml file
#Scenario would define the test case scenario.
diff --git a/docs/overview/index.rst b/legacy/docs/overview/index.rst
index 9a387360..9a387360 100644
--- a/docs/overview/index.rst
+++ b/legacy/docs/overview/index.rst
diff --git a/docs/overview/overview.rst b/legacy/docs/overview/overview.rst
index 4fd42356..4fd42356 100644
--- a/docs/overview/overview.rst
+++ b/legacy/docs/overview/overview.rst
diff --git a/legacy/scripts/ref_results/compute_benchmarks_indices.py b/legacy/scripts/ref_results/compute_benchmarks_indices.py
index 0b6eae36..936b58df 100644
--- a/legacy/scripts/ref_results/compute_benchmarks_indices.py
+++ b/legacy/scripts/ref_results/compute_benchmarks_indices.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
from index_calculation import generic_index as get_index
from index_calculation import get_reference
from result_accum import result_concat as concat
diff --git a/legacy/scripts/ref_results/index_calculation.py b/legacy/scripts/ref_results/index_calculation.py
index 95c3c4a6..14c2d4d2 100644
--- a/legacy/scripts/ref_results/index_calculation.py
+++ b/legacy/scripts/ref_results/index_calculation.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import json
diff --git a/legacy/scripts/ref_results/network_benchmarks_indices.py b/legacy/scripts/ref_results/network_benchmarks_indices.py
index c19d18eb..67980ee9 100644
--- a/legacy/scripts/ref_results/network_benchmarks_indices.py
+++ b/legacy/scripts/ref_results/network_benchmarks_indices.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
from index_calculation import generic_index as get_index
from index_calculation import get_reference
from result_accum import result_concat as concat
diff --git a/legacy/scripts/ref_results/result_accum.py b/legacy/scripts/ref_results/result_accum.py
index 6cd55886..6eb169e8 100644
--- a/legacy/scripts/ref_results/result_accum.py
+++ b/legacy/scripts/ref_results/result_accum.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import os
import json
diff --git a/legacy/scripts/ref_results/storage_benchmarks_indices.py b/legacy/scripts/ref_results/storage_benchmarks_indices.py
index a5aef638..e87fe36b 100644
--- a/legacy/scripts/ref_results/storage_benchmarks_indices.py
+++ b/legacy/scripts/ref_results/storage_benchmarks_indices.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
from index_calculation import generic_index as get_index
from index_calculation import get_reference
from result_accum import result_concat as concat
diff --git a/legacy/tests/api/test_server.py b/legacy/tests/api/test_server.py
index e9364d3d..bf316f5d 100644
--- a/legacy/tests/api/test_server.py
+++ b/legacy/tests/api/test_server.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import json
import time
diff --git a/legacy/tests/cli_test.py b/legacy/tests/cli_test.py
index 0f3e4158..5b7eac65 100644
--- a/legacy/tests/cli_test.py
+++ b/legacy/tests/cli_test.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import pytest
import mock
import os
diff --git a/legacy/tests/create_zones_test.py b/legacy/tests/create_zones_test.py
index dcfff5ec..1aa37477 100644
--- a/legacy/tests/create_zones_test.py
+++ b/legacy/tests/create_zones_test.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import pytest
import mock
from mock import Mock, MagicMock
diff --git a/legacy/tests/driver_test.py b/legacy/tests/driver_test.py
index 432ce1ae..abe8cfbb 100644
--- a/legacy/tests/driver_test.py
+++ b/legacy/tests/driver_test.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import pytest
import mock
from qtip.utils.driver import Driver
diff --git a/legacy/tests/functional/yaml_schema_test.py b/legacy/tests/functional/yaml_schema_test.py
index a975dca6..3c7994a5 100644
--- a/legacy/tests/functional/yaml_schema_test.py
+++ b/legacy/tests/functional/yaml_schema_test.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import os
import os.path
from pykwalify.core import Core
diff --git a/legacy/tests/helper/perftest.yaml b/legacy/tests/helper/perftest.yaml
index 26c58452..57948b62 100644
--- a/legacy/tests/helper/perftest.yaml
+++ b/legacy/tests/helper/perftest.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 taseer94@gmail.com and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
tests:
diff --git a/legacy/tests/helper/suite.yaml b/legacy/tests/helper/suite.yaml
index 718ae440..84bf9239 100644
--- a/legacy/tests/helper/suite.yaml
+++ b/legacy/tests/helper/suite.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 taseer94@gmail.com and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
tests:
diff --git a/legacy/tests/helper/version.yaml b/legacy/tests/helper/version.yaml
index b23f16f2..59be4256 100644
--- a/legacy/tests/helper/version.yaml
+++ b/legacy/tests/helper/version.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 taseer94@gmail.com and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
tests:
diff --git a/legacy/tests/spawn_vm_test.py b/legacy/tests/spawn_vm_test.py
index ba237378..ac58db27 100644
--- a/legacy/tests/spawn_vm_test.py
+++ b/legacy/tests/spawn_vm_test.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import pytest
import mock
from mock import Mock, MagicMock
diff --git a/legacy/utils/dashboard/pushtoDB.py b/legacy/utils/dashboard/pushtoDB.py
index 427d39c4..ce54aebd 100644
--- a/legacy/utils/dashboard/pushtoDB.py
+++ b/legacy/utils/dashboard/pushtoDB.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import requests
import json
import datetime
diff --git a/legacy/utils/report/get_indices.py b/legacy/utils/report/get_indices.py
index 91219c0b..42db6584 100644
--- a/legacy/utils/report/get_indices.py
+++ b/legacy/utils/report/get_indices.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import json
diff --git a/legacy/utils/report/get_results.py b/legacy/utils/report/get_results.py
index 23fd5383..6df88235 100644
--- a/legacy/utils/report/get_results.py
+++ b/legacy/utils/report/get_results.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import os
import json
diff --git a/legacy/utils/report/qtip_graph.py b/legacy/utils/report/qtip_graph.py
index acbda40c..68ed660f 100644
--- a/legacy/utils/report/qtip_graph.py
+++ b/legacy/utils/report/qtip_graph.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
diff --git a/legacy/utils/report/qtip_report.py b/legacy/utils/report/qtip_report.py
index 6809e892..1097df5f 100644
--- a/legacy/utils/report/qtip_report.py
+++ b/legacy/utils/report/qtip_report.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib.units import inch
diff --git a/legacy/utils/transform/dpi_transform.py b/legacy/utils/transform/dpi_transform.py
index ee29d8e2..bc837311 100644
--- a/legacy/utils/transform/dpi_transform.py
+++ b/legacy/utils/transform/dpi_transform.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import os
import pickle
import datetime
diff --git a/legacy/utils/transform/final_report.py b/legacy/utils/transform/final_report.py
index 274742d4..1d7c3001 100644
--- a/legacy/utils/transform/final_report.py
+++ b/legacy/utils/transform/final_report.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import pickle
import json
import datetime
diff --git a/legacy/utils/transform/fio_transform.py b/legacy/utils/transform/fio_transform.py
index 5ecac823..e8de2f9a 100755..100644
--- a/legacy/utils/transform/fio_transform.py
+++ b/legacy/utils/transform/fio_transform.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import json
import pickle
import os
diff --git a/legacy/utils/transform/iperf_transform.py b/legacy/utils/transform/iperf_transform.py
index b52e4634..c5eef6f5 100644
--- a/legacy/utils/transform/iperf_transform.py
+++ b/legacy/utils/transform/iperf_transform.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import json
import datetime
import pickle
diff --git a/legacy/utils/transform/ramspeed_transform.py b/legacy/utils/transform/ramspeed_transform.py
index 960f84fc..9aa713ff 100644
--- a/legacy/utils/transform/ramspeed_transform.py
+++ b/legacy/utils/transform/ramspeed_transform.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import os
import pickle
import datetime
diff --git a/legacy/utils/transform/ssl_transform.py b/legacy/utils/transform/ssl_transform.py
index de84d24b..24b696e5 100644
--- a/legacy/utils/transform/ssl_transform.py
+++ b/legacy/utils/transform/ssl_transform.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import os
import pickle
import datetime
diff --git a/legacy/utils/transform/ubench_transform.py b/legacy/utils/transform/ubench_transform.py
index ab5fe171..fe687118 100644
--- a/legacy/utils/transform/ubench_transform.py
+++ b/legacy/utils/transform/ubench_transform.py
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
import os
import json
import pickle
diff --git a/opt/infra/roles/docker/handlers/main.yml b/opt/infra/roles/docker/handlers/main.yml
index 985f8d41..dddbdc6b 100644
--- a/opt/infra/roles/docker/handlers/main.yml
+++ b/opt/infra/roles/docker/handlers/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
- name: starting docker service
become: true
diff --git a/opt/infra/roles/docker/tasks/main.yml b/opt/infra/roles/docker/tasks/main.yml
index 1cf3bea0..6cf0a6b5 100644
--- a/opt/infra/roles/docker/tasks/main.yml
+++ b/opt/infra/roles/docker/tasks/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- name: adding keys
become: true
apt_key: keyserver=hkp://p80.pool.sks-keyservers.net id=0X58118E89F3A912897C070ADBF76221572C52609D
diff --git a/opt/infra/roles/elk/tasks/main.yml b/opt/infra/roles/elk/tasks/main.yml
index ed987f1a..12bc7bf6 100644
--- a/opt/infra/roles/elk/tasks/main.yml
+++ b/opt/infra/roles/elk/tasks/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
- name: pulling elasticsearch and kibana
become: true
diff --git a/opt/infra/roles/mongo/tasks/main.yml b/opt/infra/roles/mongo/tasks/main.yml
index 81fb49b5..daa2b519 100644
--- a/opt/infra/roles/mongo/tasks/main.yml
+++ b/opt/infra/roles/mongo/tasks/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
- name: pulling mongo
become: true
diff --git a/opt/infra/roles/nginx/defaults/main.yml b/opt/infra/roles/nginx/defaults/main.yml
index cdd1d773..9cd8a7b5 100644
--- a/opt/infra/roles/nginx/defaults/main.yml
+++ b/opt/infra/roles/nginx/defaults/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
services:
- { name: kibana, upstream: 'http://127.0.0.1:5601' }
diff --git a/opt/infra/roles/nginx/handlers/main.yml b/opt/infra/roles/nginx/handlers/main.yml
index 35585363..8bbd88c9 100644
--- a/opt/infra/roles/nginx/handlers/main.yml
+++ b/opt/infra/roles/nginx/handlers/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
- name: restart nginx
become: true
diff --git a/opt/infra/roles/nginx/tasks/main.yml b/opt/infra/roles/nginx/tasks/main.yml
index 5c78166c..99e5678e 100644
--- a/opt/infra/roles/nginx/tasks/main.yml
+++ b/opt/infra/roles/nginx/tasks/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
- name: nginx is installed
become: true
diff --git a/opt/infra/roles/qtip/tasks/main.yml b/opt/infra/roles/qtip/tasks/main.yml
index b8292791..cbbde6cb 100644
--- a/opt/infra/roles/qtip/tasks/main.yml
+++ b/opt/infra/roles/qtip/tasks/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
# TODO:change the script to docker_container.
- name: setting up qtip
diff --git a/opt/infra/roles/testapi/tasks/main.yml b/opt/infra/roles/testapi/tasks/main.yml
index 8ca91396..5ff176b6 100644
--- a/opt/infra/roles/testapi/tasks/main.yml
+++ b/opt/infra/roles/testapi/tasks/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
- name: setting up testapi
become: true
diff --git a/opt/infra/roles/user/defaults/main.yml b/opt/infra/roles/user/defaults/main.yml
index ef496dd4..90e56b0b 100644
--- a/opt/infra/roles/user/defaults/main.yml
+++ b/opt/infra/roles/user/defaults/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
users:
- { name: yujunz, comment: "Yujun Zhang <zhang.yujunz@zte.com.cn>" }
diff --git a/opt/infra/roles/user/tasks/main.yml b/opt/infra/roles/user/tasks/main.yml
index b1b5be9b..bb4ca141 100644
--- a/opt/infra/roles/user/tasks/main.yml
+++ b/opt/infra/roles/user/tasks/main.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
- name: add group qtip
become: true
group: name=qtip state=present
diff --git a/opt/infra/test.yml b/opt/infra/test.yml
index ee3ded13..c61faaf8 100644
--- a/opt/infra/test.yml
+++ b/opt/infra/test.yml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
---
- hosts: testing
roles:
diff --git a/qtip/base/error.py b/qtip/base/error.py
index a055aa8d..f23d8cd9 100644
--- a/qtip/base/error.py
+++ b/qtip/base/error.py
@@ -12,16 +12,16 @@ class BaseError(Exception):
pass
-class InvalidContent(BaseError):
+class InvalidContentError(BaseError):
def __init__(self, filename, excinfo=None):
self.filename = filename
self.excinfo = excinfo
-class NotFound(BaseError):
- def __init__(self, module, package='qtip'):
- self.package = package
- self.module = module
+class NotFoundError(BaseError):
+ def __init__(self, needle, heystack='qtip'):
+ self.needle = needle
+ self.heystack = heystack
class ToBeDoneError(BaseError):
@@ -29,9 +29,3 @@ class ToBeDoneError(BaseError):
def __init__(self, method, module):
self.method = method
self.module = module
-
-
-def make_tbd(method, module='qtip'):
- def tbd():
- raise ToBeDoneError(method, module)
- return tbd
diff --git a/qtip/cli/commands/cmd_plan.py b/qtip/cli/commands/cmd_plan.py
index 0c0a3c12..c1dd7cf6 100644
--- a/qtip/cli/commands/cmd_plan.py
+++ b/qtip/cli/commands/cmd_plan.py
@@ -24,11 +24,8 @@ def cli(ctx):
@cli.command('init', help='Initialize Environment')
-@click.option('--inst_type', prompt='Installer Type')
-@click.option('--inst_ip', prompt='Installer IP')
-@click.option('--ext_net', prompt='Openstack External Network')
@pass_context
-def init(ctx, inst_type, inst_ip, ext_net):
+def init(ctx):
pass
diff --git a/qtip/collector/parser/grep.py b/qtip/collector/parser/grep.py
index d7ada485..c3274bc2 100644
--- a/qtip/collector/parser/grep.py
+++ b/qtip/collector/parser/grep.py
@@ -29,5 +29,6 @@ class GrepParser(BaseActor):
def grep_in_file(filename, regex):
- with open(filename, 'r') as f:
- return filter(lambda x: x is not None, [re.search(regex, line) for line in f])
+ with open(filename, "r") as outfile:
+ return filter(lambda x: x is not None,
+ list(re.finditer(regex, outfile.read(), re.MULTILINE)))
diff --git a/qtip/driver/ansible/__init__.py b/qtip/driver/ansible/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/qtip/driver/ansible/__init__.py
diff --git a/qtip/driver/ansible.py b/qtip/driver/ansible/ansible.py
index 04e9f9bd..cd17625d 100644
--- a/qtip/driver/ansible.py
+++ b/qtip/driver/ansible/ansible.py
@@ -7,7 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from base import BaseDriver
+from qtip.driver.base import BaseDriver
class AnsibleDriver(BaseDriver):
diff --git a/qtip/driver/ansible/playbook/bwn_ng.yaml b/qtip/driver/ansible/playbook/bwn_ng.yaml
new file mode 100644
index 00000000..99477856
--- /dev/null
+++ b/qtip/driver/ansible/playbook/bwn_ng.yaml
@@ -0,0 +1,23 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+- name: Install bwm-ng when CentOS
+ yum:
+ name: bwm-ng
+ state: present
+ when: ansible_os_family == "RedHat"
+
+- name: Install bwm-ng when Ubuntu
+ apt:
+ name: bwm-ng
+ state: present
+ update_cache: yes
+ when: ansible_os_family == "Debian"
+
+- name: Run bwm-ng
+ shell: bwm-ng -o plain -c 1 > $HOME/qtip_result/bwm-dump.log \ No newline at end of file
diff --git a/qtip/driver/ansible/playbook/inxi.yaml b/qtip/driver/ansible/playbook/inxi.yaml
new file mode 100644
index 00000000..f6a0311d
--- /dev/null
+++ b/qtip/driver/ansible/playbook/inxi.yaml
@@ -0,0 +1,23 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+- name: Install Inxi when CentOS
+ yum:
+ name: inxi
+ state: present
+ when: ansible_os_family == "RedHat"
+
+- name: Install Inxi when Ubuntu
+ apt:
+ name: inxi
+ state: present
+ update_cache: yes
+ when: ansible_os_family == "Debian"
+
+- name: Run inxi
+ shell: inxi -b -c0 -n > $HOME/qtip_result/inxi.log
diff --git a/qtip/driver/ansible/playbook/prepare_env.yaml b/qtip/driver/ansible/playbook/prepare_env.yaml
new file mode 100644
index 00000000..0595d988
--- /dev/null
+++ b/qtip/driver/ansible/playbook/prepare_env.yaml
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+- name: Epel Release install when CentOS
+ yum:
+ name: epel-release
+ state: present
+ when: ansible_os_family == "RedHat"
+
+- name: Software Properties Common
+ apt:
+ name: software-properties-common
+ state: present
+ when: ansible_os_family == "Debian"
+
+- name: Adding ubuntu backport main repo
+ apt_repository:
+ repo: deb http://archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-backports main restricted universe multiverse
+ state: present
+ when: ansible_os_family == "Debian"
+
+- name: Adding ubuntu main repo
+ apt_repository:
+ repo: deb http://archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} main restricted universe multiverse
+ when: ansible_os_family == "Debian"
+
+- name: Install ansible copy dependencies if remote host has selinux enabled
+ yum:
+ name: libselinux-python
+ state: present
+ when: ansible_os_family == "RedHat"
+
+- name: Install ansiblle copy dependencies if remote host has selinux enaled
+ apt:
+ name: python-selinux
+ state: present
+ when: ansible_os_family == "Debian"
diff --git a/qtip/driver/ansible/playbook/top.yaml b/qtip/driver/ansible/playbook/top.yaml
new file mode 100644
index 00000000..8de7e3d6
--- /dev/null
+++ b/qtip/driver/ansible/playbook/top.yaml
@@ -0,0 +1,10 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+- name: Collect cpu usage
+ shell: top -bn1 > $HOME/qtip_result/top.log
diff --git a/qtip/loader/file.py b/qtip/loader/file.py
index 0ea4d5b6..038f57dd 100644
--- a/qtip/loader/file.py
+++ b/qtip/loader/file.py
@@ -12,7 +12,7 @@ from os import listdir
from os import path
from qtip.base.constant import BaseProp
-from qtip.base.error import NotFound
+from qtip.base.error import NotFoundError
from qtip.loader.base import BaseLoader
@@ -35,7 +35,7 @@ class FileLoader(BaseLoader):
abspath = path.join(p, self.RELATIVE_PATH, name)
if path.exists(abspath):
return abspath
- raise NotFound(name, paths)
+ raise NotFoundError(name, paths)
@classmethod
def list_all(cls, paths=None):
diff --git a/qtip/loader/yaml_file.py b/qtip/loader/yaml_file.py
index 8b78a47c..7ff838f9 100644
--- a/qtip/loader/yaml_file.py
+++ b/qtip/loader/yaml_file.py
@@ -10,7 +10,7 @@
from os import path
import yaml
-from qtip.base.error import InvalidContent
+from qtip.base.error import InvalidContentError
from qtip.base.constant import BaseProp
from qtip.loader.file import FileLoader
@@ -25,6 +25,6 @@ class YamlFileLoader(FileLoader):
with open(abspath, 'r') as stream:
content = yaml.safe_load(stream)
if not isinstance(content, dict):
- raise InvalidContent(abspath)
+ raise InvalidContentError(abspath)
self.content = content
self.name = content.get(BaseProp.NAME, path.splitext(name)[0])
diff --git a/qtip/runner/__init__.py b/qtip/runner/__init__.py
index 79c38850..52c43a14 100644
--- a/qtip/runner/__init__.py
+++ b/qtip/runner/__init__.py
@@ -8,7 +8,7 @@
##############################################################################
from qtip.base.constant import PkgName, BaseProp
-from qtip.base.error import NotFound
+from qtip.base.error import NotFoundError
from qtip.collector.stdout import StdoutCollector
from qtip.driver.random import RandomDriver
from qtip.reporter.console import ConsoleReporter
@@ -28,16 +28,16 @@ class Runner(object):
if driver_name == 'random':
self.driver = RandomDriver()
else:
- raise NotFound(driver_name, heystack=PkgName.DRIVER)
+ raise NotFoundError(driver_name, heystack=PkgName.DRIVER)
if collector_name == 'stdout':
self.collector = StdoutCollector()
else:
- raise NotFound(collector_name,
- heystack=PkgName.COLLECTOR)
+ raise NotFoundError(collector_name,
+ heystack=PkgName.COLLECTOR)
if reporter_name == 'console':
self.reporter = ConsoleReporter()
else:
- raise NotFound(reporter_name,
- heystack=PkgName.REPORTER)
+ raise NotFoundError(reporter_name,
+ heystack=PkgName.REPORTER)
diff --git a/tests/__init__.py b/qtip/util/dev.py
index d6d2dee5..b77bf1eb 100644
--- a/tests/__init__.py
+++ b/qtip/util/dev.py
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2016 ZTE Corp and others.
+# Copyright (c) 2017 ZTE Corporation and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -7,12 +7,11 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from os import path
+from qtip.base.error import ToBeDoneError
-class BaseTest(object):
- PATH = path.abspath(path.join(path.dirname(__file__), 'data'))
- @classmethod
- def abspath(cls, name):
- return path.join(cls.PATH, name)
+def create_to_be_done(method, module='qtip'):
+ def tbd():
+ raise ToBeDoneError(method, module)
+ return tbd
diff --git a/qtip/util/formula.py b/qtip/util/formula.py
index cdfbae86..e92d21f3 100644
--- a/qtip/util/formula.py
+++ b/qtip/util/formula.py
@@ -9,7 +9,7 @@
import numpy
-from qtip.base.error import make_tbd
+from qtip.util.dev import create_to_be_done
from qtip.base.constant import FormulaName
@@ -17,10 +17,10 @@ MAPPING = {
FormulaName.ARITHMETIC_MEAN: numpy.mean,
FormulaName.WEIGHTED_ARITHMETIC_MEAN: numpy.average,
# TODO(yujunz) find or implement the method
- FormulaName.GEOMETRIC_MEAN: make_tbd(FormulaName.GEOMETRIC_MEAN, __name__),
+ FormulaName.GEOMETRIC_MEAN: create_to_be_done(FormulaName.GEOMETRIC_MEAN, __name__),
# TODO(yujunz) find or implement the method
FormulaName.WEIGHTED_GEOMETRIC_MEAN:
- make_tbd(FormulaName.GEOMETRIC_MEAN, __name__)}
+ create_to_be_done(FormulaName.GEOMETRIC_MEAN, __name__)}
class Formula:
diff --git a/setup.cfg b/setup.cfg
index ced6d22e..5b9b9567 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -14,7 +14,7 @@ setup-hooks =
[entry_points]
console_scripts =
qtip = qtip.cli.entry:cli
- qtip-api = qtip.api.cmd.server:main
+ # TODO(akhil) add qtip-api
[files]
packages =
diff --git a/test-requirements.txt b/test-requirements.txt
index a5080127..e434748e 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -9,3 +9,7 @@ coverage
pykwalify
mock
pip_check_reqs
+coverage
+pytest-cov
+pytest-faker
+tox
diff --git a/tests/data/benchmarks/QPI/compute.yaml b/tests/data/benchmarks/QPI/compute.yaml
index e28efaf9..78a2d324 100644
--- a/tests/data/benchmarks/QPI/compute.yaml
+++ b/tests/data/benchmarks/QPI/compute.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
title: compute
description: sample performance index of computing
formula: weighted arithmetic mean
diff --git a/tests/data/benchmarks/QPI/fake_qpi.yaml b/tests/data/benchmarks/QPI/fake_qpi.yaml
index aa1097f4..4b34a495 100644
--- a/tests/data/benchmarks/QPI/fake_qpi.yaml
+++ b/tests/data/benchmarks/QPI/fake_qpi.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
name: Fake QPI
description: a fake QPI producing random result
formula: weighted arithmetic mean
diff --git a/tests/data/benchmarks/metric/dhrystone.yaml b/tests/data/benchmarks/metric/dhrystone.yaml
index 220b7841..e4d26248 100644
--- a/tests/data/benchmarks/metric/dhrystone.yaml
+++ b/tests/data/benchmarks/metric/dhrystone.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
name: dhrystone
description: >
A synthetic computing benchmark program intended to be representative of
diff --git a/tests/data/benchmarks/metric/dpi.yaml b/tests/data/benchmarks/metric/dpi.yaml
index fc24c8d1..c90075d2 100644
--- a/tests/data/benchmarks/metric/dpi.yaml
+++ b/tests/data/benchmarks/metric/dpi.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
name: dpi
description: deep packet inspection
workloads:
diff --git a/tests/data/benchmarks/metric/fake-metric.yaml b/tests/data/benchmarks/metric/fake-metric.yaml
index c5fcc5c2..dd2875d7 100644
--- a/tests/data/benchmarks/metric/fake-metric.yaml
+++ b/tests/data/benchmarks/metric/fake-metric.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
name: fake compute
description: >
a fake compute performance index which generate random result
diff --git a/tests/data/benchmarks/metric/ramspeed.yaml b/tests/data/benchmarks/metric/ramspeed.yaml
index bb7618b7..e2e2b98f 100644
--- a/tests/data/benchmarks/metric/ramspeed.yaml
+++ b/tests/data/benchmarks/metric/ramspeed.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
name: ramspeed
description: a memory performance benchmarking
workloads:
diff --git a/tests/data/benchmarks/metric/ssl.yaml b/tests/data/benchmarks/metric/ssl.yaml
index 21e8add7..2b01dccd 100644
--- a/tests/data/benchmarks/metric/ssl.yaml
+++ b/tests/data/benchmarks/metric/ssl.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
name: ssl
description: a Secure Sockets Layer performance benchmarking
workloads:
diff --git a/tests/data/benchmarks/metric/whetstone.yaml b/tests/data/benchmarks/metric/whetstone.yaml
index 448c9645..625ea87f 100644
--- a/tests/data/benchmarks/metric/whetstone.yaml
+++ b/tests/data/benchmarks/metric/whetstone.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
name: whetstone
description: >
A synthetic benchmark for evaluating the performance of computers.
diff --git a/tests/data/benchmarks/plan/compute.yaml b/tests/data/benchmarks/plan/compute.yaml
new file mode 100644
index 00000000..8529d8dc
--- /dev/null
+++ b/tests/data/benchmarks/plan/compute.yaml
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+name: compute QPI
+description: compute QPI profile
+info:
+ facility: local
+ engineer: local
+config:
+ driver: ansible
+ collectors:
+ - type: logfile
+ paths:
+ - '../../external/sysinfo'
+ logs:
+ - filename: top.log
+ parsers:
+ - type: grep
+ regex: 'Cpu\(s\):.+?(?P<cpu_idle>\d+\.\d)\sid'
+ - filename: inxi.log
+ parsers:
+ - type: grep
+ regex: '.+\s+Host:\s+(?P<hostname>.+)\sKernel'
+ - type: grep
+ regex: '.+\sMemory:\s+(?P<memory>.+MB)\s'
+ - type: grep
+ regex: '^CPU\(s\):\s+(?P<cpu>.+)'
+ - type: grep
+ regex: '.+\sDistro:\s+(?P<os>.+)'
+ - type: grep
+ regex: '.+\sKernel:\s+(?P<kernel>.+)\sConsole'
+ - type: grep
+ regex: '.+\s+HDD Total Size:\s+(?P<disk>.+)\s'
+ - type: grep
+ regex: '.+\sproduct:\s+(?P<product>.+)\sversion'
+ reporter:
+ name: console
+ # transform collected data into timeline
+ transformer: timeline
+QPIs:
+ - compute.yaml
diff --git a/tests/data/benchmarks/plan/doctor.yaml b/tests/data/benchmarks/plan/doctor.yaml
index f8dcf08d..af995dac 100644
--- a/tests/data/benchmarks/plan/doctor.yaml
+++ b/tests/data/benchmarks/plan/doctor.yaml
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
name: doctor performance profiling
description: create performance profile for OPNFV doctor notification time
info:
diff --git a/tests/data/external/sysinfo/bwm-dump.log b/tests/data/external/sysinfo/bwm-dump.log
new file mode 100644
index 00000000..7072b9c4
--- /dev/null
+++ b/tests/data/external/sysinfo/bwm-dump.log
@@ -0,0 +1,24 @@
+bwm-ng v0.6 (delay 0.500s); input: /proc/net/dev
+ iface Rx Tx Total
+==============================================================================
+ ens2f0.211: 0.09 KB/s 0.09 KB/s 0.09 KB/s
+ ens2f1: 2.11 KB/s 2.11 KB/s 2.11 KB/s
+ lo: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ ens4f0.210: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ br-storage: 1.86 KB/s 1.86 KB/s 1.86 KB/s
+ p_e52381cd-0: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ ens4f0: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ ens2f1.212: 1.86 KB/s 1.86 KB/s 1.86 KB/s
+ br-prv: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ br-mgmt: 0.09 KB/s 0.09 KB/s 0.09 KB/s
+ ens4f1: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ br-fw-admin: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ ens2f0: 166.42 KB/s 166.42 KB/s 166.42 KB/s
+ p_ff798dba-0: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ ens1f1: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ br-ex: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ br-floating: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ br-aux: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+ ens4f1.213: 0.00 KB/s 0.00 KB/s 0.00 KB/s
+------------------------------------------------------------------------------
+ total: 172.44 KB/s 172.44 KB/s 172.44 KB/s
diff --git a/tests/data/external/sysinfo/inxi.log b/tests/data/external/sysinfo/inxi.log
new file mode 100755
index 00000000..c5eb9382
--- /dev/null
+++ b/tests/data/external/sysinfo/inxi.log
@@ -0,0 +1,20 @@
+System: Host: node-6.zte.com.cn Kernel: 3.13.0-103-generic x86_64 (64 bit) Console: tty 6 Distro: Ubuntu 14.04 trusty
+Machine: System: ZTE product: EC600G3 version: 1.00 serial: 123456789
+ Mobo: ZTE model: XH20G2 serial: 702471300014 Bios: ZTE version: UBF03.09.59_SVN64446 date: 07/21/2016
+CPU(s): 2 Deca core Intel Xeon CPU E5-2650 v3s (-HT-MCP-SMP-) clocked at 2301.00 MHz
+Graphics: Card: Matrox Systems MGA G200e [Pilot] ServerEngines (SEP1)
+ X-Vendor: N/A driver: N/A tty size: 143x43 Advanced Data: N/A for root out of X
+Network: Card-1: Intel 82599 10 Gigabit Dual Port Backplane Connection driver: ixgbe
+ IF: ens2f0 state: up speed: 10000 Mbps duplex: full mac: 74:4a:a4:01:8b:8b
+ Card-2: Intel 82599 10 Gigabit Dual Port Backplane Connection driver: ixgbe
+ IF: ens2f1 state: up speed: 10000 Mbps duplex: full mac: 74:4a:a4:01:8b:8c
+ Card-3: Intel 82599 10 Gigabit Dual Port Backplane Connection driver: ixgbe
+ IF: ens1f0 state: down mac: 74:4a:a4:01:8b:87
+ Card-4: Intel 82599 10 Gigabit Dual Port Backplane Connection driver: ixgbe
+ IF: ens1f1 state: up speed: 10000 Mbps duplex: full mac: 74:4a:a4:01:8b:88
+ Card-5: Intel I350 Gigabit Backplane Connection driver: igb
+ IF: ens4f0 state: up speed: 1000 Mbps duplex: full mac: 74:4a:a4:00:dc:de
+ Card-6: Intel I350 Gigabit Backplane Connection driver: igb
+ IF: ens4f1 state: up speed: 1000 Mbps duplex: full mac: 74:4a:a4:00:dc:df
+Drives: HDD Total Size: 1200.3GB (0.3% used)
+Info: Processes: 446 Uptime: 12 days Memory: 1836.1/128527.0MB Runlevel: 2 Client: Shell (bash) inxi: 1.9.17
diff --git a/tests/data/external/sysinfo/top.log b/tests/data/external/sysinfo/top.log
new file mode 100644
index 00000000..b2cec325
--- /dev/null
+++ b/tests/data/external/sysinfo/top.log
@@ -0,0 +1,452 @@
+top - 06:07:47 up 12 days, 3:31, 1 user, load average: 1.10, 1.02, 1.02
+Tasks: 445 total, 2 running, 443 sleeping, 0 stopped, 0 zombie
+%Cpu(s): 0.9 us, 0.1 sy, 0.0 ni, 97.0 id, 0.0 wa, 0.0 hi, 1.9 si, 0.0 st
+KiB Mem: 13161169+total, 4220448 used, 12739124+free, 212968 buffers
+KiB Swap: 4194300 total, 0 used, 4194300 free. 2130872 cached Mem
+
+ PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
+ 139 root 20 0 0 0 0 R 70.9 0.0 6308:54 ksoftirqd/10
+ 99 root 20 0 0 0 0 S 6.4 0.0 149:00.25 ksoftirqd/2
+ 2930 root 20 0 23804 1716 1048 R 6.4 0.0 0:00.01 top
+35932 root 10 -10 1571296 181420 6788 S 6.4 0.1 101:17.81 ovs-vswitchd
+ 1 root 20 0 33864 3216 1436 S 0.0 0.0 0:06.42 init
+ 2 root 20 0 0 0 0 S 0.0 0.0 0:00.20 kthreadd
+ 3 root 20 0 0 0 0 S 0.0 0.0 5:27.83 ksoftirqd/0
+ 4 root 20 0 0 0 0 S 0.0 0.0 0:38.50 kworker/0:0
+ 5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
+ 8 root 20 0 0 0 0 S 0.0 0.0 74:24.50 rcu_sched
+ 9 root 20 0 0 0 0 S 0.0 0.0 0:56.03 rcuos/0
+ 10 root 20 0 0 0 0 S 0.0 0.0 0:45.86 rcuos/1
+ 11 root 20 0 0 0 0 S 0.0 0.0 0:46.93 rcuos/2
+ 12 root 20 0 0 0 0 S 0.0 0.0 1:38.51 rcuos/3
+ 13 root 20 0 0 0 0 S 0.0 0.0 0:42.34 rcuos/4
+ 14 root 20 0 0 0 0 S 0.0 0.0 0:35.74 rcuos/5
+ 15 root 20 0 0 0 0 S 0.0 0.0 0:35.59 rcuos/6
+ 16 root 20 0 0 0 0 S 0.0 0.0 0:31.38 rcuos/7
+ 17 root 20 0 0 0 0 S 0.0 0.0 0:48.62 rcuos/8
+ 18 root 20 0 0 0 0 S 0.0 0.0 0:42.36 rcuos/9
+ 19 root 20 0 0 0 0 S 0.0 0.0 0:07.89 rcuos/10
+ 20 root 20 0 0 0 0 S 0.0 0.0 0:10.09 rcuos/11
+ 21 root 20 0 0 0 0 S 0.0 0.0 1:13.81 rcuos/12
+ 22 root 20 0 0 0 0 S 0.0 0.0 2:08.89 rcuos/13
+ 23 root 20 0 0 0 0 S 0.0 0.0 1:25.84 rcuos/14
+ 24 root 20 0 0 0 0 S 0.0 0.0 0:30.09 rcuos/15
+ 25 root 20 0 0 0 0 S 0.0 0.0 0:26.71 rcuos/16
+ 26 root 20 0 0 0 0 S 0.0 0.0 0:20.49 rcuos/17
+ 27 root 20 0 0 0 0 S 0.0 0.0 0:39.43 rcuos/18
+ 28 root 20 0 0 0 0 S 0.0 0.0 1:05.52 rcuos/19
+ 29 root 20 0 0 0 0 S 0.0 0.0 0:15.04 rcuos/20
+ 30 root 20 0 0 0 0 S 0.0 0.0 1:54.76 rcuos/21
+ 31 root 20 0 0 0 0 S 0.0 0.0 1:14.99 rcuos/22
+ 32 root 20 0 0 0 0 S 0.0 0.0 0:50.07 rcuos/23
+ 33 root 20 0 0 0 0 S 0.0 0.0 1:10.15 rcuos/24
+ 34 root 20 0 0 0 0 S 0.0 0.0 1:32.73 rcuos/25
+ 35 root 20 0 0 0 0 S 0.0 0.0 0:33.40 rcuos/26
+ 36 root 20 0 0 0 0 S 0.0 0.0 0:40.64 rcuos/27
+ 37 root 20 0 0 0 0 S 0.0 0.0 0:13.61 rcuos/28
+ 38 root 20 0 0 0 0 S 0.0 0.0 0:22.56 rcuos/29
+ 39 root 20 0 0 0 0 S 0.0 0.0 0:02.76 rcuos/30
+ 40 root 20 0 0 0 0 S 0.0 0.0 1:31.70 rcuos/31
+ 41 root 20 0 0 0 0 S 0.0 0.0 1:05.86 rcuos/32
+ 42 root 20 0 0 0 0 S 0.0 0.0 0:13.69 rcuos/33
+ 43 root 20 0 0 0 0 S 0.0 0.0 0:10.67 rcuos/34
+ 44 root 20 0 0 0 0 S 0.0 0.0 0:11.19 rcuos/35
+ 45 root 20 0 0 0 0 S 0.0 0.0 0:07.07 rcuos/36
+ 46 root 20 0 0 0 0 S 0.0 0.0 0:03.94 rcuos/37
+ 47 root 20 0 0 0 0 S 0.0 0.0 0:03.07 rcuos/38
+ 48 root 20 0 0 0 0 S 0.0 0.0 0:06.25 rcuos/39
+ 49 root 20 0 0 0 0 S 0.0 0.0 0:00.02 rcu_bh
+ 50 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
+ 51 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/1
+ 52 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/2
+ 53 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/3
+ 54 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/4
+ 55 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/5
+ 56 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/6
+ 57 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/7
+ 58 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/8
+ 59 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/9
+ 60 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/10
+ 61 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/11
+ 62 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/12
+ 63 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/13
+ 64 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/14
+ 65 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/15
+ 66 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/16
+ 67 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/17
+ 68 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/18
+ 69 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/19
+ 70 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/20
+ 71 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/21
+ 72 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/22
+ 73 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/23
+ 74 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/24
+ 75 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/25
+ 76 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/26
+ 77 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/27
+ 78 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/28
+ 79 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/29
+ 80 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/30
+ 81 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/31
+ 82 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/32
+ 83 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/33
+ 84 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/34
+ 85 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/35
+ 86 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/36
+ 87 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/37
+ 88 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/38
+ 89 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/39
+ 90 root rt 0 0 0 0 S 0.0 0.0 0:00.68 migration/0
+ 91 root rt 0 0 0 0 S 0.0 0.0 0:01.68 watchdog/0
+ 92 root rt 0 0 0 0 S 0.0 0.0 0:01.96 watchdog/1
+ 93 root rt 0 0 0 0 S 0.0 0.0 0:00.40 migration/1
+ 94 root 20 0 0 0 0 S 0.0 0.0 1:21.55 ksoftirqd/1
+ 95 root 20 0 0 0 0 S 0.0 0.0 0:03.70 kworker/1:0
+ 96 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H
+ 97 root rt 0 0 0 0 S 0.0 0.0 0:03.18 watchdog/2
+ 98 root rt 0 0 0 0 S 0.0 0.0 0:00.59 migration/2
+ 100 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/2:0
+ 101 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/2:0H
+ 102 root rt 0 0 0 0 S 0.0 0.0 0:02.48 watchdog/3
+ 103 root rt 0 0 0 0 S 0.0 0.0 0:00.65 migration/3
+ 104 root 20 0 0 0 0 S 0.0 0.0 60:06.64 ksoftirqd/3
+ 105 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/3:0
+ 106 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/3:0H
+ 107 root rt 0 0 0 0 S 0.0 0.0 0:01.66 watchdog/4
+ 108 root rt 0 0 0 0 S 0.0 0.0 0:00.34 migration/4
+ 109 root 20 0 0 0 0 S 0.0 0.0 0:07.02 ksoftirqd/4
+ 110 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/4:0
+ 111 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/4:0H
+ 112 root rt 0 0 0 0 S 0.0 0.0 0:01.69 watchdog/5
+ 113 root rt 0 0 0 0 S 0.0 0.0 0:00.36 migration/5
+ 114 root 20 0 0 0 0 S 0.0 0.0 0:06.14 ksoftirqd/5
+ 115 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/5:0
+ 116 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/5:0H
+ 117 root rt 0 0 0 0 S 0.0 0.0 0:01.66 watchdog/6
+ 118 root rt 0 0 0 0 S 0.0 0.0 0:00.36 migration/6
+ 119 root 20 0 0 0 0 S 0.0 0.0 0:15.15 ksoftirqd/6
+ 120 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/6:0
+ 121 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/6:0H
+ 122 root rt 0 0 0 0 S 0.0 0.0 0:01.43 watchdog/7
+ 123 root rt 0 0 0 0 S 0.0 0.0 0:00.32 migration/7
+ 124 root 20 0 0 0 0 S 0.0 0.0 0:08.87 ksoftirqd/7
+ 125 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/7:0
+ 126 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/7:0H
+ 127 root rt 0 0 0 0 S 0.0 0.0 0:01.46 watchdog/8
+ 128 root rt 0 0 0 0 S 0.0 0.0 0:00.44 migration/8
+ 129 root 20 0 0 0 0 S 0.0 0.0 0:00.96 ksoftirqd/8
+ 130 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/8:0
+ 131 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/8:0H
+ 132 root rt 0 0 0 0 S 0.0 0.0 0:01.48 watchdog/9
+ 133 root rt 0 0 0 0 S 0.0 0.0 0:00.32 migration/9
+ 134 root 20 0 0 0 0 S 0.0 0.0 0:05.57 ksoftirqd/9
+ 135 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/9:0
+ 136 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/9:0H
+ 137 root rt 0 0 0 0 S 0.0 0.0 0:08.99 watchdog/10
+ 138 root rt 0 0 0 0 S 0.0 0.0 0:01.98 migration/10
+ 140 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/10:0
+ 141 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/10:0H
+ 143 root rt 0 0 0 0 S 0.0 0.0 0:08.90 watchdog/11
+ 144 root rt 0 0 0 0 S 0.0 0.0 0:02.03 migration/11
+ 145 root 20 0 0 0 0 S 0.0 0.0 6217:01 ksoftirqd/11
+ 146 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/11:0
+ 147 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/11:0H
+ 148 root rt 0 0 0 0 S 0.0 0.0 0:01.59 watchdog/12
+ 149 root rt 0 0 0 0 S 0.0 0.0 0:00.46 migration/12
+ 150 root 20 0 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/12
+ 151 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/12:0
+ 152 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/12:0H
+ 153 root rt 0 0 0 0 S 0.0 0.0 0:01.54 watchdog/13
+ 154 root rt 0 0 0 0 S 0.0 0.0 0:00.65 migration/13
+ 155 root 20 0 0 0 0 S 0.0 0.0 0:07.02 ksoftirqd/13
+ 156 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/13:0
+ 157 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/13:0H
+ 158 root rt 0 0 0 0 S 0.0 0.0 0:01.61 watchdog/14
+ 159 root rt 0 0 0 0 S 0.0 0.0 0:00.84 migration/14
+ 160 root 20 0 0 0 0 S 0.0 0.0 0:08.74 ksoftirqd/14
+ 162 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/14:0H
+ 163 root rt 0 0 0 0 S 0.0 0.0 0:01.59 watchdog/15
+ 164 root rt 0 0 0 0 S 0.0 0.0 0:00.37 migration/15
+ 165 root 20 0 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd/15
+ 166 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/15:0
+ 167 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/15:0H
+ 168 root rt 0 0 0 0 S 0.0 0.0 0:01.58 watchdog/16
+ 169 root rt 0 0 0 0 S 0.0 0.0 0:00.36 migration/16
+ 170 root 20 0 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd/16
+ 171 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/16:0
+ 172 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/16:0H
+ 173 root rt 0 0 0 0 S 0.0 0.0 0:01.57 watchdog/17
+ 174 root rt 0 0 0 0 S 0.0 0.0 0:00.33 migration/17
+ 175 root 20 0 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd/17
+ 176 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/17:0
+ 177 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/17:0H
+ 178 root rt 0 0 0 0 S 0.0 0.0 0:01.55 watchdog/18
+ 179 root rt 0 0 0 0 S 0.0 0.0 0:00.49 migration/18
+ 180 root 20 0 0 0 0 S 0.0 0.0 0:00.05 ksoftirqd/18
+ 181 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/18:0
+ 182 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/18:0H
+ 183 root rt 0 0 0 0 S 0.0 0.0 0:01.58 watchdog/19
+ 184 root rt 0 0 0 0 S 0.0 0.0 0:00.49 migration/19
+ 185 root 20 0 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/19
+ 186 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/19:0
+ 187 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/19:0H
+ 188 root rt 0 0 0 0 S 0.0 0.0 0:01.57 watchdog/20
+ 189 root rt 0 0 0 0 S 0.0 0.0 0:00.79 migration/20
+ 190 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/20
+ 191 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/20:0
+ 192 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/20:0H
+ 193 root rt 0 0 0 0 S 0.0 0.0 0:02.57 watchdog/21
+ 194 root rt 0 0 0 0 S 0.0 0.0 0:07.91 migration/21
+ 195 root 20 0 0 0 0 S 0.0 0.0 86:16.84 ksoftirqd/21
+ 196 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/21:0
+ 197 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/21:0H
+ 198 root rt 0 0 0 0 S 0.0 0.0 0:01.60 watchdog/22
+ 199 root rt 0 0 0 0 S 0.0 0.0 0:02.34 migration/22
+ 200 root 20 0 0 0 0 S 0.0 0.0 3:20.20 ksoftirqd/22
+ 201 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/22:0
+ 202 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/22:0H
+ 203 root rt 0 0 0 0 S 0.0 0.0 0:01.57 watchdog/23
+ 204 root rt 0 0 0 0 S 0.0 0.0 0:02.20 migration/23
+ 205 root 20 0 0 0 0 S 0.0 0.0 0:00.48 ksoftirqd/23
+ 206 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/23:0
+ 207 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/23:0H
+ 208 root rt 0 0 0 0 S 0.0 0.0 0:01.68 watchdog/24
+ 209 root rt 0 0 0 0 S 0.0 0.0 0:06.80 migration/24
+ 210 root 20 0 0 0 0 S 0.0 0.0 4:14.70 ksoftirqd/24
+ 211 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/24:0
+ 212 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/24:0H
+ 213 root rt 0 0 0 0 S 0.0 0.0 0:01.57 watchdog/25
+ 214 root rt 0 0 0 0 S 0.0 0.0 0:02.62 migration/25
+ 215 root 20 0 0 0 0 S 0.0 0.0 0:00.63 ksoftirqd/25
+ 216 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/25:0
+ 217 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/25:0H
+ 218 root rt 0 0 0 0 S 0.0 0.0 0:01.60 watchdog/26
+ 219 root rt 0 0 0 0 S 0.0 0.0 0:02.75 migration/26
+ 220 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/26
+ 221 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/26:0
+ 222 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/26:0H
+ 223 root rt 0 0 0 0 S 0.0 0.0 0:01.33 watchdog/27
+ 224 root rt 0 0 0 0 S 0.0 0.0 0:01.46 migration/27
+ 225 root 20 0 0 0 0 S 0.0 0.0 0:03.63 ksoftirqd/27
+ 226 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/27:0
+ 227 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/27:0H
+ 228 root rt 0 0 0 0 S 0.0 0.0 0:01.60 watchdog/28
+ 229 root rt 0 0 0 0 S 0.0 0.0 0:01.26 migration/28
+ 230 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/28
+ 231 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/28:0
+ 232 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/28:0H
+ 233 root rt 0 0 0 0 S 0.0 0.0 0:01.61 watchdog/29
+ 234 root rt 0 0 0 0 S 0.0 0.0 0:00.87 migration/29
+ 235 root 20 0 0 0 0 S 0.0 0.0 0:00.05 ksoftirqd/29
+ 236 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/29:0
+ 237 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/29:0H
+ 238 root rt 0 0 0 0 S 0.0 0.0 0:01.68 watchdog/30
+ 239 root rt 0 0 0 0 S 0.0 0.0 0:00.37 migration/30
+ 240 root 20 0 0 0 0 S 0.0 0.0 55:11.14 ksoftirqd/30
+ 241 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/30:0
+ 242 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/30:0H
+ 243 root rt 0 0 0 0 S 0.0 0.0 0:01.83 watchdog/31
+ 244 root rt 0 0 0 0 S 0.0 0.0 0:06.33 migration/31
+ 245 root 20 0 0 0 0 S 0.0 0.0 0:09.11 ksoftirqd/31
+ 246 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/31:0
+ 247 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/31:0H
+ 248 root rt 0 0 0 0 S 0.0 0.0 0:01.87 watchdog/32
+ 249 root rt 0 0 0 0 S 0.0 0.0 0:01.45 migration/32
+ 250 root 20 0 0 0 0 S 0.0 0.0 248:19.74 ksoftirqd/32
+ 251 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/32:0
+ 252 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/32:0H
+ 253 root rt 0 0 0 0 S 0.0 0.0 0:01.56 watchdog/33
+ 254 root rt 0 0 0 0 S 0.0 0.0 0:00.44 migration/33
+ 255 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/33
+ 256 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/33:0
+ 257 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/33:0H
+ 258 root rt 0 0 0 0 S 0.0 0.0 0:01.50 watchdog/34
+ 259 root rt 0 0 0 0 S 0.0 0.0 0:00.58 migration/34
+ 260 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/34
+ 261 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kworker/34:0
+ 262 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/34:0H
+ 263 root rt 0 0 0 0 S 0.0 0.0 0:01.55 watchdog/35
+ 264 root rt 0 0 0 0 S 0.0 0.0 0:00.57 migration/35
+ 265 root 20 0 0 0 0 S 0.0 0.0 0:06.98 ksoftirqd/35
+ 266 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/35:0
+ 267 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/35:0H
+ 268 root rt 0 0 0 0 S 0.0 0.0 0:01.53 watchdog/36
+ 269 root rt 0 0 0 0 S 0.0 0.0 0:00.38 migration/36
+ 270 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/36
+ 271 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/36:0
+ 272 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/36:0H
+ 273 root rt 0 0 0 0 S 0.0 0.0 0:01.59 watchdog/37
+ 274 root rt 0 0 0 0 S 0.0 0.0 0:00.33 migration/37
+ 275 root 20 0 0 0 0 S 0.0 0.0 0:02.97 ksoftirqd/37
+ 276 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/37:0
+ 277 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/37:0H
+ 278 root rt 0 0 0 0 S 0.0 0.0 0:01.50 watchdog/38
+ 279 root rt 0 0 0 0 S 0.0 0.0 0:00.30 migration/38
+ 280 root 20 0 0 0 0 S 0.0 0.0 0:02.21 ksoftirqd/38
+ 281 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/38:0
+ 282 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/38:0H
+ 283 root rt 0 0 0 0 S 0.0 0.0 0:01.53 watchdog/39
+ 284 root rt 0 0 0 0 S 0.0 0.0 0:00.21 migration/39
+ 285 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/39
+ 286 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/39:0
+ 287 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/39:0H
+ 288 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
+ 289 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
+ 290 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
+ 291 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback
+ 292 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
+ 293 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
+ 294 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u83:0
+ 295 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u84:0
+ 296 root 0 -20 0 0 0 S 0.0 0.0 0:00.01 kworker/u85:0
+ 297 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
+ 299 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ata_sff
+ 300 root 20 0 0 0 0 S 0.0 0.0 0:00.06 khubd
+ 301 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 md
+ 302 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 devfreq_wq
+ 303 root 20 0 0 0 0 S 0.0 0.0 0:46.89 kworker/2:1
+ 304 root 20 0 0 0 0 S 0.0 0.0 0:07.47 kworker/22:1
+ 305 root 20 0 0 0 0 S 0.0 0.0 0:04.62 kworker/5:1
+ 307 root 20 0 0 0 0 S 0.0 0.0 0:00.35 khungtaskd
+ 308 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0
+ 309 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kswapd1
+ 310 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 vmstat
+ 311 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
+ 312 root 39 19 0 0 0 S 0.0 0.0 0:05.95 khugepaged
+ 313 root 20 0 0 0 0 S 0.0 0.0 0:00.00 fsnotify_mark
+ 314 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ecryptfs-kthrea
+ 315 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 crypto
+ 327 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kthrotld
+ 328 root 20 0 0 0 0 S 0.0 0.0 1:17.70 kworker/10:1
+ 331 root 20 0 0 0 0 S 0.0 0.0 0:01.04 kworker/39:1
+ 332 root 20 0 0 0 0 S 0.0 0.0 0:03.99 kworker/12:1
+ 333 root 20 0 0 0 0 S 0.0 0.0 0:04.70 kworker/13:1
+ 334 root 20 0 0 0 0 S 0.0 0.0 0:52.89 kworker/14:1
+ 335 root 20 0 0 0 0 S 0.0 0.0 0:02.87 kworker/15:1
+ 336 root 20 0 0 0 0 S 0.0 0.0 0:02.62 kworker/16:1
+ 337 root 20 0 0 0 0 S 0.0 0.0 0:00.05 kworker/0:2
+ 339 root 20 0 0 0 0 S 0.0 0.0 0:10.69 kworker/31:1
+ 340 root 20 0 0 0 0 S 0.0 0.0 0:07.69 kworker/u80:1
+ 359 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 deferwq
+ 360 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 charger_manager
+ 367 root 20 0 0 0 0 S 0.0 0.0 0:34.08 kworker/21:1
+ 387 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kmpathd
+ 388 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kmpath_handlerd
+ 400 root 20 0 0 0 0 S 0.0 0.0 0:02.33 kworker/23:1
+ 427 root 20 0 0 0 0 S 0.0 0.0 0:09.71 kworker/24:1
+ 433 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u82:0
+ 445 root 20 0 0 0 0 S 0.0 0.0 0:02.51 kworker/6:1
+ 446 root 20 0 0 0 0 S 0.0 0.0 0:10.30 kworker/32:1
+ 447 root 20 0 0 0 0 S 0.0 0.0 0:53.43 kworker/8:1
+ 454 root 20 0 0 0 0 S 0.0 0.0 0:23.83 kworker/3:1
+ 455 root 20 0 0 0 0 S 0.0 0.0 0:02.43 kworker/9:1
+ 456 root 20 0 0 0 0 S 0.0 0.0 0:02.86 kworker/4:1
+ 457 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/1:1
+ 461 root 20 0 0 0 0 S 0.0 0.0 0:32.64 kworker/7:1
+ 462 root 20 0 0 0 0 S 0.0 0.0 0:01.39 kworker/28:1
+ 463 root 20 0 0 0 0 S 0.0 0.0 0:01.55 kworker/34:1
+ 466 root 20 0 0 0 0 S 0.0 0.0 0:08.13 kworker/20:1
+ 467 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
+ 468 root 20 0 0 0 0 S 0.0 0.0 0:02.42 kworker/26:1
+ 469 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
+ 470 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_2
+ 471 root 20 0 0 0 0 S 0.0 0.0 0:02.41 kworker/29:1
+ 472 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_3
+ 473 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_4
+ 474 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_5
+ 476 root 20 0 0 0 0 S 0.0 0.0 0:57.15 kworker/27:1
+ 484 root 20 0 0 0 0 S 0.0 0.0 0:05.47 kworker/25:1
+ 485 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_6
+ 486 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 fw_event0
+ 514 root 20 0 0 0 0 S 0.0 0.0 0:08.44 kworker/30:1
+ 515 root 20 0 0 0 0 S 0.0 0.0 0:01.83 kworker/35:1
+ 516 root 20 0 0 0 0 S 0.0 0.0 0:02.01 kworker/33:1
+ 518 root 20 0 0 0 0 S 0.0 0.0 1:35.24 kworker/11:1
+ 519 root 20 0 0 0 0 S 0.0 0.0 0:03.69 kworker/19:1
+ 520 root 20 0 0 0 0 S 0.0 0.0 0:05.52 kworker/18:1
+ 521 root 20 0 0 0 0 S 0.0 0.0 0:01.28 kworker/38:1
+ 522 root 20 0 0 0 0 S 0.0 0.0 0:02.66 kworker/17:1
+ 542 root 20 0 0 0 0 S 0.0 0.0 0:01.47 kworker/36:1
+ 543 root 20 0 0 0 0 S 0.0 0.0 0:01.17 kworker/37:1
+ 547 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 raid5wq
+ 624 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 poll_0_status
+ 654 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kdmflush
+ 661 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
+ 673 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kdmflush
+ 674 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
+ 676 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kdmflush
+ 677 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
+ 737 root 20 0 0 0 0 S 0.0 0.0 0:17.36 jbd2/dm-1-8
+ 738 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ext4-rsv-conver
+ 878 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ext4-rsv-conver
+ 893 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xfsalloc
+ 894 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xfs_mru_cache
+ 895 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xfslogd
+ 896 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xfs-data/dm-0
+ 897 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xfs-conv/dm-0
+ 898 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xfs-cil/dm-0
+ 899 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xfs-reclaim/dm-
+ 900 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xfs-log/dm-0
+ 901 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xfs-eofblocks/d
+ 902 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/32:1H
+ 903 root 20 0 0 0 0 S 0.0 0.0 0:00.12 xfsaild/dm-0
+ 904 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/13:1H
+ 961 root 20 0 19736 916 612 S 0.0 0.0 0:00.40 upstart-udev-br
+ 966 root 20 0 51220 1528 992 S 0.0 0.0 0:00.34 systemd-udevd
+ 1138 root 39 19 0 0 0 S 0.0 0.0 0:37.42 kipmi0
+ 1395 root 20 0 15544 888 476 S 0.0 0.0 0:00.24 upstart-socket-
+ 6105 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/12:1H
+ 8658 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kauditd
+ 8708 root 20 0 15552 884 468 S 0.0 0.0 0:00.21 upstart-file-br
+ 8729 message+ 20 0 39248 1540 1092 S 0.0 0.0 0:00.14 dbus-daemon
+ 8812 root 20 0 43444 1840 1480 S 0.0 0.0 0:00.01 systemd-logind
+ 8836 root 20 0 12960 936 776 S 0.0 0.0 0:00.00 getty
+ 8838 root 20 0 12960 932 776 S 0.0 0.0 0:00.00 getty
+ 8843 root 20 0 12960 936 776 S 0.0 0.0 0:00.00 getty
+ 8844 root 20 0 12960 936 776 S 0.0 0.0 0:00.00 getty
+ 8846 root 20 0 12960 936 776 S 0.0 0.0 0:00.00 getty
+ 8893 root rt 0 238444 4976 3972 S 0.0 0.0 0:15.62 multipathd
+ 8918 root 20 0 23648 1028 772 S 0.0 0.0 0:03.94 cron
+ 8932 root 20 0 19432 1052 544 S 0.0 0.0 3:20.79 irqbalance
+ 9031 root 20 0 25336 1668 1356 S 0.0 0.0 0:01.85 master
+ 9057 postfix 20 0 27452 1524 1240 S 0.0 0.0 0:00.37 qmgr
+ 9082 root 20 0 13264 456 312 S 0.0 0.0 0:00.06 mdadm
+ 9224 root 20 0 451716 56968 4020 S 0.0 0.0 1:20.70 ruby
+10722 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/11:1H
+11383 neutron 20 0 201288 60516 5872 S 0.0 0.0 123:37.72 neutron-openvsw
+11421 root 20 0 14532 936 784 S 0.0 0.0 0:00.00 getty
+12603 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/17:1H
+12864 root 20 0 60032 2000 1548 S 0.0 0.0 0:00.00 sudo
+12874 root 20 0 44136 11676 3740 S 0.0 0.0 0:00.05 neutron-rootwra
+12943 root 20 0 17456 1576 1204 S 0.0 0.0 0:00.00 ovsdb-client
+15172 root 20 0 1011092 13316 8148 S 0.0 0.0 29:15.41 libvirtd
+18884 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kvm-irqfd-clean
+19748 root 0 -20 0 0 0 S 0.0 0.0 0:00.02 kworker/0:1H
+20161 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u85:1
+20212 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u81:2
+22427 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/15:1H
+22619 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/10:1H
+23390 root 20 0 0 0 0 S 0.0 0.0 0:03.88 kworker/u80:2
+25515 syslog 20 0 412760 18576 1168 S 0.0 0.0 3:51.93 rsyslogd
+26596 root 0 -20 18356 6084 3504 S 0.0 0.0 0:25.99 atop
+26632 nova 20 0 2189604 126392 12524 S 0.0 0.1 407:45.01 nova-compute
+27847 ceilome+ 20 0 210356 47388 7724 S 0.0 0.0 3:01.50 ceilometer-poll
+27867 root 20 0 280116 6004 2968 S 0.0 0.0 0:00.02 polkitd
+29018 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u84:1
+29672 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/16:1H
+33372 postfix 20 0 27400 1520 1212 S 0.0 0.0 0:00.00 pickup
+33382 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u82:1
+35221 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/14:0
+35921 root 10 -10 17384 532 180 S 0.0 0.0 0:00.00 monitor
+35922 root 10 -10 17828 2240 1360 S 0.0 0.0 3:03.18 ovsdb-server
+35931 root 10 -10 21896 624 184 S 0.0 0.0 0:00.00 monitor
+35948 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bond0
+36096 ntp 20 0 27220 1924 1352 S 0.0 0.0 0:30.87 ntpd
+36955 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u81:0
+37453 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u82:2
+39711 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/18:1H
+39948 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/19:1H
+40517 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u81:1
+40523 root 20 0 61376 3064 2384 S 0.0 0.0 0:00.00 sshd
+40600 root 20 0 101504 4168 3204 S 0.0 0.0 0:00.05 sshd
+40624 root 20 0 22124 4684 1872 S 0.0 0.0 0:00.15 bash
diff --git a/tests/data/yaml/invalid.yaml b/tests/data/yaml/invalid.yaml
index 22e31ed1..57dc7a33 100644
--- a/tests/data/yaml/invalid.yaml
+++ b/tests/data/yaml/invalid.yaml
@@ -1 +1,9 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
invalid - yaml \ No newline at end of file
diff --git a/tests/data/yaml/with_name.yaml b/tests/data/yaml/with_name.yaml
index 25f7f83d..0cb4fd95 100644
--- a/tests/data/yaml/with_name.yaml
+++ b/tests/data/yaml/with_name.yaml
@@ -1 +1,9 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
name: name in content \ No newline at end of file
diff --git a/tests/data/yaml/without_name.yaml b/tests/data/yaml/without_name.yaml
index bd234bd4..cbc4a1e9 100644
--- a/tests/data/yaml/without_name.yaml
+++ b/tests/data/yaml/without_name.yaml
@@ -1 +1,9 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
no_name: yaml file without name \ No newline at end of file
diff --git a/tests/unit/base/error_test.py b/tests/unit/base/error_test.py
new file mode 100644
index 00000000..2be6d695
--- /dev/null
+++ b/tests/unit/base/error_test.py
@@ -0,0 +1,48 @@
+###############################################################
+# Copyright (c) 2017 ZTE Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+import pytest
+
+from qtip.base.error import InvalidContentError
+from qtip.base.error import NotFoundError
+from qtip.base.error import ToBeDoneError
+
+
+def test_invalid_content(faker):
+ filename = faker.file_name()
+ error = InvalidContentError(filename)
+ assert error.filename == filename
+
+
+def test_not_found(faker):
+ package = faker.pystr()
+ module = faker.pystr()
+ error = NotFoundError(module)
+ assert error.needle == module
+ assert error.heystack == 'qtip'
+
+ error = NotFoundError(module, package)
+ assert error.needle == module
+ assert error.heystack == package
+
+
+@pytest.fixture
+def method(faker):
+ return faker.pystr()
+
+
+@pytest.fixture
+def module(faker):
+ return faker.pystr()
+
+
+def test_to_be_done(method, module):
+ error = ToBeDoneError(method, module)
+ assert error.method == method
+ assert error.module == module
diff --git a/tests/unit/cli/test_metric.py b/tests/unit/cli/cmd_metric_test.py
index 239da96e..239da96e 100644
--- a/tests/unit/cli/test_metric.py
+++ b/tests/unit/cli/cmd_metric_test.py
diff --git a/tests/unit/cli/test_plan.py b/tests/unit/cli/cmd_plan_test.py
index 3ce3766e..3ce3766e 100644
--- a/tests/unit/cli/test_plan.py
+++ b/tests/unit/cli/cmd_plan_test.py
diff --git a/tests/unit/cli/test_qpi.py b/tests/unit/cli/cmd_qpi_test.py
index 992c85d7..992c85d7 100644
--- a/tests/unit/cli/test_qpi.py
+++ b/tests/unit/cli/cmd_qpi_test.py
diff --git a/tests/unit/cli/test_options.py b/tests/unit/cli/options_test.py
index f9472814..f9472814 100644
--- a/tests/unit/cli/test_options.py
+++ b/tests/unit/cli/options_test.py
diff --git a/tests/unit/collector/grep_test.py b/tests/unit/collector/grep_test.py
index e5d5f8c6..2d4079af 100644
--- a/tests/unit/collector/grep_test.py
+++ b/tests/unit/collector/grep_test.py
@@ -21,7 +21,9 @@ def logfile(data_root):
@pytest.mark.parametrize("regex,expected", [
('not exist', []),
('Lorem (\S+)', [{'groups': ('ipsum',), 'groupdict': {}}]),
- ('nisi ut (?P<name>\S+)', [{'groups': ('aliquip',), 'groupdict': {'name': 'aliquip'}}])
+ ('nisi ut (?P<name>\S+)', [{'groups': ('aliquip',), 'groupdict': {'name': 'aliquip'}}]),
+ ('Lorem\s(\w+)\s.+\nconsectetur\s(\w+)\s.+\n',
+ [{'groups': ('ipsum', 'adipiscing',), 'groupdict': {}}])
])
def test_grep_in_file(logfile, regex, expected):
matches = grep_in_file(logfile, regex)
diff --git a/tests/unit/loader/metric_test.py b/tests/unit/loader/metric_test.py
index 26f144af..619d5e00 100644
--- a/tests/unit/loader/metric_test.py
+++ b/tests/unit/loader/metric_test.py
@@ -28,11 +28,10 @@ def init_test(metric_spec):
def list_all_test(benchmarks_root):
- metric_list = MetricSpec.list_all(paths=[benchmarks_root])
- assert len(list(metric_list)) is 6
+ metric_list = list(MetricSpec.list_all(paths=[benchmarks_root]))
+ assert len(metric_list) is 6
for desc in metric_list:
assert BaseProp.NAME in desc
- assert BaseProp.DESCRIPTION in desc
assert BaseProp.ABSPATH in desc
assert BaseProp.ABSPATH is not None
@@ -40,6 +39,5 @@ def list_all_test(benchmarks_root):
def content_test(metric_spec):
content = metric_spec.content
assert BaseProp.NAME in content
- assert BaseProp.DESCRIPTION in content
assert BaseProp.WORKLOADS in content
assert isinstance(content[BaseProp.WORKLOADS], list)
diff --git a/tests/unit/loader/plan_test.py b/tests/unit/loader/plan_test.py
index 4872b4cd..70ae2ad5 100644
--- a/tests/unit/loader/plan_test.py
+++ b/tests/unit/loader/plan_test.py
@@ -29,11 +29,10 @@ def test_init(plan):
def test_list_all(benchmarks_root):
- plan_list = Plan.list_all(paths=[benchmarks_root])
- assert len(list(plan_list)) is 1
+ plan_list = list(Plan.list_all(paths=[benchmarks_root]))
+ assert len(plan_list) is 2
for desc in plan_list:
assert PlanProp.NAME in desc
- assert PlanProp.CONTENT in desc
assert PlanProp.ABSPATH in desc
assert PlanProp.ABSPATH is not None
diff --git a/tests/unit/loader/qpi_test.py b/tests/unit/loader/qpi_test.py
index 3328b43a..b53030d4 100644
--- a/tests/unit/loader/qpi_test.py
+++ b/tests/unit/loader/qpi_test.py
@@ -30,11 +30,10 @@ def test_init(qpi_spec):
def test_list_all(benchmarks_root):
- qpi_spec_list = QPISpec.list_all(paths=[benchmarks_root])
- assert len(list(qpi_spec_list)) is 2
+ qpi_spec_list = list(QPISpec.list_all(paths=[benchmarks_root]))
+ assert len(qpi_spec_list) is 2
for item in qpi_spec_list:
assert SpecProp.NAME in item
- assert SpecProp.CONTENT in item
assert SpecProp.ABSPATH in item
assert SpecProp.ABSPATH is not None
diff --git a/tests/unit/loader/yaml_file_test.py b/tests/unit/loader/yaml_file_test.py
index 17836946..0f0632c4 100644
--- a/tests/unit/loader/yaml_file_test.py
+++ b/tests/unit/loader/yaml_file_test.py
@@ -10,7 +10,7 @@
import os
import pytest
-from qtip.base.error import InvalidContent
+from qtip.base.error import InvalidContentError
from qtip.loader.yaml_file import YamlFileLoader
@@ -28,6 +28,6 @@ def test_init(yaml_root, filename, expected):
def test_invalid_content(yaml_root):
- with pytest.raises(InvalidContent) as excinfo:
+ with pytest.raises(InvalidContentError) as excinfo:
YamlFileLoader('invalid.yaml', [yaml_root])
assert 'invalid.yaml' in excinfo.value.filename
diff --git a/tests/unit/util/dev_test.py b/tests/unit/util/dev_test.py
new file mode 100644
index 00000000..021b1004
--- /dev/null
+++ b/tests/unit/util/dev_test.py
@@ -0,0 +1,32 @@
+###############################################################
+# Copyright (c) 2017 ZTE Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+import pytest
+
+from qtip.base.error import ToBeDoneError
+from qtip.util.dev import create_to_be_done
+
+
+def test_create_to_be_done(faker):
+ method = faker.pystr()
+ module = faker.pystr()
+
+ tbd = create_to_be_done(method)
+ assert callable(tbd)
+ with pytest.raises(ToBeDoneError) as excinfo:
+ tbd()
+ assert excinfo.value.method == method
+ assert excinfo.value.module == 'qtip'
+
+ tbd = create_to_be_done(method, module)
+ assert callable(tbd)
+ with pytest.raises(ToBeDoneError) as excinfo:
+ tbd()
+ assert excinfo.value.method == method
+ assert excinfo.value.module == module
diff --git a/third-party/License/.gitrepo b/third-party/License/.gitrepo
new file mode 100644
index 00000000..29cd5a75
--- /dev/null
+++ b/third-party/License/.gitrepo
@@ -0,0 +1,11 @@
+; DO NOT EDIT (unless you know what you are doing)
+;
+; This subdirectory is a git "subrepo", and this file is maintained by the
+; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
+;
+[subrepo]
+ remote = git@github.com:openzero-zte/License.git
+ branch = master
+ commit = 61489dae4453b66887d0d90a2244610a30f7e53c
+ parent = 3e443dff14a2be02b914e66f27b549d0ed4cc600
+ cmdver = 0.3.0
diff --git a/third-party/License/README.md b/third-party/License/README.md
new file mode 100644
index 00000000..0232de7e
--- /dev/null
+++ b/third-party/License/README.md
@@ -0,0 +1,10 @@
+# License
+
+A script for checking and adding license header according to [OPNFV contribution guideline](https://wiki.opnfv.org/display/DEV/Contribution+Guidelines)
+
+## Quick Start
+
+```
+$ cd <project-folder>
+$ curl https://raw.githubusercontent.com/Justin-chi/License/master/add_license.sh |bash
+```
diff --git a/third-party/License/add_license.sh b/third-party/License/add_license.sh
new file mode 100755
index 00000000..9b383c62
--- /dev/null
+++ b/third-party/License/add_license.sh
@@ -0,0 +1,180 @@
+#!/bin/bash
+# Copyright justin.chigang@gmail.com
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+TMP_FILE=tmp.file
+LICENSE_TOKEN="http://www.apache.org/licenses/LICENSE-2.0"
+
+function get_first_author()
+{
+ author=$(git log --reverse --pretty=format:"%ae" $1 | head -1)
+ substring=$(git log --reverse --pretty=format:"%ae" $1 | head -1 | awk -F@ '{print $2}')
+ case $substring in
+ huawei*)
+ echo "HUAWEI TECHNOLOGIES CO.,LTD"
+ ;;
+ orange*)
+ echo "Orange"
+ ;;
+ zte*)
+ echo "ZTE Corporation"
+ ;;
+ *)
+ echo "$author"
+ ;;
+ esac
+}
+
+function get_latest_year()
+{
+ git log --pretty=format:"%ad" $1 | head -1 | awk '{print $5}'
+}
+
+function gen_c_license()
+{
+cat << EOF >$1
+/*******************************************************************************
+ * Copyright (c) $2 $3 and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License, Version 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *******************************************************************************/
+
+EOF
+}
+
+function gen_xml_license()
+{
+cat << EOF >$1
+<!--
+ Copyright (c) $2 $3 and others.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+
+EOF
+}
+
+function gen_bash_license()
+{
+cat << EOF >$1
+##############################################################################
+# Copyright (c) $2 $3 and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+EOF
+}
+
+function add_c_license()
+{
+ C_LICENSE="c_license_header.tmp"
+ author=`get_first_author "$1"`
+ year=`get_latest_year "$1"`
+ gen_c_license $C_LICENSE $year "$author"
+ cat $C_LICENSE $1 > $TMP_FILE
+ rm -f $C_LICENSE
+ mv $TMP_FILE $1
+}
+
+function add_xml_license()
+{
+ XML_LICENSE="xml_license_header.tmp"
+ author=`get_first_author "$1"`
+ year=`get_latest_year "$1"`
+ gen_xml_license $XML_LICENSE $year "$author"
+ cat $XML_LICENSE $1 > $TMP_FILE
+ rm -f $XML_LICENSE
+ mv $TMP_FILE $1
+}
+
+function add_bash_license()
+{
+ BASH_LICENSE="bash_license_header.tmp"
+ author=`get_first_author "$1"`
+ year=`get_latest_year "$1"`
+ gen_bash_license $BASH_LICENSE $year "$author"
+ cat $1 | head -1 | grep "#!" > /dev/null
+ if [ $? -eq 0 ]; then
+ #insert 2
+ sed -i "1 r $BASH_LICENSE" $1
+ else
+ #sed -i "1 R $BASH_LICENSE" $1
+ cat $BASH_LICENSE $1 > $TMP_FILE
+ mv $TMP_FILE $1
+ fi
+ rm -f $BASH_LICENSE
+}
+
+if [[ -z "$1" ]] || [[ ! -d "$1" ]]; then
+ echo "The directory is empty or not exist!"
+ echo "It will use the current directory."
+ nowdir=$(pwd)
+else
+ nowdir=$(cd $1; pwd)
+fi
+echo "$nowdir"
+
+n=0
+
+function Searchfile()
+{
+ cd $1
+
+ dirlist=$(ls)
+ for dirname in $dirlist
+ do
+ if [[ -d "$dirname" ]];then
+ n=$((n+4))
+ cd $dirname
+ for i in $( seq 0 $n );do echo -n ' ';done;echo "$dirname ..."
+ Searchfile $(pwd)
+ cd ..
+ n=$((n-4))
+ fi;
+
+ filename=$dirname
+ if [[ -f "$filename" ]]; then
+ for i in $( seq 0 $n );do echo -n ' ';done;echo " |--$filename"
+ grep -rn $LICENSE_TOKEN $filename >/dev/null
+ if [ $? -eq 1 ]; then
+ if [ "${filename##*.}" = "c" -o "${filename##*.}" = "cpp" -o "${filename##*.}" = "java" ]; then
+ add_c_license $filename
+ for i in $( seq 0 $n );do echo -n ' ';done;echo " |--add license for $filename... "
+ elif [ "${filename##*.}" = "py" -o "${filename##*.}" = "yml" -o "${filename##*.}" = "yaml" -o "${filename##*.}" = "sh" ]; then
+ add_bash_license $filename
+ for i in $( seq 0 $n );do echo -n ' ';done;echo " |--add license for $filename... "
+ elif [ "${filename##*.}" = "xml" ]; then
+ add_xml_license $filename
+ for i in $( seq 0 $n );do echo -n ' ';done;echo " |--add license for $filename... "
+ fi;
+ fi;
+ fi;
+ done;
+}
+
+Searchfile $nowdir
+
+# Revert changes of skipped files, e.g. __init__.py
+
+git checkout \*\*/__init__.py
diff --git a/tox.ini b/tox.ini
index 1a90dfa3..40ecbbf6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -16,7 +16,7 @@ deps =
commands=
py.test \
--basetemp={envtmpdir} \
- --cov qtip --cov-report term-missing --cov-report html \
+ --cov \
{posargs}
setenv=
HOME = {envtmpdir}