Skip to content
Snippets Groups Projects
Commit 480667a6 authored by Sana Zulfiqar's avatar Sana Zulfiqar
Browse files

Descriptor checks added for 7.3.3.1.1

parent 46830e43
No related branches found
No related tags found
3 merge requests!199Merge "3.3.1 dev" into "release 3" master,!193Merge 2.7.1 dev into Master, for TST010ed271 publication,!145SOL003 - Implementation of additional test steps for checks against VNFD content in v2.7.1
......@@ -5,6 +5,7 @@ Resource VNFPackageManagementKeywords.robot
Library JSONLibrary
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false
*** Test Cases ***
GET Individual VNF Package
[Documentation] Test ID: 7.3.3.2.1
......
......@@ -9,7 +9,8 @@ Library Collections
Library JSONSchemaLibrary schemas/
Library Process
Library String
Variables descriptors/SOL001/vnf-b-1_VNF.yaml
Variables descriptors/SOL001/reference_tst010_vnf_b_2vdu_SOL001.yaml
Variables descriptors/SOL006/reference_tst010_vnf_b_2vdu_SOL006.yaml
*** Keywords ***
Get all VNF Packages
......@@ -1530,42 +1531,65 @@ Check HTTP Response Body of Individual VNF Package content against VNF Descripto
Run Keyword If ${check_descriptors} == 1 Check Individual VNF Package Content
Check Individual VNF Package Content
Run Keyword If '${descriptorType}'=='SOL001' Parse SOL001 VNF Package ELSE Parse SOL006 VNF Package
Parse SOL001 VNF Package
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}
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}
Get key for VNF Descriptor
PARSE the Descriptor File
Match the VNF Package 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
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()}
Log ${key}
${check1}= Run Keyword And Return Status Should Be Equal As Strings ${topology_template.node_templates.${key}.type} tosca.nodes.nfv.VNF
Run Keyword If ${check1} Set Global Variable ${vnfKey} ${key}
${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type}
${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF}
Run Keyword If ${VNF_check} Append To List ${VNF_labels} ${key}
Run Keyword If ${VNF_check} Get VNF Attributes from SOL001 ${key}
END
Parse SOL006 VNF Package
Set Global Variable @{VNF_IDs} @{VNF_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}
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}
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}
${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}
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}
Match the VNF Package 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}
Check HTTP Response Body of Individual Subscription content against VNF Descriptor
Run Keyword If ${check_descriptors} == 1 Check Individual VNF Subscription Content
......
......@@ -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:
......@@ -75,7 +37,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,20 +50,20 @@ 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:
- 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:
......@@ -120,16 +82,16 @@ 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:
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
nfv:
vnfd:
- id: VNF-B-2df
- id: VNF-B-2vdu
provider: ETSI TST WG
product-name: TST010 reference VNF-B with 2 DFs
software-version: '2.1'
version: '2.1'
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: 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
- 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:
......@@ -42,6 +56,39 @@ nfv:
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:
......@@ -55,51 +102,36 @@ nfv:
layer-protocol: ethernet
- id: ext-b-right
int-cpd:
vdu-id: vdu-b-1
vdu-id: vdu-b-2
cpd: right
layer-protocol: ethernet
df:
- id: small
vdu-profile:
id: vdu-b-1
id: normal
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
- 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
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'
- 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
......@@ -90,5 +90,15 @@ ${VAR_SEPERATOR} &
${callbackResp} localhost
${descriptorType} SOL001
${vnfKey} {}
${check_descriptors} 1
\ No newline at end of file
${check_descriptors} 1
${tosca_type_VNF} tosca.nodes.nfv.VNF
@{VNF_IDs}
${Descriptor_ID}
${Provider}
${Product_Name}
${Software_Version}
${Descriptor_Version}
${Flavour_ID}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment