tacker/tacker/tests
asmita singh ab50e471b9 Auth parameters for uploading vnf package from URI
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
2020-04-25 07:41:37 +00:00
..
common Update hacking for Python3 2020-04-24 13:48:53 +02:00
contrib Fix post gate hook to accommodate for new os-testr 2017-09-17 23:28:28 +08:00
etc Fetch an on-boarded VNF package with HTTP_RANGE 2020-04-25 07:39:06 +00:00
functional Auth parameters for uploading vnf package from URI 2020-04-25 07:41:37 +00:00
unit Auth parameters for uploading vnf package from URI 2020-04-25 07:41:37 +00:00
var rename neutron/tests to tacker/tests 2014-07-04 18:20:50 +09:00
__init__.py Enable hacking check H104 2015-04-09 18:45:52 -07:00
base.py Merge "Support UT for agent/linux/utils.py" 2018-11-20 13:39:52 +00:00
constants.py Support updating VNF parameters in tacker 2020-03-12 00:34:26 +00:00
fake_notifier.py Move unit tests dir to tacker/tests/unit 2017-02-24 16:38:18 +08:00
post_mortem_debug.py Cleanup vim settings 2016-03-28 13:03:56 +02:00
tools.py Update hacking 2016-01-02 17:30:55 +01:00
utils.py Auth parameters for uploading vnf package from URI 2020-04-25 07:41:37 +00:00
uuidsentinel.py Improve code coverage of openstack module 2019-06-12 11:20:00 +00:00