2024-02-07 06:13:50 |
Shivam Shukla |
bug |
|
|
added bug |
2024-02-07 06:16:40 |
Shivam Shukla |
description |
A Tacker compliance test case fails with the error "'operationParam' is not type of object".
The detail is as below:
<Target test case>
tacker.tests.compliance.sol003.test_vnflcm.IndividualVnfLcmOperationOccurenceTest.test_get_ind_vnf_lcm_op_occs
<Error message>
<status status="FAIL" starttime="20230904 08:49:24.324" endtime="20230904 08:49:24.423" critical="yes">ValidationError: Validation error for schema VnfLcmOpOcc.schema.json: '{"flavourId": "simple", "extVirtualLinks": [{"id": "net0", "resourceId": "c4370d60-e1bf-4608-be5c-5fc5d31d9b3a", "extCps": [{"cpdId": "CP1", "cpConfig": [{"cpProtocolData": [{"layerProtocol": "IP_OVER_ETHERNET"}]}]}]}], "vimConnectionInfo": [{"id": "16dfa727-a452-4713-912d-db2834479361", "vimId": "752e5d3e-3ebc-4ac8-bc92-a6fcbc291cf8", "vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2"}]}' is not of type 'object'</status>
<Possible root cause>
In NFV-TST 010 “~/api-tests/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOpOcc.schema.json” file, there is a validation check that "operationParams" should be of object type.
The type of ‘operationParams’ was validated in the Tacker code side, and it was observed that 'operationParams' is of type string.
In Tacker code side, 'operationParams' is defined as of type 'string' in <class VnfLcmOpOcc> defined in <https://opendev.org/openstack/tacker/src/branch/master/tacker/objects/vnf_lcm_op_occs.py>
------------------------------------------------------------------------------------------------
class VnfLcmOpOcc(base.TackerObject, base.TackerObjectDictCompat,
base.TackerPersistentObject):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.UUIDField(nullable=False),
'operation_state': fields.StringField(nullable=False),
'state_entered_time': fields.DateTimeField(nullable=False),
'start_time': fields.DateTimeField(nullable=False),
'vnf_instance_id': fields.StringField(nullable=False),
'grant_id': fields.StringField(nullable=True),
'operation': fields.StringField(nullable=False),
'is_automatic_invocation': fields.BooleanField(default=False),
'operation_params': fields.StringField(nullable=True),
'is_cancel_pending': fields.BooleanField(default=False),
'error': fields.ObjectField(
'ProblemDetails', nullable=True, default=None),
'resource_changes': fields.ObjectField(
'ResourceChanges', nullable=True, default=None),
'changed_info': fields.ObjectField(
'VnfInfoModifications', nullable=True, default=None),
'changed_ext_connectivity': fields.ListOfObjectsField(
'ExtVirtualLinkInfo', nullable=True, default=[]),
'error_point': fields.IntegerField(nullable=True, default=0),
'tenant_id': fields.StringField(nullable=False)
}
----------------------------------------------------------------------------------------------------
However, As per the ETSI NFV-SOL003v020601p specification document, 'operationParams' should be of object type.
https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.06.01_60/gs_NFV-SOL003v020601p.pdf
As the result, the validation check in NFV TST api-tests fails due to the mismatch of types between in tacker codebase and JSON schema. |
A Tacker compliance test case fails with the error "'operationParam' is not type of object".
The detail is as below:
<Target test case>
tacker.tests.compliance.sol003.test_vnflcm.IndividualVnfLcmOperationOccurenceTest.test_get_ind_vnf_lcm_op_occs
<Error message>
<status status="FAIL" starttime="20230904 08:49:24.324" endtime="20230904 08:49:24.423" critical="yes">ValidationError: Validation error for schema VnfLcmOpOcc.schema.json: '{"flavourId": "simple", "extVirtualLinks": [{"id": "net0", "resourceId": "c4370d60-e1bf-4608-be5c-5fc5d31d9b3a", "extCps": [{"cpdId": "CP1", "cpConfig": [{"cpProtocolData": [{"layerProtocol": "IP_OVER_ETHERNET"}]}]}]}], "vimConnectionInfo": [{"id": "16dfa727-a452-4713-912d-db2834479361", "vimId": "752e5d3e-3ebc-4ac8-bc92-a6fcbc291cf8", "vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2"}]}' is not of type 'object'</status>
<Possible root cause>
In NFV-TST 010 “~/api-tests/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOpOcc.schema.json” file, there is a validation check that "operationParams" should be of object type.
The type of ‘operationParams’ was validated in the Tacker code side, and it was observed that 'operationParams' is of type string.
In Tacker code side, 'operationParams' is defined as of type 'string' in <class VnfLcmOpOcc> defined in <https://opendev.org/openstack/tacker/src/branch/master/tacker/objects/vnf_lcm_op_occs.py>
------------------------------------------------------------------------------------------------
class VnfLcmOpOcc(base.TackerObject, base.TackerObjectDictCompat,
base.TackerPersistentObject):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.UUIDField(nullable=False),
'operation_state': fields.StringField(nullable=False),
'state_entered_time': fields.DateTimeField(nullable=False),
'start_time': fields.DateTimeField(nullable=False),
'vnf_instance_id': fields.StringField(nullable=False),
'grant_id': fields.StringField(nullable=True),
'operation': fields.StringField(nullable=False),
'is_automatic_invocation': fields.BooleanField(default=False),
'operation_params': fields.StringField(nullable=True),
'is_cancel_pending': fields.BooleanField(default=False),
'error': fields.ObjectField(
'ProblemDetails', nullable=True, default=None),
'resource_changes': fields.ObjectField(
'ResourceChanges', nullable=True, default=None),
'changed_info': fields.ObjectField(
'VnfInfoModifications', nullable=True, default=None),
'changed_ext_connectivity': fields.ListOfObjectsField(
'ExtVirtualLinkInfo', nullable=True, default=[]),
'error_point': fields.IntegerField(nullable=True, default=0),
'tenant_id': fields.StringField(nullable=False)
}
----------------------------------------------------------------------------------------------------
However, As per the ETSI NFV-SOL003v020601p specification document, 'operationParams' should be of object type.
https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.06.01_60/gs_NFV-SOL003v020601p.pdf
As a result, the validation check in NFV TST api-tests fails due to the mismatch of types between in tacker codebase and JSON schema. |
|
2024-02-08 08:57:37 |
renu rani |
tacker: assignee |
|
renu rani (renur) |
|
2024-02-08 11:18:11 |
Shivam Shukla |
description |
A Tacker compliance test case fails with the error "'operationParam' is not type of object".
The detail is as below:
<Target test case>
tacker.tests.compliance.sol003.test_vnflcm.IndividualVnfLcmOperationOccurenceTest.test_get_ind_vnf_lcm_op_occs
<Error message>
<status status="FAIL" starttime="20230904 08:49:24.324" endtime="20230904 08:49:24.423" critical="yes">ValidationError: Validation error for schema VnfLcmOpOcc.schema.json: '{"flavourId": "simple", "extVirtualLinks": [{"id": "net0", "resourceId": "c4370d60-e1bf-4608-be5c-5fc5d31d9b3a", "extCps": [{"cpdId": "CP1", "cpConfig": [{"cpProtocolData": [{"layerProtocol": "IP_OVER_ETHERNET"}]}]}]}], "vimConnectionInfo": [{"id": "16dfa727-a452-4713-912d-db2834479361", "vimId": "752e5d3e-3ebc-4ac8-bc92-a6fcbc291cf8", "vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2"}]}' is not of type 'object'</status>
<Possible root cause>
In NFV-TST 010 “~/api-tests/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOpOcc.schema.json” file, there is a validation check that "operationParams" should be of object type.
The type of ‘operationParams’ was validated in the Tacker code side, and it was observed that 'operationParams' is of type string.
In Tacker code side, 'operationParams' is defined as of type 'string' in <class VnfLcmOpOcc> defined in <https://opendev.org/openstack/tacker/src/branch/master/tacker/objects/vnf_lcm_op_occs.py>
------------------------------------------------------------------------------------------------
class VnfLcmOpOcc(base.TackerObject, base.TackerObjectDictCompat,
base.TackerPersistentObject):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.UUIDField(nullable=False),
'operation_state': fields.StringField(nullable=False),
'state_entered_time': fields.DateTimeField(nullable=False),
'start_time': fields.DateTimeField(nullable=False),
'vnf_instance_id': fields.StringField(nullable=False),
'grant_id': fields.StringField(nullable=True),
'operation': fields.StringField(nullable=False),
'is_automatic_invocation': fields.BooleanField(default=False),
'operation_params': fields.StringField(nullable=True),
'is_cancel_pending': fields.BooleanField(default=False),
'error': fields.ObjectField(
'ProblemDetails', nullable=True, default=None),
'resource_changes': fields.ObjectField(
'ResourceChanges', nullable=True, default=None),
'changed_info': fields.ObjectField(
'VnfInfoModifications', nullable=True, default=None),
'changed_ext_connectivity': fields.ListOfObjectsField(
'ExtVirtualLinkInfo', nullable=True, default=[]),
'error_point': fields.IntegerField(nullable=True, default=0),
'tenant_id': fields.StringField(nullable=False)
}
----------------------------------------------------------------------------------------------------
However, As per the ETSI NFV-SOL003v020601p specification document, 'operationParams' should be of object type.
https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.06.01_60/gs_NFV-SOL003v020601p.pdf
As a result, the validation check in NFV TST api-tests fails due to the mismatch of types between in tacker codebase and JSON schema. |
[Issue]
Zuul job for compliance testing in Tacker is currently in a non-voting state. While addressing compliance test , "OperationParams" type mismatch issue is found in Individual VNF Operation Occurrence Compliance Test.
[Issue Detail]
Executed Individual VNF operation occurrence compliance test in Tacker.
<Testcase>
tacker.tests.compliance.sol003.test_vnflcm.IndividualVnfLcmOperationOccurenceTest.test_get_ind_vnf_lcm_op_occs
<Encountered an error> 'operationParam' is not of type object.
<Error message>
<status status="FAIL" starttime="20230904 08:49:24.324" endtime="20230904 08:49:24.423" critical="yes">ValidationError: Validation error for schema VnfLcmOpOcc.schema.json: '{"flavourId": "simple", "extVirtualLinks": [{"id": "net0", "resourceId": "c4370d60-e1bf-4608-be5c-5fc5d31d9b3a", "extCps": [{"cpdId": "CP1", "cpConfig": [{"cpProtocolData": [{"layerProtocol": "IP_OVER_ETHERNET"}]}]}]}], "vimConnectionInfo": [{"id": "16dfa727-a452-4713-912d-db2834479361", "vimId": "752e5d3e-3ebc-4ac8-bc92-a6fcbc291cf8", "vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2"}]}' is not of type 'object'</status>
<Error location> https://opendev.org/openstack/tacker/src/branch/master/tacker/objects/vnf_lcm_op_occs.py#L250
[Cause]
In NFV-TST 010 “~/api-tests/SOL003/VNFLifecycleManagementAPI/schemas/VnfLcmOpOcc.schema.json” file, there is a validation check that "operationParams" should be of object type.
The type of ‘operationParams’ was validated in the Tacker code side, and it was observed that 'operationParams' is of type string.
<Cause code>
Validation check in ~/apitests/SOL003/VNFLifecycleManagementAPI/schemas/VnfLcmOpOcc.schema.json.
'operationParams' is defined as of type 'string' . https://opendev.org/openstack/tacker/src/branch/master/tacker/objects/vnf_lcm_op_occs.py#L250
[Proposal]
Tacker side code need to be fixed in file ~/tacker/tacker/api/vnflcm/v1/controller.py under “_notification_process” function by converting json_string to dictionary by using json.loads function.
<Impact of approach>
Below LCM operations are directly impacted while changing operation_param data type from string to object.
•Instantiate
def _instantiate : https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L729
•Terminate
def _terminate :
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L800
•Heal
def _heal:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L849
•Cancel
def cancel:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L1557
•Fail
def _fail:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L1727
•change external connectivity
def _change_ext_conn:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L1927
<Impact on db>
•Table vnf_lcm_op_occs will be impacted as currently data type of operation_params is longtext. |
|
2024-02-08 11:18:47 |
Shivam Shukla |
description |
[Issue]
Zuul job for compliance testing in Tacker is currently in a non-voting state. While addressing compliance test , "OperationParams" type mismatch issue is found in Individual VNF Operation Occurrence Compliance Test.
[Issue Detail]
Executed Individual VNF operation occurrence compliance test in Tacker.
<Testcase>
tacker.tests.compliance.sol003.test_vnflcm.IndividualVnfLcmOperationOccurenceTest.test_get_ind_vnf_lcm_op_occs
<Encountered an error> 'operationParam' is not of type object.
<Error message>
<status status="FAIL" starttime="20230904 08:49:24.324" endtime="20230904 08:49:24.423" critical="yes">ValidationError: Validation error for schema VnfLcmOpOcc.schema.json: '{"flavourId": "simple", "extVirtualLinks": [{"id": "net0", "resourceId": "c4370d60-e1bf-4608-be5c-5fc5d31d9b3a", "extCps": [{"cpdId": "CP1", "cpConfig": [{"cpProtocolData": [{"layerProtocol": "IP_OVER_ETHERNET"}]}]}]}], "vimConnectionInfo": [{"id": "16dfa727-a452-4713-912d-db2834479361", "vimId": "752e5d3e-3ebc-4ac8-bc92-a6fcbc291cf8", "vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2"}]}' is not of type 'object'</status>
<Error location> https://opendev.org/openstack/tacker/src/branch/master/tacker/objects/vnf_lcm_op_occs.py#L250
[Cause]
In NFV-TST 010 “~/api-tests/SOL003/VNFLifecycleManagementAPI/schemas/VnfLcmOpOcc.schema.json” file, there is a validation check that "operationParams" should be of object type.
The type of ‘operationParams’ was validated in the Tacker code side, and it was observed that 'operationParams' is of type string.
<Cause code>
Validation check in ~/apitests/SOL003/VNFLifecycleManagementAPI/schemas/VnfLcmOpOcc.schema.json.
'operationParams' is defined as of type 'string' . https://opendev.org/openstack/tacker/src/branch/master/tacker/objects/vnf_lcm_op_occs.py#L250
[Proposal]
Tacker side code need to be fixed in file ~/tacker/tacker/api/vnflcm/v1/controller.py under “_notification_process” function by converting json_string to dictionary by using json.loads function.
<Impact of approach>
Below LCM operations are directly impacted while changing operation_param data type from string to object.
•Instantiate
def _instantiate : https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L729
•Terminate
def _terminate :
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L800
•Heal
def _heal:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L849
•Cancel
def cancel:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L1557
•Fail
def _fail:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L1727
•change external connectivity
def _change_ext_conn:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L1927
<Impact on db>
•Table vnf_lcm_op_occs will be impacted as currently data type of operation_params is longtext. |
[Issue]
Zuul job for compliance testing in Tacker is currently in a non-voting state. While addressing compliance test , "OperationParams" type mismatch issue is found in Individual VNF Operation Occurrence Compliance Test.
[Issue Detail]
Executed Individual VNF operation occurrence compliance test in Tacker.
<Testcase>
tacker.tests.compliance.sol003.test_vnflcm.IndividualVnfLcmOperationOccurenceTest.test_get_ind_vnf_lcm_op_occs
<Encountered an error> 'operationParam' is not of type object.
<Error message>
<status status="FAIL" starttime="20230904 08:49:24.324" endtime="20230904 08:49:24.423" critical="yes">ValidationError: Validation error for schema VnfLcmOpOcc.schema.json: '{"flavourId": "simple", "extVirtualLinks": [{"id": "net0", "resourceId": "c4370d60-e1bf-4608-be5c-5fc5d31d9b3a", "extCps": [{"cpdId": "CP1", "cpConfig": [{"cpProtocolData": [{"layerProtocol": "IP_OVER_ETHERNET"}]}]}]}], "vimConnectionInfo": [{"id": "16dfa727-a452-4713-912d-db2834479361", "vimId": "752e5d3e-3ebc-4ac8-bc92-a6fcbc291cf8", "vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2"}]}' is not of type 'object'</status>
<Error location> https://opendev.org/openstack/tacker/src/branch/master/tacker/objects/vnf_lcm_op_occs.py#L250
[Cause]
In NFV-TST 010 “~/api-tests/SOL003/VNFLifecycleManagementAPI/schemas/VnfLcmOpOcc.schema.json” file, there is a validation check that "operationParams" should be of object type.
The type of ‘operationParams’ was validated in the Tacker code side, and it was observed that 'operationParams' is of type string.
<Cause code>
Validation check in ~/apitests/SOL003/VNFLifecycleManagementAPI/schemas/VnfLcmOpOcc.schema.json.
'operationParams' is defined as of type 'string' . https://opendev.org/openstack/tacker/src/branch/master/tacker/objects/vnf_lcm_op_occs.py#L250
[Proposal]
Tacker side code need to be fixed in file ~/tacker/tacker/api/vnflcm/v1/controller.py under “_notification_process” function by converting json_string to dictionary by using json.loads function.
<Impact of approach>
Below LCM operations are directly impacted while changing operation_param data type from string to object.
•Instantiate
def _instantiate : https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L729
•Terminate
def _terminate :
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L800
•Heal
def _heal:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L849
•Cancel
def cancel:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L1557
•Fail
def _fail:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L1727
•change external connectivity
def _change_ext_conn:
https://github.com/openstack/tacker/blob/c738e956c62b64a42b1cbec120c31ff38d964cb1/tacker/api/vnflcm/v1/controller.py#L1927
<Impact on db>
Table vnf_lcm_op_occs will be impacted as currently data type of operation_params is longtext. |
|
2024-02-20 08:14:26 |
Yasufumi Ogawa |
tacker: importance |
Undecided |
Medium |
|