Supported the following operations to get the VNF package
information from NFVO when starting LCM operation.
- VNF packages (GET)
- VNF package content (GET)
- VNFD in an individual VNF package (GET)
- Individual VNF package artifact (GET)
Implements: blueprint support-vnfm-operations
Spec: https://specs.openstack.org/openstack/tacker-specs/specs/victoria/support-sol003-vnfm-operations.html
Change-Id: Ibdafdda815f8e130226b9d8eef4f18639f01292c
Implements: blueprint add-artifacts-vnf-packages
* Add artifacts support for vnf packages:
* Read and verify artifacts from TOSCA.meta and manifest file.
* Modify and add artifact related APIs
Change-Id: Iad045407338535022aa385b57125225ee6253732
This update is to fix `ResourceWarning` messages while running tox
tests because file descriptors are not closed explicitly after each
of tests. Although these tests are completed as `succeeded`, such nouse
warnings make hard to inspect log messages.
Closes-Bug: #1881416
Change-Id: Icff5315969a1303fcbf71ecddfaa7ea0c99a3e5b
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I130c03e12ddc53ce7ced728a43b10b142f7b066f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Co-Authored-By: Hiroo Kitamura <hiroo.kitamura@ntt-at.co.jp>
Upload VNF Package from uri REST API accepts userName and password
parameter but internally these parameters are not used while getting
the csar zip file from the URI as specified in the addressInformation.
If the server serving the CSAR zip requires authentication, it would
return 401 error and the uploading vnf package will fail to set the VNF
package to onboarded status.
This patch uses userName and password parameters to set "Authorization"
header as shown below if these parameters are passed in the request body.
* The userName and password are combined with a single colon (:).
This means that the username itself cannot contain a colon.
* The resulting string is encoded using a variant of Base64.
* The authorization method (Basic and a space (e.g. "Basic ") is then
prepended to the encoded string.
For example, if userName and password is "xyz" and "xyzpassword", then
the field's value is the base64-encoding of xyz:xyzpassword, or
eHl6Onh5enBhc3N3b3Jk. Then the Authorization header will appear as:
Authorization: Basic eHl6Onh5enBhc3N3b3Jk
Change-Id: Ie79d5e4659951f41db4a1003950c649acab8b439
The GET method fetches the content of a VNF package identified by
the VNF package identifier allocated by the NFVO.
The 'HTTP_RANGE' header is inspected for a valid value.
If it is present and valid, then the package content within
the range is fetched.If not present the entire content is
fetched
A 'size' column has been added to vnf_packages db table.
When the VNF package content is uploaded, the size of the
csar zip is persisted in this newly added 'size' column of
vnf_packages db table.
When VNF_Package content is fetched for the first time, its size is
retrieved from glance store and the size column in vnf packages table
is populated with this value. For subsequent fetch calls the size of
csar file content is retrieved from 'size' column in vnf_packages
table.
A lot of the content fetching code has been reused from
glance/api/v2/image_data.py ResponseSerializer class
download function
Blueprint: bp/enhance-vnf-package-support-part1
Change-Id: Ib49ef8b1e81ca4a4b7e3ac4a0836c111ce7da4a3
Used tooz distribued lock mechanism for synchronizing various
vnf instance tasks like instantiate, terminate and heal. It
supports various backends, such as etcd, mysql, file locks, redis,
zookeeper, etc.
This change imports the "coordination" module, which is shared by
Cinder, Manila and a few other projects.
The lock backend can be selected using the CONF.coordination.backend_url
config option.
Change-Id: Ia4979571e788ecc4874ae0b62533fbc5277253a8
Blueprint: support-etsi-nfv-specs
Implemented instantiate vnf instance API.
* GET /vnflcm/v1/vnf_instances/{vnf_instance_id}/instantiate
Co-authored-By: Nitin Uikey <nitin.uikey@nttdata.com>
Co-authored-By: tpatil <tushar.vitthal.patil@gmail.com>
Co-authored-By: Ajay Parja <ajay.parja@nttdata.com>
Co-authored-By: Shubham Potale <shubham.potale@nttdata.com>
Co-authored-By: Sameer Thakur <sameer.thakur@nttdata.com>
Updated lower-constraints openstacksdk version to 0.44.0 as it
includes fix[1] which is required to create images from filename
which further requires to upgrade os-service-types, keystoneauth1
and decorato to higher versions.
[1] : https://review.opendev.org/#/c/710368
Change-Id: Ic30f8d730d54e3af1345816ffa1bfb702cd00694
Blueprint: support-etsi-nfv-specs
The VNFD can be implemented as a single file or as a collection of
multiple files. If the VNFD is implemented in the form of multiple
files, a ZIP file embedding these files shall be returned. If the VNFD
is implemented as a single file, either that file or a ZIP file
embedding that file shall be returned.
Implemented below API:-
* GET /vnf_packages/{vnfPkgId}/vnfd
Change-Id: I4af9c8126fb7478da294bc99a176eabba3944564
Implements: bp enhance-vnf-package-support-part1
Pep8 didn't recognised this error because it was running
on python2. Now tacker is going to support python3 so this
window style line ending should be fixed.
This patch removed window style line endings.
Change-Id: I2dfee4967545aba5ea54561dc4910df02b0a9c98
Adding some corresponding directories to UT, and
moving some cases to right places.
Partially Implements: blueprint test-addition-refactoring
Change-Id: Ic47ea2640c89787ac291c31db51a8529f73a66a3