`metadata` field in VnfInstanceV2 is accessed at [1] during DB synchronization.
```
def _get_pod_information(self, resource_name, resource_type, vnf_instance, vim_connection_info):
"""Extract a Pod starting with the specified 'resource_name' name"""
namespace = vnf_instance.metadata.get('namespace')
```
This field is optional (i.e. cardinality of this field is `0..1` in SOL002/003 specification), but this process has no None check. This results in a below bug when processing VNF instances with no `metadata` value.
```
2023-06-14 04:32:56.294 1 ERROR tacker.sol_refactored.conductor.conductor_v2 [None req-03b13adc-af42-4438-8bed-7ab72cf6e510 - - - - - -] Failed to synchronize database vnf: 399216ac-06bd-4ad6-8f54-ecc8e35f36b9 Error: Cannot load 'metadata' in the base class: NotImplementedError: Cannot load 'metadata' in the base class
```
We can resolve this issue by either one:
- Adding None check before this process
- Getting namespace from `vnf_instance.instantiatedVnfInfo.metadata['namespace']`
Current implementation has the below bug:
`metadata` field in VnfInstanceV2 is accessed at [1] during DB synchronization.
``` information( self, resource_name,
resource_ type, vnf_instance, vim_connection_ info): metadata. get('namespace' )
def _get_pod_
"""Extract a Pod starting with the specified 'resource_name' name"""
namespace = vnf_instance.
```
This field is optional (i.e. cardinality of this field is `0..1` in SOL002/003 specification), but this process has no None check. This results in a below bug when processing VNF instances with no `metadata` value.
``` sol_refactored. conductor. conductor_ v2 [None req-03b13adc- af42-4438- 8bed-7ab72cf6e5 10 - - - - - -] Failed to synchronize database vnf: 399216ac- 06bd-4ad6- 8f54-ecc8e35f36 b9 Error: Cannot load 'metadata' in the base class: NotImplementedE rror: Cannot load 'metadata' in the base class
2023-06-14 04:32:56.294 1 ERROR tacker.
```
We can resolve this issue by either one:
- Adding None check before this process instantiatedVnf Info.metadata[ 'namespace' ]`
- Getting namespace from `vnf_instance.
[1] https:/ /github. com/openstack/ tacker/ blob/stable/ 2023.1/ tacker/ sol_refactored/ infra_drivers/ kubernetes/ kubernetes_ common. py#L319