tacker/tacker/tests/unit/vnfm
LiangLu 26a2b5fce2 Fix missing required parameter when k8s_obj init
While deploying CNF(deployment) using pod-affinity rules, a
parameter error happended because the topology_key is not
assigned when initializing k8s object.

This patch fixes this bug by adding the topology_key's default
value into `must_param` in translate_outputs._create_k8s_object().
At the same time, in order to deal with the recurrence of this
kind of bug, we checked the required parameters of all resources
in kubernetes again and added them to must_param.
    * Kubernetes version: from v1.18.20 to v1.21.1
    * Kubernetes-python-client version: v18.20.0

The major changes from the "must_param" used in the previous
Wallaby release of Tacker are probably as follows:

RuntimeRawExtension
  The `data` parameter of `V1ControllerRevision`[1] in v11.0.0
  was `RuntimeRawExtension`[2], but the `RuntimeRawExtension` was
  not support for v12.0.0 or later. Therefore `V1ControllerRevision`
  in v18.20.0[3] it has been changed to` object` type.

V1ServiceReference
  The `service` parameter of `V1APIServiceSpec`[4] in v11.0.0 was
  `V1ServiceReference`[5], but the `V1ServiceReference` was not
  support for v12.0.0 or later.
  Therefore `V1APIServiceSpec` in v18.20.0[6] it has been changed
  to `ApiregistrationV1ServiceReference`[7].

V1LimitRangeItem
  The `type` parameter of `V1LimitRangeItem`[8] in v11.0.0 was
  optional type, but the parameter has changed to must param
  in v18.20.0[9].
  Therefore, the parameter should be added into `must_param`.

[1] https://github.com/kubernetes-client/python/blob/v11.0.0/kubernetes/docs/V1ControllerRevision.md
[2] https://github.com/kubernetes-client/python/blob/v11.0.0/kubernetes/docs/RuntimeRawExtension.md
[3] https://github.com/kubernetes-client/python/blob/v18.20.0/kubernetes/docs/V1ControllerRevision.md
[4] https://github.com/kubernetes-client/python/blob/v11.0.0/kubernetes/docs/V1APIServiceSpec.md
[5] https://github.com/kubernetes-client/python/blob/v11.0.0/kubernetes/docs/V1ServiceReference.md
[6] https://github.com/kubernetes-client/python/blob/v18.20.0/kubernetes/docs/V1APIServiceSpec.md
[7] https://github.com/kubernetes-client/python/blob/v18.20.0/kubernetes/docs/ApiregistrationV1ServiceReference.md
[8] https://github.com/kubernetes-client/python/blob/v11.0.0/kubernetes/docs/V1LimitRangeItem.md
[9] https://github.com/kubernetes-client/python/blob/v18.20.0/kubernetes/docs/V1LimitRangeItem.md

Closes-Bug: #1928153
Closes-Bug: #1940602
Change-Id: If77be98d0c4cec6f4c860ae84978f59772f9a6ee
2021-08-25 13:35:55 +09:00
..
infra_drivers Fix missing required parameter when k8s_obj init 2021-08-25 13:35:55 +09:00
lcm_user_data Enhancement IpOverEthernet in API Parameter 2021-03-26 03:04:13 +00:00
mgmt_drivers Refactoring UT directories 2018-11-12 13:13:39 +00:00
monitor_drivers Dropping explicit unicode literal 2021-02-02 06:45:53 +05:30
policy_actions Use unittest.mock instead of third party mock 2020-05-22 12:03:45 +09:00
tosca Support feature to attach the existing volume 2021-01-28 13:11:03 +05:30
__init__.py Put vnfm cases into discovered case list 2017-03-22 22:14:09 +08:00
test_k8s_plugin.py Implementation Fenix plugin in Tacker 2020-09-24 04:20:06 +00:00
test_monitor.py Implementation Fenix plugin in Tacker 2020-09-24 04:20:06 +00:00
test_nfvo_client.py Improve redundant test code of NFVO client 2020-10-08 00:50:59 +00:00
test_plugin.py Dropping explicit unicode literal 2021-02-02 06:45:53 +05:30
test_vim_client.py Support flow of Getting VNF package 2020-10-05 07:19:32 +00:00