From 71788593472711463c77dcd157575dc786fa59de Mon Sep 17 00:00:00 2001 From: zafar Date: Tue, 5 Jan 2021 20:25:07 +0500 Subject: [PATCH] SOL006 descriptors updated --- .../NSLCMOperationKeywords.robot | 14 ++++++++++---- .../NotificationConsumer.robot | 2 +- .../NsLcmOperationOccurrenceNotification.json | 4 +++- .../VNFPackageManagementKeywords.robot | 4 +--- .../jsons/subscriptions.json | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index 0472e3a8..c7d01465 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -8,7 +8,7 @@ Library OperatingSystem Library MockServerLibrary Library Collections Library String -Variables descriptors/SOL001/vnf-b-1_VNF.yaml +Variables descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml *** Keywords *** @@ -255,8 +255,10 @@ Parse SOL006 ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} ${external_cp}= Get Variable Value ${nfv.vnfd[0].ext-cpd[0].id} ${vdu_id}= Get Variable Value ${nfv.vnfd[0].vdu[0].id} - ${virtual_storage}= Get Variable Value ${nfv.vnfd[0].vdu[0].virtual-storage-desc} - + ${vdu_cpid}= Get Variable Value ${nfv.vnfd[0].vdu[0].int-cpd[2].id} + ${virtual_storage}= Get Variable Value ${nfv.vnfd[0].virtual-storage-desc.id} + ${virtual_link}= Get Variable Value ${nfv.vnfd[0].int-virtual-link-desc.id} + Should Be Equal As Strings ${response['body']['vnfInstance']['vnfdId']} ${descriptor_id} Should Be Equal As Strings ${response['body']['vnfInstance']['vnfProvider']} ${provider} Should Be Equal As Strings ${response['body']['vnfInstance']['vnfProductName']} ${product_name} @@ -264,7 +266,10 @@ Parse SOL006 Should Be Equal As Strings ${response['body']['vnfInstance']['vnfdVersion']} ${descriptor_version} Should Be Equal As Strings ${response['body']['vnfInstance']['instantiatedVnfInfo']['extCpInfo']['cpdId']} ${external_cp} Should Be Equal As Strings ${response['body']['vnfInstance']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} ${vdu_id} + Should Be Equal As Strings ${response['body']['vnfInstance']['instantiatedVnfInfo']['extCpInfo']['cpdId']} ${vdu_cpid} Should Be Equal As Strings ${response['body']['vnfInstance']['instantiatedVnfInfo']['virtualStorageResourceInfo']['virtualStorageDescId']} ${virtual_storage} + Should Be Equal As Strings ${response['body']['vnfInstance']['instantiatedVnfInfo']['extManagedVirtualLinkInfo']['vnfVirtualLinkDescId']} ${virtual_link} + Get key for VNF Descriptor FOR ${key} IN @{topology_template.node_templates.keys()} @@ -583,7 +588,8 @@ Parse SOL006 NS Instance ${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} + ${virtualLink_id}= Get Variable Value ${nfv.vnfd[0].int-virtual-link-desc.id} ${instantiationLevel_id}= Get Variable Value ${nfv.vnfd[0].df[0].instantiation-level[0].id} DELETE Heal NSInstance diff --git a/SOL005/NSLifecycleManagement-API/NotificationConsumer.robot b/SOL005/NSLifecycleManagement-API/NotificationConsumer.robot index 2ad41997..546b1086 100644 --- a/SOL005/NSLifecycleManagement-API/NotificationConsumer.robot +++ b/SOL005/NSLifecycleManagement-API/NotificationConsumer.robot @@ -68,7 +68,7 @@ Post Ns Lcm Operation Occurrence Notification Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Notification ${template} = Get File jsons/NsLcmOperationOccurrenceNotification.json - ${body}= Format String ${template} nsInstanceId=${nsInstanceId} nsLcmOpOccId=${nsLcmOpOccId} subscriptionId=${subscriptionId} affectedVnf=${descriptor_id} + ${body}= Format String ${template} nsInstanceId=${nsInstanceId} nsLcmOpOccId=${nsLcmOpOccId} subscriptionId=${subscriptionId} vnfdId=${descriptor_id} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json b/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json index 414dc2d1..9a4e3cfb 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json +++ b/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json @@ -9,6 +9,8 @@ "notificationStatus":"START", "operationState":"PROCESSING", "isAutomaticInvocation":"True", - "affectedVnf": "{affectedVnf}", + "affectedVnf": {{ + "vnfdId": "{vnfdId}" + }}, "_links":"" }} diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index c886c044..b1c600a4 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -8,7 +8,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_veri Library Process Library MockServerLibrary Library String -Variables descriptors/SOL001/vnf-b-1_VNF.yaml +Variables descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml *** Keywords *** @@ -222,14 +222,12 @@ Parse SOL001 ${product_name}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.product_name} ${software_version}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.software_version} ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_version} - #${flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id} Should Be Equal As Strings ${response['body']['vnfProvider']} ${provider} Should Be Equal As Strings ${response['body']['vnfProductName']} ${product_name} Should Be Equal As Strings ${response['body']['vnfSoftwareVesion']} ${software_version} Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version} - #Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['flavourId']} ${flavour_id} Parse SOL006 ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} diff --git a/SOL005/VNFPackageManagement-API/jsons/subscriptions.json b/SOL005/VNFPackageManagement-API/jsons/subscriptions.json index 0edaec10..e4db0e2b 100644 --- a/SOL005/VNFPackageManagement-API/jsons/subscriptions.json +++ b/SOL005/VNFPackageManagement-API/jsons/subscriptions.json @@ -9,7 +9,7 @@ "vnfProductName": {"vnfProductName"}, "versions": {{ "vnfSoftwareVersion": {"vnfSoftwareVersion"}, - "vnfdVersions": [{"vnfdVersions"}] + "vnfdVersions": [{"vnfdVersion"}] }} }} }} -- GitLab