Skip to content
Snippets Groups Projects
Commit 67acbdbf authored by zafar's avatar zafar
Browse files

SOL006 descriptors added for Test ID: 5.3.2.2.2

parent 6d4a5d58
No related branches found
No related tags found
3 merge requests!199Merge "3.3.1 dev" into "release 3" master,!193Merge 2.7.1 dev into Master, for TST010ed271 publication,!146SOL005 - Implementation of additional test steps for checks against NSD and VNFD content in v2.7.1
......@@ -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 VNF Descriptor
PUT Individual NSInstance - Method not implemented
[Documentation] Test ID: 5.3.2.2.3
......
......@@ -8,6 +8,8 @@ Library OperatingSystem
Library MockServerLibrary
Library Collections
Library String
Variables descriptors/SOL001/vnf-b-1_VNF.yaml
*** Keywords ***
Initialize System
......@@ -221,6 +223,56 @@ POST New nsInstance
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Body NsInstance content against VNF Descriptor
#${check_descriptors} flag, 1 to check descriptors
Run Keyword If ${check_descriptors} == 1 Check Individual NsInstance Content
Check Individual NsInstance Content
Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 ELSE Parse SOL006
Parse SOL001
Get key for VNF Descriptor
${descriptor_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_id}
${provider}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.provider}
${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']['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']['vnfSoftwareVesion']} ${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}
Parse SOL006
${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}
${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}
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']['vnfSoftwareVesion']} ${software_version}
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']['virtualStorageResourceInfo']['virtualStorageDescId']} ${virtual_storage}
Get key for VNF Descriptor
FOR ${key} IN @{topology_template.node_templates.keys()}
Log ${key}
${check1}= Run Keyword And Return Status Should End With ${key} VNF
Run Keyword If ${check1} Set Global Variable ${vnfKey} ${key}
END
POST New nsInstance with DISABLED nsd
Log Create NS instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances
Set Headers {"Accept":"${ACCEPT}"}
......
......@@ -76,4 +76,15 @@ ${NEG_FILTER} attribute_not_exist=some_value
${NEG_SELECTOR} fields=wrong_field
${json} {"notificationStatus": ""}
${callbackResp} 127.0.0.1
\ No newline at end of file
${callbackResp} 127.0.0.1
${descriptorType} SOL001
${vnfKey} {}
${check_descriptors} 1
${descriptor_id}
${provider}
${product_name}
${software_version}
${descriptor_version}
${flavour_id}
\ No newline at end of file
......@@ -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/vnf-b-1_VNF.yaml
*** Keywords ***
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment