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 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
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
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
When tacker registers kubernetes vim using Kubernetes config file,
ssl_ca_cert value doesn't accept all of none value such as none, NONE..etc. So, it makes errors.
Closes-Bug: #1829384
Change-Id: I1aa2c4c489a3196fa8f88c1ca8420e8b344d875b
Starting from Ocata tacker payloads will only accept
YAML dict for config and param payload values. Hence
remove the warning when something other than YAML dict
is received by the API.
Change-Id: I9f06bf0e0f89b6633c25994b7a7d08cdf93547a2
Closes-Bug: #1656416
Co-Authored-By: lijiale<lijiale@cmss.chinamobile.com>
Co-Authored-By: Dharmendra Kushwaha<dharmendra.kushwaha@india.nec.com>
Implementing a utility function to check auth_url which is defined in
the keystone_authtoken section of /etc/tacker/tacker.conf. So that,
'/v3' suffix will be added (if it is missed) to match with keystoneclient
v3.
Changes:
- Create a validate_keystone_auth_url function in tacker.nfvo.nfvo_plugin
- Check auth_url in get_auth_dict in nfvo_plugin
Co-Authored-By: Cong Phuoc Hoang <hoangphuocbk2.07@gmail.com>
Change-Id: I30abaff188bd1d352750cb327a624c1e8ced884f
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators.
We can use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Fixed the Error in the file openwrt.py continuation line over-indented
for visual indent.
Change-Id: Ia1d5e6a73112f7093fccc4aa0d541250439193be
Accept transient VNFD template as part of VNF creation without
need for VNFD onboarding into Tacker VNFD catalog.
Change-Id: I3c8bbe139dec27adbfc943d3ac9f909db8097f89
Implements: blueprint vnf-inline-template
Depends-On: I719237dd04dd7fe13fb7e7964402d7074679b2d6
vnfd templates, parameter and config files are sent as yaml
strings in requests body to tacker server.
Change the attributes to dictionary objects. New behavior
is applicable to tosca templates only. Also, this change may mangle
the order of nodes in tosca templates. In order to address this
concern and preserve the network interfaces order in these nodes,
there will be follow on patch to address this.
Change-Id: I05a1d60dc643dca864aff559f37491914b1fcfc3
Partial-Bug: #1591361
Replace dict.itervalues() with dict.values(). The Python 3 dict
type has no itervalues() method, the old itervalues() method was
renamed to values().
Change-Id: I675daebf4e5b1a24f2ddeec1451b6d95e6a8785e
Also, we move tacker.i18n into tacker._i18n.
Other i18n usage integration will be done by bug 1599735
Change-Id: I742f7be08958337720056bcc4344dcdc06606035
Partial-bug: #1552282
To make patches small and easy to review, the task (using oslo) is
implemented in a series of patches.
In this patch, some codes under tacker/openstack/common are changed
temporarily, but they will be removed totally in later patches.
Change-Id: I5396e8e569ff8b26b387e99f2442ccfa3f27d684
Partial-Bug: #1552282
Added support for multisite OpenStack VIM feature through a new
'nfvo' extension. This also enables remote VNF life cycle manage-
ment through the VIM Id parameter.
Implements: blueprint multi-site-vim
Depends-On: I3c08945f24343288c2c5614ab4b472d68a1e1d47
Change-Id: I7dd19a0c1ce948474bb3069073b3608ce265beb4
This Patch fixes all H307 errors and enables this
test for all new patches to tacker.
"H307 like imports should be grouped together"
Change-Id: I48a41e2333c3286e8610158c89a84f6ca0ef1fcc
Related-Bug: 1515930
This Patch fixes all E305 errors and enables this
test for all new patches to tacker.
"E305 imports not grouped correctly"
Change-Id: I2275e657e55d80f539af434c1af14ef497946def
Related-Bug: 1515930