Skip to content
Snippets Groups Projects
Commit 94a29637 authored by uihassan's avatar uihassan
Browse files

descriptors templating for 7.3.1.1.1 added

parent bede9ed1
No related branches found
No related tags found
4 merge requests!199Merge "3.3.1 dev" into "release 3" master,!193Merge 2.7.1 dev into Master, for TST010ed271 publication,!145SOL003 - Implementation of additional test steps for checks against VNFD content in v2.7.1,!1372.7.1 dev sol003 vnf lcm descriptors
This commit is part of merge request !137. Comments created here will be created in the context of that merge request.
......@@ -124,7 +124,16 @@ Send VNF Instance Resource Create Request
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/createVnfRequest.json
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}
${configurable_properties}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.configurable_properties}
${flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id}
${template}= Get File jsons/createVnfRequest.json
${body}= Format String ${template} vnfdId=${descriptor_id} vnfProvider=${provider} vnfProductName=${product_name} vnfSoftwareVersion=${software_version} vnfdVersion= ${descriptor_version} vnfConfigurableProperties=${configurable_properties} flavourId=${flavour_id}
${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body}
Send VNF Instance Resource Delete Request
......@@ -361,8 +370,16 @@ POST Create a new vnfInstance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
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}
${configurable_properties}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.configurable_properties}
${flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id}
${template}= Get File jsons/createVnfRequest.json
${body}= Format String ${template} vnfdId=${vnfdId}
${body}= Format String ${template} vnfdId=${descriptor_id} vnfProvider=${provider} vnfProductName=${product_name} vnfSoftwareVersion=${software_version} vnfdVersion= ${descriptor_version} vnfConfigurableProperties=${configurable_properties} flavourId=${flavour_id}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
......@@ -1186,11 +1203,7 @@ Check HTTP Response Body vnfInstance content against VNF Descriptor
Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 ELSE Parse SOL006
Parse SOL001
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
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}
......@@ -1206,7 +1219,14 @@ Parse SOL001
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']['vnfConfigurableProperties']} ${configurable_properties}
Should Be Equal As Strings ${response['body']['flavourId']} ${flavour_id}
Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['flavourId']} ${flavour_id}
Parse SOL006
Log SOL006 code
\ No newline at end of file
Log SOL006 code
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
\ No newline at end of file
{{
"vnfdId": "{vnfdId}",
"vnfInstanceName": "string",
"vnfInstanceDescription": "string",
"vnfdId": "{vnfdId}",
"vnfProvider":"{vnfProvider}",
"vnfProductName":"{vnfProductName}",
"vnfSoftwareVersion":"{vnfSoftwareVersion}",
"vnfdVersion":"{vnfdVersion}",
"vnfConfigurableProperties":"{vnfConfigurableProperties}",
"instantiatedVnfInfo":{{
"flavourId":"{flavourId}",
"vnfState":"STARTED"
}}
"metadata":{{}}
}}
\ No newline at end of file
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