From 2fec8527417fc46d9fc9d1f1de52365c59e200c2 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Fri, 17 Sep 2021 18:04:22 +0500 Subject: [PATCH 01/18] changed the notation for list type environment/variables --- .../environment/variables.txt | 6 +---- .../environment/variables.txt | 16 ++++++------- .../environment/variables.txt | 16 ++++++------- .../environment/variables.txt | 10 ++++---- .../environment/variables.txt | 24 +++++++++---------- .../environment/variables.txt | 16 ++++++------- 6 files changed, 42 insertions(+), 46 deletions(-) diff --git a/SOL002/VNFConfiguration-API/environment/variables.txt b/SOL002/VNFConfiguration-API/environment/variables.txt index c07ffa6c0..f76515b1c 100644 --- a/SOL002/VNFConfiguration-API/environment/variables.txt +++ b/SOL002/VNFConfiguration-API/environment/variables.txt @@ -19,8 +19,4 @@ ${apiRoot} / ${apiName} vnfconfig ${apiMajorVersion} v1 -${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX - - - - +${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index 56cdb9f9c..bd9262424 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -93,14 +93,14 @@ ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage -@{VDU_IDs} -@{VNF_IDs} -@{virtualLink_IDs} -@{CP_IDs} -@{Storage_IDs} -@{internalCP_IDs} -@{externalCP_IDs} -@{InstantiationLevel_IDs} +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} ${Descriptor_ID} ${Provider} diff --git a/SOL003/VNFLifecycleManagement-API/environment/variables.txt b/SOL003/VNFLifecycleManagement-API/environment/variables.txt index bf398e841..6c2e4ee11 100644 --- a/SOL003/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL003/VNFLifecycleManagement-API/environment/variables.txt @@ -116,14 +116,14 @@ ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage -@{VDU_IDs} -@{VNF_IDs} -@{virtualLink_IDs} -@{CP_IDs} -@{Storage_IDs} -@{internalCP_IDs} -@{externalCP_IDs} -@{InstantiationLevel_IDs} +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} ${Descriptor_ID} ${Provider} diff --git a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt index 1355aa159..fc30e979a 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt +++ b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt @@ -52,11 +52,11 @@ ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp -@{VDU_IDs} -@{virtualLink_IDs} -@{CP_IDs} -@{externalCP_IDs} -@{Compute_IDs} +${VDU_IDs} +${virtualLink_IDs} +${CP_IDs} +${externalCP_IDs} +${Compute_IDs} ${Descriptor_ID} ${Provider} diff --git a/SOL005/NSLifecycleManagement-API/environment/variables.txt b/SOL005/NSLifecycleManagement-API/environment/variables.txt index 6cb07cd18..0971b545c 100644 --- a/SOL005/NSLifecycleManagement-API/environment/variables.txt +++ b/SOL005/NSLifecycleManagement-API/environment/variables.txt @@ -92,18 +92,18 @@ ${tosca_type_NS} tosca.nodes.nfv.NS ${tosca_type_NsVirtualLink} tosca.nodes.nfv.NsVirtualLink ${tosca_type_NsCP} tosca.nodes.nfv.Cp -@{VDU_IDs} -@{VNF_IDs} -@{virtualLink_IDs} -@{CP_IDs} -@{Storage_IDs} -@{internalCP_IDs} -@{externalCP_IDs} -@{InstantiationLevel_IDs} - -@{NS_VirtualLink_IDs} -@{NsCP_IDs} -@{SAP_IDs} +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} + +${NS_VirtualLink_IDs} +${NsCP_IDs} +${SAP_IDs} ${NS_DescriptorID} ${Designer} diff --git a/SOL005/VNFPackageManagement-API/environment/variables.txt b/SOL005/VNFPackageManagement-API/environment/variables.txt index f6dd5c0e8..a88c75a86 100644 --- a/SOL005/VNFPackageManagement-API/environment/variables.txt +++ b/SOL005/VNFPackageManagement-API/environment/variables.txt @@ -99,14 +99,14 @@ ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage -@{VDU_IDs} -@{VNF_IDs} -@{virtualLink_IDs} -@{CP_IDs} -@{Storage_IDs} -@{internalCP_IDs} -@{externalCP_IDs} -@{InstantiationLevel_IDs} +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} ${Descriptor_ID} ${Provider} -- GitLab From eb2a657b18eb066d27ec9ad0486100bb1d9f99f9 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Fri, 17 Sep 2021 18:09:14 +0500 Subject: [PATCH 02/18] internal variables to ignore while building the HIVE-TAP GUI --- internal_variables.txt | 386 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 386 insertions(+) create mode 100644 internal_variables.txt diff --git a/internal_variables.txt b/internal_variables.txt new file mode 100644 index 000000000..f947429ff --- /dev/null +++ b/internal_variables.txt @@ -0,0 +1,386 @@ +################################################################ +####################### v2.8.1-fix-plu ######################### +################################################################ + + +######################### SOL002 ############################### + + +### SOL002 VNFConfiguration-API ### + +${response}= httpresponse +${CONTENT_TYPE} application/json + +### SOL002 VNFFaultManagement-API ### + +${ACCEPT} application/json +${ACCEPT_JSON} application/json +${CONTENT_TYPE} application/json +${origResponse}= httpresponse +${CONTENT_TYPE_PATCH} application/merge-patch+json +${notification_request} [] +${notification_response} [] +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response}= httpresponse +${AlarmNotification} {} +${AlarmClearedNotification} {} +${AlarmListRebuiltNotification} {} + +### SOL002 VNFIndicator-API ### + +${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} some_response_object +#${origResponse}= httpresponse +${vnfIndicators} + +### SOL002 VNFIndicatorNotification-API ### + +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +### SOL002 VNFLifecycleManagement-API ### + +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +${ACCEPT_PLAIN} text/plain +${ACCEPT_ZIP} application/zip +${ARTIFACT_TYPE} application/octet-stream +${WRONG_ACCEPT} application/json +${VnfLcmOperationOccurrenceNotification} {} +${VnfIdentifierCreationNotification} {} +${VnfIdentifierDeletionNotification} {} +#${notification_request} [] +#${notification_response} [] +#${response}= httpresponse +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} + +${Descriptor_ID} +${Provider} +${Product_Name} +${Software_Version} +${Descriptor_Version} + +${scaleVnfRequesttype} SCALE_OUT +${scaleVnfRequestAspect} Aspect + + +### SOL002 VNFPerformanceManagement-API ### + +#${CONTENT_TYPE_JSON} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} http-response +${subscribe} /subscribe +${OrigResponse}= httpresponse + +### SOL002 VNFPerformanceManagementNotification-API ### + +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + + +######################### SOL003 ############################### + +### SOL003 VirtualizedQuotaAvailableNotification-API ### + +#${CONTENT_TYPE} application/json +#${ACCEPT} application/json +#${notification_request} [] +#${notification_response} [] +${VrQuotaAvailNotification} {} +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} {} + + +### SOL003 VNFFaultManagement-API ### + +#${CONTENT_TYPE} application/json +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${AlarmNotification} {} +#${AlarmClearedNotification} {} +#${AlarmListRebuiltNotification} {} +#${response} {} +${req_mock} {} +${resp_mock} {} +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +### SOL003 VNFFaultManagementNotification-API ### + +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + + +### SOL003 VNFIndicator-API ### + +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE_JSON} application/json +#${response} +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${origResponse} httpresponse + + +### SOL003 VNFLifecycleManagement-API ### + +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ARTIFACT_TYPE} application/octet-stream +#${WRONG_ACCEPT} application/json +${VnfLcmOperationOccurrenceNotification} {} +${VnfIdentifierCreationNotification} {} +${VnfIdentifierDeletionNotification} {} +#${response} {} +${json} {} + +${changeVnfFlavourRequest} {} +${changeVnfOperateRequest} {} +${requestedState} test +${changeVnfExtConnectivityRequest} {} +${patchBodyRequest} {} + +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +${LccnSubscriptions} +${scaleInfo} +${element} +${scaleOutResponse} + +#${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +#${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +#${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +#${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +#${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +#${VDU_IDs} +#${VNF_IDs} +#${virtualLink_IDs} +#${CP_IDs} +#${Storage_IDs} +#${internalCP_IDs} +#${externalCP_IDs} +#${InstantiationLevel_IDs} + +#${Descriptor_ID} +#${Provider} +#${Product_Name} +#${Software_Version} +#${Descriptor_Version} + + +### SOL003 VNFLifecycleOperationGranting-API ### + +#${CONTENT_TYPE} application/json +#${ACCEPT} application/json +#${response} {} +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ARTIFACT_TYPE} application/octet-stream +#${WRONG_ACCEPT} application/json +#${VrQuotaAvailNotification} {} + +#${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +#${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +#${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +#${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp + +#${VDU_IDs} +#${virtualLink_IDs} +#${CP_IDs} +#${externalCP_IDs} + +#${Descriptor_ID} +#${Provider} +#${Product_Name} +#${Software_Version} +#${Descriptor_Version} + + +### SOL003 VNFPackageManagement-API ### + +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE_JSON} application/json +#${response} httpresponse +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${notification_request} [] +#${notification_response} [] +#${origResponse} httpresponse +#${ACCEPT_PLAIN} text/plain +${CONTENT_TYPE_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +${CONTENT_TYPE_ZIP} application/zip + +${CONTENT_TYPE_OCTET} application/octet-stream + +#${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder + +#${Descriptor_ID} +#${Provider} +#${Product_Name} +#${Software_Version} +#${Descriptor_Version} + +### SOL003 VNFPerformanceManagement-API ### + + +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response}= httpresponse +#${OrigResponse}= httpresponse +#${notification_request} [] +#${notification_response} [] + + +######################### SOL005 ############################### + +### SOL005 NSDManagement-API ### + +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${notification_request} [] +#${notification_response} [] +#${response} httpresponse +#${origResponse} httpresponse +#${ACCEPT_ZIP} application/zip +#${ACCEPT_PLAIN} text/plain +#${CONTENT_TYPE_ZIP} application/zip +#${CONTENT_TYPE_PLAIN} text/plain + + +### SOL005 NSFaultManagement-API ### + +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${AlarmNotification} {} +#${AlarmClearedNotification} {} +#${AlarmListRebuiltNotification} {} +#${response} {} +#${req_mock} {} +#${resp_mock} {} +#${notification_request} [] +#${notification_response} [] + +### SOL005 NSLifecycleManagement-API ### + +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_JSON} application/json +#${ACCEPT} application/json +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ARTIFACT_TYPE} application/octet-stream +#${WRONG_ACCEPT} application/json +#${VnfLcmOperationOccurrenceNotification} {} +#${VnfIdentifierCreationNotification} {} +#${VnfIdentifierDeletionNotification} {} +#${notification_request} {} +#${notification_response} {} +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} {} +#${json} {"notificationStatus": ""} + +#${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +#${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +#${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +#${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +#${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +#${VDU_IDs} +#${VNF_IDs} +#${virtualLink_IDs} +#${CP_IDs} +#${Storage_IDs} +#${internalCP_IDs} +#${externalCP_IDs} +#${InstantiationLevel_IDs} + +#${Descriptor_ID} +#${Provider} +#${Product_Name} +#${Software_Version} +#${Descriptor_Version} + + +### SOL005 NSPerformanceManagement-API ### + +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} {} +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${origResponse}= httpresponse +#${notification_request} [] +#${notification_response} [] + + +### SOL005 VNFPackageManagement-API ### + +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} +#${notification_request} [] +#${notification_response} [] +#${origResponse} httpresponse +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${CONTENT_TYPE_PLAIN} text/plain +#${CONTENT_TYPE_ZIP} application/zip +#${CONTENT_TYPE_OCTET} application/octet-stream + +#${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +#${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +#${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +#${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +#${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +#${VDU_IDs} +#${VNF_IDs} +#${virtualLink_IDs} +#${CP_IDs} +#${Storage_IDs} +#${internalCP_IDs} +#${externalCP_IDs} +#${InstantiationLevel_IDs} + +#${Descriptor_ID} +#${Provider} +#${Product_Name} +#${Software_Version} +#${Descriptor_Version} -- GitLab From 6c3d8ca5bc5ae52de0dccc801201be66d383df76 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Mon, 20 Sep 2021 14:20:38 +0500 Subject: [PATCH 03/18] added some missing internal variables to be removed from TAP GUI --- internal_variables.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal_variables.txt b/internal_variables.txt index f947429ff..ed9c49b02 100644 --- a/internal_variables.txt +++ b/internal_variables.txt @@ -280,6 +280,11 @@ ${CONTENT_TYPE_OCTET} application/octet-stream #${CONTENT_TYPE_ZIP} application/zip #${CONTENT_TYPE_PLAIN} text/plain +${NS_DescriptorID} +${Designer} +${NS_Name} +${NS_Version} +${NS_InvariantId} ### SOL005 NSFaultManagement-API ### @@ -336,6 +341,11 @@ ${CONTENT_TYPE_OCTET} application/octet-stream #${Software_Version} #${Descriptor_Version} +#${NS_DescriptorID} +#${Designer} +#${NS_Name} +#${NS_Version} +#${NS_InvariantId} ### SOL005 NSPerformanceManagement-API ### -- GitLab From aeb7d6df4f71be1f4c7701135ec77a20205ea08b Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Tue, 21 Sep 2021 18:14:40 +0200 Subject: [PATCH 04/18] fixed issues #90 and #190 in 2.8.1 --- SOL002/VNFConfiguration-API/Configuration.robot | 3 ++- SOL002/VNFFaultManagement-API/Alarms.robot | 3 ++- .../VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot | 3 ++- SOL002/VNFFaultManagement-API/IndividualAlarm.robot | 3 ++- SOL002/VNFFaultManagement-API/IndividualSubscription.robot | 3 ++- SOL002/VNFFaultManagement-API/Subscriptions.robot | 3 ++- SOL002/VNFIndicator-API/IndividualSubscription.robot | 3 ++- SOL002/VNFIndicator-API/IndividualVNFindicator.robot | 3 ++- SOL002/VNFIndicator-API/Subscriptions.robot | 3 ++- SOL002/VNFIndicator-API/VNFIndicators.robot | 3 ++- SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot | 3 ++- .../VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot | 2 ++ SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot | 3 ++- SOL002/VNFPerformanceManagement-API/IndividualReport.robot | 3 ++- SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot | 3 ++- SOL002/VNFPerformanceManagement-API/PMJobs.robot | 3 ++- SOL002/VNFPerformanceManagement-API/Thresholds.robot | 3 ++- .../VNFPerformanceManagementKeywords.robot | 3 ++- SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot | 2 ++ SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot | 3 ++- .../VnfLcmMntOperationKeywords.robot | 2 ++ SOL003/VNFLifecycleOperationGranting-API/Grants.robot | 2 ++ SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot | 2 ++ .../VNFPackageManagementKeywords.robot | 3 ++- SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot | 3 ++- SOL003/VNFPerformanceManagement-API/IndividualReport.robot | 3 ++- SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot | 3 ++- SOL003/VNFPerformanceManagement-API/PMJobs.robot | 3 ++- SOL003/VNFPerformanceManagement-API/Thresholds.robot | 3 ++- .../VRQANOperationKeywords.robot | 2 ++ SOL005/NSDManagement-API/NSDManagementKeywords.robot | 3 ++- SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot | 2 ++ SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot | 2 ++ .../NSPerformanceManagementKeywords.robot | 3 ++- .../VNFPackageManagementKeywords.robot | 3 ++- 35 files changed, 70 insertions(+), 27 deletions(-) diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index 1da0b7543..7deaed7bf 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -136,7 +136,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/problem+json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema}= Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/Alarms.robot b/SOL002/VNFFaultManagement-API/Alarms.robot index bb0b3f232..8e42500c6 100644 --- a/SOL002/VNFFaultManagement-API/Alarms.robot +++ b/SOL002/VNFFaultManagement-API/Alarms.robot @@ -352,7 +352,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot index 361cd2374..5267feeab 100644 --- a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot +++ b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot @@ -112,7 +112,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot index fa7bfe6c1..c9c479a4f 100644 --- a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot @@ -192,7 +192,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot index 69ea95cd9..aab3d6de2 100644 --- a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot @@ -147,7 +147,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index 8d4742c43..8ede0ce56 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -424,7 +424,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/IndividualSubscription.robot b/SOL002/VNFIndicator-API/IndividualSubscription.robot index 9ea1314f9..c4f45268b 100644 --- a/SOL002/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL002/VNFIndicator-API/IndividualSubscription.robot @@ -168,7 +168,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index 32c7b0348..dc41e3b50 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -218,7 +218,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index 2fb925c5d..2ad0cfb67 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -282,7 +282,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 6643bb798..261791e7b 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -286,7 +286,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${schema} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${jsonSchema}= Catenate SEPARATOR= ${schema} .schema.json Validate Json ${jsonSchema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 765eafcf6..0287b43b3 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -214,7 +214,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index ffbf9fda6..2d5e64031 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -40,6 +40,8 @@ Check Operation Occurrence Id Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index ef1fdb1c2..b5dad77ef 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -241,7 +241,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot index b45328fd1..3855e6684 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot @@ -155,7 +155,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index 646e853c2..8e56dd2e6 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -243,7 +243,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index 0e1993f3d..34b416d7c 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -409,7 +409,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index 036076301..a016b2424 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -257,7 +257,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index a5e14818d..f986bff12 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -271,7 +271,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot index 408350d10..f57e2d0a7 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -63,6 +63,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index 23c3a6a77..5163cc9af 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -172,7 +172,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index 9b76a7912..b7c038f32 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -42,6 +42,8 @@ Check Operation Occurrence Id existence Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index 24cd2bb5c..a23355984 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -166,6 +166,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index 3fa55f01f..a097a2cff 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -162,6 +162,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index bad2ad8b0..725c3a02d 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -652,7 +652,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot index 02b8a81c9..038559a01 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -265,7 +265,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot index 12259bfe2..9e7c5b73e 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot @@ -143,7 +143,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot index 878485dfe..fd7ab02a5 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -255,7 +255,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/PMJobs.robot b/SOL003/VNFPerformanceManagement-API/PMJobs.robot index d8bca91e5..9c863b890 100644 --- a/SOL003/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL003/VNFPerformanceManagement-API/PMJobs.robot @@ -472,7 +472,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/Thresholds.robot b/SOL003/VNFPerformanceManagement-API/Thresholds.robot index e59f8a797..a5a5c2792 100644 --- a/SOL003/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL003/VNFPerformanceManagement-API/Thresholds.robot @@ -278,7 +278,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot index 4a9e77183..27d3cca02 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot @@ -34,6 +34,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index 9eeb0abdf..874ec1a0a 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -866,7 +866,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Log ${response['body']} Validate Json ${schema} ${response['body']} diff --git a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot index 2c9daa406..1d142a825 100644 --- a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot +++ b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot @@ -35,6 +35,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index de60b0830..6e4e57885 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -219,6 +219,8 @@ Check Individual NS LCM operation occurrence operationState is Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot index 245f84882..ab2bbddea 100644 --- a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot +++ b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot @@ -586,7 +586,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 6e0976a6c..1a81bdcf0 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -984,7 +984,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK -- GitLab From 9db9c02635857be8238d6807adf8e18a95d76d54 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Wed, 22 Sep 2021 15:52:43 +0200 Subject: [PATCH 05/18] ../SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot --- SOL005/NSDManagement-API/NSDManagementKeywords.robot | 4 ++++ .../VNFPackageManagementKeywords.robot | 7 +++++++ requirements.txt | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index 874ec1a0a..3a5dcd2d8 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -359,6 +359,7 @@ GET NSD Content with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -369,6 +370,7 @@ GET NSD Content with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -671,6 +673,7 @@ Get PNFD Content with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -680,6 +683,7 @@ Get PNFD Content with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 1a81bdcf0..d53c817a4 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -484,6 +484,7 @@ GET Individual VNF Package Content with Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -493,6 +494,7 @@ GET Individual VNF Package Content with explicit Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -516,6 +518,7 @@ GET Individual VNF Package Content with invalid Range Request Set Headers {"Range": "bytes=${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -649,6 +652,7 @@ GET Individual VNF Package Artifact with Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -659,6 +663,7 @@ GET Individual VNF Package Artifact with invalid Range Request Set Headers {"Range": "bytes=${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1196,6 +1201,7 @@ Get Artifact in VNF Package with Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1229,6 +1235,7 @@ GET VNF Package Artifact with invalid Range Request Set Headers {"Range": "bytes=${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/requirements.txt b/requirements.txt index bafc102d3..4f00299b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ ## To install the libraries, use: # pip -r requirements.txt - +git+https://github.com/etsi-cti-admin/RESTinstance robotframework==3.1 -RESTinstance==1.0.0rc4 +#RESTinstance==1.0.0rc4 robotframework-dependencylibrary==1.0.0.post1 robotframework-jsonlibrary==0.3 robotframework-jsonschemalibrary==1.0 -- GitLab From 547c77e4c92215609912c99d15b03e99feba0784 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Wed, 22 Sep 2021 15:53:33 +0200 Subject: [PATCH 06/18] Fixing issue #153 --- .../VNFPackageManagementKeywords.robot | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 725c3a02d..74abd1bde 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -279,6 +279,7 @@ GET Individual VNF Package Content with Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -288,6 +289,7 @@ GET Individual VNF Package Content with explicit Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -311,6 +313,7 @@ GET Individual VNF Package Content with invalid Range Request Set Headers {"Range": "bytes=${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -585,6 +588,7 @@ GET Individual VNF Package Artifact with Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -595,6 +599,7 @@ GET Individual VNF Package Artifact with invalid Range Request Set Headers {"Range": "bytes=${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1058,6 +1063,7 @@ GET Individual OnBoarded VNF Package Content with Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1068,6 +1074,7 @@ GET Individual OnBoarded VNF Package Content with invalid Range Request Set Headers {"Range": "bytes=${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1107,6 +1114,7 @@ GET Individual OnBoarded VNF Package Artifact with Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1117,6 +1125,7 @@ GET Individual OnBoarded VNF Package Artifact with invalid Range Request Set Headers {"Range": "bytes=${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1410,6 +1419,7 @@ Get Artifact in VNF Package with Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1443,6 +1453,7 @@ GET VNF Package Artifact with invalid Range Request Set Headers {"Range": "bytes=${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1525,6 +1536,7 @@ Get Artifact in OnBoarded VNF Package with Range Request Set Headers {"Range": "bytes=${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1558,6 +1570,7 @@ GET OnBoarded VNF Package Artifact with invalid Range Request Set Headers {"Range": "bytes=${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1666,4 +1679,4 @@ Match the VNF subscription Response Attributes with Descriptors Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProducts'][0]['vnfProductName']} ${Product_Name} Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProducts']['versions'][0]['vnfSoftwareVersion']} ${Software_Version} Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProducts']['versions'][0]['vnfdVersion']} ${Descriptor_Version} - \ No newline at end of file + -- GitLab From 94adb87ea33c7805a4ad4fc071c7035d8b512742 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Wed, 22 Sep 2021 17:46:22 +0200 Subject: [PATCH 07/18] CI/CD enhancements --- .jenkins.sh | 14 +++++++++++++- scripts/docker/Dockerfile | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.jenkins.sh b/.jenkins.sh index 22ed7fcf2..8bfd08f3e 100644 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -12,7 +12,18 @@ run_dir="$(pwd)" echo "Using git branch $GIT_BRANCH" bash ./scripts/build-container.sh -bash ./scripts/run-container.sh "${run_dir}" "$GIT_BRANCH" +ret=$? +if [ "$ret" != "0" ]; then + echo "build-container.sh failed" + exit -1 +fi + +bash ./scripts/run-container.sh "${run_dir}" +ret=$? +if [ "$ret" != "0" ]; then + echo "run-container.sh failed" + exit -1 +fi if [[ "$GIT_BRANCH" =~ .*fix-plu$ ]]; then @@ -30,3 +41,4 @@ fi ret=$? echo "Final validation result: $ret" exit $ret + diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index bf5f18016..9f082157b 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 MAINTAINER ETSI STF 583 -- GitLab From af8d9f010a7b3ca36e328590c75a8351f1dfbac1 Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Mon, 27 Sep 2021 10:19:35 +0200 Subject: [PATCH 08/18] fixed issue #191 in 2.8.1-fix-plu --- SOL005/NSFaultManagement-API/schemas/alarm.schema.json | 5 ++++- SOL005/NSFaultManagement-API/schemas/alarms.schema.json | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SOL005/NSFaultManagement-API/schemas/alarm.schema.json b/SOL005/NSFaultManagement-API/schemas/alarm.schema.json index 76fc39504..5aadd14cd 100644 --- a/SOL005/NSFaultManagement-API/schemas/alarm.schema.json +++ b/SOL005/NSFaultManagement-API/schemas/alarm.schema.json @@ -157,7 +157,10 @@ }, "faultDetails": { "description": "Provides additional information about the fault..\n", - "type": "string" + "type": "array", + "items": { + "type": "string" + } }, "_links": { "description": "Links for this resource.\n", diff --git a/SOL005/NSFaultManagement-API/schemas/alarms.schema.json b/SOL005/NSFaultManagement-API/schemas/alarms.schema.json index 716025e57..b43c87fb1 100644 --- a/SOL005/NSFaultManagement-API/schemas/alarms.schema.json +++ b/SOL005/NSFaultManagement-API/schemas/alarms.schema.json @@ -159,7 +159,10 @@ }, "faultDetails": { "description": "Provides additional information about the fault..\n", - "type": "string" + "type": "array", + "items": { + "type": "string" + } }, "_links": { "description": "Links for this resource.\n", -- GitLab From 7cbb1a35434b4bbe0cc6bf8c7e285c7feff2e799 Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Mon, 27 Sep 2021 10:35:47 +0200 Subject: [PATCH 09/18] fixed issue #192 in 2.8.1-fix-plu --- SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index b4cc16f0c..2888ac54f 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -132,5 +132,5 @@ Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId} Integer response status 200 \ No newline at end of file -- GitLab From 4e774dd7143d8af3a9eb56c952e7c0a9e42ff4d4 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Mon, 27 Sep 2021 16:07:56 +0500 Subject: [PATCH 10/18] fixed VNFD parsing in SOL002 VNF-LCM-API --- .../VnfLcmOperationKeywords.robot | 22 +++++++++++++------ .../descriptors/SOL001/VNFD/vnfd_SOL001.yaml | 2 -- .../environment/variables.txt | 3 ++- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 2d5e64031..284b86aaa 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -1132,8 +1132,16 @@ Fetch Information from SOL001 descriptor file @{VirtualLink_labels}= Create List @{CP_labels}= Create List @{Storage_labels}= Create List + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + FOR ${key} IN @{topology_template.node_templates.keys()} - ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${key_type}= Get Variable Value ${topology_template.node_templates['${key}'].type} ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} @@ -1155,12 +1163,12 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml [Arguments] ${VNF_label} - ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} - ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} - ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} - ${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version} - ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version} - ${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id} + ${descriptor_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.flavour_id} Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index 7f25ee910..fa3d11e58 100644 --- a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -90,7 +90,6 @@ topology_template: order: 1 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: management: type: "tosca.nodes.nfv.VduCp" properties: @@ -98,7 +97,6 @@ topology_template: order: 0 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: left: type: "tosca.nodes.nfv.VduCp" properties: diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index bd9262424..f4b5436e9 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -88,10 +88,11 @@ ${descriptorType} SOL006 ${check_multiple_instances} 0 ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute -${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_VNF} tosca.nodes.nfv.VNF ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage +${tosca_type_derived_from_VNF} ${VDU_IDs} ${VNF_IDs} -- GitLab From d61a1faf6ac28321620f0640375fc378851a5847 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Mon, 27 Sep 2021 17:20:14 +0500 Subject: [PATCH 11/18] fixed VNFD parsing in SOL003 APIs --- .../environment/variables.txt | 1 + .../VnfLcmMntOperationKeywords.robot | 26 +- .../descriptors/SOL001/VNFD/vnfd_SOL001.yaml | 4 +- .../environment/variables.txt | 6 +- .../Grants.robot | 141 +------- .../IndividualGrant.robot | 148 +-------- ...NFLifecycleOperationGrantingKeywords.robot | 311 ++++++++++++++++++ .../descriptors/SOL001/VNFD/vnfd_SOL001.yaml | 4 +- .../environment/variables.txt | 10 +- .../VNFPackageManagementKeywords.robot | 117 ++++++- .../descriptors/SOL001/VNFD/vnfd_SOL001.yaml | 4 +- .../environment/variables.txt | 19 +- 12 files changed, 477 insertions(+), 314 deletions(-) create mode 100644 SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index f4b5436e9..319003887 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -87,6 +87,7 @@ ${check_descriptors} 1 ${descriptorType} SOL006 ${check_multiple_instances} 0 +#############internal variables used for descriptor parsing################ ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute ${tosca_type_VNF} tosca.nodes.nfv.VNF ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index b7c038f32..7a59afaa4 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -1530,14 +1530,22 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file - Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml @{VDU_labels}= Create List @{VNF_labels}= Create List @{VirtualLink_labels}= Create List @{CP_labels}= Create List @{Storage_labels}= Create List + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + FOR ${key} IN @{topology_template.node_templates.keys()} - ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${key_type}= Get Variable Value ${topology_template.node_templates['${key}'].type} ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} @@ -1558,13 +1566,13 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 [Arguments] ${VNF_label} - Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} - ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} - ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} - ${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version} - ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version} - ${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + ${descriptor_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.flavour_id} Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} diff --git a/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index 2694612e3..e770a8cd4 100644 --- a/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -90,7 +90,6 @@ topology_template: order: 1 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: management: type: "tosca.nodes.nfv.VduCp" properties: @@ -98,7 +97,6 @@ topology_template: order: 0 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: left: type: "tosca.nodes.nfv.VduCp" properties: @@ -164,4 +162,4 @@ topology_template: terminate: implementation: terminate-example.yaml operate: - implementation: operate-example.yaml + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/environment/variables.txt b/SOL003/VNFLifecycleManagement-API/environment/variables.txt index 6c2e4ee11..505557384 100644 --- a/SOL003/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL003/VNFLifecycleManagement-API/environment/variables.txt @@ -110,12 +110,14 @@ ${callbackResp} localhost ${descriptorType} SOL001 ${check_descriptors} 1 +#############internal variables used for descriptor parsing################ ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute -${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_VNF} tosca.nodes.nfv.VNF ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage - +${tosca_type_derived_from_VNF} + ${VDU_IDs} ${VNF_IDs} ${virtualLink_IDs} diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index a23355984..5859b67d2 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -1,6 +1,7 @@ *** Settings *** Library String -Resource environment/variables.txt +Resource environment/variables.txt +Resource VNFLifecycleOperationGrantingKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary @@ -12,7 +13,6 @@ Documentation This resource represents grants. The client can use this resour ... from the NFVO to perform a particular VNF lifecycle operation. *** Variables *** -${response} {} ${retry} 2 min ${polling} 10 sec @@ -110,139 +110,4 @@ DELETE Grants - Method not implemented *** Keywords *** Wait for individual grant successful notification - Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful -Send Request Grant Request in Synchronous mode - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants - Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request - ${template}= Get File jsons/grantRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Send Request Grant Request in Asynchronous mode - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants - Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request - ${template}= Get File jsons/grantRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Send Request for a new Grant Forbiden Operation - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants - Log The grant request should be rejected - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request - ${template}= Get File jsons/grantRejectedRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check Operation Occurrence Id existence - ${occId}= Get Value From Json ${response['headers']} $..Location - Should Not Be Empty ${occId} - -Check HTTP Response Header Contains - [Arguments] ${CONTENT_TYPE} - Should Contain ${response['headers']} ${CONTENT_TYPE} - Log Header is present - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json - ... ELSE Should Contain ${response['headers']['Content-Type']} application/json - ${schema} = Catenate SEPARATOR= ${input} .schema.json - Validate Json ${schema} ${response['body']} - -Get an individual grant - Successful - log Trying to read an individual grant - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${response['headers']['Location']} - Log Validate Status code - Integer response status 200 - -Get Grants - Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants - ${body}= Output response - Set Suite Variable ${response} ${body} - -Put Grants - Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants - ${body}= Output response - Set Suite Variable ${response} ${body} - -Patch Grants - Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants - ${body}= Output response - Set Suite Variable ${response} ${body} - -Delete Grants - Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants - ${body}= Output response - Set Suite Variable ${response} ${body} - -Add VNF Descriptor Content to Grant Request - PARSE the Descriptor File - -PARSE the Descriptor File - Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file - -Fetch Information from SOL001 descriptor file - Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} - ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} - ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} - ${software_version}= Get Variable Value ${topology_template.node_templates.properties.software_version} - ${descriptor_version}= Get Variable Value ${topology_template.node_templates.properties.descriptor_version} - ${flavour_id}= Get Variable Value ${topology_template.node_templates.properties.flavour_id} - Set Global Variable ${Descriptor_ID} ${descriptor_id} - Set Global Variable ${Provider} ${provider} - Set Global Variable ${Product_Name} ${product_name} - Set Global Variable ${Software_Version} ${software_version} - Set Global Variable ${Descriptor_Version} ${descriptor_version} - Set Global Variable ${Flavour_ID} ${flavour_id} - -Fetch Information from SOL006 descriptor file - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} - ${provider}= Get Variable Value ${nfv.vnfd[0].provider} - ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} - ${software_version}= Get Variable Value ${nfv.vnfd[0]['software-version']} - ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} - Set Global Variable ${Descriptor_ID} ${descriptor_id} - Set Global Variable ${Provider} ${provider} - Set Global Variable ${Product_Name} ${product_name} - Set Global Variable ${Software_Version} ${software_version} - Set Global Variable ${Descriptor_Version} ${descriptor_version} - - + Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index a097a2cff..c3dbba6ba 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -1,5 +1,6 @@ *** Settings *** -Resource environment/variables.txt +Resource environment/variables.txt +Resource VNFLifecycleOperationGrantingKeywords.robot Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -100,147 +101,4 @@ DELETE an individual grant - Method not implemented ... Applicability: none ... Post-Conditions: none Delete individual Grant - Check HTTP Response Status Code Is 405 - -*** Keywords *** -Get individual grant - log Trying to read an individual grant - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - -Post individual Grant - log Trying to read an individual grant - Pass Execution If ${SYNC_MODE} == 1 Skipping. Synchronous mode is supported - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Put individual Grant - Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Patch individual Grant - Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Delete individual Grant - Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Header Contains - [Arguments] ${CONTENT_TYPE} - Should Contain ${response['headers']} ${CONTENT_TYPE} - Log Header is present - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json - ... ELSE Should Contain ${response['headers']['Content-Type']} application/json - ${schema} = Catenate SEPARATOR= ${input} .schema.json - Validate Json ${schema} ${response['body']} - -Check HTTP Response Body grant content against VNF Descriptor - Run Keyword If ${check_descriptors} == 1 Check Individual grant Content - -Check Individual grant Content - PARSE the Descriptor File - Match the grant Response Attributes with Descriptors - -PARSE the Descriptor File - Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file - -Fetch Information from SOL001 descriptor file - Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - @{VDU_labels}= Create List - @{VirtualLink_labels}= Create List - @{CP_labels}= Create List - FOR ${key} IN @{topology_template.node_templates.keys()} - ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} - ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} - ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} - ${VDUcp_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_cp} - Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} - Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} - Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} - END - Set Global Variable @{VDU_IDs} @{VDU_labels} - Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} - Set Global Variable @{CP_IDs} @{CP_labels} - -Fetch Information from SOL006 descriptor file - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} - ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} - ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} - FOR ${key} IN @{nfv.vnfd[0].keys()} - ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu - Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} - ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext-cpd - Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} - ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int-virtual-link-desc - Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} - END - -Get VDU IDs - [Arguments] ${count} - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - @{VDU_labels}= Create List - @{Compute_labels}= Create List - FOR ${i} IN RANGE ${count} - Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} - Append To List ${Compute_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-compute-desc']} - END - Set Global Variable ${VDU_IDs} ${VDU_labels} - Set Global Variable ${Compute_IDs} ${Compute_labels} - -Get External CP IDs - [Arguments] ${count} - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - @{external_CPs}= Create List - FOR ${i} IN RANGE ${count} - Append To List ${external_CPs} ${nfv.vnfd[0].ext_cpd[${i}].id} - END - Set Global Variable ${externalCP_IDs} ${external_CPs} - -Get Virtual Link IDs - [Arguments] ${count} - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - ${VirtualLink_labels}= Create List - FOR ${i} IN RANGE ${count} - Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} - END - Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} - -Match the grant Response Attributes with Descriptors - Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} - Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} - List Should Contain Value ${VirtualLink_IDs} ${response['body']['extManagedVirtualLinkData'][0]['vnfVirtualLinkDescId']} - List Should Contain value ${Compute_IDs} ${response['body']['vimAssets']['computeResourceFlavours'][0]['vnfdVirtualComputeDescId']} + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot b/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot new file mode 100644 index 000000000..bcc612f9f --- /dev/null +++ b/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot @@ -0,0 +1,311 @@ +*** Settings *** +Library String +Resource environment/variables.txt +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library Collections + +*** Variables *** +${retry} 2 min +${polling} 10 sec + +*** Keywords *** +Wait for individual grant successful notification + Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful +Send Request Grant Request in Synchronous mode + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants + Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/grantRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Send Request Grant Request in Asynchronous mode + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants + Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/grantRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Send Request for a new Grant Forbiden Operation + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants + Log The grant request should be rejected + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/grantRejectedRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check Operation Occurrence Id existence + ${occId}= Get Value From Json ${response['headers']} $..Location + Should Not Be Empty ${occId} + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + +Get an individual grant - Successful + log Trying to read an individual grant + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${response['headers']['Location']} + Log Validate Status code + Integer response status 200 + +Get Grants + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants + ${body}= Output response + Set Suite Variable ${response} ${body} + +Put Grants + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants + ${body}= Output response + Set Suite Variable ${response} ${body} + +Patch Grants + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants + ${body}= Output response + Set Suite Variable ${response} ${body} + +Delete Grants + Log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants + ${body}= Output response + Set Suite Variable ${response} ${body} + + +Get individual grant + log Trying to read an individual grant + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Check resource existence + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + +Post individual Grant + log Trying to read an individual grant + Pass Execution If ${SYNC_MODE} == 1 Skipping. Synchronous mode is supported + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Put individual Grant + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Patch individual Grant + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Delete individual Grant + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Check HTTP Response Body grant content against VNF Descriptor + Run Keyword If ${check_descriptors} == 1 Check Individual grant Content + +Check Individual grant Content + PARSE the Descriptor File + Match the grant Response Attributes with Descriptors + +PARSE the Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file + +Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + FOR ${key} IN @{topology_template.node_templates.keys()} + ${key_type}= Get Variable Value ${topology_template.node_templates['${key}'].type} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} + ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} + ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} + ${VDUcp_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_cp} + ${Storage_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_storage} + Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} + Run Keyword If ${VNF_check} Append To List ${VNF_labels} ${key} + Run Keyword If ${VNF_check} Get VNF Attributes from SOL001 ${key} + Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} + Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} + Run Keyword If ${Storage_check} Append To List ${Storage_labels} ${key} + END + Set Global Variable @{VDU_IDs} @{VDU_labels} + Set Global Variable @{VNF_IDs} @{VNF_labels} + Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} + Set Global Variable @{CP_IDs} @{CP_labels} + Set Global Variable @{Storage_IDs} @{Storage_labels} + +Get VNF Attributes from SOL001 + [Arguments] ${VNF_label} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + ${descriptor_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.flavour_id} + + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + Set Global Variable ${Flavour_ID} ${flavour_id} + + +Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} + ${provider}= Get Variable Value ${nfv.vnfd[0].provider} + ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} + ${software_version}= Get Variable Value ${nfv.vnfd[0]['software-version']} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} + ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} + ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} + ${instantiation_levels}= Get Length ${nfv.vnfd[0].df['instantiation-level']} + FOR ${key} IN @{nfv.vnfd[0].keys()} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu + Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} + ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext-cpd + Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} + ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int-virtual-link-desc + Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} + ${DF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} df + Run Keyword If ${DF_check} Get Instantiation Levels ${instantiation_levels} + END + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Get VDU IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{VDU_labels}= Create List + ${Storage_labels}= Create List + ${Compute_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} + Append To List ${Storage_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-storage-desc']} + Append To List ${Compute_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-compute-desc']} + Get Internal CPs for each VDU ${i} + END + Set Global Variable ${VDU_IDs} ${VDU_labels} + Set Global Variable ${Storage_IDs} ${Storage_labels} + Set Global Variable ${Compute_IDs} ${Compute_labels} + +Get Internal CPs for each VDU + [Arguments] ${vdu} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} + ${internal_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${internal_CPs} ${nfv.vnfd[0].vdu[${vdu}]['int-cpd'][${i}]['id']} + END + Set Global Variable ${internalCP_IDs} ${internal_CPs} + +Get External CP IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{external_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${external_CPs} ${nfv.vnfd[0].ext_cpd[${i}].id} + END + Set Global Variable ${externalCP_IDs} ${external_CPs} + +Get Virtual Link IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${VirtualLink_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} + END + Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} + +Get Instantiation Levels + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{Instantiation_Levels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} + END + Set Global Variable ${InstantiationLevel_IDs} ${Instantiation_Levels} + +Match the grant Response Attributes with Descriptors + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['extManagedVirtualLinkData'][0]['vnfVirtualLinkDescId']} + List Should Contain value ${Compute_IDs} ${response['body']['vimAssets']['computeResourceFlavours'][0]['vnfdVirtualComputeDescId']} \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index 2694612e3..e770a8cd4 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -90,7 +90,6 @@ topology_template: order: 1 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: management: type: "tosca.nodes.nfv.VduCp" properties: @@ -98,7 +97,6 @@ topology_template: order: 0 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: left: type: "tosca.nodes.nfv.VduCp" properties: @@ -164,4 +162,4 @@ topology_template: terminate: implementation: terminate-example.yaml operate: - implementation: operate-example.yaml + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt index fc30e979a..ee0d68ede 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt +++ b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt @@ -47,16 +47,24 @@ ${flavourId} string ${descriptorType} SOL001 ${check_descriptors} 1 -${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +#############internal variables used for descriptor parsing################ ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +${tosca_type_VNF} tosca.nodes.nfv.VNF ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage +${tosca_type_derived_from_VNF} ${VDU_IDs} +${VNF_IDs} ${virtualLink_IDs} ${CP_IDs} ${externalCP_IDs} +${Storage_IDs} ${Compute_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} ${Descriptor_ID} ${Provider} diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 74abd1bde..e5498fa48 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -1631,17 +1631,55 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file - Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} - ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} - ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} - ${software_version}= Get Variable Value ${topology_template.node_templates.properties.software_version} - ${descriptor_version}= Get Variable Value ${topology_template.node_templates.properties.descriptor_version} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + FOR ${key} IN @{topology_template.node_templates.keys()} + ${key_type}= Get Variable Value ${topology_template.node_templates['${key}'].type} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} + ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} + ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} + ${VDUcp_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_cp} + ${Storage_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_storage} + Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} + Run Keyword If ${VNF_check} Append To List ${VNF_labels} ${key} + Run Keyword If ${VNF_check} Get VNF Attributes from SOL001 ${key} + Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} + Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} + Run Keyword If ${Storage_check} Append To List ${Storage_labels} ${key} + END + Set Global Variable @{VDU_IDs} @{VDU_labels} + Set Global Variable @{VNF_IDs} @{VNF_labels} + Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} + Set Global Variable @{CP_IDs} @{CP_labels} + Set Global Variable @{Storage_IDs} @{Storage_labels} + +Get VNF Attributes from SOL001 + [Arguments] ${VNF_label} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + ${descriptor_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.flavour_id} + Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} Set Global Variable ${Product_Name} ${product_name} Set Global Variable ${Software_Version} ${software_version} Set Global Variable ${Descriptor_Version} ${descriptor_version} + Set Global Variable ${Flavour_ID} ${flavour_id} Fetch Information from SOL006 descriptor file Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @@ -1649,13 +1687,76 @@ Fetch Information from SOL006 descriptor file ${provider}= Get Variable Value ${nfv.vnfd[0].provider} ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} ${software_version}= Get Variable Value ${nfv.vnfd[0]['software-version']} - ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} + ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} + ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} + ${instantiation_levels}= Get Length ${nfv.vnfd[0].df['instantiation-level']} + FOR ${key} IN @{nfv.vnfd[0].keys()} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu + Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} + ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext-cpd + Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} + ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int-virtual-link-desc + Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} + ${DF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} df + Run Keyword If ${DF_check} Get Instantiation Levels ${instantiation_levels} + END Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} Set Global Variable ${Product_Name} ${product_name} Set Global Variable ${Software_Version} ${software_version} Set Global Variable ${Descriptor_Version} ${descriptor_version} - +Get VDU IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{VDU_labels}= Create List + ${Storage_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} + Append To List ${Storage_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-storage-desc']} + Get Internal CPs for each VDU ${i} + END + Set Global Variable ${VDU_IDs} ${VDU_labels} + Set Global Variable ${Storage_IDs} ${Storage_labels} + +Get Internal CPs for each VDU + [Arguments] ${vdu} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} + ${internal_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${internal_CPs} ${nfv.vnfd[0].vdu[${vdu}]['int-cpd'][${i}]['id']} + END + Set Global Variable ${internalCP_IDs} ${internal_CPs} + +Get External CP IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{external_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${external_CPs} ${nfv.vnfd[0].ext_cpd[${i}].id} + END + Set Global Variable ${externalCP_IDs} ${external_CPs} + +Get Virtual Link IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${VirtualLink_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} + END + Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} + +Get Instantiation Levels + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{Instantiation_Levels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} + END + Set Global Variable ${InstantiationLevel_IDs} ${Instantiation_Levels} + Match the VNF Package Response Attributes with Descriptors #Checking Response attributes with VNF Descriptors Should Be Equal As Strings ${response['body']['vnfdId']} ${Descriptor_ID} diff --git a/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index 2694612e3..e770a8cd4 100644 --- a/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -90,7 +90,6 @@ topology_template: order: 1 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: management: type: "tosca.nodes.nfv.VduCp" properties: @@ -98,7 +97,6 @@ topology_template: order: 0 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: left: type: "tosca.nodes.nfv.VduCp" properties: @@ -164,4 +162,4 @@ topology_template: terminate: implementation: terminate-example.yaml operate: - implementation: operate-example.yaml + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/environment/variables.txt b/SOL003/VNFPackageManagement-API/environment/variables.txt index ad883bc38..2b806fa76 100644 --- a/SOL003/VNFPackageManagement-API/environment/variables.txt +++ b/SOL003/VNFPackageManagement-API/environment/variables.txt @@ -93,11 +93,26 @@ ${callbackResp} localhost ${descriptorType} SOL001 ${check_descriptors} 1 -${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +#############internal variables used for descriptor parsing################ +${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +${tosca_type_VNF} tosca.nodes.nfv.VNF +${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage +${tosca_type_derived_from_VNF} + +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} ${Descriptor_ID} ${Provider} ${Product_Name} ${Software_Version} ${Descriptor_Version} -${Flavour_ID} +${Flavour_ID} \ No newline at end of file -- GitLab From ef5add676c0980938e19e1fb430a66f336a05903 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Mon, 27 Sep 2021 18:10:07 +0500 Subject: [PATCH 12/18] fixed VNFD parsing in SOL005 APIs --- .../NSLCMOperationKeywords.robot | 27 +++-- .../descriptors/SOL001/VNFD/vnfd_SOL001.yaml | 4 +- .../environment/variables.txt | 5 +- .../VNFPackageManagementKeywords.robot | 109 ++++++++++++++++-- .../descriptors/SOL001/VNFD/vnfd_SOL001.yaml | 4 +- .../environment/variables.txt | 6 +- 6 files changed, 128 insertions(+), 27 deletions(-) diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index 6e4e57885..3a58a5a03 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -269,14 +269,23 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file - Import Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @{VDU_labels}= Create List @{VNF_labels}= Create List @{VirtualLink_labels}= Create List @{CP_labels}= Create List @{Storage_labels}= Create List + + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + FOR ${key} IN @{topology_template.node_templates.keys()} - ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${key_type}= Get Variable Value ${topology_template.node_templates['${key}'].type} ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} @@ -297,13 +306,13 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 [Arguments] ${VNF_label} - Import Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} - ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} - ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} - ${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version} - ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version} - ${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id} + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + ${descriptor_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.flavour_id} Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} diff --git a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index 2694612e3..e770a8cd4 100644 --- a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -90,7 +90,6 @@ topology_template: order: 1 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: management: type: "tosca.nodes.nfv.VduCp" properties: @@ -98,7 +97,6 @@ topology_template: order: 0 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: left: type: "tosca.nodes.nfv.VduCp" properties: @@ -164,4 +162,4 @@ topology_template: terminate: implementation: terminate-example.yaml operate: - implementation: operate-example.yaml + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/environment/variables.txt b/SOL005/NSLifecycleManagement-API/environment/variables.txt index 0971b545c..620035975 100644 --- a/SOL005/NSLifecycleManagement-API/environment/variables.txt +++ b/SOL005/NSLifecycleManagement-API/environment/variables.txt @@ -82,11 +82,13 @@ ${callbackResp} 127.0.0.1 ${check_descriptors} 1 ${descriptorType} SOL006 +#############internal variables used for descriptor parsing################ ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute -${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_VNF} tosca.nodes.nfv.VNF ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage +${tosca_type_derived_from_VNF} ${tosca_type_NS} tosca.nodes.nfv.NS ${tosca_type_NsVirtualLink} tosca.nodes.nfv.NsVirtualLink @@ -111,7 +113,6 @@ ${NS_Name} ${NS_Version} ${NS_InvariantId} - ${Descriptor_ID} ${Provider} ${Product_Name} diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index d53c817a4..9b26d0d34 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -197,11 +197,45 @@ PARSE the Descriptor File Fetch Information from SOL001 descriptor file Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} - ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} - ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} - ${software_version}= Get Variable Value ${topology_template.node_templates.properties.software_version} - ${descriptor_version}= Get Variable Value ${topology_template.node_templates.properties.descriptor_version} + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + FOR ${key} IN @{topology_template.node_templates.keys()} + ${key_type}= Get Variable Value ${topology_template.node_templates['${key}'].type} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} + ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} + ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} + ${VDUcp_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_cp} + ${Storage_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_storage} + Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} + Run Keyword If ${VNF_check} Append To List ${VNF_labels} ${key} + Run Keyword If ${VNF_check} Get VNF Attributes from SOL001 ${key} + Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} + Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} + Run Keyword If ${Storage_check} Append To List ${Storage_labels} ${key} + END + Set Global Variable @{VDU_IDs} @{VDU_labels} + Set Global Variable @{VNF_IDs} @{VNF_labels} + Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} + Set Global Variable @{CP_IDs} @{CP_labels} + Set Global Variable @{Storage_IDs} @{Storage_labels} + +Get VNF Attributes from SOL001 + [Arguments] ${VNF_label} + ${descriptor_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_version} Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} @@ -213,14 +247,73 @@ Fetch Information from SOL006 descriptor file Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} ${provider}= Get Variable Value ${nfv.vnfd[0].provider} - ${product_name}= Get Variable Value ${nfv.vnfd[0].product-name} - ${software_version}= Get Variable Value ${nfv.vnfd[0].software-version} - ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} + ${software_version}= Get Variable Value ${nfv.vnfd[0]['software-version']} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} + ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} + ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} + ${instantiation_levels}= Get Length ${nfv.vnfd[0].df['instantiation-level']} + FOR ${key} IN @{nfv.vnfd[0].keys()} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu + Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} + ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext-cpd + Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} + ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int-virtual-link-desc + Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} + ${DF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} df + Run Keyword If ${DF_check} Get Instantiation Levels ${instantiation_levels} + END Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} Set Global Variable ${Product_Name} ${product_name} Set Global Variable ${Software_Version} ${software_version} Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Get VDU IDs + [Arguments] ${count} + @{VDU_labels}= Create List + ${Storage_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} + Append To List ${Storage_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-storage-desc']} + Get Internal CPs for each VDU ${i} + END + Set Global Variable ${VDU_IDs} ${VDU_labels} + Set Global Variable ${Storage_IDs} ${Storage_labels} + +Get Internal CPs for each VDU + [Arguments] ${vdu} + ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} + ${internal_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${internal_CPs} ${nfv.vnfd[0].vdu[${vdu}]['int-cpd'][${i}]['id']} + END + Set Global Variable ${internalCP_IDs} ${internal_CPs} + +Get External CP IDs + [Arguments] ${count} + @{external_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${external_CPs} ${nfv.vnfd[0]['ext-cpd'][${i}]['id']} + END + Set Global Variable ${externalCP_IDs} ${external_CPs} + +Get Virtual Link IDs + [Arguments] ${count} + ${VirtualLink_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} + END + Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} + +Get Instantiation Levels + [Arguments] ${count} + @{Instantiation_Levels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} + END + Set Global Variable ${InstantiationLevel_IDs} ${Instantiation_Levels} Match the Response Attributes of vnfPkgInfo with Descriptors #Checking Response attributes with VNF Descriptors diff --git a/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index 2694612e3..e770a8cd4 100644 --- a/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -90,7 +90,6 @@ topology_template: order: 1 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: management: type: "tosca.nodes.nfv.VduCp" properties: @@ -98,7 +97,6 @@ topology_template: order: 0 requirements: - virtual_binding: VDU-B - vdu-b-1-vsd: left: type: "tosca.nodes.nfv.VduCp" properties: @@ -164,4 +162,4 @@ topology_template: terminate: implementation: terminate-example.yaml operate: - implementation: operate-example.yaml + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/environment/variables.txt b/SOL005/VNFPackageManagement-API/environment/variables.txt index a88c75a86..c46555272 100644 --- a/SOL005/VNFPackageManagement-API/environment/variables.txt +++ b/SOL005/VNFPackageManagement-API/environment/variables.txt @@ -93,12 +93,14 @@ ${callbackResp} 127.0.0.1 ${check_descriptors} 1 ${descriptorType} SOL006 +#############internal variables used for descriptor parsing################ ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute -${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_VNF} tosca.nodes.nfv.VNF ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage - +${tosca_type_derived_from_VNF} + ${VDU_IDs} ${VNF_IDs} ${virtualLink_IDs} -- GitLab From 31e5e98fe11b260c52c8b001e7a8e95bfa9d593a Mon Sep 17 00:00:00 2001 From: muhammadh Date: Mon, 27 Sep 2021 18:42:53 +0500 Subject: [PATCH 13/18] minor fix in VNFD parsing for SOL003 APIs --- .../VnfLcmMntOperationKeywords.robot | 4 ++-- .../VNFLifecycleOperationGrantingKeywords.robot | 4 ++-- .../VNFPackageManagementKeywords.robot | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index 7a59afaa4..9f66a051a 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -1530,7 +1530,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @{VDU_labels}= Create List @{VNF_labels}= Create List @{VirtualLink_labels}= Create List @@ -1566,7 +1566,7 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 [Arguments] ${VNF_label} - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml ${descriptor_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_id} ${provider}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.provider} ${product_name}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.product_name} diff --git a/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot b/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot index bcc612f9f..fc02bff6a 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot @@ -173,7 +173,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @{VDU_labels}= Create List @{VNF_labels}= Create List @{VirtualLink_labels}= Create List @@ -208,7 +208,7 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 [Arguments] ${VNF_label} - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml ${descriptor_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_id} ${provider}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.provider} ${product_name}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.product_name} diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index e5498fa48..573d2e405 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -1631,7 +1631,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @{VDU_labels}= Create List @{VNF_labels}= Create List @{VirtualLink_labels}= Create List @@ -1666,7 +1666,7 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 [Arguments] ${VNF_label} - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml ${descriptor_id}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.descriptor_id} ${provider}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.provider} ${product_name}= Get Variable Value ${topology_template.node_templates['${VNF_label}'].properties.product_name} -- GitLab From e633f141433a7e87f3bb9f186a66a2ef30aefb04 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Mon, 27 Sep 2021 18:48:31 +0500 Subject: [PATCH 14/18] added some missing internal variables to be removed from TAP GUI --- internal_variables.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal_variables.txt b/internal_variables.txt index ed9c49b02..85791f1cd 100644 --- a/internal_variables.txt +++ b/internal_variables.txt @@ -326,6 +326,14 @@ ${NS_InvariantId} #${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp #${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage +${tosca_type_NS} tosca.nodes.nfv.NS +${tosca_type_NsVirtualLink} tosca.nodes.nfv.NsVirtualLink +${tosca_type_NsCP} tosca.nodes.nfv.Cp + +${NS_VirtualLink_IDs} +${NsCP_IDs} +${SAP_IDs} + #${VDU_IDs} #${VNF_IDs} #${virtualLink_IDs} -- GitLab From ca8975bbee0d0fb8c5cbbdee8d09ac24670d00a6 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Tue, 28 Sep 2021 14:55:59 +0500 Subject: [PATCH 15/18] updated version in SOL002 VNF-LCM-API descriptors --- .../descriptors/SOL001/VNFD/vnfd_SOL001.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index fa3d11e58..a5b1cab4e 100644 --- a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -2,7 +2,7 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" imports: - - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.8.1/etsi_nfv_sol001_vnfd_types.yaml metadata: descriptor_id: "VNF-B" -- GitLab From fe1f0f44387ecdcb71eb0db79c66305f24eeb70e Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Tue, 28 Sep 2021 15:35:57 +0200 Subject: [PATCH 16/18] Fix issue #193 --- SOL002/VNFFaultManagement-API/Subscriptions.robot | 2 +- SOL002/VNFIndicator-API/Subscriptions.robot | 4 ++-- .../VnfLcmOperationKeywords.robot | 4 ++-- .../VNFPerformanceManagementKeywords.robot | 4 ++-- .../VNFFaultManagement-API/FaultManagement-APIKeyword.robot | 6 +++--- SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot | 4 ++-- .../VnfLcmMntOperationKeywords.robot | 4 ++-- .../VNFPackageManagementKeywords.robot | 4 ++-- .../VRQANOperationKeywords.robot | 4 ++-- SOL005/NSDManagement-API/NSDManagementKeywords.robot | 4 ++-- .../NSLifecycleManagement-API/NSLCMOperationKeywords.robot | 6 +++--- .../VNFPackageManagementKeywords.robot | 4 ++-- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index 8ede0ce56..31d39d6d2 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -317,7 +317,7 @@ Post Create subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index 2ad0cfb67..ae668a49e 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -338,7 +338,7 @@ Post Create subscription - DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -358,7 +358,7 @@ Post Create subscription - NO-DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 284b86aaa..0b516cb3d 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -856,7 +856,7 @@ Post Create subscription - DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -874,7 +874,7 @@ Post Create subscription - NO-DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index f986bff12..8651f5c8e 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -106,7 +106,7 @@ Send Post Request for VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} allow_redirects=false ${output}= Output response Set Suite Variable ${response} ${output} Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 @@ -137,7 +137,7 @@ Send Post Request for Duplicated VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} allow_redirects=false ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 303 diff --git a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot index f57e2d0a7..f0cef11fb 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -273,7 +273,7 @@ POST Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify the notification endpoint has been tested @@ -293,7 +293,7 @@ Send POST Request for duplicated subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify the notification endpoint has been tested @@ -313,7 +313,7 @@ Send POST Request for duplicated subscription not permitted &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify the notification endpoint has been tested diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index 5163cc9af..99b6b765b 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -106,7 +106,7 @@ Send Post Request for VNF Indicator Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Log Verify the notification endpoint has been tested @@ -129,7 +129,7 @@ Send Post Request for Duplicated VNF indicator Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Log Verify the notification endpoint has been tested diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index 9f66a051a..ea72c4633 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -1289,7 +1289,7 @@ Post Create subscription - DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify notification endpoint is tested @@ -1311,7 +1311,7 @@ Post Create subscription - NO-DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify notification endpoint is tested diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 573d2e405..488768dd4 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -418,7 +418,7 @@ Send Post Request for VNF Package Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Log Verify that the notification endpoint has been tested @@ -439,7 +439,7 @@ Send Post Request for Duplicated VNF Package Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Log Verify that the notification endpoint has been tested diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot index 27d3cca02..bcfc85abb 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot @@ -123,7 +123,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify that the notification endpoint has been tested @@ -143,7 +143,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify that the notification endpoint has been tested diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index 3a5dcd2d8..7bfbfb230 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -801,7 +801,7 @@ Send Post Request for NSD Management Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -822,7 +822,7 @@ Send POST Request for Duplicated NSD Management Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index 3a58a5a03..7b3dea2b3 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -1150,7 +1150,7 @@ POST subscriptions &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify that NFVO tested the notification endpoint @@ -1171,7 +1171,7 @@ POST subscriptions DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify that NFVO tested the notification endpoint @@ -1192,7 +1192,7 @@ POST subscriptions NO DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Log Verify that NFVO tested the notification endpoint diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 9b26d0d34..fb5336488 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -903,7 +903,7 @@ Send Post Request for VNF Package Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -922,7 +922,7 @@ Send Post Request for Duplicated VNF Package Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} -- GitLab From 99865b67a40aad5ffcd5eac02959406235fe160b Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Fri, 1 Oct 2021 12:16:03 +0200 Subject: [PATCH 17/18] fixed issue #194 in 2.8.1-fix-plu --- .../IndividualVNFInstance.robot | 4 ++-- .../VnfLcmMntOperationKeywords.robot | 23 +++++++++++++++++++ .../environment/variables.txt | 1 + 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index 2888ac54f..5d936ae91 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -82,9 +82,9 @@ PATCH Individual VNFInstance Conflict ... Pre-conditions: another LCM operation is ongoing ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.8.1 ... Config ID: Config_prod_VNFM - ... Applicability: none + ... Applicability: ... Post-Conditions: VNFInstance not modified - PATCH individual vnfInstance + PATCH individual vnfInstance with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index ea72c4633..0bbb405b1 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -571,6 +571,29 @@ PATCH individual vnfInstance ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +POST conflicting operation + Log Trying to create conflicting operation. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/terminateVnfRequest.json + ${body}= Format String ${template} terminationType=${terminationType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${anotherInstantiatedVnfInstanceId}/terminate ${body} + +PATCH individual vnfInstance with conflict + POST conflicting operation + log Trying to modify an individual VNF instance with conflict + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/patchBodyRequest.json + ${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfdVersion= ${Descriptor_Version} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${anotherInstantiatedVnfInstanceId} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + + PATCH individual vnfInstance - Etag mismatch log Trying to modify an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} diff --git a/SOL003/VNFLifecycleManagement-API/environment/variables.txt b/SOL003/VNFLifecycleManagement-API/environment/variables.txt index 505557384..6c64aa34b 100644 --- a/SOL003/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL003/VNFLifecycleManagement-API/environment/variables.txt @@ -32,6 +32,7 @@ ${WRONG_ACCEPT} application/json ${SYNC_MODE} 0 ${instantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${anotherInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${notExistingVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -- GitLab From dde654fdd1d597889cf519f83432b3001143cca1 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Tue, 5 Oct 2021 11:34:27 +0200 Subject: [PATCH 18/18] Update .jenkins.sh: Adding missing parameter to run-container script --- .jenkins.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.jenkins.sh b/.jenkins.sh index 8bfd08f3e..3fb76157c 100644 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -18,7 +18,7 @@ if [ "$ret" != "0" ]; then exit -1 fi -bash ./scripts/run-container.sh "${run_dir}" +bash ./scripts/run-container.sh "${run_dir}" "$GIT_BRANCH" ret=$? if [ "$ret" != "0" ]; then echo "run-container.sh failed" -- GitLab