Loading SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +29 −9 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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} Loading Loading @@ -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} Loading @@ -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 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 SOL003/VNFLifecycleManagement-API/jsons/createVnfRequest.json +10 −1 Original line number Diff line number Diff line {{ "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 Loading
SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +29 −9 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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} Loading Loading @@ -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} Loading @@ -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 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
SOL003/VNFLifecycleManagement-API/jsons/createVnfRequest.json +10 −1 Original line number Diff line number Diff line {{ "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