Current Tacker repository contains .pylintrc, which is a configuration
file of Pylint [1].
[1] https://pylint.org/
However, it is not maintained for 8 years ago,
so it contains some out-of-date configurations
for current Pylint version.
This patch removes those out-of-date configurations,
and introduces some useful configurations for IDE integration.
Signed-off-by: Masaki UENO <masaki.ueno.up@hco.ntt.co.jp>
Change-Id: I9e09a6befef2ef22e09f1a0b0ed2a75bf173a4f6
This patch fixes a bug of making grant request of terminate v2 API.
There was a lack of consideration for a VDU port which was specified
by extLinkPorts of extVirtualLinks in InstantiateVnfRequest when the
vnf instance was instantiated.
Closes-Bug: #1952821
Change-Id: I9dde61ae8a3c9a12b1a89cf62e73a5ab34600882
The error is occur on calling read/patch_xxx_scale API of kubernetes
python client when using manifest that has no namespace in Helm chart.
This patch fixes this problem by setting namespace to "default" if it
is an empty string or None.
Closes-Bug: #1953477
Change-Id: I5f5bc38c023bbe7674c7513e4a0609c217936595
python-aodhclient must be installed from the git code in order for Zuul
FT to succeed until the patch [1] fix is applied to it installed by pip.
[1] https://review.opendev.org/c/openstack/python-aodhclient/+/819393
This patch changes to use python-aodhclient from git repo in Zuul FT.
Change-Id: I2cf11c47ab64a29c72e3ccbbe4baa3c45c446364
This update is to add Fenix plugin in the example of `local.conf` for
Kubernetes.
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: I2a7c9c57e2f651057f1a3f170f34555d8ece02f5
This patch fixes some attributes of grant request for instantiate
and terminate of v2 API.
In the process of fixing bug #1949318 and adding UTs, some other
mistakes are found and fixed at the same time.
* fix number of STORAGE resource definitions of instantiate grant
request is not correct.
* fix extManagedVLs are included in VL resource definitions of
instantiate grant mistakenly.
* fix interpretation of vnfcCpInfo attributes is not correct when
making terminate grant request.
* fix an incorrect variable used to handle extManagedVirtualLinkInfo
when making terminate grant request. (fix bug #1949318)
Closes-Bug: #1949318
Change-Id: I61baaee8fec5bb2e1e954900dd2b9361ac594546
This reverts commit 5eced54d7fb6f35a480d93e59f67a711d79403a9.
The heat bug has been fixed in patch [1] and merged, so remove the
added skips.
[1] https://review.opendev.org/c/openstack/heat/+/813124
Change-Id: Id05eae9e5141d8baeea3c5336062a41e9d6366f5
Usage guide for how to install Helm to Kubernetes Cluster and deploy
CNF using helm chart is added in user docs.
Change-Id: I62e73f1457741ad811a89ab08630ce133cad8837
A recent devstack change [1] has switched off the creation of an admin
endpoint for keystone, which we need. Create it again until we update
Tacker to stop using it.
And devstack patch [2] has stopped creating userrc_early and If we do
not use OS_CLOUD, we must override the --os-cloud option of the
openstack command.
So, this patch fixes to set default OS_CLOUD setting overridden.
And for UUID formatting checks in db/types.py, fix to use first
element for List, since value may be passed as a List.
[1] https://review.opendev.org/c/openstack/devstack/+/735472
[2] https://review.opendev.org/c/openstack/devstack/+/780417
Change-Id: I39be7c48aca4be9a4e0bcec6dc6fa45b11c623b3
SQLAlchemy 1.4.27 released on Nov 11, and tox-docs job error become
to occur since then.
`:ref:` attribute introduced from 1.4.27 in docstring of the parent
class of our TypeDecorator cannot be referred.
This patch fixes the error by excluding db/types.py from target of
sphinx-apidoc.
Change-Id: If7944774f2336d8f98124e9934da47b11801c607
Anyjson 0.3.3 is 9 years old project and is not installable on Python 3:
INFO:kolla.common.utils.tacker-base:Collecting anyjson>=0.3.3
INFO:kolla.common.utils.tacker-base: Downloading anyjson-0.3.3.tar.gz (8.3 kB)
INFO:kolla.common.utils.tacker-base:ESC[91m ERROR: Command errored out with exit status 1:
INFO:kolla.common.utils.tacker-base: command: /var/lib/kolla/venv/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zkeekfya/anyjson_956fe77196244503b52f1d5b9cacb75f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zkeekfya/anyjson_956fe77196244503b52f1d5b9cacb75f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6n_kkxqa
INFO:kolla.common.utils.tacker-base: cwd: /tmp/pip-install-zkeekfya/anyjson_956fe77196244503b52f1d5b9cacb75f/
INFO:kolla.common.utils.tacker-base: Complete output (1 lines):
INFO:kolla.common.utils.tacker-base: error in anyjson setup command: use_2to3 is invalid.
INFO:kolla.common.utils.tacker-base: ----------------------------------------
And use of anyjson was dropped over 5 years ago:
commit aaeda502bb0ffc0adc99795a86b7396c8f2f0b76
Author: gong yong sheng <gong.yongsheng@99cloud.net>
Date: Tue Jun 7 13:48:39 2016 +0800
Use oslo serialization jsonutils
Change-Id: I081697d987fc7c2bcd4ae73b97aedc058c57a84f
Change-Id: Ic4ceea9461a4d7e2e7afb3d7df93e530f7cd1ac3
According to SOL005 v3.3.1 Table 9.4.2.3.1-1 [1], the HTTP response
shall include a "Location" HTTP header that contains the resource URI of
the individual VNF package resource.
In order to realize the above, this patch adds a Location header, which
includes a URL of a created VNF Package, to responses for `POST
{apiRoot}/vnfpkgm/{apiMajorVersion}/vnf_packages` requests.
Also, this patch removes unused arguments from methods in ViewBuilder.
[1] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/03.03.01_60/gs_NFV-SOL005v030301p.pdf
Signed-off-by: Hiromu Asahina <hiromu.asahina.az@hco.ntt.co.jp>
Change-Id: I754afaaf910de0048f4f11e259c644b3e0baea99
Closes-Bug: #1915109
When scaling occurs during the heat cooldown, VNF is not actually
scaled but the scale_level value in the VNF information will change.
This bug happens because Heat does not return any error responses when
it cannot perform scaling action due to the cooldown, and thus Tacker
cannot detect a scaling failure.
To fix this bug, this patch changes the ``scale`` method of OpenStack
infra-driver to wait for scaling until cooldown ends.
Closes-Bug: #1925119
Change-Id: Ieca345d7e46e03756d34f7d00b37ebc9c25d8d8b
Signed-off-by: Hiromu Asahina <hiromu.asahina.az@hco.ntt.co.jp>
As the version of doc8 in upper-constraints.txt in requirements project
was changed to `0.9.0`, it's required to update the version in tacker.
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Ib41af0a9b6402d9c0644d5270ed4f532d01a0ece
When creating a duplicated subscription, according to spec SOL003,
the api should return 303 See Other instead of 201 Created.
To fix this error, the following things is done in this patch:
1.Fix the error when the database virtual field extracts
the value from json in table `vnf_lcm_filters`.
2.Fix the error of sql query statement when querying subscription.
3.The attribute VnfProductsFromProviders should be an array, not an
object. Fix this error in UT, FT and schemas.
4.Fix typos when writing "object" as "objects" in dict "_versions"
in vnf_lcm schemas.
5.Rewrite the throwing and catching of SeeOther exception of this
api to fix the following errors: SeeOther should be thrown instead
of Exception; the return body should be empty instead of
ProblemDetail; the return header should contain location instead
of link.
Closes-Bug: #1933169
Change-Id: I51c198d60001dba94dd369f495cecef526e79800
Add file to the reno documentation build to show release notes for
stable/xena.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.
Sem-Ver: feature
Change-Id: I80feb85ac58a3ffe498f11560cf847975b0c5f63
Support deploying Kubernetes cluster VNF which has a storage server
with Cinder volume. This feature enables users to deploy CNF which
has PersistentVolume on it. The following changes are added for
MgmtDriver.
1.Create a storage server VM with Cinder volume.
2.Expose Cinder volume as NFS shared directories in the storage
server.
3.Register NFS shared directories as Kubernetes PersistentVolumes.
4.Install NFS client on newly created Master/Worker VMs in all LCM
operations.
Implements: blueprint pv-k8s-cluster
Change-Id: Iaab9b6393e6f2007c637f83a82de0d27cf9db257
The current `Kubernetes VIM installation` page has some
out-of-date instructions.
This patch replaces those out-of-date instructions with current
kubernetes manner, and fixes some other trivial mistakes
in the document.
Change-Id: I3d37aa215a9629f4ded92d0b4cb1b930658a2113
Signed-off-by: Masaki UENO <masaki.ueno.up@hco.ntt.co.jp>
This patch implements spec
Support deployed Kubernetes cluster using the images in a Docker
private registry with MgmtDriver in blueprint bp/cir-k8s-cluster.
It includes mgmt_driver scripts of deploying a Docker private
registry to vm created by openstack_driver.
Support instantiate/terminate/heal function.
It includes mgmt_driver scripts of deploying kubernetes cluster
that can use images in Docker private registry to vm created by
openstack_driver.
Support instantiate/terminate/scale/heal function.
It also includes a shell script that actual install kubernetes
cluster and configure environment to support Docker private registry
on vm.
Implements: blueprint cir-k8s-cluster
Change-Id: I7adab1d1eaa491a37399d0b615cbee4c6ae86657
This patch and "Sample script for deploying k8s with kubespray",
"Sample script for scaling k8s with kubespray" are actually the
same one. For the convenience of review, they
were submitted separately.
This patch is only about the content of heal k8s nodes. However,
since the processing of scale_start is similar to heal_start,
and the processing of scale_end is similar to the processing of
heal_end, the code of scale has been refactored and the common
processing is extracted as a common method. At the same time,
when CNF needs to perform `heal_entire`, the configuration file
of Load Balancer needs to be re-modified, so heal-related
processing is added to the example MgmtDriver of CNF's `NodePort`.
Because the input parameter of terminate and heal is limited,
the type of this parameter is also modified. In
`NFV-SOL003 v2.6.1`[1], the `additionalParams`'s type is
`KeyValuePairs`, so we changed the additionalParams's type from
`list` to `dict` in heal_vnf_request. In order not to affect
the original function, we modified the original additional_params
to legacy_additional_params and retained the original processing,
and revised the UT code.
[1] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.06.01_60/gs_NFV-SOL003v020601p.pdf
Implements: blueprint k8s-mgmtdriver-kubespray
Change-Id: Ibf8b56904b1326f5c7d323c9295d10e303f4b4b8
This patch and "Sample script for deploying k8s with kubespray"
are actually the same one. For the convenience of review, they
were submitted separately.
This patch is only about the content of scale k8s nodes. Since
the content of `NodePort` is not involved when scaling CNF,
there is no need to modify the configuration of Load Balancer.
The type of input parameter `additionalParams` of
ScaleVnfRequest is `DictOfStringsField`. The type of Kubernetes
cluster parameters used in MgmtDriver is dict, `DictOfStringsField`
type cannot adapt it. So we modify the type of additionalParams to
`DictOfNullableField`.
Implements: blueprint k8s-mgmtdriver-kubespray
Change-Id: Ib5e009c53dd834624d91ea38c9facba832d65d2b
This patch provides a sample script that allows users to install
or delete kubernetes on VMs in the VNF when executing
instantiate/terminate/scale/heal through the kubespray ansible
server.
It also provides script to install and configure Load Balancer
for kubernetes cluster in the VNF.
When instantiating CNF with service resource whose type is
`NodePort` on Kubernetes VIM deployed by kubespray, its port must
be added into Load Balancer's configuration and restart it. So
this patch also provides a sample MgmtDriver and shell script
to fix this problem.
At the same time, we found that if instantiate operation fails,
after the `instantiate_end` operation, the `terminate_end` operation
will not be executed in the rollback, which may cause the
modification in `instantiate_end` remains in the environment, so
this patch adds a `terminate_end` operation in `post_rollback_vnf`.
Implements: blueprint k8s-mgmtdriver-kubespray
Change-Id: I45661b5d8006e87db5f46a595756231849723ce6
This patch support pods to be scheduled on the different
physical Compute server. Through the policy attribute of
the VDU, the Worker node can be instantiated on different
Compute server. Then we can obtain the Compute information
where the worker node is located, and use it as the label
of the Worker node. Finally, pod will be deployed on
different Worker nodes based on labels.
Implements: blueprint hardware-aware-pod-affinity
Change-Id: I71dc5bed94654c19bace77c11fe1202ccdc549c9
This patch provides Tacker documents for multi-version API support.
VNF LCM API Version 2 is added to API Reference and the page hierarchy
is changed for readability.
Also, the Show VNF LCM Versions command is added to Command-Line
Interface Reference.
Furthermore, a manual of the Userdata script is added to Tacker User
Guide.
Implements: blueprint multi-version-api
Implements: blueprint support-nfv-solv3-start-and-terminate-vnf
Implements: blueprint support-nfv-solv3-query-vnf-instances
Implements: blueprint support-nfv-solv3-query-operation-occurrences
Implements: blueprint support-nfv-solv3-subscriptions
Change-Id: I603e32090303af080b17e549a0caf7e862aa7e1e
In NFV-SOL003 V2.6.1, the add_resources'id in grant should be
same as the vnfc_resource_info'id. However, at present, if
you execute heal_grant and scale_grant request, the add_resources's
resource_definition_id in grantResponse cannot match the
vnfc_resource_info.id.
In _scale_grant, to fix this bug, we changed the processing
of _scale_grant in openstack._get_grant_resource_scale_out method.
Firstly initialize the data of vnfc_resource_info according
to the input parameters and the vnfd file, then initialize
the add_resources data of grant according to the
vnfc_resource_info data. After scaling out, store the data
in the stack into vnfc_resource_info in the
openstack.scale_resource_update method.
In addition, in openstack._get_grant_resource_scale_out, there is
also a problem with the placement_constraint rule setting, which
is also corrected in this patch.
In _heal_grant, if heal entire vnf_instance, we initialize
remove_resources used old vnf_instance's info, and then
reinitialize vnf_instance's info and use them to initialize
add_resources. If heal partial vnf_instance, we just use
update_resources in grant.
For instantiate, if you need to use the data obtained by
instantiate_grant in instantiate_end, the process should
execute the post_instantiate_vnf method before instantiate_end,
so the vnflcm_driver._instantiate_vnf method has also been
modified.
Closes-Bug: #1930782
Change-Id: I1008472f5a7104324b61a413052dc44bc84c7ade