36 Commits

Author SHA1 Message Date
Zuul
61cb57a8b9 Merge "FT for multi tenant policy in LCM" 2022-03-10 21:58:55 +00:00
Manpreet Kaur
a039fa329e FT for multi tenant policy in LCM
This patch adds functional test cases to validate the subscription
and vnf package functionality in a multi-tenant environment.
Validates VNF instantiation is only allowed when VNF and VIM belongs
to same tenants.

The patch covers only positive test cases of the feature.
Validation of negative test cases would require design changes in Fake
NFVO server, which could be implemented in the upcoming cycle.

Additionally, add missing "domain-name" field while creating VIM config
file in tools/gen_vim_config.sh.

Implement: blueprint multi-tenant-policy

Change-Id: I57d2ec780bd65423820c291bc67d1328bcf9f620
2022-03-10 10:49:26 +00:00
Yi Feng
d219c49e11 Support CNF update with MgmtDriver
This patch supports MgmtDriver in the operation of modifying VNF.
It provides a sample script MgmtDriver, when modifying CNF,
If the ConfigMap and Secret are updated, the Pod and Deployment will
also be updated (image only).

Implements: blueprint container-update
Change-Id: I1e7a1b03fef13f4c7a83488f6d2fdd7efc2e454b
2022-03-10 09:48:55 +00:00
Yasufumi Ogawa
15ea1511d7 Add VIM config generator
This update is to introduce a helper script and its docs for generating
VIM configuration. It reduces the number of steps for setting up Tacker.
It is also expected to reduce the lines of codes or some template files
of VIM configuration.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: I2f9c6255a5011c2788547a0b936a5c7c1eefbd77
2022-01-06 08:27:13 +00:00
Manpreet Kaur
401a12deeb Update references to sys.version_info
We support Python 3.6 as a minimum now.
Updating minimum version check from py2.6 to py3.6 and
removing no op checks.

Change-Id: Iac35026682578c30d06b29969e133438be777ebd
2021-07-26 18:18:22 +05:30
Purandhar Sairam Mannidi
02e6a7cd7c include mariadb, mariadb-server in bindep, for tests
as of https://review.opendev.org/#/c/751112/
py36 tests fail w/
     + sudo -H mysqladmin -u root password insecure_slave
     sudo: mysqladmin: command not found

Change-Id: I95bdb5e3908fdcef4e555095c9d61a282f48b0bb
2021-03-02 07:26:09 +00:00
Naoaki Horie
fe46bd2612 Add a k8s cluster for the k8s related FT in zuul
This patch add a kubernetes cluster for the kubernetes related
functional tests of the VNF LCM in the zuul environment.

There is no impact to the existing jobs because this patch only
add a new job, however we may need to watch the load on the Zuul
environment due to its parallel jobs.

A new node-set consists of four nodes;

  * Controller: Keystone, Nova, Neutron, Glance, Cinder, Octavia,
                MySQL, MQ, ETCD
  * Controller-tacker: Tacker, Tacker-conductor
  * Controller-k8s: kuryr-k8s, kuryr-CNI, k8s-api, kubelet
  * Compute: Nova-compute

All kubernetes resources are created on the controller-k8s node.

This patch includes the following changes:

  * Added a execution command for the functional test of related
    k8s for the VNF LCM in tox.ini.
  * Registered a vim of the `kubernetes` type by ansible. Also
    added related materials.
  * Moved the functional test files for k8s to other new directory.
  * Fixed a minor invalid definition in the definition file used
    for functional testing.

Change-Id: I1621b904450e94d6793b4c524de6785520f2e805
2021-02-08 13:11:16 +00:00
Ghanshyam Mann
7b9a074bda [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1885825
Fix user creation with GRANT in MySQL 8.0(Ubuntu Focal)
Ubuntu Focal (20.04) has mysql 8.0 and with mysql 8.0 there
is no implicit user creation with GRANT. We need to
create the user first before using GRANT command.

- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.

- Move functional jobs to Focal nodeset

Closes-Bug: #1886298

Story: #2007865
Task: #40222

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal>

Change-Id: I636c3a3b6cd429b1f8df4eaff0cb845ae0f57362
2020-09-09 01:10:03 +00:00
Zuul
90f267ecea Merge "Unexpected update in setup script for functional test" 2020-07-22 14:24:28 +00:00
Naoaki Horie
fa373795ba Unexpected update in setup script for functional test
There are some placeholder files for running functional test in zuul.
The contents of the files, such as `auth_url` of the following files,
are updated while running devstack `stack.sh`.

* tacker/tests/etc/samples/local-vim.yaml
* tools/test-setup-default-vim.sh

These Git management files including the above, should not be
modified. Therefore, I will be fix as follow.

The need files to be change for Zuul are deploy by Ansible,
so the deploy process is run with Ansible instead of the
`devstack/lib/tacker` script.

Allow `tools/test-setup-default-vim.sh` script to be executed
by itself, so the git management files aren't updated by running
devstack `stack.sh`.

Also, as other improvements, replace the file path included in
Ansible role to definition value.

Change-Id: Iad88c7adfe56e926ee0324d94787577ba066989b
Closes-Bug: #1879303
2020-07-15 11:52:58 +00:00
Hervé Beraud
2e7813d09d Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I2436a7fd91a1d081c2c5fac28452a57f048e5a73
2020-06-02 21:00:17 +02:00
tpatil
e99738ff17 Revert vim shell script file mode from 644 to 755
In patch [1], the mode of tools/test-setup-default-vim.sh shell
script file was changed from 755 to 644 because of which it's fails to
run the script which registers a default vim 'VIM0' needed to run
for some of the functional tests.

This patch reverts back the mode of test-setup-default-vim.sh
from 644 to 755 and logs meaningful error message in case
the script file doesn't exists or it doesn't have execute permission.

[1] : https://review.opendev.org/#/c/674761

Change-Id: I4651bdd89da12720416e630173f80cc788911307
Closes-Bug: #1874007
2020-05-14 04:37:54 +00:00
Zuul
b2aff2e847 Merge "Adding Multi-Interface for Containerized VNF in Tacker" 2020-04-24 11:13:10 +00:00
hyunsikYang
0210cb1d69 Adding Multi-Interface for Containerized VNF in Tacker
Implement blueprint multi-interface-container

Change-Id: Ib062fdc344f6bb94affd8f650c40cf9a425ec4d9
2020-04-24 13:43:30 +09:00
Andreas Jaeger
98a67d5b96 Cleanup Python 2.7 support
OpenStack is dropping the py2.7 support in ussuri cycle.

Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove section from setup.cfg: Wheel is not needed for python
  3 only repo
- Remove ancient sections from setup.cfg
- Update requirements
- Update api-ref/source/conf.py for current openstackdocstheme
- Don't test for broken po files, this is done in the infra scripts
  since a long time
- Change shebang lines to use python3

Change-Id: If5276a47b8822c5c19d045fbc5c41394f4a9dd2d
2020-03-29 20:23:26 +00:00
Q.hongtao
7d955f1b27 Fix import library error
Change-Id: I4b1f886bafdcfe8e110249596e85947e567babe8
2019-09-06 16:34:48 +08:00
dharmendra
e254845470 Switch to oslo_utils.importutils to load module
The imp module is deprecated since a while and the load_source
method has been removed from docs because broken [1][2].
Switch to oslo_utils.importutils for the same.

[1] https://bugs.python.org/issue14551
[2] https://mail.python.org/pipermail/python-ideas/2014-December/030265.html

Change-Id: Ic567e48b925befe2c196a5d46de8e504f273387e
2019-08-03 09:25:49 +00:00
caoyuan
1ebb081e8f Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I6c273be62735d46221130a1da4d3672fdea77e01
2019-04-26 18:07:57 +08:00
Nguyen Hai
5915585cd2 Switch to using stestr
stestr is maintained project to which all Openstack projects
should migrate.

[1] https://etherpad.openstack.org/p/YVR-python-pti
[2] https://governance.openstack.org/tc/reference/pti/python.html

Change-Id: I3a4a8e6a7c856446686252d80046532e08d3936b
2018-06-14 04:49:05 +00:00
yong sheng gong
9af2b71e07 Move to zuul3 jobs
https://docs.openstack.org/infra/manual/zuulv3.html#legacy-job-migration-details

Co-Authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com>
Co-Authored-By: yong sheng gong <gong.yongsheng@99cloud.net>

Closes-bug: #1729632
Change-Id: I2d1c4795b1a591831a12535d2f048a13258f4913
2017-11-04 22:09:42 +11:00
rajat29
ab6a2557d4 Fix to use . to source script files
Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.
When you have to source a script file, for example, a credentials file
to gain access to user-only or admin-only CLI commands, use . instead of source.
https://docs.openstack.org/contributor-guide/writing-style/code-conventions.html

Change-Id: I267e2282345b5cb97eba8d0c844417354ec24f4c
2017-09-11 15:21:20 +05:30
gong yong sheng
cb4e713ae6 Provide a tool to generate a VNFC image
Change-Id: I8a35db57b536c75860355840537afeb20d088ec6
Partial-Bug: 1673012
2017-03-17 14:32:43 +08:00
gong yong sheng
a2f1d9cc96 Remove the customized test-requirements script
The gate-test-requirements job is doing the same thing.
We cannot use revert since it is breaking the gate-test-requiremnts job.

Change-Id: Ie5f4304b0cb59fda9bcc87df518e4c2ad9915b60
2017-03-07 15:48:42 +08:00
gong yong sheng
13f4ff41d1 Sync test-requirements with global requirements
In this patch, a tool is provided for team to do the sync to avoid
any gaps with global requirements.

Change-Id: Ie960eae7a2756aa0f267c8ad37ea60f5effe6742
Partial-bug: 1668848
2017-03-06 22:16:37 +08:00
Andreas Jaeger
00e74f456c Prepare for using standard python tests
Add simple script to setup mysql and postgresql databases, this script
can be run by users during testing and will be run by CI systems for
specific setup before running unit tests. This is exactly what is
currently done by OpenStack CI in project-config.

This allows to change in project-config the python-db jobs to
python-jobs since python-jobs will call this script initially.

See also
http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html

Update TESTING.rst for this.

Needed-By: Ia34de3e1649576769a20bd14cee39e2c5c50c82d
Change-Id: I8ac66b1c370cdd0801fcfd5dc1b46a5935219038
2017-02-06 22:05:04 +01:00
doantungbk
17e28c9d90 Fix dsvm failure caused by devstack plugin and event/auditing func.
This patch will fix dsvm failure:
1. The new changes in devstack [1]. Whereby, plugin was not enabled
to use multiple times. Currently, almost functions like fixup_quota,
add_key and add_secgrp enable plugin which runs multiple times.
2. Some functional tests were not working with event/auditing function.
[1]https://review.openstack.org/#/c/396794/

Change-Id: I1846c0df1d59557919a4caa612f2a4c60fbf7ce8
Closes-Bug: #1646807
2016-12-11 22:28:18 -08:00
Cao Xuan Hoang
c159b4e640 Add Apache 2.0 license to source file
As per OpenStack licensing guide lines [1]:
[H102 H103] Newly contributed Source Code should be licensed under
the Apache 2.0 license.
[H104] Files with no code shouldn't contain any license header nor
comments, and must be left completely empty.

[1] http://docs.openstack.org/developer/hacking/#openstack-licensing

Change-Id: I0da33542af07e461004011e911e0410b48221ab3
2016-11-07 09:26:28 +07:00
Tin Lam
043c147690 Provide support for security groups for ConnectionPoints
Add option for providing security groups in ConnectionPoint
node_type of TOSCA VNF templates.

Co-Authored-By: Sridhar Ramaswamy <srics.r@gmail.com>

Change-Id: I5fabaa8a33d684a591364510ed6d3df93989c419
Closes-Bug: #1591372
2016-09-14 10:32:52 -05:00
gong yong sheng
b90d3e4d6d Add a shell script for developers to prepare functional test env
After devstack installation, to run functional test cases, the
nova instance quota, keypair and neutron port quota should be
set to a level which will not block tests. This patch adds a tool
to do this preparation so that developers can easily run
functional tests locally.

Change-Id: I1c2fae110863906e3f7601456dbf79ff06da4c40
Closes-bug: #1617303
2016-08-31 10:21:54 +08:00
Kanagaraj Manickam
e575760d3c Sample tacker.conf generator
It also make required keystone config changes as part
of devstack plugin, which helps the functional test cases
to successfully complete and it makes inline with existing
tacker conf.

Closes-bug: #1592247
Change-Id: I545ceb2c9e61c22dbd8a0e1ee39a6e4fa24f8e88
2016-07-21 12:11:42 +05:30
gong yong sheng
494487437b Remove all openstack common stuff
This is the last patch for tacker to use oslo codes.

Change-Id: I163862f0d1a007afdfa91ed939648c73ae36ae5d
Partial-bug: #1552282
2016-07-12 15:11:15 +00:00
Jenkins
d1903f53b3 Merge "Collect test result reports" 2016-04-15 23:05:03 +00:00
Martin Oemke
d517c24e00 Cleanup vim settings
This patch cleans up vim settings in .py files.
Settings should be handled in local settings.

Change-Id: I3dcb1b062cb5f51e59bf6e7463a4fedc2c283491
2016-03-28 13:03:56 +02:00
gong yong sheng
8bdccea2bb Collect test result reports
Fix the post_test_hook.sh and tox.ini to use right tox enviroment.
Post_test_hook.sh collects the result reports.

Change-Id: Ie60cd55521d89cb2e00f3ecff0fe3af989e0f6ea
Closes-bug: 1559861
2016-03-21 18:59:06 +08:00
Isaku Yamahata
bddc116913 update configuration files for tacker
TODO: import python-tackerclient once pypi repository

Change-Id: Iedfa49682a03f898cacab5d3a936383cb2740ae0
2014-07-04 18:20:50 +09:00
Isaku Yamahata
8aff29509f import neutron master of cba140daccd7c4f715263cda422d5cec27af069d
Merge Neutron master branch to tacker master branch with modification
of tox.ini and .gitreview.
This patch imports the following change set of Neutron.

  > commit cba140daccd7c4f715263cda422d5cec27af069d
  > Merge: 63d8237 6bed4a0
  > Author: Jenkins <jenkins@review.openstack.org>
  > Date:   Sun Jun 22 16:02:56 2014 +0000
  >
  >     Merge "Adding static routes data for members"

Change-Id: I5a0f522bc20530c46e35dc9e03fe72d72ad04577
2014-07-01 17:11:09 +09:00