From 9530726b04444691dfbb8597319204bfe25947f1 Mon Sep 17 00:00:00 2001 From: uihassan Date: Sun, 20 Dec 2020 07:17:00 +0500 Subject: [PATCH 01/15] Descriptors for 6.3.5.1.1 added --- .../VNFInstances.robot | 1 - .../VnfLcmOperationKeywords.robot | 19 +- .../descriptors/SOL001/vnf-b-1_VNF.yaml | 168 ++++++++++++++++++ .../reference_tst010_vnf_b_2df_SOL006.yaml | 105 +++++++++++ .../environment/variables.txt | 5 +- .../jsons/createVnfRequest.json | 14 +- 6 files changed, 305 insertions(+), 7 deletions(-) create mode 100644 SOL002/VNFLifecycleManagement-API/descriptors/SOL001/vnf-b-1_VNF.yaml create mode 100644 SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2df_SOL006.yaml diff --git a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot index 9f2f09c01..e518ec98a 100644 --- a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot @@ -33,7 +33,6 @@ GET information about multiple VNF instances Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances - GET information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters [Documentation] Test ID: 6.3.5.1.3 ... Test title: GET information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 210784c18..dfc2dad13 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -10,6 +10,7 @@ Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ Library String +Variables descriptors/SOL001/vnf-b-1_VNF.yaml *** Keywords *** @@ -79,8 +80,15 @@ POST Create a new vnfInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} 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} ${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} flavourId=${flavour_id} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1015,4 +1023,11 @@ Get VNF LCM Operation occurrences with exclude_fields attribute selector Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link - Should Not Be Empty ${linkURL} \ No newline at end of file + Should Not Be Empty ${linkURL} + +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 diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/vnf-b-1_VNF.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/vnf-b-1_VNF.yaml new file mode 100644 index 000000000..1712e2b33 --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/vnf-b-1_VNF.yaml @@ -0,0 +1,168 @@ +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 diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2df_SOL006.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2df_SOL006.yaml new file mode 100644 index 000000000..4b84be92b --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2df_SOL006.yaml @@ -0,0 +1,105 @@ +nfv: + vnfd: + - id: VNF-B-2df + provider: ETSI TST WG + product-name: TST010 reference VNF-B with 2 DFs + software-version: '2.1' + version: '2.1' + vnfm-info: ETSI VNFM + vdu: + id: vdu-b-1 + name: VNF-B VDU 1 + int-cpd: + - id: left + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: right + layer-protocol: ethernet + virtual-compute-desc: vdu-b-1-vcd + virtual-storage-desc: vdu-b-1-vsd + sw-image-desc: vdu-b-1-image + virtual-compute-desc: + id: vdu-b-1-vcd + virtual-memory: + size: '4.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-1-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-1-image + name: VNF-B image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B.qcow2' + ext-cpd: + - id: ext-b-left + int-cpd: + vdu-id: vdu-b-1 + cpd: left + layer-protocol: ethernet + - id: management + int-cpd: + vdu-id: vdu-b-1 + cpd: management + layer-protocol: ethernet + - id: ext-b-right + int-cpd: + vdu-id: vdu-b-1 + cpd: right + layer-protocol: ethernet + df: + - id: small + vdu-profile: + id: vdu-b-1 + min-number-of-instances: '1' + max-number-of-instances: '2' + instantiation-level: + - id: double + vdu-level: + vdu-id: vdu-b-1 + number-of-instances: '2' + - id: single + vdu-level: + vdu-id: vdu-b-1 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' + - id: big + vdu-profile: + id: vdu-b-1 + min-number-of-instances: '1' + max-number-of-instances: '4' + instantiation-level: + - id: double + vdu-level: + vdu-id: vdu-b-1 + number-of-instances: '2' + - id: triple + vdu-level: + vdu-id: vdu-b-1 + number-of-instances: '3' + default-instantiation-level: double + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index 29e211d27..511ea0e2f 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -77,4 +77,7 @@ ${changeStateTo} STOPPED ${vnfdIds} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${callbackResp} localhost \ No newline at end of file +${callbackResp} localhost + +${descriptorType} SOL001 +${vnfKey} {} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json index 5c9c30a25..6d6066433 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json @@ -1,5 +1,13 @@ {{ - "vnfdId": "${vnfdId}", "vnfInstanceName": "string", - "vnfInstanceDescription": "string" -}} \ No newline at end of file + "vnfInstanceDescription": "string", + "vnfdId": "{vnfdId}", + "vnfProvider":"{vnfProvider}", + "vnfProductName":"{vnfProductName}", + "vnfSoftwareVersion":"{vnfSoftwareVersion}", + "vnfdVersion":"{vnfdVersion}", + "instantiatedVnfInfo":{{ + "flavourId":"{flavourId}", + "vnfState":"STARTED" + }} +}} -- GitLab From d7494b97579416f74957be8007f9fb69d2a865dc Mon Sep 17 00:00:00 2001 From: uihassan Date: Sun, 20 Dec 2020 07:31:10 +0500 Subject: [PATCH 02/15] Descriptors for 6.3.5.2.2 added --- .../IndividualVNFInstance.robot | 1 + .../VnfLcmOperationKeywords.robot | 39 +++++++++++++++++++ .../environment/variables.txt | 3 +- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot index 826228e15..65aba97b4 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -37,6 +37,7 @@ GET Information about an individual VNF Instance GET individual vnfInstance Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstance + Check HTTP Response Body vnfInstance content against VNF Descriptor PUT Individual VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.2.3 diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index dfc2dad13..89da19236 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -1031,3 +1031,42 @@ Get key for VNF Descriptor ${check1}= Run Keyword And Return Status Should End With ${key} VNF Run Keyword If ${check1} Set Global Variable ${vnfKey} ${key} END + +Check HTTP Response Body vnfInstance content against VNF Descriptor + #${check_descriptors} flag, 1 to check descriptors + 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 + 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']['vnfdId']} ${descriptor_id} + Should Be Equal As Strings ${response['body']['vnfProvider']} ${provider} + Should Be Equal As Strings ${response['body']['vnfProductName']} ${product_name} + 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']['instantiatedVnfInfo']['flavourId']} ${flavour_id} + +Parse SOL006 + #Log SOL006 code + ${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} + + Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id} + Should Be Equal As Strings ${response['body']['vnfProvider']} ${provider} + Should Be Equal As Strings ${response['body']['vnfProductName']} ${product_name} + Should Be Equal As Strings ${response['body']['vnfSoftwareVesion']} ${software_version} + Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version} + diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index 511ea0e2f..af7f6a479 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -80,4 +80,5 @@ ${vnfdIds} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${callbackResp} localhost ${descriptorType} SOL001 -${vnfKey} {} \ No newline at end of file +${vnfKey} {} +${check_descriptors} 1 \ No newline at end of file -- GitLab From 5a6e72a1bf3d7262890b19af862c80bfa44679f2 Mon Sep 17 00:00:00 2001 From: uihassan Date: Mon, 21 Dec 2020 07:11:42 +0500 Subject: [PATCH 03/15] Added SOL006 descriptors in 6.3.5.1.1 --- .../VnfLcmOperationKeywords.robot | 28 +++++++++++++------ .../environment/variables.txt | 9 +++++- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 89da19236..421a8d71c 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -80,15 +80,9 @@ POST Create a new vnfInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} 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 Post ${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} @@ -1057,7 +1051,6 @@ Parse SOL001 Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['flavourId']} ${flavour_id} Parse SOL006 - #Log SOL006 code ${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} @@ -1070,3 +1063,20 @@ Parse SOL006 Should Be Equal As Strings ${response['body']['vnfSoftwareVesion']} ${software_version} Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version} +Add VNF Descriptor Content to VNF Instance Post + 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} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index af7f6a479..f0679b13b 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -81,4 +81,11 @@ ${callbackResp} localhost ${descriptorType} SOL001 ${vnfKey} {} -${check_descriptors} 1 \ No newline at end of file +${check_descriptors} 1 + +${descriptor_id} +${provider} +${product_name} +${software_version} +${descriptor_version} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} \ No newline at end of file -- GitLab From eaf4dbc36b721f9a7562541037e6fc2d6e476b08 Mon Sep 17 00:00:00 2001 From: uihassan Date: Mon, 21 Dec 2020 07:21:23 +0500 Subject: [PATCH 04/15] Descriptors for 6.3.5.2.4 added --- .../VnfLcmOperationKeywords.robot | 8 +++++--- .../jsons/createVnfRequest.json | 6 +----- .../jsons/patchBodyRequest.json | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 421a8d71c..4105f3616 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -80,7 +80,7 @@ POST Create a new vnfInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Authorization":"${AUTHORIZATION}"} - Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to VNF Instance Post + 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} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} @@ -204,7 +204,9 @@ PATCH individual vnfInstance Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Set Headers {"If-Match": "${original_etag}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/patchBodyRequest.json + 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} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1063,7 +1065,7 @@ Parse SOL006 Should Be Equal As Strings ${response['body']['vnfSoftwareVesion']} ${software_version} Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version} -Add VNF Descriptor Content to VNF Instance Post +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 diff --git a/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json index 6d6066433..08fe8a182 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json @@ -5,9 +5,5 @@ "vnfProvider":"{vnfProvider}", "vnfProductName":"{vnfProductName}", "vnfSoftwareVersion":"{vnfSoftwareVersion}", - "vnfdVersion":"{vnfdVersion}", - "instantiatedVnfInfo":{{ - "flavourId":"{flavourId}", - "vnfState":"STARTED" - }} + "vnfdVersion":"{vnfdVersion}" }} diff --git a/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json index 0c8845c21..a9f1c9dae 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json @@ -1,4 +1,5 @@ { "vnfInstanceName": "vnf new name", - "vnfInstanceDescription": "new description" + "vnfInstanceDescription": "new description", + "vnfdId": "{vnfdId}" } \ No newline at end of file -- GitLab From 00b70753d9a5b30400d7a85146f81b948e586759 Mon Sep 17 00:00:00 2001 From: uihassan Date: Mon, 21 Dec 2020 07:27:26 +0500 Subject: [PATCH 05/15] Descriptors for 6.3.5.12.2 added --- .../IndividualVnfLcmOperationOccurence.robot | 1 + .../VnfLcmOperationKeywords.robot | 24 ++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 82ecf4c76..25bdd4d68 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -29,6 +29,7 @@ Get status information about multiple VNF instances Get Individual VNF LCM OP occurrences Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOcc + Check HTTP Response Body vnf LCM OpOCC content against VNF Descriptor PUT status information about multiple VNF instances - Method not implemented [Documentation] Test ID: 6.3.5.12.3 diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 4105f3616..f47e49094 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -1081,4 +1081,26 @@ Parse SOL006 VNF Instance ${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} \ No newline at end of file + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + +Check HTTP Response Body vnf LCM OpOCC 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 LCM Op Occ ELSE Parse SOL006 LCM Op Occ + +Parse SOL001 LCM Op Occ + 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} + + Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id} + Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version} + +Parse SOL006 LCM Op Occ + ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + + Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id} + Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version} \ No newline at end of file -- GitLab From 3cd55a9e9a78bcd37d38da9e727938e3c757ff30 Mon Sep 17 00:00:00 2001 From: uihassan Date: Tue, 22 Dec 2020 18:48:34 +0500 Subject: [PATCH 06/15] remove unused template variable --- .../VnfLcmOperationKeywords.robot | 2 +- .../VNFLifecycleManagement-API/jsons/createVnfRequest.json | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index f47e49094..46e2fa7a6 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -82,7 +82,7 @@ POST Create a new vnfInstance Set Headers {"Authorization":"${AUTHORIZATION}"} 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} + ${body}= Format String ${template} vnfdId=${descriptor_id} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json index 08fe8a182..5b1a730e3 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json @@ -1,9 +1,5 @@ {{ "vnfInstanceName": "string", "vnfInstanceDescription": "string", - "vnfdId": "{vnfdId}", - "vnfProvider":"{vnfProvider}", - "vnfProductName":"{vnfProductName}", - "vnfSoftwareVersion":"{vnfSoftwareVersion}", - "vnfdVersion":"{vnfdVersion}" + "vnfdId": "{vnfdId}" }} -- GitLab From 3fb8875a3fa6333588216dd79b4b6f0c866f0c5f Mon Sep 17 00:00:00 2001 From: zafar Date: Tue, 5 Jan 2021 16:16:26 +0500 Subject: [PATCH 07/15] SOL006 descriptors updated --- .../VNFInstances.robot | 1 + .../VnfLcmOperationKeywords.robot | 15 +- ...> reference_tst010_vnf_b_2vdu_SOL001.yaml} | 8 +- .../reference_tst010_vnf_b_2df_SOL006.yaml | 105 ------------- .../reference_tst010_vnf_b_2vdu_SOL006.yaml | 138 ++++++++++++++++++ 5 files changed, 157 insertions(+), 110 deletions(-) rename SOL002/VNFLifecycleManagement-API/descriptors/SOL001/{vnf-b-1_VNF.yaml => reference_tst010_vnf_b_2vdu_SOL001.yaml} (96%) delete mode 100644 SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2df_SOL006.yaml create mode 100644 SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml diff --git a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot index e518ec98a..6c042d821 100644 --- a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot @@ -19,6 +19,7 @@ POST Create a new vnfInstance POST Create a new vnfInstance Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is vnfInstance + Check HTTP Response Body vnfInstance content against VNF Descriptor GET information about multiple VNF instances [Documentation] Test ID: 6.3.5.1.2 diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 46e2fa7a6..9d183ea82 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -76,7 +76,7 @@ Check HTTP Response Header Contains Log Header is present POST Create a new vnfInstance - Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances + Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Authorization":"${AUTHORIZATION}"} @@ -1058,12 +1058,25 @@ Parse SOL006 ${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} + ${vdu_cpid}= Get Variable Value ${nfv.vnfd[0].vdu[0].int-cpd[2].id} + ${virtual_storage}= Get Variable Value ${nfv.vnfd[0].virtual-storage-desc.id} + ${virtual_link}= Get Variable Value ${nfv.vnfd[0].int-virtual-link-desc.id} + Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id} Should Be Equal As Strings ${response['body']['vnfProvider']} ${provider} Should Be Equal As Strings ${response['body']['vnfProductName']} ${product_name} 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']['instantiatedVnfInfo']['extCpInfo']['cpdId']} ${external_cp} + Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} ${vdu_id} + Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vnfcCpInfo']['cpdId']} ${vdu_cpid} + Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['virtualStorageResourceInfo']['virtualStorageDescId']} ${virtual_storage} + Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['extManagedVirtualLinkInfo']['vnfVirtualLinkDescId']} ${virtual_link} + + Add VNF Descriptor Content to VNF Instance Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 VNF Instance ELSE Parse SOL006 VNF Instance diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/vnf-b-1_VNF.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml similarity index 96% rename from SOL002/VNFLifecycleManagement-API/descriptors/SOL001/vnf-b-1_VNF.yaml rename to SOL002/VNFLifecycleManagement-API/descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml index 1712e2b33..797d8bec3 100644 --- a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/vnf-b-1_VNF.yaml +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml @@ -75,7 +75,7 @@ topology_template: virtual_link_left: virtual_binding: VDU-B-1 internal_vl: - type: tosca.nodes.nfv.VnfVirtualLink + type: "tosca.nodes.nfv.VnfVirtualLink" properties: connectivity_type: layer_protocols: [ ipv4 ] @@ -88,14 +88,14 @@ topology_template: root: 10000 leaf: 10000 internal_vdu_b_1_cp: - type: tosca.nodes.nfv.VduCp + 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 + type: "tosca.nodes.nfv.VduCp" properties: order: 0 requirements: @@ -120,7 +120,7 @@ topology_template: size: '1' artifacts: sw_image: - type: tosca.artifacts.nfv.SwImage + type: "tosca.artifacts.nfv.SwImage" file: vdu-b-1.qcow2 vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2df_SOL006.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2df_SOL006.yaml deleted file mode 100644 index 4b84be92b..000000000 --- a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2df_SOL006.yaml +++ /dev/null @@ -1,105 +0,0 @@ -nfv: - vnfd: - - id: VNF-B-2df - provider: ETSI TST WG - product-name: TST010 reference VNF-B with 2 DFs - software-version: '2.1' - version: '2.1' - vnfm-info: ETSI VNFM - vdu: - id: vdu-b-1 - name: VNF-B VDU 1 - int-cpd: - - id: left - layer-protocol: ethernet - - id: management - layer-protocol: ethernet - - id: right - layer-protocol: ethernet - virtual-compute-desc: vdu-b-1-vcd - virtual-storage-desc: vdu-b-1-vsd - sw-image-desc: vdu-b-1-image - virtual-compute-desc: - id: vdu-b-1-vcd - virtual-memory: - size: '4.0' - virtual-cpu: - num-virtual-cpu: '2' - virtual-storage-desc: - id: vdu-b-1-vsd - type-of-storage: root-storage - size-of-storage: '0' - sw-image-desc: - id: vdu-b-1-image - name: VNF-B image - version: '1.1' - checksum: - algorithm: sha-224 - hash: somehashfortst010 - container-format: bare - disk-format: qcow2 - min-disk: '1' - min-ram: '2.0' - size: '1' - image: 'http://someurl.com/VNF-B.qcow2' - ext-cpd: - - id: ext-b-left - int-cpd: - vdu-id: vdu-b-1 - cpd: left - layer-protocol: ethernet - - id: management - int-cpd: - vdu-id: vdu-b-1 - cpd: management - layer-protocol: ethernet - - id: ext-b-right - int-cpd: - vdu-id: vdu-b-1 - cpd: right - layer-protocol: ethernet - df: - - id: small - vdu-profile: - id: vdu-b-1 - min-number-of-instances: '1' - max-number-of-instances: '2' - instantiation-level: - - id: double - vdu-level: - vdu-id: vdu-b-1 - number-of-instances: '2' - - id: single - vdu-level: - vdu-id: vdu-b-1 - number-of-instances: '1' - default-instantiation-level: single - lcm-operations-configuration: - scale-vnf-to-level-op-config: - arbitrary-target-levels-supported: 'true' - terminate-vnf-op-config: - min-graceful-termination: '1' - operate-vnf-op-config: - min-graceful-stop-timeout: '1' - - id: big - vdu-profile: - id: vdu-b-1 - min-number-of-instances: '1' - max-number-of-instances: '4' - instantiation-level: - - id: double - vdu-level: - vdu-id: vdu-b-1 - number-of-instances: '2' - - id: triple - vdu-level: - vdu-id: vdu-b-1 - number-of-instances: '3' - default-instantiation-level: double - lcm-operations-configuration: - scale-vnf-to-level-op-config: - arbitrary-target-levels-supported: 'true' - terminate-vnf-op-config: - min-graceful-termination: '1' - operate-vnf-op-config: - min-graceful-stop-timeout: '1' diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml new file mode 100644 index 000000000..d033e5a2e --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml @@ -0,0 +1,138 @@ +nfv: + vnfd: + - id: VNF-B-2vdu + provider: ETSI TST WG + product-name: TST010 reference VNF-B with 2 VDUs + software-version: '2.2' + version: '2.2' + vnfm-info: ETSI VNFM + vdu: + id: vdu-b-1 + name: VNF-B VDU 1 + int-cpd: + - id: left + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-1-vcd + virtual-storage-desc: vdu-b-1-vsd + sw-image-desc: vdu-b-1-image + vdu: + id: vdu-b-2 + name: VNF-B VDU 2 + int-cpd: + - id: right + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-2-vcd + virtual-storage-desc: vdu-b-2-vsd + sw-image-desc: vdu-b-2-image + virtual-compute-desc: + id: vdu-b-1-vcd + virtual-memory: + size: '4.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-1-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-1-image + name: VNF-B image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B.qcow2' + virtual-compute-desc: + id: vdu-b-2-vcd + virtual-memory: + size: '6.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-2-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-2-image + name: VNF-B-2 image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B-2.qcow2' + int-virtual-link-desc: + - id: internal-vl + flavour: + id: internal-vl-flavour + qos: + latency: '1' + packet-delay-variation: '1' + packet-loss-ratio: '0.05' + connectivity-type: + layer-protocol: ethernet + ext-cpd: + - id: ext-b-left + int-cpd: + vdu-id: vdu-b-1 + cpd: left + layer-protocol: ethernet + - id: management + int-cpd: + vdu-id: vdu-b-1 + cpd: management + layer-protocol: ethernet + - id: ext-b-right + int-cpd: + vdu-id: vdu-b-2 + cpd: right + layer-protocol: ethernet + df: + id: normal + vdu-profile: + - id: vdu-b-1 + min-number-of-instances: '1' + max-number-of-instances: '2' + - id: vdu-b-2 + min-number-of-instances: '1' + max-number-of-instances: '4' + instantiation-level: + - id: double + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '2' + - vdu-id: vdu-b-2 + number-of-instances: '2' + - id: single + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '1' + - vdu-id: vdu-b-2 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' \ No newline at end of file -- GitLab From a2f15601f08ac6b0b3b0932841ec1846d18a2755 Mon Sep 17 00:00:00 2001 From: zafar Date: Tue, 5 Jan 2021 17:37:40 +0500 Subject: [PATCH 08/15] SOL006 descriptors added --- .../IndividualVnfLcmOperationOccurence.robot | 2 +- .../VnfLcmOperationKeywords.robot | 23 ++++++++++++------- .../jsons/patchBodyRequest.json | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 25bdd4d68..cf5882df8 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -28,7 +28,7 @@ Get status information about multiple VNF instances ... Post-Conditions: none Get Individual VNF LCM OP occurrences Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is VnfLcmOpOcc + Check HTTP Response Body Json Schema Is vnfLcmOpOcc Check HTTP Response Body vnf LCM OpOCC content against VNF Descriptor PUT status information about multiple VNF instances - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 9d183ea82..1119823c3 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -10,7 +10,7 @@ Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ Library String -Variables descriptors/SOL001/vnf-b-1_VNF.yaml +Variables descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml *** Keywords *** @@ -204,9 +204,9 @@ PATCH individual vnfInstance Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Set Headers {"If-Match": "${original_etag}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - 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} + #Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to VNF Instance + ${body}= Get File jsons/patchBodyRequest.json + #${body}= Format String ${template} vnfdId=${descriptor_id} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1108,12 +1108,19 @@ Parse SOL001 LCM Op Occ ${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} - Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id} - Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version} + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${descriptor_id} + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${descriptor_version} Parse SOL006 LCM Op Occ ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${vdu_id}= Get Variable Value ${nfv.vnfd[0].vdu[0].id} + ${virtual_storage}= Get Variable Value ${nfv.vnfd[0].virtual-storage-desc.id} + ${virtual_link}= Get Variable Value ${nfv.vnfd[0].int-virtual-link-desc.id} - Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id} - Should Be Equal As Strings ${response['body']['vnfdVersion']} ${descriptor_version} \ No newline at end of file + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${descriptor_id} + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${descriptor_version} + Should Be Equal As Strings ${response['body']['resourceChanges']['affectedVirtualLinks']['vnfVirtualLinkDescId']} ${virtual_link} + Should Be Equal As Strings ${response['body']['resourceChanges']['affectedVnfcs']['vduId']} ${vdu_id} + Should Be Equal As Strings ${response['body']['resourceChanges']['affectedVirtualStorages']['virtualStorageDescId']} ${virtual_storage} + \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json index a9f1c9dae..774192021 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json @@ -1,5 +1,5 @@ { "vnfInstanceName": "vnf new name", "vnfInstanceDescription": "new description", - "vnfdId": "{vnfdId}" + "vnfdId": "" } \ No newline at end of file -- GitLab From ad5297ca8ad07b952f3d1e7820db8a1622b4a8f2 Mon Sep 17 00:00:00 2001 From: zafar Date: Fri, 15 Jan 2021 13:08:17 +0500 Subject: [PATCH 09/15] Updated reference descriptor YAML files for SOL001 and SOL006 --- .../reference_tst010_vnf_b_2vdu_SOL001.yaml | 82 ++++---- .../reference_tst010_vnf_b_2vdu_SOL006.yaml | 185 +++++++++--------- .../environment/variables.txt | 33 +++- 3 files changed, 156 insertions(+), 144 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml index 797d8bec3..e9159106a 100644 --- a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml @@ -15,44 +15,6 @@ topology_template: 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: @@ -101,7 +63,7 @@ topology_template: requirements: - virtual_binding: VDU-B-2 - virtual_link: internal_vl - vdu-b-1-vsd: + vdu_b_1_vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: @@ -122,14 +84,14 @@ topology_template: sw_image: type: "tosca.artifacts.nfv.SwImage" file: vdu-b-1.qcow2 - vdu-b-1-vsd: + vdu_b_2_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" + name: "vdu-b-2 image" version: "1.1" checksum: algorithm: "sha-224" @@ -166,3 +128,41 @@ topology_template: implementation: terminate-example.yaml operate: implementation: operate-example.yaml + 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" \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml index d033e5a2e..0ea9820f0 100644 --- a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml @@ -2,137 +2,136 @@ nfv: vnfd: - id: VNF-B-2vdu provider: ETSI TST WG - product-name: TST010 reference VNF-B with 2 VDUs - software-version: '2.2' + product_name: TST010 reference VNF-B with 2 VDUs + software_version: '2.2' version: '2.2' - vnfm-info: ETSI VNFM + vnfm_info: ETSI VNFM vdu: - id: vdu-b-1 - name: VNF-B VDU 1 - int-cpd: - - id: left - layer-protocol: ethernet - - id: management - layer-protocol: ethernet - - id: internal - layer-protocol: ethernet - int-virtual-link-desc: internal-vl - virtual-compute-desc: vdu-b-1-vcd - virtual-storage-desc: vdu-b-1-vsd - sw-image-desc: vdu-b-1-image - vdu: - id: vdu-b-2 - name: VNF-B VDU 2 - int-cpd: - - id: right - layer-protocol: ethernet - - id: management - layer-protocol: ethernet - - id: internal - layer-protocol: ethernet - int-virtual-link-desc: internal-vl - virtual-compute-desc: vdu-b-2-vcd - virtual-storage-desc: vdu-b-2-vsd - sw-image-desc: vdu-b-2-image - virtual-compute-desc: + - id: vdu-b-1 + name: VNF-B VDU 1 + int_cpd: + - id: left + layer_protocol: ethernet + - id: management + layer_protocol: ethernet + - id: internal + layer_protocol: ethernet + int_virtual_link_desc: internal-vl + virtual_compute_desc: vdu-b-1-vcd + virtual_storage_desc: vdu-b-1-vsd + sw_image_desc: vdu-b-1-image + - id: vdu-b-2 + name: VNF-B VDU 2 + int_cpd: + - id: right + layer_protocol: ethernet + - id: management + layer_protocol: ethernet + - id: internal + layer_protocol: ethernet + int_virtual_link_desc: internal-vl + virtual_compute_desc: vdu-b-2-vcd + virtual_storage_desc: vdu-b-2-vsd + sw_image_desc: vdu-b-2-image + virtual_compute_desc: id: vdu-b-1-vcd - virtual-memory: + virtual_memory: size: '4.0' - virtual-cpu: - num-virtual-cpu: '2' - virtual-storage-desc: + virtual_cpu: + num_virtual_cpu: '2' + virtual_storage_desc: id: vdu-b-1-vsd - type-of-storage: root-storage - size-of-storage: '0' - sw-image-desc: + type_of_storage: root-storage + size_of_storage: '0' + sw_image_desc: id: vdu-b-1-image name: VNF-B image version: '1.1' checksum: algorithm: sha-224 hash: somehashfortst010 - container-format: bare - disk-format: qcow2 - min-disk: '1' - min-ram: '2.0' + container_format: bare + disk_format: qcow2 + min_disk: '1' + min_ram: '2.0' size: '1' image: 'http://someurl.com/VNF-B.qcow2' - virtual-compute-desc: + virtual_compute_desc: id: vdu-b-2-vcd - virtual-memory: + virtual_memory: size: '6.0' - virtual-cpu: - num-virtual-cpu: '2' - virtual-storage-desc: + virtual_cpu: + num_virtual_cpu: '2' + virtual_storage_desc: id: vdu-b-2-vsd - type-of-storage: root-storage - size-of-storage: '0' - sw-image-desc: + type_of_storage: root-storage + size_of_storage: '0' + sw_image_desc: id: vdu-b-2-image name: VNF-B-2 image version: '1.1' checksum: algorithm: sha-224 hash: somehashfortst010 - container-format: bare - disk-format: qcow2 - min-disk: '1' - min-ram: '2.0' + container_format: bare + disk_format: qcow2 + min_disk: '1' + min_ram: '2.0' size: '1' image: 'http://someurl.com/VNF-B-2.qcow2' - int-virtual-link-desc: + int_virtual_link_desc: - id: internal-vl flavour: id: internal-vl-flavour qos: latency: '1' - packet-delay-variation: '1' - packet-loss-ratio: '0.05' - connectivity-type: - layer-protocol: ethernet - ext-cpd: + packet_delay_variation: '1' + packet_loss_ratio: '0.05' + connectivity_type: + layer_protocol: ethernet + ext_cpd: - id: ext-b-left - int-cpd: - vdu-id: vdu-b-1 + int_cpd: + vdu_id: vdu-b-1 cpd: left - layer-protocol: ethernet + layer_protocol: ethernet - id: management - int-cpd: - vdu-id: vdu-b-1 + int_cpd: + vdu_id: vdu-b-1 cpd: management - layer-protocol: ethernet + layer_protocol: ethernet - id: ext-b-right - int-cpd: - vdu-id: vdu-b-2 + int_cpd: + vdu_id: vdu-b-2 cpd: right - layer-protocol: ethernet + layer_protocol: ethernet df: id: normal - vdu-profile: + vdu_profile: - id: vdu-b-1 - min-number-of-instances: '1' - max-number-of-instances: '2' + min_number_of_instances: '1' + max_number_of_instances: '2' - id: vdu-b-2 - min-number-of-instances: '1' - max-number-of-instances: '4' - instantiation-level: + min_number_of_instances: '1' + max_number_of_instances: '4' + instantiation_level: - id: double - vdu-level: - - vdu-id: vdu-b-1 - number-of-instances: '2' - - vdu-id: vdu-b-2 - number-of-instances: '2' + vdu_level: + - vdu_id: vdu-b-1 + number_of_instances: '2' + - vdu_id: vdu-b-2 + number_of_instances: '2' - id: single - vdu-level: - - vdu-id: vdu-b-1 - number-of-instances: '1' - - vdu-id: vdu-b-2 - number-of-instances: '1' - default-instantiation-level: single - lcm-operations-configuration: - scale-vnf-to-level-op-config: - arbitrary-target-levels-supported: 'true' - terminate-vnf-op-config: - min-graceful-termination: '1' - operate-vnf-op-config: - min-graceful-stop-timeout: '1' \ No newline at end of file + vdu_level: + - vdu_id: vdu-b-1 + number_of_instances: '1' + - vdu_id: vdu-b-2 + number_of_instances: '1' + default_instantiation_level: single + lcm_operations_configuration: + scale_vnf_to_level_op_config: + arbitrary_target_levels_supported: 'true' + terminate_vnf_op_config: + min_graceful_termination: '1' + operate_vnf_op_config: + min_graceful_stop_timeout: '1' \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index f0679b13b..08edc6357 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -79,13 +79,26 @@ ${vnfdIds} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${callbackResp} localhost -${descriptorType} SOL001 -${vnfKey} {} -${check_descriptors} 1 - -${descriptor_id} -${provider} -${product_name} -${software_version} -${descriptor_version} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} \ No newline at end of file +${check_descriptors} 1 +${descriptorType} SOL006 + +${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +${tosca_type_VNF} tosca.nodes.nfv.VNF +${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +@{VDU_IDs} +@{VNF_IDs} +@{virtualLink_IDs} +@{CP_IDs} +@{Storage_IDs} +@{internalCP_IDs} +@{externalCP_IDs} +@{InstantiationLevel_IDs} + +${Descriptor_ID} +${Provider} +${Product_Name} +${Software_Version} +${Descriptor_Version} -- GitLab From 861199659f2dbd43ec6fecc8368352c98b7ef66c Mon Sep 17 00:00:00 2001 From: zafar Date: Fri, 15 Jan 2021 16:43:07 +0500 Subject: [PATCH 10/15] SOL001 & SOL006 Descriptor parsing and checking updated for VNFLCM-API --- .../VNFInstances.robot | 1 + .../VnfLcmOperationKeywords.robot | 255 +++++++++++------- .../VnfLcmOperationOccurences.robot | 3 +- .../environment/variables.txt | 2 + 4 files changed, 169 insertions(+), 92 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot index 6c042d821..c2d5451b4 100644 --- a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot @@ -33,6 +33,7 @@ GET information about multiple VNF instances GET multiple vnfInstances Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances + Check HTTP Response Body vnfInstances content against VNF Descriptor GET information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters [Documentation] Test ID: 6.3.5.1.3 diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 1119823c3..3cf609f26 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -11,6 +11,7 @@ Library Collections Library JSONSchemaLibrary schemas/ Library String Variables descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml +Variables descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml *** Keywords *** @@ -80,9 +81,9 @@ POST Create a new vnfInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Authorization":"${AUTHORIZATION}"} - Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to VNF Instance + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File ${template} = Get File jsons/createVnfRequest.json - ${body}= Format String ${template} vnfdId=${descriptor_id} + ${body}= Format String ${template} vnfdId=${Descriptor_ID} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1020,107 +1021,179 @@ Get VNF LCM Operation occurrences with exclude_fields attribute selector Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} + +Check HTTP Response Body vnfInstances content against VNF Descriptor + #{check_multiple_instances} flag, set to 1 to check multiple instances against descriptors + Run Keyword If ${check_multiple_instances} == 1 Check Multiple VNF Instances Content -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 +Check Multiple VNF Instances Content + #${number_of_instances}= Get Length ${response['body']} + #FOR ${i} IN RANGE ${number_of_instances} + ${response['body']}= Get Variable Value ${response['body'][0]} #Gets the first instance at index 0 + Check Individual VNF Instance Content + #END Check HTTP Response Body vnfInstance content against VNF Descriptor #${check_descriptors} flag, 1 to check descriptors 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 - 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']['vnfdId']} ${descriptor_id} - Should Be Equal As Strings ${response['body']['vnfProvider']} ${provider} - Should Be Equal As Strings ${response['body']['vnfProductName']} ${product_name} - 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']['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} - ${vdu_cpid}= Get Variable Value ${nfv.vnfd[0].vdu[0].int-cpd[2].id} - ${virtual_storage}= Get Variable Value ${nfv.vnfd[0].virtual-storage-desc.id} - ${virtual_link}= Get Variable Value ${nfv.vnfd[0].int-virtual-link-desc.id} - - - Should Be Equal As Strings ${response['body']['vnfdId']} ${descriptor_id} - Should Be Equal As Strings ${response['body']['vnfProvider']} ${provider} - Should Be Equal As Strings ${response['body']['vnfProductName']} ${product_name} - 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']['instantiatedVnfInfo']['extCpInfo']['cpdId']} ${external_cp} - Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} ${vdu_id} - Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vnfcCpInfo']['cpdId']} ${vdu_cpid} - Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['virtualStorageResourceInfo']['virtualStorageDescId']} ${virtual_storage} - Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['extManagedVirtualLinkInfo']['vnfVirtualLinkDescId']} ${virtual_link} - - -Add VNF Descriptor Content to VNF Instance - Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 VNF Instance ELSE Parse SOL006 VNF Instance +Check Individual VNF Instance Content + PARSE the Descriptor File + Match the VNF Instance Response Attributes with Descriptors + +PARSE the Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file -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} +Fetch Information from SOL001 descriptor file + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{topology_template.node_templates.keys()} + ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} + ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} + ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} + ${VDUcp_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_cp} + ${Storage_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_storage} + Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} + Run Keyword If ${VNF_check} Append To List ${VNF_labels} ${key} + Run Keyword If ${VNF_check} Get VNF Attributes from SOL001 ${key} + Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} + Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} + Run Keyword If ${Storage_check} Append To List ${Storage_labels} ${key} + END + Set Global Variable @{VDU_IDs} @{VDU_labels} + Set Global Variable @{VNF_IDs} @{VNF_labels} + Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} + Set Global Variable @{CP_IDs} @{CP_labels} + Set Global Variable @{Storage_IDs} @{Storage_labels} + +Get VNF Attributes from SOL001 + [Arguments] ${VNF_label} + ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id} -Parse SOL006 VNF Instance + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + Set Global Variable ${Flavour_ID} ${flavour_id} + +Fetch Information from SOL006 descriptor file ${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} - -Check HTTP Response Body vnf LCM OpOCC 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 LCM Op Occ ELSE Parse SOL006 LCM Op Occ - -Parse SOL001 LCM Op Occ - Get key for VNF Descriptor + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} + ${extCP_count}= Get Length ${nfv.vnfd[0].ext_cpd} + ${virtualLink_count}= Get length ${nfv.vnfd[0].int_virtual_link_desc} + ${instantiation_levels}= Get Length ${nfv.vnfd[0].df.instantiation_level} + FOR ${key} IN @{nfv.vnfd[0].keys()} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu + Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} + ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext_cpd + Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} + ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int_virtual_link_desc + Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} + ${DF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} df + Run Keyword If ${DF_check} Get Instantiation Levels ${instantiation_levels} + END + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Get VDU IDs + [Arguments] ${count} + @{VDU_labels}= Create List + ${Storage_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}].id} + Append To List ${Storage_labels} ${nfv.vnfd[0].vdu[${i}].virtual_storage_desc} + Get Internal CPs for each VDU ${i} + END + Set Global Variable ${VDU_IDs} ${VDU_labels} + Set Global Variable ${Storage_IDs} ${Storage_labels} + +Get Internal CPs for each VDU + [Arguments] ${vdu} + ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}].int_cpd} + ${internal_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${internal_CPs} ${nfv.vnfd[0].vdu[${vdu}].int_cpd[${i}].id} + END + Set Global Variable ${internalCP_IDs} ${internal_CPs} - ${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} +Get External CP IDs + [Arguments] ${count} + @{external_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${external_CPs} ${nfv.vnfd[0].ext_cpd[${i}].id} + END + Set Global Variable ${externalCP_IDs} ${external_CPs} + +Get Virtual Link IDs + [Arguments] ${count} + ${VirtualLink_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VirtualLink_labels} ${nfv.vnfd[0].int_virtual_link_desc[${i}].id} + END + Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} + +Get Instantiation Levels + [Arguments] ${count} + @{Instantiation_Levels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df.instantiation_level[${i}].id} + END + Set Global Variable ${InstantiationLevel_IDs} ${Instantiation_Levels} + +Match the VNF Instance Response Attributes with Descriptors + #Checking Response attributes with VNF Descriptors + Should Be Equal As Strings ${response['body']['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['vnfProvider']} ${Provider} + Should Be Equal As Strings ${response['body']['vnfProductName']} ${Product_Name} + 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']['instantiatedVnfInfo']['flavourId']} ${Flavour_ID} + List Should Contain Value ${VDU_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo']['cpdId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${internalCP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vnfcCpInfo']['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo']['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vnfcCpInfo']['cpdId']} + List Should Contain value ${Storage_IDs} ${response['body']['instantiatedVnfInfo']['virtualStorageResourceInfo']['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['instantiatedVnfInfo']['extManagedVirtualLinkInfo']['vnfVirtualLinkDescId']} - Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${descriptor_id} - Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${descriptor_version} +Check HTTP Response Body vnf LCM OpOCCs content against VNF Descriptor + #{check_multiple_instances} flag, set to 1 to check multiple instances against descriptors + Run Keyword If ${check_multiple_instances} == 1 Check Multiple VNF LCM OpOCCs Content -Parse SOL006 LCM Op Occ - ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} - ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} - ${vdu_id}= Get Variable Value ${nfv.vnfd[0].vdu[0].id} - ${virtual_storage}= Get Variable Value ${nfv.vnfd[0].virtual-storage-desc.id} - ${virtual_link}= Get Variable Value ${nfv.vnfd[0].int-virtual-link-desc.id} - - Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${descriptor_id} - Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${descriptor_version} - Should Be Equal As Strings ${response['body']['resourceChanges']['affectedVirtualLinks']['vnfVirtualLinkDescId']} ${virtual_link} - Should Be Equal As Strings ${response['body']['resourceChanges']['affectedVnfcs']['vduId']} ${vdu_id} - Should Be Equal As Strings ${response['body']['resourceChanges']['affectedVirtualStorages']['virtualStorageDescId']} ${virtual_storage} - \ No newline at end of file +Check Multiple VNF LCM OpOCCs Content + #${number_of_instances}= Get Length ${response['body']} + #FOR ${i} IN RANGE ${number_of_instances} + ${response['body']}= Get Variable Value ${response['body'][0]} #Gets the first instance at index 0 + Check Individual VNF LCM Operation Occurence Content + #END + +Check HTTP Response Body vnf LCM OpOCC content against VNF Descriptor + Run Keyword If ${check_descriptors} == 1 Check Individual VNF LCM Operation Occurence Content + +Check Individual VNF LCM Operation Occurence Content + PARSE the Descriptor File + Match the VNF LCM Operation Occurence Response Attributes with Descriptors + +Match the VNF LCM Operation Occurence Response Attributes with Descriptors + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${Descriptor_Version} + List Should Contain Value ${VDU_IDs} ${response['body']['resourceChanges']['affectedVnfcs']['vduId']} + List Should Contain value ${Storage_IDs} ${response['body']['resourceChanges']['affectedVirtualStorages']['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['resourceChanges']['affectedVirtualLinks']['vnfVirtualLinkDescId']} diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index 687c6f711..d5e329d38 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -32,7 +32,8 @@ GET status information about multiple VNF LCM operation occurrences GET VNF LCM OP occurrences Check HTTP Response Status Code Is 202 Check HTTP Response Body Json Schema Is VnfLcmOpOccs - + Check HTTP Response Body vnf LCM OpOCCs content against VNF Descriptor + GET status information about multiple VNF LCM operation occurrences Bad Request Invalid attribute-based filtering parameters [Documentation] Test ID: 6.3.5.11.3 ... Test title: GET status information about multiple VNF LCM operation occurrences Bad Request Invalid attribute-based filtering parameters diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index 08edc6357..ee664f186 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -81,6 +81,7 @@ ${callbackResp} localhost ${check_descriptors} 1 ${descriptorType} SOL006 +${check_multiple_instances} 0 ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute ${tosca_type_VNF} tosca.nodes.nfv.VNF @@ -102,3 +103,4 @@ ${Provider} ${Product_Name} ${Software_Version} ${Descriptor_Version} +${Flavour_ID} -- GitLab From 28ecd83a42d550e0c2cbdb027bf11fc6187c29a7 Mon Sep 17 00:00:00 2001 From: zafar Date: Tue, 19 Jan 2021 14:54:50 +0500 Subject: [PATCH 11/15] SOL006 reference descriptor file and checking functionality updated (with dashes instead of underscores) --- .../VnfLcmOperationKeywords.robot | 30 ++-- .../reference_tst010_vnf_b_2vdu_SOL006.yaml | 164 +++++++++--------- 2 files changed, 96 insertions(+), 98 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 3cf609f26..2b541dd46 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -1077,31 +1077,29 @@ Get VNF Attributes from SOL001 ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} ${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version} ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version} - ${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id} Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} Set Global Variable ${Product_Name} ${product_name} Set Global Variable ${Software_Version} ${software_version} Set Global Variable ${Descriptor_Version} ${descriptor_version} - Set Global Variable ${Flavour_ID} ${flavour_id} Fetch Information from SOL006 descriptor file ${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} + ${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} ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} - ${extCP_count}= Get Length ${nfv.vnfd[0].ext_cpd} - ${virtualLink_count}= Get length ${nfv.vnfd[0].int_virtual_link_desc} - ${instantiation_levels}= Get Length ${nfv.vnfd[0].df.instantiation_level} + ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} + ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} + ${instantiation_levels}= Get Length ${nfv.vnfd[0].df['instantiation-level']} FOR ${key} IN @{nfv.vnfd[0].keys()} ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} - ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext_cpd + ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext-cpd Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} - ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int_virtual_link_desc + ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int-virtual-link-desc Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} ${DF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} df Run Keyword If ${DF_check} Get Instantiation Levels ${instantiation_levels} @@ -1117,8 +1115,8 @@ Get VDU IDs @{VDU_labels}= Create List ${Storage_labels}= Create List FOR ${i} IN RANGE ${count} - Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}].id} - Append To List ${Storage_labels} ${nfv.vnfd[0].vdu[${i}].virtual_storage_desc} + Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} + Append To List ${Storage_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-storage-desc']} Get Internal CPs for each VDU ${i} END Set Global Variable ${VDU_IDs} ${VDU_labels} @@ -1126,10 +1124,10 @@ Get VDU IDs Get Internal CPs for each VDU [Arguments] ${vdu} - ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}].int_cpd} + ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} ${internal_CPs}= Create List FOR ${i} IN RANGE ${count} - Append To List ${internal_CPs} ${nfv.vnfd[0].vdu[${vdu}].int_cpd[${i}].id} + Append To List ${internal_CPs} ${nfv.vnfd[0].vdu[${vdu}]['int-cpd'][${i}]['id']} END Set Global Variable ${internalCP_IDs} ${internal_CPs} @@ -1137,7 +1135,7 @@ Get External CP IDs [Arguments] ${count} @{external_CPs}= Create List FOR ${i} IN RANGE ${count} - Append To List ${external_CPs} ${nfv.vnfd[0].ext_cpd[${i}].id} + Append To List ${external_CPs} ${nfv.vnfd[0]['ext-cpd'][${i}]['id']} END Set Global Variable ${externalCP_IDs} ${external_CPs} @@ -1145,7 +1143,7 @@ Get Virtual Link IDs [Arguments] ${count} ${VirtualLink_labels}= Create List FOR ${i} IN RANGE ${count} - Append To List ${VirtualLink_labels} ${nfv.vnfd[0].int_virtual_link_desc[${i}].id} + Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} END Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} @@ -1153,7 +1151,7 @@ Get Instantiation Levels [Arguments] ${count} @{Instantiation_Levels}= Create List FOR ${i} IN RANGE ${count} - Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df.instantiation_level[${i}].id} + Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} END Set Global Variable ${InstantiationLevel_IDs} ${Instantiation_Levels} diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml index 0ea9820f0..d902779a2 100644 --- a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml @@ -2,136 +2,136 @@ nfv: vnfd: - id: VNF-B-2vdu provider: ETSI TST WG - product_name: TST010 reference VNF-B with 2 VDUs - software_version: '2.2' + product-name: TST010 reference VNF-B with 2 VDUs + software-version: '2.2' version: '2.2' - vnfm_info: ETSI VNFM + vnfm-info: ETSI VNFM vdu: - id: vdu-b-1 name: VNF-B VDU 1 - int_cpd: + int-cpd: - id: left - layer_protocol: ethernet + layer-protocol: ethernet - id: management - layer_protocol: ethernet + layer-protocol: ethernet - id: internal - layer_protocol: ethernet - int_virtual_link_desc: internal-vl - virtual_compute_desc: vdu-b-1-vcd - virtual_storage_desc: vdu-b-1-vsd - sw_image_desc: vdu-b-1-image + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-1-vcd + virtual-storage-desc: vdu-b-1-vsd + sw-image-desc: vdu-b-1-image - id: vdu-b-2 name: VNF-B VDU 2 - int_cpd: + int-cpd: - id: right - layer_protocol: ethernet + layer-protocol: ethernet - id: management - layer_protocol: ethernet + layer-protocol: ethernet - id: internal - layer_protocol: ethernet - int_virtual_link_desc: internal-vl - virtual_compute_desc: vdu-b-2-vcd - virtual_storage_desc: vdu-b-2-vsd - sw_image_desc: vdu-b-2-image - virtual_compute_desc: + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-2-vcd + virtual-storage-desc: vdu-b-2-vsd + sw-image-desc: vdu-b-2-image + virtual-compute-desc: id: vdu-b-1-vcd - virtual_memory: + virtual-memory: size: '4.0' - virtual_cpu: - num_virtual_cpu: '2' - virtual_storage_desc: + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: id: vdu-b-1-vsd - type_of_storage: root-storage - size_of_storage: '0' - sw_image_desc: + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: id: vdu-b-1-image name: VNF-B image version: '1.1' checksum: algorithm: sha-224 hash: somehashfortst010 - container_format: bare - disk_format: qcow2 - min_disk: '1' - min_ram: '2.0' + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' size: '1' image: 'http://someurl.com/VNF-B.qcow2' - virtual_compute_desc: + virtual-compute-desc: id: vdu-b-2-vcd - virtual_memory: + virtual-memory: size: '6.0' - virtual_cpu: - num_virtual_cpu: '2' - virtual_storage_desc: + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: id: vdu-b-2-vsd - type_of_storage: root-storage - size_of_storage: '0' - sw_image_desc: + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: id: vdu-b-2-image name: VNF-B-2 image version: '1.1' checksum: algorithm: sha-224 hash: somehashfortst010 - container_format: bare - disk_format: qcow2 - min_disk: '1' - min_ram: '2.0' + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' size: '1' image: 'http://someurl.com/VNF-B-2.qcow2' - int_virtual_link_desc: + int-virtual-link-desc: - id: internal-vl flavour: id: internal-vl-flavour qos: latency: '1' - packet_delay_variation: '1' - packet_loss_ratio: '0.05' - connectivity_type: - layer_protocol: ethernet - ext_cpd: + packet-delay-variation: '1' + packet-loss-ratio: '0.05' + connectivity-type: + layer-protocol: ethernet + ext-cpd: - id: ext-b-left - int_cpd: - vdu_id: vdu-b-1 + int-cpd: + vdu-id: vdu-b-1 cpd: left - layer_protocol: ethernet + layer-protocol: ethernet - id: management - int_cpd: - vdu_id: vdu-b-1 + int-cpd: + vdu-id: vdu-b-1 cpd: management - layer_protocol: ethernet + layer-protocol: ethernet - id: ext-b-right - int_cpd: - vdu_id: vdu-b-2 + int-cpd: + vdu-id: vdu-b-2 cpd: right - layer_protocol: ethernet + layer-protocol: ethernet df: id: normal - vdu_profile: + vdu-profile: - id: vdu-b-1 - min_number_of_instances: '1' - max_number_of_instances: '2' + min-number-of-instances: '1' + max-number-of-instances: '2' - id: vdu-b-2 - min_number_of_instances: '1' - max_number_of_instances: '4' - instantiation_level: + min-number-of-instances: '1' + max-number-of-instances: '4' + instantiation-level: - id: double - vdu_level: - - vdu_id: vdu-b-1 - number_of_instances: '2' - - vdu_id: vdu-b-2 - number_of_instances: '2' + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '2' + - vdu-id: vdu-b-2 + number-of-instances: '2' - id: single - vdu_level: - - vdu_id: vdu-b-1 - number_of_instances: '1' - - vdu_id: vdu-b-2 - number_of_instances: '1' - default_instantiation_level: single - lcm_operations_configuration: - scale_vnf_to_level_op_config: - arbitrary_target_levels_supported: 'true' - terminate_vnf_op_config: - min_graceful_termination: '1' - operate_vnf_op_config: - min_graceful_stop_timeout: '1' \ No newline at end of file + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '1' + - vdu-id: vdu-b-2 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' \ No newline at end of file -- GitLab From 5a464a59d134c710e77bd6edfc91429ce920bd4b Mon Sep 17 00:00:00 2001 From: zafar Date: Tue, 19 Jan 2021 15:01:31 +0500 Subject: [PATCH 12/15] minor bug fix for previous commit (FlavorId got deleted by mistake) --- SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 2b541dd46..97fae54e4 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -1077,12 +1077,14 @@ Get VNF Attributes from SOL001 ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} ${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version} ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id} Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} Set Global Variable ${Product_Name} ${product_name} Set Global Variable ${Software_Version} ${software_version} Set Global Variable ${Descriptor_Version} ${descriptor_version} + Set Global Variable ${Flavour_ID} ${flavour_id} Fetch Information from SOL006 descriptor file ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} -- GitLab From b4d9f52cd0f2959896777e014df86728ba61216a Mon Sep 17 00:00:00 2001 From: zafar Date: Thu, 21 Jan 2021 15:21:16 +0500 Subject: [PATCH 13/15] minor typo error resolved --- SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 97fae54e4..1f5c1e031 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -1162,7 +1162,7 @@ Match the VNF Instance Response Attributes with Descriptors Should Be Equal As Strings ${response['body']['vnfdId']} ${Descriptor_ID} Should Be Equal As Strings ${response['body']['vnfProvider']} ${Provider} Should Be Equal As Strings ${response['body']['vnfProductName']} ${Product_Name} - Should Be Equal As Strings ${response['body']['vnfSoftwareVesion']} ${Software_Version} + Should Be Equal As Strings ${response['body']['vnfSoftwareVersion']} ${Software_Version} Should Be Equal As Strings ${response['body']['vnfdVersion']} ${Descriptor_Version} Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['flavourId']} ${Flavour_ID} List Should Contain Value ${VDU_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} -- GitLab From b0e44fd2e32f25e4d2db9defa88729584383bfd3 Mon Sep 17 00:00:00 2001 From: Sana Zulfiqar Date: Tue, 26 Jan 2021 14:04:30 +0100 Subject: [PATCH 14/15] Bug fix in response parsing --- .../VnfLcmOperationKeywords.robot | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 1f5c1e031..d7ad8c246 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -1165,13 +1165,13 @@ Match the VNF Instance Response Attributes with Descriptors Should Be Equal As Strings ${response['body']['vnfSoftwareVersion']} ${Software_Version} Should Be Equal As Strings ${response['body']['vnfdVersion']} ${Descriptor_Version} Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['flavourId']} ${Flavour_ID} - List Should Contain Value ${VDU_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} - Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo']['cpdId']} - Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${internalCP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vnfcCpInfo']['cpdId']} - Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo']['cpdId']} - Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vnfcCpInfo']['cpdId']} - List Should Contain value ${Storage_IDs} ${response['body']['instantiatedVnfInfo']['virtualStorageResourceInfo']['virtualStorageDescId']} - List Should Contain Value ${VirtualLink_IDs} ${response['body']['instantiatedVnfInfo']['extManagedVirtualLinkInfo']['vnfVirtualLinkDescId']} + List Should Contain Value ${VDU_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo'][0]['vduId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${internalCP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo'][0]['vnfcCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo'][0]['vnfcCpInfo'][0]['cpdId']} + List Should Contain value ${Storage_IDs} ${response['body']['instantiatedVnfInfo']['virtualStorageResourceInfo'][0]['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['instantiatedVnfInfo']['extManagedVirtualLinkInfo'][0]['vnfVirtualLinkDescId']} Check HTTP Response Body vnf LCM OpOCCs content against VNF Descriptor #{check_multiple_instances} flag, set to 1 to check multiple instances against descriptors @@ -1194,6 +1194,6 @@ Check Individual VNF LCM Operation Occurence Content Match the VNF LCM Operation Occurence Response Attributes with Descriptors Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${Descriptor_ID} Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${Descriptor_Version} - List Should Contain Value ${VDU_IDs} ${response['body']['resourceChanges']['affectedVnfcs']['vduId']} - List Should Contain value ${Storage_IDs} ${response['body']['resourceChanges']['affectedVirtualStorages']['virtualStorageDescId']} - List Should Contain Value ${VirtualLink_IDs} ${response['body']['resourceChanges']['affectedVirtualLinks']['vnfVirtualLinkDescId']} + List Should Contain Value ${VDU_IDs} ${response['body']['resourceChanges']['affectedVnfcs'][0]['vduId']} + List Should Contain value ${Storage_IDs} ${response['body']['resourceChanges']['affectedVirtualStorages'][0]['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['resourceChanges']['affectedVirtualLinks'][0]['vnfVirtualLinkDescId']} -- GitLab From dedf94bbdb57d33359f2ad7700cff672faef81e5 Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Thu, 28 Jan 2021 18:31:46 +0100 Subject: [PATCH 15/15] renamed descriptors --- .../VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot | 4 ++-- .../vnfd_SOL001.yaml} | 0 .../vnfd_SOL006.yaml} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename SOL002/VNFLifecycleManagement-API/descriptors/SOL001/{reference_tst010_vnf_b_2vdu_SOL001.yaml => VNFD/vnfd_SOL001.yaml} (100%) rename SOL002/VNFLifecycleManagement-API/descriptors/SOL006/{reference_tst010_vnf_b_2vdu_SOL006.yaml => VNFD/vnfd_SOL006.yaml} (100%) diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index d7ad8c246..4a3f22e52 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -10,8 +10,8 @@ Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ Library String -Variables descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml -Variables descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml +Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml *** Keywords *** diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml similarity index 100% rename from SOL002/VNFLifecycleManagement-API/descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml rename to SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml similarity index 100% rename from SOL002/VNFLifecycleManagement-API/descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml rename to SOL002/VNFLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml -- GitLab