Loading SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +39 −15 Original line number Diff line number Diff line Loading @@ -332,10 +332,9 @@ POST Change VNF deployment flavour 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 ${flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Change VNF Flavour ${template}= Get File jsons/changeVnfFlavourRequest.json ${body}= Format String ${template} newFlavourId=${flavour_id} ${body}= Format String ${template} newFlavourId=${newFlavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Loading Loading @@ -372,15 +371,9 @@ 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} ${flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to VNF Instance ${template}= Get File jsons/createVnfRequest.json ${body}= Format String ${template} vnfdId=${descriptor_id} vnfProvider=${provider} vnfProductName=${product_name} vnfSoftwareVersion=${software_version} vnfdVersion= ${descriptor_version} flavourId=${flavour_id} ${body}= Format String ${template} vnfdId=${descriptor_id} vnfProvider=${provider} vnfProductName=${product_name} vnfSoftwareVersion=${software_version} vnfdVersion= ${descriptor_version} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Loading Loading @@ -510,9 +503,7 @@ PATCH individual vnfInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} 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} ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_version} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to VNF Instance ${template}= Get File jsons/patchBodyRequest.json ${body}= Format String ${template} vnfdId=${descriptor_id} vnfdVersion= ${descriptor_version} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body} Loading Loading @@ -1206,6 +1197,9 @@ Check HTTP Response Header Contain Link Should Not Be Empty ${linkURL} Check HTTP Response Body vnfInstance content against VNF Descriptor Run Keyword If ${check_descriptors} == 1 Check Individual VNF Instance Content Check Individual VNF Instance Content Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 ELSE Parse SOL006 Parse SOL001 Loading Loading @@ -1247,6 +1241,9 @@ Get key for VNF Descriptor END Check HTTP Response Body of Individual VNF LCM Operation occurrences content against VNF Descriptor Run Keyword If ${check_descriptors} == 1 Check Individual VNF LCM Operation Occurence Content Check Individual VNF LCM Operation Occurence Content Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 VNF LCM ELSE Parse SOL006 VNF LCM Parse SOL001 Individual VNF LCM Loading @@ -1263,3 +1260,30 @@ Parse SOL006 Individual VNF LCM Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${descriptor_id} Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${descriptor_version} Add VNF Descriptor Content to VNF Instance Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 VNF Instance ELSE Parse SOL006 VNF Instance Parse SOL001 VNF Instance 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} Parse SOL006 VNF Instance ${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} Add VNF Descriptor Content to Change VNF Flavour Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 Change VNF Flavour ELSE Parse SOL006 Change VNF Flavour Parse SOL001 Change VNF Flavour Get key for VNF Descriptor ${newFlavourId}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Parse SOL006 Change VNF Flavour Log flavour id is not present in SOL006 descriptors No newline at end of file SOL003/VNFLifecycleManagement-API/environment/variables.txt +8 −1 Original line number Diff line number Diff line Loading @@ -101,3 +101,10 @@ ${callbackResp} localhost ${descriptorType} SOL001 ${vnfKey} {} ${check_descriptors} 1 ${descriptor_id} ${provider} ${product_name} ${software_version} ${descriptor_version} No newline at end of file SOL003/VNFLifecycleManagement-API/jsons/createVnfRequest.json +1 −6 Original line number Diff line number Diff line Loading @@ -5,10 +5,5 @@ "vnfProvider":"{vnfProvider}", "vnfProductName":"{vnfProductName}", "vnfSoftwareVersion":"{vnfSoftwareVersion}", "vnfdVersion":"{vnfdVersion}", "instantiatedVnfInfo":{{ "flavourId":"{flavourId}", "vnfState":"STARTED" }} "metadata":{{}} "vnfdVersion":"{vnfdVersion}" }} No newline at end of file SOL003/VNFLifecycleOperationGranting-API/Grants.robot +15 −9 Original line number Diff line number Diff line Loading @@ -115,10 +115,9 @@ Send Request Grant Request in Synchronous mode 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 ${vnf_flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request ${template}= Get File jsons/grantRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${vnf_flavour_id} ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Loading @@ -129,10 +128,9 @@ Send Request Grant Request in Asynchronous mode 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 ${vnf_flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request ${template}= Get File jsons/grantRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${vnf_flavour_id} ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Loading @@ -143,10 +141,9 @@ Send Request for a new Grant Forbiden Operation 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 ${vnf_flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request ${template}= Get File jsons/grantRejectedRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${vnf_flavour_id} ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Loading Loading @@ -211,4 +208,13 @@ Delete Grants ${body}= Output response Set Suite Variable ${response} ${body} Add VNF Descriptor Content to Grant Request Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 Grant Request ELSE Parse SOL006 Grant Request Parse SOL001 Grant Request Get key for VNF Descriptor ${flavourId}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Parse SOL006 Grant Request Log flavour id is not present in SOL006 descriptors SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/vnf-b-1_VNF.yaml 0 → 100644 +168 −0 Original line number Diff line number Diff line tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" topology_template: substitution_mappings: node_type: "tosca.nodes.nfv.VNF" requirements: virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] virtual_link_right: [right, virtual_link_right] node_templates: VDU-B-1: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" descriptor: "Description of VDU-B-1" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 2 capabilities: virtual_compute: properties: virtual_memory: virtual_mem_size: 4096 numa_enabled: false virtual_cpu: num_virtual_cpu: 2 requirements: virtual_storage: - "vdu-b-1-vsd" VDU-B-2: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-2-vcd" descriptor: "Description of VDU-B-2" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 4 capabilities: virtual_compute: properties: virtual_memory: virtual_mem_size: 6144 numa_enabled: false virtual_cpu: num_virtual_cpu: 2 requirements: virtual_storage: - "vdu-b-2-vsd" right: type: "tosca.nodes.nfv.VduCp" properties: order: 1 requirements: virtual_link_right: virtual_binding: VDU-B-2 management: type: "tosca.nodes.nfv.VduCp" properties: order: 0 requirements: virtual_link_management: virtual_binding: VDU-B-1 left: type: "tosca.nodes.nfv.VduCp" properties: order: 2 requirements: virtual_link_left: virtual_binding: VDU-B-1 internal_vl: type: tosca.nodes.nfv.VnfVirtualLink properties: connectivity_type: layer_protocols: [ ipv4 ] description: Internal Virtual link in the VNF vl_profile: max_bitrate_requirements: root: 100000 leaf: 20000 min_bitrate_requirements: root: 10000 leaf: 10000 internal_vdu_b_1_cp: type: tosca.nodes.nfv.VduCp properties: order: 2 requirements: - virtual_binding: VDU-B-1 - virtual_link: internal_vl internal_vdu_b_2_cp: type: tosca.nodes.nfv.VduCp properties: order: 0 requirements: - virtual_binding: VDU-B-2 - virtual_link: internal_vl vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: size_of_storage: 20 rdma_enabled: false sw_image_data: name: "vdu-b-1 image" version: "1.1" checksum: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" disk-format: qcow2 min-disk: '1' min-ram: '2' size: '1' artifacts: sw_image: type: tosca.artifacts.nfv.SwImage file: vdu-b-1.qcow2 vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: size_of_storage: 20 rdma_enabled: false sw_image_data: name: "vdu-b-1 image" version: "1.1" checksum: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" disk-format: qcow2 min-disk: '1' min-ram: '2' size: '1' artifacts: sw_image: type: tosca.artifacts.nfv.SwImage file: vdu-b-2.qcow2 vnf_b_1_VNF: type: "tosca.nodes.nfv.VNF" properties: descriptor_id: "VNF-B-2VDUs" descriptor_version: "2.0" provider: "ETSI TST WG" product_name: "VNF-B-2VDUs" software_version: "2.0" product_info_name: "VNF-B-2VDUs" product_info_description: "TST010 reference VNF-B with 2 VDUs" flavour_id: "VNF-B-2VDU_flavor" flavour_description: "VNF-B with 2 VDUs flavor" vnfm_info: etsivnfm: - v2.3.1 interfaces: Vnflcm: scale: implementation: scale-example.yaml terminate: implementation: terminate-example.yaml operate: implementation: operate-example.yaml Loading
SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +39 −15 Original line number Diff line number Diff line Loading @@ -332,10 +332,9 @@ POST Change VNF deployment flavour 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 ${flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Change VNF Flavour ${template}= Get File jsons/changeVnfFlavourRequest.json ${body}= Format String ${template} newFlavourId=${flavour_id} ${body}= Format String ${template} newFlavourId=${newFlavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Loading Loading @@ -372,15 +371,9 @@ 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} ${flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to VNF Instance ${template}= Get File jsons/createVnfRequest.json ${body}= Format String ${template} vnfdId=${descriptor_id} vnfProvider=${provider} vnfProductName=${product_name} vnfSoftwareVersion=${software_version} vnfdVersion= ${descriptor_version} flavourId=${flavour_id} ${body}= Format String ${template} vnfdId=${descriptor_id} vnfProvider=${provider} vnfProductName=${product_name} vnfSoftwareVersion=${software_version} vnfdVersion= ${descriptor_version} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Loading Loading @@ -510,9 +503,7 @@ PATCH individual vnfInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} 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} ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.descriptor_version} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to VNF Instance ${template}= Get File jsons/patchBodyRequest.json ${body}= Format String ${template} vnfdId=${descriptor_id} vnfdVersion= ${descriptor_version} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body} Loading Loading @@ -1206,6 +1197,9 @@ Check HTTP Response Header Contain Link Should Not Be Empty ${linkURL} Check HTTP Response Body vnfInstance content against VNF Descriptor Run Keyword If ${check_descriptors} == 1 Check Individual VNF Instance Content Check Individual VNF Instance Content Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 ELSE Parse SOL006 Parse SOL001 Loading Loading @@ -1247,6 +1241,9 @@ Get key for VNF Descriptor END Check HTTP Response Body of Individual VNF LCM Operation occurrences content against VNF Descriptor Run Keyword If ${check_descriptors} == 1 Check Individual VNF LCM Operation Occurence Content Check Individual VNF LCM Operation Occurence Content Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 VNF LCM ELSE Parse SOL006 VNF LCM Parse SOL001 Individual VNF LCM Loading @@ -1263,3 +1260,30 @@ Parse SOL006 Individual VNF LCM Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${descriptor_id} Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${descriptor_version} Add VNF Descriptor Content to VNF Instance Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 VNF Instance ELSE Parse SOL006 VNF Instance Parse SOL001 VNF Instance 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} Parse SOL006 VNF Instance ${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} Add VNF Descriptor Content to Change VNF Flavour Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 Change VNF Flavour ELSE Parse SOL006 Change VNF Flavour Parse SOL001 Change VNF Flavour Get key for VNF Descriptor ${newFlavourId}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Parse SOL006 Change VNF Flavour Log flavour id is not present in SOL006 descriptors No newline at end of file
SOL003/VNFLifecycleManagement-API/environment/variables.txt +8 −1 Original line number Diff line number Diff line Loading @@ -101,3 +101,10 @@ ${callbackResp} localhost ${descriptorType} SOL001 ${vnfKey} {} ${check_descriptors} 1 ${descriptor_id} ${provider} ${product_name} ${software_version} ${descriptor_version} No newline at end of file
SOL003/VNFLifecycleManagement-API/jsons/createVnfRequest.json +1 −6 Original line number Diff line number Diff line Loading @@ -5,10 +5,5 @@ "vnfProvider":"{vnfProvider}", "vnfProductName":"{vnfProductName}", "vnfSoftwareVersion":"{vnfSoftwareVersion}", "vnfdVersion":"{vnfdVersion}", "instantiatedVnfInfo":{{ "flavourId":"{flavourId}", "vnfState":"STARTED" }} "metadata":{{}} "vnfdVersion":"{vnfdVersion}" }} No newline at end of file
SOL003/VNFLifecycleOperationGranting-API/Grants.robot +15 −9 Original line number Diff line number Diff line Loading @@ -115,10 +115,9 @@ Send Request Grant Request in Synchronous mode 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 ${vnf_flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request ${template}= Get File jsons/grantRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${vnf_flavour_id} ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Loading @@ -129,10 +128,9 @@ Send Request Grant Request in Asynchronous mode 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 ${vnf_flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request ${template}= Get File jsons/grantRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${vnf_flavour_id} ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Loading @@ -143,10 +141,9 @@ Send Request for a new Grant Forbiden Operation 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 ${vnf_flavour_id}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request ${template}= Get File jsons/grantRejectedRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${vnf_flavour_id} ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Loading Loading @@ -211,4 +208,13 @@ Delete Grants ${body}= Output response Set Suite Variable ${response} ${body} Add VNF Descriptor Content to Grant Request Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 Grant Request ELSE Parse SOL006 Grant Request Parse SOL001 Grant Request Get key for VNF Descriptor ${flavourId}= Get Variable Value ${topology_template.node_templates.${vnfKey}.properties.flavour_id} Parse SOL006 Grant Request Log flavour id is not present in SOL006 descriptors
SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/vnf-b-1_VNF.yaml 0 → 100644 +168 −0 Original line number Diff line number Diff line tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" topology_template: substitution_mappings: node_type: "tosca.nodes.nfv.VNF" requirements: virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] virtual_link_right: [right, virtual_link_right] node_templates: VDU-B-1: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" descriptor: "Description of VDU-B-1" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 2 capabilities: virtual_compute: properties: virtual_memory: virtual_mem_size: 4096 numa_enabled: false virtual_cpu: num_virtual_cpu: 2 requirements: virtual_storage: - "vdu-b-1-vsd" VDU-B-2: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-2-vcd" descriptor: "Description of VDU-B-2" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 4 capabilities: virtual_compute: properties: virtual_memory: virtual_mem_size: 6144 numa_enabled: false virtual_cpu: num_virtual_cpu: 2 requirements: virtual_storage: - "vdu-b-2-vsd" right: type: "tosca.nodes.nfv.VduCp" properties: order: 1 requirements: virtual_link_right: virtual_binding: VDU-B-2 management: type: "tosca.nodes.nfv.VduCp" properties: order: 0 requirements: virtual_link_management: virtual_binding: VDU-B-1 left: type: "tosca.nodes.nfv.VduCp" properties: order: 2 requirements: virtual_link_left: virtual_binding: VDU-B-1 internal_vl: type: tosca.nodes.nfv.VnfVirtualLink properties: connectivity_type: layer_protocols: [ ipv4 ] description: Internal Virtual link in the VNF vl_profile: max_bitrate_requirements: root: 100000 leaf: 20000 min_bitrate_requirements: root: 10000 leaf: 10000 internal_vdu_b_1_cp: type: tosca.nodes.nfv.VduCp properties: order: 2 requirements: - virtual_binding: VDU-B-1 - virtual_link: internal_vl internal_vdu_b_2_cp: type: tosca.nodes.nfv.VduCp properties: order: 0 requirements: - virtual_binding: VDU-B-2 - virtual_link: internal_vl vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: size_of_storage: 20 rdma_enabled: false sw_image_data: name: "vdu-b-1 image" version: "1.1" checksum: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" disk-format: qcow2 min-disk: '1' min-ram: '2' size: '1' artifacts: sw_image: type: tosca.artifacts.nfv.SwImage file: vdu-b-1.qcow2 vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: size_of_storage: 20 rdma_enabled: false sw_image_data: name: "vdu-b-1 image" version: "1.1" checksum: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" disk-format: qcow2 min-disk: '1' min-ram: '2' size: '1' artifacts: sw_image: type: tosca.artifacts.nfv.SwImage file: vdu-b-2.qcow2 vnf_b_1_VNF: type: "tosca.nodes.nfv.VNF" properties: descriptor_id: "VNF-B-2VDUs" descriptor_version: "2.0" provider: "ETSI TST WG" product_name: "VNF-B-2VDUs" software_version: "2.0" product_info_name: "VNF-B-2VDUs" product_info_description: "TST010 reference VNF-B with 2 VDUs" flavour_id: "VNF-B-2VDU_flavor" flavour_description: "VNF-B with 2 VDUs flavor" vnfm_info: etsivnfm: - v2.3.1 interfaces: Vnflcm: scale: implementation: scale-example.yaml terminate: implementation: terminate-example.yaml operate: implementation: operate-example.yaml