tacker/tacker/tests/unit
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
..
agent Python3 support 2019-02-25 15:11:47 +00:00
api Update hacking for Python3 2020-04-24 13:48:53 +02:00
cmd Add framework for tacker-status upgrade check 2018-10-26 09:07:04 +00:00
common Auth parameters for uploading vnf package from URI 2020-04-25 07:41:37 +00:00
conductor Auth parameters for uploading vnf package from URI 2020-04-25 07:41:37 +00:00
db Update hacking for Python3 2020-04-24 13:48:53 +02:00
extensions Python3 support 2019-02-25 15:11:47 +00:00
glance_store Auth parameters for uploading vnf package from URI 2020-04-25 07:41:37 +00:00
hacking Refactoring UT directories 2018-11-12 13:13:39 +00:00
keymgr Refactoring UT directories 2018-11-12 13:13:39 +00:00
mistral Refactoring UT directories 2018-11-12 13:13:39 +00:00
nfvo Delete test_create_vnffg_pre() for Python3 unittest 2019-10-17 16:51:39 +09:00
objects Fetch an on-boarded VNF package with HTTP_RANGE 2020-04-25 07:39:06 +00:00
plugins Refactoring UT directories 2018-11-12 13:13:39 +00:00
services Refactoring UT directories 2018-11-12 13:13:39 +00:00
tests Refactoring UT directories 2018-11-12 13:13:39 +00:00
tosca Refactoring UT directories 2018-11-12 13:13:39 +00:00
vnflcm Support LCM operation with user data 2020-04-24 11:37:45 +09:00
vnfm Merge "Adding Multi-Interface for Containerized VNF in Tacker" 2020-04-24 11:13:10 +00:00
vnfpkgm Auth parameters for uploading vnf package from URI 2020-04-25 07:41:37 +00:00
__init__.py Add versioned objects for vnf packages 2019-09-18 12:24:39 +00:00
_test_rootwrap_exec.py Recover some file permissions 2016-07-20 22:56:09 +00:00
base.py Add instantiate vnf instance API 2020-04-22 07:42:05 +00:00
database_stubs.py Use oslo log and oslo concurrency 2016-06-03 11:38:36 +08:00
extension_stubs.py Cleanup vim settings 2016-03-28 13:03:56 +02:00
fake_request.py Add vnf packages RestFul APIs 2019-09-20 06:48:28 +00:00
fixtures.py Remove deprecation warning messages 2019-09-20 12:27:06 +05:30
test_alarm_receiver.py Fix bytestring bugs in Python3.7 unittest 2019-11-08 10:23:11 +09:00
test_auth.py Enable UT test_auth.py 2018-11-15 00:19:49 +08:00
test_context.py Remove deprecation warning messages 2019-09-20 12:27:06 +05:30
test_policy.py Using assertFalse(A) instead of assertEqual(False, A) 2017-06-28 11:49:37 +07:00
test_wsgi.py Update hacking for Python3 2020-04-24 13:48:53 +02:00
testlib_api.py Add __ne__ built-in function 2016-11-16 15:40:42 +08:00