summaryrefslogtreecommitdiffstats
path: root/etc/conf
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2019-03-04 16:12:10 +0200
committerDan Xu <xudan16@huawei.com>2019-03-18 02:29:02 +0000
commitef2d5282306a277e591aa3c355277c6f158d8e76 (patch)
tree9f2bdf2bf77e1cfd08a058eaa696b0ed673b67fe /etc/conf
parent1540d41ec9291d61c1cd5b5d2f347d1d8f9c3dbe (diff)
Replace subprocess commands with Docker SDK
JIRA: DOVETAIL-752 This patch replaces all python subprocess commands with the Docker SDK relevant commands. Change-Id: Iac7caffd80a863a8a022247d735b2a7f2792e49d Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to 'etc/conf')
-rw-r--r--etc/conf/bottlenecks_config.yml26
-rw-r--r--etc/conf/functest-k8s_config.yml20
-rw-r--r--etc/conf/functest_config.yml32
-rw-r--r--etc/conf/onap-vtp_config.yml14
-rw-r--r--etc/conf/onap-vvp_config.yml9
-rw-r--r--etc/conf/yardstick_config.yml24
6 files changed, 79 insertions, 46 deletions
diff --git a/etc/conf/bottlenecks_config.yml b/etc/conf/bottlenecks_config.yml
index 8a0a39bc..eb067c4a 100644
--- a/etc/conf/bottlenecks_config.yml
+++ b/etc/conf/bottlenecks_config.yml
@@ -8,7 +8,7 @@
{% set build_tag = build_tag or '' %}
{% set cacert_volume = '' %}
{% if cacert %}
- {% set cacert_volume = ' -v ' + cacert + ':' + cacert %}
+ {% set cacert_volume = cacert + ':' + cacert %}
{% endif %}
{% set openrc_file = '/tmp/admin_rc.sh' %}
{% set result_dir = '/home/opnfv/bottlenecks/results' %}
@@ -19,18 +19,24 @@
bottlenecks:
image_name: opnfv/bottlenecks
docker_tag: latest
- opts: '-id --privileged=true'
+ opts:
+ detach: true
+ stdin_open: true
+ privileged: true
shell: '/bin/bash'
- envs: '-e DEPLOY_SCENARIO={{deploy_scenario}} -e Yardstick_TAG=stable
- -e OUTPUT_FILE={{testcase}}.out -e CI_DEBUG={{debug}}
- -e BUILD_TAG={{build_tag}}-{{testcase}}'
+ envs:
+ - 'DEPLOY_SCENARIO={{deploy_scenario}}'
+ - 'Yardstick_TAG=stable'
+ - 'OUTPUT_FILE={{testcase}}.out'
+ - 'CI_DEBUG={{debug}}'
+ - 'BUILD_TAG={{build_tag}}-{{testcase}}'
volumes:
- - '-v /var/run/docker.sock:/var/run/docker.sock'
- - '-v {{dovetail_home}}/results/bottlenecks:/tmp'
- - '-v {{dovetail_home}}/pre_config/env_config.sh:{{openrc_file}}'
+ - '/var/run/docker.sock:/var/run/docker.sock'
+ - '{{dovetail_home}}/results/bottlenecks:/tmp'
+ - '{{dovetail_home}}/pre_config/env_config.sh:{{openrc_file}}'
- {{cacert_volume}}
- - '-v {{dovetail_home}}/images:{{images_dir}}'
- - '-v {{dovetail_home}}/results:{{result_dir}}'
+ - '{{dovetail_home}}/images:{{images_dir}}'
+ - '{{dovetail_home}}/results:{{result_dir}}'
pre_condition:
- 'cp {{images_dir}}/ubuntu-16.04-server-cloudimg-amd64-disk1.img {{image_file}}'
cmds:
diff --git a/etc/conf/functest-k8s_config.yml b/etc/conf/functest-k8s_config.yml
index b5ad12b6..e4781715 100644
--- a/etc/conf/functest-k8s_config.yml
+++ b/etc/conf/functest-k8s_config.yml
@@ -12,15 +12,21 @@
functest-k8s:
image_name: opnfv/functest-kubernetes-healthcheck
docker_tag: gambia
- opts: '-id'
+ opts:
+ detach: true
+ stdin_open: true
shell: '/bin/bash'
- envs: '-e INSTALLER_TYPE=unknown -e DEPLOY_SCENARIO=k8-deploy -e NODE_NAME=unknown
- -e TEST_DB_URL=file:///home/opnfv/functest/results/functest_results.txt
- -e CI_DEBUG={{debug}} -e BUILD_TAG={{build_tag}}-{{testcase}}'
+ envs:
+ - 'INSTALLER_TYPE=unknown'
+ - 'DEPLOY_SCENARIO=k8-deploy'
+ - 'NODE_NAME=unknown'
+ - 'TEST_DB_URL=file:///home/opnfv/functest/results/functest_results.txt'
+ - 'CI_DEBUG={{debug}}'
+ - 'BUILD_TAG={{build_tag}}-{{testcase}}'
volumes:
- - '-v {{dovetail_home}}/pre_config/k8.creds:{{openrc_file}}'
- - '-v {{dovetail_home}}/pre_config/admin.conf:{{kube_file}}'
- - '-v {{dovetail_home}}/results/:{{result_dir}}'
+ - '{{dovetail_home}}/pre_config/k8.creds:{{openrc_file}}'
+ - '{{dovetail_home}}/pre_config/admin.conf:{{kube_file}}'
+ - '{{dovetail_home}}/results/:{{result_dir}}'
pre_condition:
- 'echo test for precondition in functest'
cmds:
diff --git a/etc/conf/functest_config.yml b/etc/conf/functest_config.yml
index bf637541..3bf90218 100644
--- a/etc/conf/functest_config.yml
+++ b/etc/conf/functest_config.yml
@@ -6,14 +6,14 @@
{% set os_insecure = os_insecure or 'False' %}
{% set os_verify = '' %}
{% if os_insecure == 'True' %}
- {% set os_verify = ' -e OS_VERIFY= ' %}
+ {% set os_verify = 'OS_VERIFY=' %}
{% endif %}
{% set dovetail_home = dovetail_home or '' %}
{% set debug = debug or 'false' %}
{% set build_tag = build_tag or '' %}
{% set cacert_volume = '' %}
{% if cacert %}
- {% set cacert_volume = ' -v ' + cacert + ':' + cacert %}
+ {% set cacert_volume = cacert + ':' + cacert %}
{% endif %}
{% set openrc_file = '/home/opnfv/functest/conf/env_file' %}
{% set result_dir = '/home/opnfv/functest/results' %}
@@ -24,19 +24,27 @@
functest:
image_name: opnfv/functest-smoke
docker_tag: gambia
- opts: '-id --privileged=true'
+ opts:
+ detach: true
+ stdin_open: true
+ privileged: true
shell: '/bin/bash'
- envs: '{{os_verify}} -e INSTALLER_TYPE=unknown -e DEPLOY_SCENARIO={{deploy_scenario}} -e NODE_NAME=unknown
- -e TEST_DB_URL=file://{{result_dir}}/functest_results.txt
- -e CI_DEBUG={{debug}} -e BUILD_TAG={{build_tag}}-{{testcase}}'
+ envs:
+ - {{os_verify}}
+ - 'INSTALLER_TYPE=unknown'
+ - 'DEPLOY_SCENARIO={{deploy_scenario}}'
+ - 'NODE_NAME=unknown'
+ - 'TEST_DB_URL=file://{{result_dir}}/functest_results.txt'
+ - 'CI_DEBUG={{debug}}'
+ - 'BUILD_TAG={{build_tag}}-{{testcase}}'
volumes:
- - '-v {{dovetail_home}}/pre_config/env_config.sh:{{openrc_file}}'
+ - '{{dovetail_home}}/pre_config/env_config.sh:{{openrc_file}}'
- {{cacert_volume}}
- - '-v {{dovetail_home}}/pre_config:/home/opnfv/pre_config'
- - '-v {{dovetail_home}}/userconfig:{{userconfig_dir}}'
- - '-v {{dovetail_home}}/patches:{{patches_dir}}'
- - '-v {{dovetail_home}}/results:{{result_dir}}'
- - '-v {{dovetail_home}}/images:{{images_dir}}'
+ - '{{dovetail_home}}/pre_config:/home/opnfv/pre_config'
+ - '{{dovetail_home}}/userconfig:{{userconfig_dir}}'
+ - '{{dovetail_home}}/patches:{{patches_dir}}'
+ - '{{dovetail_home}}/results:{{result_dir}}'
+ - '{{dovetail_home}}/images:{{images_dir}}'
patches_dir: {{patches_dir}}
pre_condition:
- 'echo test for precondition in functest'
diff --git a/etc/conf/onap-vtp_config.yml b/etc/conf/onap-vtp_config.yml
index 72ebeab2..eb9b024d 100644
--- a/etc/conf/onap-vtp_config.yml
+++ b/etc/conf/onap-vtp_config.yml
@@ -10,13 +10,17 @@
onap-vtp:
image_name: nexus3.onap.org:10001/onap/cli
docker_tag: 2.0.5
- opts: '-td '
+ opts:
+ detach: true
+ tty: true
shell: '/bin/bash'
- envs: '-e OPEN_CLI_MODE=daemon -e BUILD_TAG={{build_tag}}-{{testcase}}
- -e OPEN_CLI_PRODUCT_IN_USE=onap-vtp'
+ envs:
+ - 'OPEN_CLI_MODE=daemon'
+ - 'BUILD_TAG={{build_tag}}-{{testcase}}'
+ - 'OPEN_CLI_PRODUCT_IN_USE=onap-vtp'
volumes:
- - '-v {{dovetail_home}}/pre_config/{{csar_file}}:/{{csar_file}}'
- - '-v {{dovetail_home}}/results:{{result_dir}}'
+ - '{{dovetail_home}}/pre_config/{{csar_file}}:/{{csar_file}}'
+ - '{{dovetail_home}}/results:{{result_dir}}'
pre_condition:
- 'echo this is pre_condition'
cmds:
diff --git a/etc/conf/onap-vvp_config.yml b/etc/conf/onap-vvp_config.yml
index 67d21fae..d812e1f4 100644
--- a/etc/conf/onap-vvp_config.yml
+++ b/etc/conf/onap-vvp_config.yml
@@ -7,11 +7,14 @@
onap-vvp:
image_name: nexus3.onap.org:10001/onap/vvp/validation-scripts
docker_tag: latest
- opts: '-td --entrypoint=""'
+ opts:
+ detach: true
+ tty: true
+ entrypoint: ''
shell: '/bin/ash'
volumes:
- - '-v {{dovetail_home}}/pre_config/{{heat_templates_archive}}.tar.gz:/tmp/{{heat_templates_archive}}.tar.gz'
- - '-v {{dovetail_home}}/results:{{result_dir}}'
+ - '{{dovetail_home}}/pre_config/{{heat_templates_archive}}.tar.gz:/tmp/{{heat_templates_archive}}.tar.gz'
+ - '{{dovetail_home}}/results:{{result_dir}}'
pre_condition:
- 'tar xf /tmp/{{heat_templates_archive}}.tar.gz -C /vvp'
cmds:
diff --git a/etc/conf/yardstick_config.yml b/etc/conf/yardstick_config.yml
index e43989e2..610cbfd8 100644
--- a/etc/conf/yardstick_config.yml
+++ b/etc/conf/yardstick_config.yml
@@ -7,14 +7,14 @@
{% set os_insecure = os_insecure or 'False' %}
{% set os_verify = '' %}
{% if os_insecure == 'True' %}
- {% set os_verify = ' -e OS_VERIFY= ' %}
+ {% set os_verify = 'OS_VERIFY=' %}
{% endif %}
{% set dovetail_home = dovetail_home or '' %}
{% set debug = debug or 'false' %}
{% set build_tag = build_tag or '' %}
{% set cacert_volume = '' %}
{% if cacert %}
- {% set cacert_volume = ' -v ' + cacert + ':' + cacert %}
+ {% set cacert_volume = cacert + ':' + cacert %}
{% endif %}
{% set openrc_file = '/etc/yardstick/openstack.creds' %}
{% set pod_file = '/etc/yardstick/pod.yaml' %}
@@ -23,16 +23,22 @@
yardstick:
image_name: opnfv/yardstick
docker_tag: latest
- opts: '-id --privileged=true'
+ opts:
+ detach: true
+ stdin_open: true
+ privileged: true
shell: '/bin/bash'
- envs: "{{os_verify}} -e YARDSTICK_BRANCH=fraser -e CI_DEBUG={{debug}}
- -e BUILD_TAG={{build_tag}}-{{testcase}}"
+ envs:
+ - {{os_verify}}
+ - 'YARDSTICK_BRANCH=fraser'
+ - 'CI_DEBUG={{debug}}'
+ - 'BUILD_TAG={{build_tag}}-{{testcase}}"'
volumes:
- - '-v {{dovetail_home}}/pre_config/env_config.sh:{{openrc_file}}'
+ - '{{dovetail_home}}/pre_config/env_config.sh:{{openrc_file}}'
- {{cacert_volume}}
- - '-v {{dovetail_home}}/pre_config/pod.yaml:{{pod_file}}'
- - '-v {{dovetail_home}}/images:/home/opnfv/images'
- - '-v {{dovetail_home}}/results:{{result_dir}}'
+ - '{{dovetail_home}}/pre_config/pod.yaml:{{pod_file}}'
+ - '{{dovetail_home}}/images:/home/opnfv/images'
+ - '{{dovetail_home}}/results:{{result_dir}}'
pre_condition:
- 'echo this is pre_condition'
cmds: