From cf182b247292f815461f15eabe9021253b783746 Mon Sep 17 00:00:00 2001 From: zafar Date: Tue, 26 Jan 2021 15:28:44 +0500 Subject: [PATCH] NS descriptors added & minor correction in response body parsing --- .../IndividualNSInstance.robot | 1 + .../NSLCMOperationKeywords.robot | 36 +++++++++++-------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot index 7ac92c14..7fdf881d 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot @@ -32,6 +32,7 @@ GET Information about an individual NS Instance GET IndividualNSInstance Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstance + Check HTTP Response Body NsInstance content against NS Descriptor Check HTTP Response Body NsInstance content against VNF Descriptor PUT Individual NSInstance - Method not implemented diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index ee1d3074..07adcda2 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -351,18 +351,18 @@ Get Instantiation Levels Match the Response Attributes with Descriptors #Checking Response attributes with VNF Descriptors - 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} - Should Be Equal As Strings ${response['body']['vnfInstance']['vnfSoftwareVersion']} ${Software_Version} - Should Be Equal As Strings ${response['body']['vnfInstance']['vnfdVersion']} ${Descriptor_Version} - Should Be Equal As Strings ${response['body']['vnfInstance']['instantiatedVnfInfo']['flavourId']} ${Flavour_ID} - List Should Contain Value ${VDU_IDs} ${response['body']['vnfInstance']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} - Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['vnfInstance']['instantiatedVnfInfo']['extCpInfo']['cpdId']} - Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${internalCP_IDs} ${response['body']['vnfInstance']['instantiatedVnfInfo']['extCpInfo']['cpdId']} - Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value ${CP_IDs} ${response['body']['vnfInstance']['instantiatedVnfInfo']['extCpInfo']['cpdId']} - List Should Contain value ${Storage_IDs} ${response['body']['vnfInstance']['instantiatedVnfInfo']['virtualStorageResourceInfo']['virtualStorageDescId']} - List Should Contain Value ${VirtualLink_IDs} ${response['body']['vnfInstance']['instantiatedVnfInfo']['extManagedVirtualLinkInfo']['vnfVirtualLinkDescId']} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfProvider']} ${Provider} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfProductName']} ${Product_Name} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfSoftwareVersion']} ${Software_Version} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfdVersion']} ${Descriptor_Version} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['flavourId']} ${Flavour_ID} + List Should Contain Value ${VDU_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${internalCP_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value ${CP_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + List Should Contain value ${Storage_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['virtualStorageResourceInfo'][0]['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['extManagedVirtualLinkInfo'][0]['vnfVirtualLinkDescId']} POST New nsInstance with DISABLED nsd Log Create NS instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances @@ -1361,5 +1361,13 @@ Check Individual NsInstance Content for NSD Match the Response Attributes with NS Descriptors Should Be Equal As Strings ${response['body']['nsdId']} ${NSDescriptor_ID} - List Should Contain Value ${NS_VirtualLink_IDs} ${response['body']['virtualLinkInfo']['nsVirtualLinkDescId']} - Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${SAP_IDs} ${response['body']['sapInfo']['sapdId']} + List Should Contain Value ${NS_VirtualLink_IDs} ${response['body']['virtualLinkInfo'][0]['nsVirtualLinkDescId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${SAP_IDs} ${response['body']['sapInfo'][0]['sapdId']} + +Check NsLcmOpOcc content against NS Descriptor + PARSE the NS Descriptor File + Match the NsLcmOpOcc Response Attributes with NS Descriptors + +Match the NsLcmOpOcc Response Attributes with NS Descriptors + Should Be Equal As Strings ${response['body']['affectedNss'][0]['nsdId']} ${NSDescriptor_ID} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${SAP_IDs} ${response['body']['affectedSaps'][0]['sapdId']} -- GitLab