Move test samples to reduce setuptools warnings

Previously there are a lot of warning messages of setuptools
in the log files of tox jobs. This is mainly caused by test
samples because these are in python codes directories.

This patch moves test samples from under {tacker_root}/tacker/
to under {tacker_root}/samples/.

This patch reduces log messages drastically. For example,
the log file of py38 tox job decreased about 34,000 lines.

Change-Id: I8187ef892c6fe8be323fa5cc20969d298843f1ea
This commit is contained in:
Itsuro Oda 2024-01-05 05:04:20 +00:00
parent 7488cc7b77
commit c056e248b2
918 changed files with 599 additions and 925 deletions

View File

@ -147,7 +147,7 @@ all the tacker related apis supported.
**Input yaml files** : These are input files used in testcases for operations
like create vnfd or create vnf.
The location of files is ``tacker/tests/etc/samples/``.
The location of files is ``samples/tests/etc/samples/``.
**Asserting values in testcase** : The base class BaseTackerTest inherits base.
TestCase which has inbuilt assert functions which can be used in testcase.

View File

@ -38,7 +38,7 @@ base.BaseTackerTest. Testcases typically has sections to setup, test, validate
results and finally cleanup.
Input yaml files: These are input files used in testcases for operations like
create vnfd or create vnf. The location of files is tacker/tests/etc/samples/.
create vnfd or create vnf. The location of files is samples/tests/etc/samples/.
requirements.txt and test-requirements.txt : The file requirements.txt and
test-requirements.txt lists all the packages needed for functional test.

View File

@ -373,6 +373,6 @@ Result:
The age of pods under deployment has been reset, so pods under
this deployment has redeployed before and after operation.
.. _VNF Package for Common instantiate: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_kubernetes_v2/samples/test_instantiate_cnf_resources/contents
.. _VNF Package for Change Current VNF Package: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_kubernetes_v2/samples/test_change_vnf_pkg_with_deployment/contents
.. _VNF Package for Common instantiate: https://opendev.org/openstack/tacker/src/branch/master/samples/tests/functional/sol_kubernetes_v2/test_instantiate_cnf_resources/contents
.. _VNF Package for Change Current VNF Package: https://opendev.org/openstack/tacker/src/branch/master/samples/tests/functional/sol_kubernetes_v2/test_change_vnf_pkg_with_deployment/contents
.. _ETSI SOL002 v3.5.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.05.01_60/gs_nfv-sol002v030501p.pdf

View File

@ -46,12 +46,12 @@ This procedure uses an example using the sample VNF package.
How to Create VNF Package for Healing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using `tacker/tests/etc/samples/etsi/nfv/test_cnf_heal`_,
Using `samples/tests/etc/samples/etsi/nfv/test_cnf_heal`_,
describe how to create VNF package for healing.
.. code-block:: console
$ cd tacker/tests/etc/samples/etsi/nfv/test_cnf_heal
$ cd samples/tests/etc/samples/etsi/nfv/test_cnf_heal
Download official definition files from ETSI NFV.
ETSI GS NFV-SOL 001 [i.4] specifies the structure and format of the VNFD based
@ -204,7 +204,7 @@ Healing Target VNF Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assuming that the following VNF instance exists. VNF Instance is made by using
`tacker/tests/etc/samples/etsi/nfv/test_cnf_heal`_.
`samples/tests/etc/samples/etsi/nfv/test_cnf_heal`_.
This instance will be healed.
.. code-block:: console
@ -528,4 +528,4 @@ Result:
.. _NFV-SOL002 v2.6.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.06.01_60/gs_nfv-sol002v020601p.pdf
.. _tacker/tests/etc/samples/etsi/nfv/test_cnf_heal : https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/etc/samples/etsi/nfv/test_cnf_heal
.. _samples/tests/etc/samples/etsi/nfv/test_cnf_heal : https://opendev.org/openstack/tacker/src/branch/master/samples/tests/etc/samples/etsi/nfv/test_cnf_heal

View File

@ -45,12 +45,12 @@ This procedure uses an example using the sample VNF package.
How to Create VNF Package for Scaling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using `tacker/tests/etc/samples/etsi/nfv/test_cnf_scale`_,
Using `samples/tests/etc/samples/etsi/nfv/test_cnf_scale`_,
describe how to create VNF package for scaling.
.. code-block:: console
$ cd tacker/tests/etc/samples/etsi/nfv/test_cnf_scale
$ cd samples/tests/etc/samples/etsi/nfv/test_cnf_scale
Download official definition files from ETSI NFV.
ETSI GS NFV-SOL 001 [i.4] specifies the structure and format of the VNFD based
@ -354,4 +354,4 @@ Replicas information after scale-in:
vdu1 1/1 1 1 2d
.. _NFV-SOL001 v2.6.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/001/02.06.01_60/gs_NFV-SOL001v020601p.pdf
.. _tacker/tests/etc/samples/etsi/nfv/test_cnf_scale : https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/etc/samples/etsi/nfv/test_cnf_scale
.. _samples/tests/etc/samples/etsi/nfv/test_cnf_scale : https://opendev.org/openstack/tacker/src/branch/master/samples/tests/etc/samples/etsi/nfv/test_cnf_scale

View File

@ -992,9 +992,9 @@ confirm that VDU's has changed successfully.
'fc0e0fcf-8eb9-4ddc-8194-2df6c1b43a7b'.
.. _Heat CLI reference : https://docs.openstack.org/python-openstackclient/latest/cli/plugin-commands/heat.html
.. _VNF Package for Common instantiate: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_instantiate_vnf_with_old_image_or_volume/contents
.. _change from image to image: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_change_vnf_pkg_with_new_image/contents
.. _change from image to volume: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_change_vnf_pkg_with_new_volume/contents
.. _change from volume to image: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_change_vnf_pkg_with_new_image/contents
.. _change from volume to volume: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_change_vnf_pkg_with_new_volume/contents
.. _VNF Package for Common instantiate: https://opendev.org/openstack/tacker/src/branch/master/samples/tests/functional/sol_v2_common/test_instantiate_vnf_with_old_image_or_volume/contents
.. _change from image to image: https://opendev.org/openstack/tacker/src/branch/master/samples/tests/functional/sol_v2_common/test_change_vnf_pkg_with_new_image/contents
.. _change from image to volume: https://opendev.org/openstack/tacker/src/branch/master/samples/tests/functional/sol_v2_common/test_change_vnf_pkg_with_new_volume/contents
.. _change from volume to image: https://opendev.org/openstack/tacker/src/branch/master/samples/tests/functional/sol_v2_common/test_change_vnf_pkg_with_new_image/contents
.. _change from volume to volume: https://opendev.org/openstack/tacker/src/branch/master/samples/tests/functional/sol_v2_common/test_change_vnf_pkg_with_new_volume/contents
.. _ETSI SOL002 v3.5.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.05.01_60/gs_nfv-sol002v030501p.pdf

View File

@ -96,7 +96,7 @@ When Use v1 API
:::::::::::::::
.. code-block:: console
$ cd TACKER_ROOT/tacker/tests/etc/samples/etsi/nfv/test_cnf_container_update_before
$ cd TACKER_ROOT/samples/tests/etc/samples/etsi/nfv/test_cnf_container_update_before
Copy the official definition files from the sample directory.
`ETSI GS NFV-SOL 001`_ specifies the structure and format of the VNFD
@ -104,7 +104,7 @@ based on TOSCA specifications.
.. code-block:: console
$ cd TACKER_ROOT/tacker/tests/etc/samples/etsi/nfv/test_cnf_container_update_before
$ cd TACKER_ROOT/samples/tests/etc/samples/etsi/nfv/test_cnf_container_update_before
$ cp TACKER_ROOT/samples/vnf_packages/Definitions/etsi_nfv_sol001_common_types.yaml Definitions/
$ cp TACKER_ROOT/samples/vnf_packages/Definitions/etsi_nfv_sol001_vnfd_types.yaml Definitions/
@ -117,7 +117,7 @@ Following commands are an example of compressing a VNF Package:
.. code-block:: console
$ cd TACKER_ROOT/tacker/tests/etc/samples/etsi/nfv/test_cnf_container_update_before
$ cd TACKER_ROOT/samples/tests/etc/samples/etsi/nfv/test_cnf_container_update_before
$ mkdir Scripts
$ cp TACKER_ROOT/samples/mgmt_driver/kubernetes/container_update/container_update_mgmt.py Scripts/
$ zip deployment.zip -r Definitions/ Files/ TOSCA-Metadata/ Scripts/
@ -127,7 +127,7 @@ When Use v2 API
.. code-block:: console
$ cd TACKER_ROOT/tacker/tests/functional/sol_kubernetes_v2/samples/test_cnf_container_update_before
$ cd TACKER_ROOT/samples/tests/functional/sol_kubernetes_v2/test_cnf_container_update_before
$ vi pkggen.py
...
vim_id = "your k8s vim's id" (modify this value to your own vim Id)
@ -316,10 +316,10 @@ recreate the deployment, DaemonSet and ReplicaSet to update.
This document provides the new vnf package,
if you use v1 API, the path is
`tacker/tests/etc/samples/etsi/nfv/test_cnf_container_update_after`_
`samples/tests/etc/samples/etsi/nfv/test_cnf_container_update_after`_
if you use v2 API, the path is
`tacker/tests/functional/sol_kubernetes_v2/samples/test_cnf_container_update_after`_
`samples/tests/functional/sol_kubernetes_v2/test_cnf_container_update_after`_
Details of CLI commands are described in :doc:`../cli/cli-etsi-vnflcm`.
@ -841,9 +841,9 @@ recreated.
.. _How to use Mgmt Driver for deploying Kubernetes Cluster : https://docs.openstack.org/tacker/latest/user/mgmt_driver_deploy_k8s_usage_guide.html#mgmt-driver-introduction
.. _samples/mgmt_driver/kubernetes/container_update/container_update_mgmt.py : https://opendev.org/openstack/tacker/src/branch/master/samples/mgmt_driver/kubernetes/container_update/container_update_mgmt.py
.. _tacker/sol_refactored/mgmt_drivers/container_update_mgmt_v2.py : https://opendev.org/openstack/tacker/src/branch/master/tacker/sol_refactored/mgmt_drivers/container_update_mgmt_v2.py
.. _tacker/tests/etc/samples/etsi/nfv/test_cnf_container_update_before : https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/etc/samples/etsi/nfv/test_cnf_container_update_before
.. _tacker/tests/etc/samples/etsi/nfv/test_cnf_container_update_after : https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/etc/samples/etsi/nfv/test_cnf_container_update_after
.. _tacker/tests/functional/sol_kubernetes_v2/samples/test_cnf_container_update_after : https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_kubernetes_v2/samples/test_cnf_container_update_after
.. _samples/tests/etc/samples/etsi/nfv/test_cnf_container_update_before : https://opendev.org/openstack/tacker/src/branch/master/samples/tests/etc/samples/etsi/nfv/test_cnf_container_update_before
.. _samples/tests/etc/samples/etsi/nfv/test_cnf_container_update_after : https://opendev.org/openstack/tacker/src/branch/master/samples/tests/etc/samples/etsi/nfv/test_cnf_container_update_after
.. _samples/tests/functional/sol_kubernetes_v2/test_cnf_container_update_after : https://opendev.org/openstack/tacker/src/branch/master/samples/tests/functional/sol_kubernetes_v2/test_cnf_container_update_after
.. _ETSI GS NFV-SOL 001 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/001/02.06.01_60/gs_nfv-sol001v020601p.pdf
.. _Prepare Kubernetes VIM : https://docs.openstack.org/tacker/latest/user/etsi_containerized_vnf_usage_guide.html#prepare-kubernetes-vim
.. _Instantiate VNF : https://docs.openstack.org/tacker/latest/user/etsi_containerized_vnf_usage_guide.html#instantiate-vnf

View File

@ -209,12 +209,12 @@ The following is sample Base HOT corresponding to above sample userdata script.
**top Base HOT**
.. literalinclude:: ../../../tacker/tests/functional/sol_v2_common/samples/basic_lcms_max/contents/BaseHOT/simple/sample1.yaml
.. literalinclude:: ../../../samples/tests/functional/sol_v2_common/basic_lcms_max/contents/BaseHOT/simple/sample1.yaml
:language: yaml
**nested Base HOT**
.. literalinclude:: ../../../tacker/tests/functional/sol_v2_common/samples/basic_lcms_max/contents/BaseHOT/simple/nested/VDU1.yaml
.. literalinclude:: ../../../samples/tests/functional/sol_v2_common/basic_lcms_max/contents/BaseHOT/simple/nested/VDU1.yaml
:language: yaml

View File

@ -9,8 +9,8 @@
- name: Copy test vim file
copy:
remote_src=True
src={{ devstack_base_dir }}/tacker/tacker/tests/etc/samples/local-vim.yaml
dest={{ zuul_work_dir }}/tacker/tests/etc/samples/local-vim.yaml
src={{ devstack_base_dir }}/tacker/samples/tests/etc/samples/local-vim.yaml
dest={{ zuul_work_dir }}/samples/tests/etc/samples/local-vim.yaml
- name: Check if project's tools/test-setup-default-vim.sh exists
stat:
@ -45,7 +45,7 @@
replace: "{{ auth_uri }}"
with_items:
- "{{ zuul_work_dir }}/tools/test-setup-default-vim.sh"
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-vim.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-vim.yaml"
when:
- p.stat.exists
@ -53,7 +53,7 @@
replace:
path: "{{ zuul_work_dir }}/tools/test-setup-default-vim.sh"
regexp: '(?<=config-file )([^ ]+)(?= )'
replace: "{{ ansible_env.HOME }}/{{ zuul_work_dir }}/tacker/tests/etc/samples/local-vim.yaml"
replace: "{{ ansible_env.HOME }}/{{ zuul_work_dir }}/samples/tests/etc/samples/local-vim.yaml"
- name: Run tools/test-setup-default-vim.sh
command: tools/test-setup-default-vim.sh
@ -131,14 +131,14 @@
src={{ devstack_base_dir }}/tacker/{{ item }}
dest={{ zuul_work_dir }}/{{ item }}
with_items:
- "tacker/tests/etc/samples/local-k8s-vim.yaml"
- "tacker/tests/etc/samples/local-k8s-vim-helm.yaml"
- "samples/tests/etc/samples/local-k8s-vim.yaml"
- "samples/tests/etc/samples/local-k8s-vim-helm.yaml"
- name: Copy test k8s vim file for oidc
copy:
remote_src=True
src={{ devstack_base_dir }}/tacker/tacker/tests/etc/samples/local-k8s-vim-oidc.yaml
dest={{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim-oidc.yaml
src={{ devstack_base_dir }}/tacker/samples/tests/etc/samples/local-k8s-vim-oidc.yaml
dest={{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim-oidc.yaml
when:
- keycloak_host is defined
@ -184,8 +184,8 @@
regexp: "https://127.0.0.1:6443"
replace: "{{ kuryr_k8s_api_url }}"
with_items:
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim.yaml"
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim-helm.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim-helm.yaml"
when:
- p.stat.exists
@ -195,7 +195,7 @@
regexp: "https://127.0.0.1:6443"
replace: "{{ kuryr_k8s_api_url }}"
with_items:
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim-oidc.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim-oidc.yaml"
when:
- p.stat.exists
- keycloak_host is defined
@ -206,7 +206,7 @@
regexp: "https://127.0.0.1:8443"
replace: "https://{{ keycloak_host }}:{{ keycloak_https_port }}"
with_items:
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim-oidc.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim-oidc.yaml"
when:
- p.stat.exists
- keycloak_host is defined
@ -217,8 +217,8 @@
regexp: "secret_token"
replace: "{{ hostvars['controller-k8s'].admin_token.stdout }}"
with_items:
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim.yaml"
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim-helm.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim-helm.yaml"
when:
- p.stat.exists
@ -260,9 +260,9 @@
regexp: "ssl_ca_cert: .*$"
replace: "ssl_ca_cert: '{{ ssl_ca_cert.stdout }}'"
with_items:
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim.yaml"
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim-oidc.yaml"
- "{{ zuul_work_dir }}/tacker/tests/etc/samples/local-k8s-vim-helm.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim-oidc.yaml"
- "{{ zuul_work_dir }}/samples/tests/etc/samples/local-k8s-vim-helm.yaml"
when:
- p.stat.exists
- ssl_ca_cert.rc == 0 and ssl_ca_cert.stdout != ""
@ -271,7 +271,7 @@
replace:
path: "{{ zuul_work_dir }}/tools/test-setup-k8s-vim.sh"
regexp: '(?<=conf_dir=)([^\n]+)(?=\n)'
replace: "{{ ansible_env.HOME }}/{{ zuul_work_dir }}/tacker/tests/etc/samples"
replace: "{{ ansible_env.HOME }}/{{ zuul_work_dir }}/samples/tests/etc/samples"
- name: Run tools/test-setup-k8s-vim.sh
command: tools/test-setup-k8s-vim.sh

View File

@ -79,7 +79,7 @@
copy:
remote_src=True
src={{ os_vim_conf_path_tenant1 }}
dest={{ zuul_work_dir }}/tacker/tests/etc/samples/{{ os_vim_conf_name_tenant1 }}
dest={{ zuul_work_dir }}/samples/tests/etc/samples/{{ os_vim_conf_name_tenant1 }}
- name: Request authentication token for second tenant
shell: >
@ -123,7 +123,7 @@
copy:
remote_src=True
src={{ os_vim_conf_path_tenant2 }}
dest={{ zuul_work_dir }}/tacker/tests/etc/samples/{{ os_vim_conf_name_tenant2 }}
dest={{ zuul_work_dir }}/samples/tests/etc/samples/{{ os_vim_conf_name_tenant2 }}
when:
- inventory_hostname == 'controller-tacker'
@ -175,7 +175,7 @@
copy:
remote_src=True
src={{ k8s_vim_conf_path_tenant1 }}
dest={{ zuul_work_dir }}/tacker/tests/etc/samples/{{ k8s_vim_conf_name_tenant1 }}
dest={{ zuul_work_dir }}/samples/tests/etc/samples/{{ k8s_vim_conf_name_tenant1 }}
- name: Generate Kubernetes VIM config for second tenant
shell: >
@ -209,7 +209,7 @@
copy:
remote_src=True
src={{ k8s_vim_conf_path_tenant2 }}
dest={{ zuul_work_dir }}/tacker/tests/etc/samples/{{ k8s_vim_conf_name_tenant2 }}
dest={{ zuul_work_dir }}/samples/tests/etc/samples/{{ k8s_vim_conf_name_tenant2 }}
when:
- inventory_hostname == 'controller-tacker'

Some files were not shown because too many files have changed in this diff Show More