tacker/tacker/tests/unit
tpatil 3f5c81604e Support attribute filtering for GET /vnf_packages API
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
2020-04-23 10:17:45 +00:00
..
agent Python3 support 2019-02-25 15:11:47 +00:00
api python2/3 cmpatible sorted function 2019-09-05 12:57:40 +09:00
cmd Add framework for tacker-status upgrade check 2018-10-26 09:07:04 +00:00
common Merge "Implement RestFul API to read VNFD of an on-boarded VNF package" 2020-04-22 04:41:47 +00:00
conductor Sychronize vnf action tasks 2020-04-22 07:43:50 +00:00
db Support attribute filtering for GET /vnf_packages API 2020-04-23 10:17:45 +00:00
extensions Python3 support 2019-02-25 15:11:47 +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 Add db support to filter vnf packages 2020-04-23 09:38:31 +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 Add delete vnf instance API 2020-04-23 09:24:18 +00:00
vnfm Add heal vnf instance API 2020-04-22 07:42:46 +00:00
vnfpkgm Support attribute filtering for GET /vnf_packages API 2020-04-23 10:17:45 +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 Add vnfpkgm api support 2019-09-18 09:33:57 +00:00
testlib_api.py Add __ne__ built-in function 2016-11-16 15:40:42 +08:00