2103 Commits

Author SHA1 Message Date
LiangLu
424ba746a6 Fix typo and missing configure for mgmtdriver
Fixed the problem that "vnflcm_mgmt_driver = vnflcm_noop" does not exist
in /etc/tacker/tacker.conf after installing the tacker.

In setup.cfg, change vnflcm_drivers to vnflcm_driver.
In etc/config-generator.conf, add "namespace = tacker.vnflcm.vnflcm_driver".

Closes-Bug: #1918232
Change-Id: I50ffb4c96837599dcb0d04dd673e0c4681ffedfa
2021-03-10 09:21:54 +00:00
Zuul
08b4633514 Merge "Update min version of tox" 2021-03-04 07:08:02 +00:00
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
Manpreet Kaur
9cf8119af8 Update min version of tox
This patch bumps the minimum version of tox to 3.18.0 [1].
To incorporate the below changes,
* Remove configuration of "install_command" option in tox, as it
  turns out that this is the default value provided by tox [2].
* The argument such as "whitelist_externals" is deprecated,
  therefore replaces whitelist_externals by allowlist_externals option [1].

[1] https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23
[2] https://tox.readthedocs.io/en/latest/config.html#conf-install_command

Change-Id: Iaf83bbaf7a4dbe03aab42d63a81276cfe42df505
2021-02-25 11:00:10 +00:00
Ayumu Ueha
811d47f0c0 Fix FT error for legacy anti-affinity test
In the following patch [1], FT error was solved by removing
"CELLSV2_SETUP: singleconductor" and setup as a superconductor, but
after merging the patch, other error is become to occur in the
anti-affinity test in the legacy FT.
[1] https://review.opendev.org/c/openstack/tacker/+/775958

Because, anti-affinity may not work well in a environment with nova
installed as multi-cell [2].
[2] https://opendev.org/openstack/tacker/commit/b20812678bdb5266f4483b2e55c582167a605e

And db dependency error that occurred when setting single cell before
have been resolved by merging the following patches of devstack [3].
[3] https://review.opendev.org/c/openstack/devstack/+/775940

Therefore, this patch revert `CELLSV2_SETUP: singleconductor` in
".zuul.yaml" to resolve error of legacy anti-affinity test.

Change-Id: Ia1bb10daf426820b44487c85fbffd3b7ff5c0f39
2021-02-24 10:03:18 +00:00
Zuul
22d69f971a Merge "Implement SOL001 features to MgmtDriver" 2021-02-23 16:25:18 +00:00
Zuul
0940ba9d30 Merge "Remove translation sections from setup.cfg" 2021-02-22 04:10:30 +00:00
Zuul
9b92b1396e Merge "Remove unnecessary API description in API-DQ" 2021-02-22 04:01:31 +00:00
Manpreet Kaur
79c93062bd Remove translation sections from setup.cfg
These translation sections are not needed anymore,
* extract_messages
* compile_catalog
* update_catalog
As Babel can generate translation files without them.

Change-Id: I2ec08d6b9c26795f77226e324d642662412fe0de
2021-02-19 09:58:11 +00:00
LiangLu
f88022cdc2 Implement SOL001 features to MgmtDriver
* Enable VNF vendors to customize configuration methods
  for applications via MgmtDriver
* Load LCM interface from vnfd file
* Call LCM methods from vnflcm_driver
* Fix unitentional mgmt_calls in vnflcm_driver._scale_vnf_pre

Note:
* For UT, sqlalchemy is used, which calls functions in pymysql.py,
  so the dependency module PyMySQL needs to be added.
* The previous implementation of ``cfg.CONF.tacker.infra_driver``
  depends on the default config in legacy ``VNFMPlugin`` class in
  tacker/vnfm/plugin.py, so we need to fix this here.
* Due to drop unitentional mgmt_calls, it makes compatibility breakage
  for some scale actions calls and third party driver support. This
  backward incompatibility was decided to keep since it is not long
  time since last change(Victoria release)

Change-Id: Ib4ad3eb9e0a84d1a5e807d2e6004e6b2c02bf3cf
2021-02-18 17:29:39 +09:00
Ayumu Ueha
8a56f1ec53 Resolve FT error in Zuul and reduce times
Latest devstack is supporting async (parallel) task.[1]
[1] https://review.opendev.org/c/openstack/devstack/+/771505

This patch change to use async task for the following effects:
* Resolve the `RETRY_LIMIT` error that is occurring on FT
* Reduce time of functional test in Zuul

Change points of .zuul.yaml:
* For async task, I added the `DEVSTACK_PARALLEL` parameter and set it
  to True.
* Removed `CELLSV2_SETUP: singleconductor` to avoid FT error that is
  caused by nova db dependency issues. (Changed to work with the
  recommended default value `supperconductor`)

Change-Id: I7bb116f80d6327257257ec8e1eebc0bd95d109a0
2021-02-17 18:39:17 +00:00
Hiroo Kitamura
25d80fdb58 Remove unnecessary API description in API-DQ
In VNF LCM API document, there is a Notification API
where Tacker doesn't have an endpoint.
Therefore, the API definition is unnecessary and
should be removed.

Change-Id: If0272e3211da2c1372551fcb47f8bf99c10a468e
Closes-Bug: #1913665
2021-02-12 14:28:49 +09:00
Zuul
d2e817f2f9 Merge "Add doc of CLIs developed in Victoria and minor fixes" 2021-02-11 17:23:32 +00:00
Ayumu Ueha
b4f54d9d15 Adapt to python-mistralclient v4.2.0 for PingVIM
python-mistralclient upgraded to v4.2.0 on 2021-01-26.
v4.2.0 include change of the patch [1], and this patch changed argument
of ExectutionManager.create() method.
[1] https://review.opendev.org/c/openstack/python-mistralclient/+/764897

Tacker uses above method for creating VIM monitoring task during user
will register VIM.
So, this patch fix argument of mistral_client.executions.create() method
in NfvoPlugin to adapt to python-mistralclient v4.2.0 and enable to set
up vim monitoring successfuly.

And updated the python-mistralclient version of `requirements.txt`,
`lower-constraints.txt` and `upper-constraints.txt`.
After merging this patch, the user must upgrade python-mistralclient to
v4.2.0 in order for the VIM registration state to REACHABLE.

Closes-Bug: #1914737
Change-Id: Ia02b917f0dabc715575ab7f4c93cba0ff68380b6
2021-02-10 04:51:17 +00:00
Zuul
068f7686fb Merge "Update upper-constraints.txt" 2021-02-10 03:48:09 +00:00
Zuul
6156cdb328 Merge "Add a k8s cluster for the k8s related FT in zuul" 2021-02-10 01:13:30 +00:00
Yasufumi Ogawa
904e2a9c3c Update upper-constraints.txt
As some of tests are changed to use upper-constraints.txt in [1], we
need to update this file if [2] is updated.

[1] Commit: 500d2eb780 "Change tosca-parser and heat-translator install"
[2] https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt

Change-Id: If619e2e0790be96baf469c67d75151aeb656edd1
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
2021-02-09 09:54:18 +00:00
Zuul
ae3beb1fd3 Merge "Increase timeout value of heat stack creation" 2021-02-09 09:45:36 +00:00
Itsuro Oda
06b58b9e00 Increase timeout value of heat stack creation
Sometimes tacker-functional-devstack-multinode-sol-separated-nfvo
fails because of timeout of heat stack creation.

This patch increases timeout value of heat stack creation.

Change-Id: I825a60ac2261c8d47ca4273318f51221be36bb9e
2021-02-09 11:32:48 +09:00
Zuul
3bb268a2a7 Merge "Remove duplication of getting HOT templates" 2021-02-09 02:11:52 +00:00
Zuul
30e01b76bf Merge "Close HOT template files after read" 2021-02-09 02:11:20 +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
Naoaki Horie
70ec11e113 Workaround for the ControllerRevision FT
This patch is provisional workaround for bug [1].

I think possible ways to fix the bug are using the kubernetes
python client v11.0.0. However, as a other issue, the
ControllerRevision resources is not delete and remain. The
problem of resources remaining cannot be solved immediately.
Therefore, add a skip decorator to skip the Functional Test of
ControllerRevision as a workaround.

The added skip decorator will be removed after this issue
completely resolved.

[1] https://bugs.launchpad.net/tacker/+bug/1910327

Partial-Bug: #1910327
Change-Id: I6bedc5c8c712c9cf7d95ae5cb7384c4dea187108
2021-02-05 10:10:05 +00:00
Hiroo Kitamura
3a5e600764 Add doc of CLIs developed in Victoria and minor fixes
CLI commands developed in Victoria
are added in CLI doc.

This patch adds the following CLI commands:
* Heal VNF
* Scale VNF
* Rollback VNF lifecycle management operation

In addition, this patch makes the following minor fixes:
* Fix the item numbers
* Use capital letters with underscores for parameters

For the second point, I referred to the following reference.
https://docs.openstack.org/doc-contrib-guide/writing-style/code-conventions.html

Change-Id: I5383d0cf54793dfba1c496ca738acdea3c28864e
2021-02-05 13:37:59 +09:00
Zuul
c8656179fd Merge "Dropping explicit unicode literal" 2021-02-04 03:13:13 +00:00
Zuul
1b9dc2c63e Merge "Replace deprecated UPPER_CONSTRAINTS_FILE variable" 2021-02-03 14:23:32 +00:00
Zuul
8f8ea766ef Merge "Update doc8 version" 2021-02-03 14:19:22 +00:00
Zuul
3bf90ad618 Merge "Support feature to attach the existing volume" 2021-02-03 14:19:18 +00:00
Itsuro Oda
9204d07e5c Remove duplication of getting HOT templates
Previously get_base_nest_hot_dict() was called by vnflcm_driver
and openstack infra_driver redundantly.

This patch remove calling get_base_nest_hot_dict() from
vnflcm_driver because HOT is openstack specific.
base_hot_dict parameter of infra_driver interface is removed
at the same time.
Note that vnf_package_path parameter is passed to infra_driver
always since it is used by both openstack and kubernetes.

Change-Id: I94fc914f58747ae75651480ec11b177140fa849a
2021-02-03 13:58:14 +09:00
Zuul
0e16ab16fc Merge "Add parameter plugin to kubernetes_driver.instantiate_vnf()" 2021-02-02 03:35:08 +00:00
Manpreet Kaur
28cf5645e2 Dropping explicit unicode literal
In python 3, all strings are considered as unicode string.

This patch drops the explicit unicode literal (u'...')
or (u"..") appearances from the unicode strings.

Note: The scope of the patch is to drop unicode literal prefix
from python source code files, documentation and comment are overlook.

Change-Id: I66389d3f4b236a50bd3f193d4e67c2ac10e6ca24
2021-02-02 06:45:53 +05:30
Itsuro Oda
54aca142b0 Close HOT template files after read
Previously get_base_nest_hot_dict() used by tacker-conductor
opens and reads HOT template files but does not close them.
As a result, tacker-conductor will reach the limit of open
file descriptor while it is running long time.

This patch fixes to close HOT template files after read
them.

This patch makes some clean-ups too.
* use existing method to make path construction and make it easy to
  understand.
* remove _get_base_hot_dict() because it was replaced to
  get_base_nest_hot_dict() and is not used anywhere now.
  And it is considerd that it will not be used any more.
* remove meaningless array to tupple translation.
* same bug fix and clean-ups are applied in the same file.

Closes-Bug: #1913978

Change-Id: I6ffdadc196cf2ddcec3625c6bd99b5133e37af4b
2021-02-01 14:08:12 +09:00
LiangLu
4579de9018 Add parameter plugin to kubernetes_driver.instantiate_vnf()
Parameter `plugin` is added while invoking kubernetes_driver.instantiate_vnf()
in vnflcm_driver.py, occurs a parameter unmatch error, also affects FT.

This patch adds `plugin` with default value `None` in instantaite_vnf()

Closes-Bug: 1905343
Change-Id: I5e253d71e7b0f0dcdb5698d68f9fd8ff06d1e5a7
2021-02-01 08:51:47 +08:00
wuchunyang
57981bc51d Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is old name and deprecated
-https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: Ia3ffea39c995978babaafc9aa5a463e5f3eda1c0
2021-01-30 06:53:54 +00:00
Zuul
a190526e47 Merge "Add new FT set for tests with separated NFVO" 2021-01-29 10:07:45 +00:00
Manpreet Kaur
f047d56c69 Update doc8 version
The current tacker code base is using old doc8 version 0.6.0,
refer [1] for details.

This patch bumps the latest doc8 lib version, doc8 lib supports
python 3.6 starting from version 0.8.1.[2]

[1] https://pypi.org/project/doc8/0.6.0/
[2] https://pypi.org/project/doc8/

Change-Id: I7dc3fd9a9f0bc909d335ffdec771351c842a30c0
2021-01-28 18:27:06 +05:30
Manpreet Kaur
4819b827c8 Support feature to attach the existing volume
This patch attaches already created volume to vnf using volume id.
The existing volume id can be added to tosca.nodes.BlockStorage node,
in this case, no new volume will be created while vnf deployment.

Implementation:
* Set tosca.nodes.BlockStorage.Tacker "size" required as false,
  this override property definition mention in
  tosca.nodes.Storage.BlockStorage present in tosca parser.
  Please refer [1] for tosca.nodes.Storage.BlockStorage details.
* Add a local dictionary to store volume id present in
  tosca.nodes.BlockStorage.Tacker. This dictionary is use in
  to determine cinder volume mapping.

Additionally update block_storage_usage_guide.rst with changes
required to attach existing volume.

Added cinderclient in test_requirement for functional test case.
Add release notes for feature.

[1]: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csprd01/TOSCA-Simple-Profile-YAML-v1.2-csprd01.html

Change-Id: If5d386a64f98603de843f96287c1e296ae6a2e1f
Implements: blueprint attach-existing-volume
2021-01-28 13:11:03 +05:30
Ayumu Ueha
971d949da7 Change data size of instance_id in VNF table
Need to change data size of `instance_id` in the VNF table to
String(12800) from String(64).
We don't have an appropriate ID for instance_id for CNF case, so we use
the object information instead as a workaround.
If it leave the definition of String(64) as it is, a "Data too long for
column" error will occur during CNF operation, because instance_id
store kubernetes object information such as following:
----
'instance_id': "
  {'namespace': 'default', 'name': 'vdu1',
   'apiVersion': 'apps/v1', 'kind': 'Deployment'},
  {'namespace': 'default', 'name': 'pv1',
   'apiVersion': 'core/v1', 'kind': 'PersistentVolume'},
  ... (**Contains the deployed kubernetes resources)
  {...}"
----

Reason of changing string size to 12800:
Resize to 12800 so that it can store approximately 100 resources when
it requires 128 characters per resource.
This 12800 characters is under the limit of 65535 bytes per entry,
even for the maximum length character set (4 bytes) [1].
(instance_id's size (12800 * 4) + other total size(3044) < 65535)
`other total size` means the capacity used other than instance_id in
the VNF table.
[1] https://dev.mysql.com/doc/refman/8.0/en/charset-charsets.html

Closes-Bug: 1909011
Change-Id: I50db6f86cd8c164efeab2f0ebbe8ec0258a5ef1d
2021-01-26 03:58:38 +00:00
Ghanshyam Mann
40a48bde6b [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I6fc6f7d95e4efde6ea3bd0f1e4134aa54ce3889a
2021-01-22 04:18:31 +00:00
Zuul
d07b29a8c2 Merge "Add doc of ETSI VNF Scaling" 2021-01-22 01:45:36 +00:00
Toshiaki Takahashi
0d412ba7cb Add new FT set for tests with separated NFVO
This patch adds new test with separated NFVO such as Grant API.
The test requires additinal config of Tacker, and we cannot use
Tacker with such config for other tests. So we add new FT set for
separated NFVO environment.

Change-Id: I9fb5ef027b9010becc088ca0b66138bcf52512c2
2021-01-21 16:27:04 +00:00
Zuul
9e0eccac8b Merge "Split FT to Legacy and SOL implementation" 2021-01-21 15:10:59 +00:00
Hiroo Kitamura
70a6d5ab26 Add doc of ETSI VNF Scaling
Usage guide for ETSI NFV-SOL VNF Scaling is added in user docs.

Change-Id: I649d2407e18d19161a629b8dbfa4e9c7b2f9c9fd
2021-01-20 19:38:57 +09:00
Yoshito Ito
ba813054a4 Split FT to Legacy and SOL implementation
FT execution time in Zuul is about to exceed its timeout. This patch
make the existing dsvm-functional FT job to be separated to two jobs;
* dsvm-functional-legacy
* dsvm-functional-sol

This patch fixes the unstable FT results in zuul FT jobs:
* test_rollback_instantiate:
  ``depends_on`` in BaseHOT makes stable deletion of stacks, otherwise
  Heat fails to delete subnets due to missing dependency with ports.
* test_vnf_alarm_scale_with_instance_reservation:
   "--concurrency 1" enables to run test without any VMs on hosts,
  otherwise Blazar fails to add hosts into the freepool.

Changes:
* Split the FT directory to legacy and sol
* Create new tox envs for FT of legacy and of SOL
* Relative path are changed due to the new directory structure
* Add ``depends_on` parameter in BaseHOT
* Set "--concurrency 1" for both of the new FT jobs

Change-Id: I4c66353eada16f7e51d7ed1c1999cf50635b9dce
2021-01-19 15:47:41 +09:00
Zuul
a1d0eb6ebe Merge "Update upper-constraints.txt" 2021-01-19 06:18:55 +00:00
Zuul
7906be6818 Merge "Restore Ceilometer installation" 2021-01-19 03:44:47 +00:00
Yasufumi Ogawa
39c38dc424 Update upper-constraints.txt
As some of tests are changed to use upper-constraints.txt in [1], we
need to update this file if [2] is updated.

[1] Commit: 500d2eb780 "Change tosca-parser and heat-translator install"
[2] https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt

Change-Id: I4ea5b8c64800d5cc9c8446ec456ada4b42b255c7
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
2021-01-15 02:16:22 +00:00
Zuul
f6d3c6698e Merge "Fix IS_ZUUL_FT and make it more succinct" 2021-01-15 01:42:17 +00:00
Toshiaki Takahashi
53b5d03f7e Restore Ceilometer installation
This reverts [1], with some complementary bits and pieces.
Historically it'd been deactivated twice on master branch.
See also [3], which was reverted in [2]. Note this reverts
[4] as well.

[1] https://review.opendev.org/c/openstack/tacker/+/757537
[2] https://review.opendev.org/c/openstack/tacker/+/754882
[3] https://review.opendev.org/c/openstack/tacker/+/751965
[4] https://review.opendev.org/c/openstack/tacker/+/760275

Change-Id: I9c9cc65772b2f88c5ed7ef8178b79aa5c7011f29
2021-01-14 15:05:24 +09:00
Koichiro Den
d5eac3c31a Fix IS_ZUUL_FT and make it more succinct
This patch fixes the broken devstack plugin script and slightly changes
the way the var IS_ZUUL_FT is used. When the var is unset, a bash unary
operator expected error should've been emitted because of this part:
${IS_ZUUL_FT+yes}. Unset vs set was a bit confusing so this patch not
only fixes the part but forces the var into always being set and changes
it to "True" vs "False".

Change-Id: I25b418f7776d0d9a00fcf7846a406aba62d40190
2021-01-14 10:03:01 +09:00