This fix will allow Instantiation to be successful when
Multiple Base Hot is defined in the VNFD Package.
Closes-Bug: # 1895830
https://bugs.launchpad.net/tacker/+bug/1895830
Change-Id: I2d5e677820a4978d609ab492aa64cdc5269fd5c9
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
Add fenix plugin for host maintenance.
This feature creates plugin for fenix, create_vnf_maintenance() in VNFM and
VNFMaintenanceAlarmMonitor to create alarm for Fenix. And the feature modifies
alarm_receiver and CRUD in VNFM.
After this feature, all VNF has ALL_MAINTENANCE resource to interacts
with Fenix plugin and [VDU_NAME]_MAINTENANCE if VDU has maintenance property.
[VDU_NAME]_MAINTENANCE will use to perform VNF software modification.
Currently, the plugin can perform CRUD constraints for maintenance,
scale in/out and migration for MIGRATE and LIVE_MIGRATE. The feature has
functions for OWN_ACTION with modified healing, but it not works based on
default vnf workflow in Fenix. And The feature doesn't support server_group
and related with HA like switch over because of unsupported in Tacker.
So these features will be enhance after adding required.
Co-Authored-By: Hyunsik Yang <yangun@dcn.ssu.ac.kr>
Implements: blueprint vnf-rolling-upgrade
Change-Id: I34b82fd40830dd74d0f5ef24a60b3ff465cd4819
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
Some yaml files that is definition file for testing have BOM(Byte Order
Mark) <U+FEFF> at the beginning.
This BOM is unnecessary information, so delete it with this patch.
Change-Id: Ie4a59a57abe4476a2f25c4b53e7b5dc88fa3ca44
Closes-Bug: 1889148
"flavour_description" and other properties for top-level VNFD
should be updated in instantiation. Otherwise, it may fail
with the default of "" (empty string).
This patch fixes the issue for updating the properties in
instantiation and adds a UT case for vnflcm.utils.
Change-Id: I7f2a36cd67eeea5497adc4d38efffd0230e90ec9
Closes-Bug: #1882869
A time out occurs ten minutes after starting VNF create.
If the creation is not complete within ten minutes, it always
fails.
To prevent this, the timeout mins value of Heat Stack create is
changed from "10" to "(retry times) * (wait time)" defined in
Tacker's CONF.
Change-Id: I3b46fff45290904abbdc5e1c356e0215b653b9f5
Closes-Bug: #1885080
When executing "Instantiate a VNF instance" with single VNFD,
it fails with an error.
This is because in instantiation, it's not possible to consider
that VNFD is single, and an error will occur when trying to get
the information of VNFD imported on the multiple premise.
In this patch, if the VNFD is single, that is,
if the imported VNFD doesn't exist, fix to skipping
the subsequent VNFD information getting process.
In unittest, I found an error in the existing single VNFD,
so correct it as well.
Change-Id: I9e664ec156bdcf3a95ecc1c6a0b582604f7f0335
Closes-Bug: #1886634
The number of getting image URL is expected as `2`, but notactually
in test_pre_instantiation_vnf_image_with_file(). The value can be `1`
or `2` for `tox -e py36` or `tox -e lower-constraints`. It might be
because of a difference of versions of modules imported in
the test cases.
This update is just a quick fixing to avoid the issue. So, it could be
happened again possibly if the versions of modules are changed.
Closes-Bug: #1885523
Change-Id: I302607f636d6d96baa544ccad600bb21fdf18da2
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
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>
Picked up unused fuctions with vulture [1].
In this patch, from the picked up functions,
the inner-functions prefixed with '_' are deleted as dead code.
Only target the inner-function of unittest and functional-test.
Other functions are left because it's difficult
to determine if they should be mechanically deleted.
[1] https://pypi.org/project/vulture/
Change-Id: I0deb0bdc9e7a7dd1cf7f98f22686ca7727088e22
Closes-Bug: #1879871
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>
To fix the issue because of using deprecated method in python3, replace
iteritems() with items(). Although tacker itself does not cause the
error because it uses `six` actually, no need to keep python2 support.
Change-Id: Ifec7d5d3146ffe01addcb1e5c0ab78ce92bae0ff
Related-Bug: 1872120
If use_barbican is disabled and if the tacker services are running
under Py3, the registration of vim fails with TypeError.
This patch fixes this issue by writing fernet key in binary mode.
Closes-Bug: #1873440
Change-Id: I08423a7c29c7fd5eeabe64276f6e0d208ccec72b
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
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Update local hacking checks for new flake8.
Remove hacking and friends from lower-constraints, they are not
needed in installations.
Change-Id: If787d610315be6c973b4335e047242c3aa3caf2a
As per ETSI GS NFV-SOL 005 V2.4.1 (2018-02) table 9.4.2.3.2-2, GET Vnf
Packages should return list of all Vnf packages, but as per current
implemention this api is returning dictionory with resource name as key
i.e {'vnf_packages': [{vnf_package1}, {vnf_package2},...]}. Hence
removing the resource key and returning api response as a list.
As per process to fix this issue we need to provide micro version
support in tacker as well as in python-tackerclient for command.
The list api was part of VNF package api which released in train cycle.
But we can not instantiate, terminate and Heal VNF as these feature is
not released yet and about to release in U cycle. The changes we have
proposed will be useful after U release and that is why we think we
should do these change without micro version support.
Closes-bug: #1871054
Change-Id: I7f5105fc7a49f9d31fb32119c725dae0421cfde7
Implement new method of VNF lifecycle management using LCM operation
user data.
Change-Id: Ib2fbe341b5d26758f0b48dc19e3e05810c2c830f
Blueprint: support-etsi-nfv-specs
Certain resource representations can become quite big, in particular
``GET /vnfpackages`` API which is a container for multiple sub-resources.
In these cases, it can be desired to reduce the amount of data exchanged
over the interface and processed by the API consumer application.
An attribute selector i.e filter, allows the API consumer to choose
which attributes it wants to be contained in the response. Only
attributes that are not required to be present, i.e. those with
a lower bound of zero on their cardinality (e.g. 0..1, 0..N)
and that are not conditionally mandatory, are allowed to be omitted
as part of the selection process.
This patch implements attribute filtering for ``GET /vnfpackages`` API.
It will support following query parameters:-
* filter: Filter criterion built with attributes of VNF Package and
REST operators.
* all_fields: Return all fields
* fields=<list> : Return fields specified in the <list>
* exclude_fields=<list>: Return fields not specified in the <list>
* exclude_default parameters: Return all fields except default fields
* exclude_default and fields=<list>: Return all fields except default
fields and fields in the <list>
* When no parameter is specified it is treated as exclude_default.
You can find more details about supported query parameters in document:
ETSI GS NFV-SOL 013 V2.6.1 (2019-03 in section 5.2 and 5.3
Co-Authored-By: Prashant Bhole <prashant.bhole@nttdata.com>
Change-Id: I1513d7d87967de5248787cd298c3bec65c2dde9d
Implements: bp/enhance-vnf-package-support-part1
Added db support to filter out the vnf packages as per the
filter rule specified in the `filter` query parameter.
Made use of ready-made 'sqlalchemy-filters' library which
can apply filters to the query object dynamically.
You can find few examples on home page of sqlalchemy-filters
github repository:
https://github.com/juliotrigo/sqlalchemy-filters
Change-Id: Iddf0ba7445fa7739440d333d914e675bd0782040
Implements: bp/enhance-vnf-package-support-part1