diff --git a/.jenkins.sh b/.jenkins.sh index 22ed7fcf2e3f7c2036855e04f827591d5ae7c5c0..3fb76157ca75149aba2441174b27309a80b8ec45 100644 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -12,7 +12,18 @@ run_dir="$(pwd)" echo "Using git branch $GIT_BRANCH" bash ./scripts/build-container.sh +ret=$? +if [ "$ret" != "0" ]; then + echo "build-container.sh failed" + exit -1 +fi + bash ./scripts/run-container.sh "${run_dir}" "$GIT_BRANCH" +ret=$? +if [ "$ret" != "0" ]; then + echo "run-container.sh failed" + exit -1 +fi if [[ "$GIT_BRANCH" =~ .*fix-plu$ ]]; then @@ -30,3 +41,4 @@ fi ret=$? echo "Final validation result: $ret" exit $ret + diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index e73d7b7259f318b51291bafc7d835aaeb6213cb4..870974463a3c92c40046380571c99495c7ab10e9 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -136,7 +136,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/problem+json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema}= Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/Alarms.robot b/SOL002/VNFFaultManagement-API/Alarms.robot index 38cda3c6bc42828607f20912d1c198e3bbbaaba4..799660219b52f0543efbc317773020d4ba0888c2 100644 --- a/SOL002/VNFFaultManagement-API/Alarms.robot +++ b/SOL002/VNFFaultManagement-API/Alarms.robot @@ -352,7 +352,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot index 84bf414a527837390c9db362c0579b388875aff8..84e3acec7afdf27e6f427211d7bc33e3abdcd0d1 100644 --- a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot @@ -191,7 +191,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot index bb36528d00bfc2a332118cc579766d9fdf4268be..e390d767c90687594b6909083b1289620c09c994 100644 --- a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot @@ -147,7 +147,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index 9277b7d58d0de4049ce84b84ad70ab5d0916eaf0..a88d02981ed47c721e62653bb0898e47b71ed91c 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -320,7 +320,7 @@ Post Create subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -427,7 +427,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/IndividualSubscription.robot b/SOL002/VNFIndicator-API/IndividualSubscription.robot index 4281108b3fd85c731b13a8c4c2261ab3dbc8dca6..ea2a8d777f4feeaaa98804b0e9f68b1c309c95ae 100644 --- a/SOL002/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL002/VNFIndicator-API/IndividualSubscription.robot @@ -168,7 +168,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index 3a6ce09350554870676dbc926f21afad1e0741c3..0377043505a7de53c5b448342212a99a18e08f63 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -218,7 +218,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index 481813f72db824a7141b08f4e66bb55fce71d621..ba59c816665e1f6e6bc18580aa575f70402f8ac3 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -282,7 +282,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 36b0d53093ef30825cdde362f6ddea0a5d5e1784..0a53a03b22e7f5058609eba2b594ddf1872e24e9 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -286,7 +286,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${schema} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${jsonSchema}= Catenate SEPARATOR= ${schema} .schema.json Validate Json ${jsonSchema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 5f98314bf6ba4022144a83e5348fd94b850ed99c..751f102fcdbc865e031af51ccf68b4bebdf33032 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -214,7 +214,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 5568a8b600b303d58a2ba52e29a84e664cf8d23f..a3cb7f143b44ef80c5120b38c0f224a77cd438e1 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -44,6 +44,8 @@ Check HTTP Location Header Contains URI of Created Resource Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -1166,7 +1168,7 @@ Post Create subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -1185,7 +1187,7 @@ Post Create subscription - DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -1203,7 +1205,7 @@ Post Create subscription - NO-DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -1461,8 +1463,17 @@ Fetch Information from SOL001 descriptor file @{VirtualLink_labels}= Create List @{CP_labels}= Create List @{Storage_labels}= Create List + + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + FOR ${key} IN @{topology_template.node_templates.keys()} - ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${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} @@ -1484,12 +1495,12 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 [Arguments] ${VNF_label} Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${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} + ${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} diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..04f00443ca7f093b7dc939e8f4b8d42c1a550080 100644 --- a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,73 +1,114 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v3.3.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 1 requirements: - virtual_link_right: - virtual_binding: VDU-B-2 + - virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 0 requirements: - virtual_link_management: - virtual_binding: VDU-B-1 + - virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] 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: + - virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: - size_of_storage: 20 + size_of_storage: 20 GB rdma_enabled: false sw_image_data: name: "vdu-b-1 image" @@ -76,63 +117,15 @@ topology_template: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' + 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_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-2 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 - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" - descriptor: "Description of VDU-B-1" + description: "Description of VDU-B-1" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 2 @@ -140,29 +133,33 @@ topology_template: virtual_compute: properties: virtual_memory: - virtual_mem_size: 4096 + virtual_mem_size: 4096 MB 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" + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" 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 + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index fb0bb290722ede39733e0da3a013e812295237d1..2b40b06755c39c2f7903a311863cfbeab18d8ac3 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -95,20 +95,22 @@ ${check_descriptors} 1 ${descriptorType} SOL006 ${check_multiple_instances} 0 +#############internal variables used for descriptor parsing################ ${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 +${tosca_type_derived_from_VNF} -@{VDU_IDs} -@{VNF_IDs} -@{virtualLink_IDs} -@{CP_IDs} -@{Storage_IDs} -@{internalCP_IDs} -@{externalCP_IDs} -@{InstantiationLevel_IDs} +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} ${Descriptor_ID} ${Provider} diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index 32440446f85c16c5f25e1d780de6cb479e17d59c..9efe999988eebdf0a1ee1e3da51d8b7a84439bfa 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -229,7 +229,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot index c441161df54ca7b606c4f0ad9b1271491294c315..fbaf31ae6b2400b5892d8952bee59c0f97585771 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot @@ -155,7 +155,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index b89cfb101b4f9030240a303bf01ad9b0a130f1e2..3b1ede7343781bceb07b428e093596642ce495a4 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -228,7 +228,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index 6729e776e0faf0fdbd9f4fcbcde5bcae9edeb5d1..8de51eb6149563659a00692bcb13348d10439866 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -409,7 +409,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index 63cc807246668b6148e4e5663692e04a638b752f..9f9c314017924725113f8748b7db5e7c0774e18f 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -258,7 +258,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index a5e14818d05d7daa5e00898a6c7d2df4211ad173..8651f5c8edc68ec3fd674690e33e1601bf286f8d 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -106,7 +106,7 @@ Send Post Request for VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} allow_redirects=false ${output}= Output response Set Suite Variable ${response} ${output} Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 @@ -137,7 +137,7 @@ Send Post Request for Duplicated VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} allow_redirects=false ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 303 @@ -271,7 +271,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot index 72dce684ae207102f8ecb8e3d1a81e355a57c0e6..66ac5df0933531adc5d5932b62b845858c6a6b6c 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -63,6 +63,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -273,7 +275,7 @@ POST Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -291,7 +293,7 @@ Send POST Request for duplicated subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -309,7 +311,7 @@ Send POST Request for duplicated subscription not permitted &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index eb7e4d10729706db5d5a399b4f057d995873c4f9..8d764cab5dca3e90edef4418e0ae5d3819e206b9 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -106,7 +106,7 @@ Send Post Request for VNF Indicator Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -127,7 +127,7 @@ Send Post Request for Duplicated VNF indicator Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -168,7 +168,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index 496319b4984dc53618eddca65dd6a1ddb93120e2..423900cd7257a26b9bb7cc7799f31824191c607f 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -84,7 +84,7 @@ PATCH Individual VNFInstance Conflict ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: VNFInstance not modified - PATCH individual vnfInstance + PATCH individual vnfInstance with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -132,5 +132,5 @@ Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index 7949f59dacfe759bf4875f00258ecd76cac2c53f..a4bd5d49a660b46fc4545fc73d9928d1c6c5ebe4 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -42,6 +42,8 @@ Check Operation Occurrence Id existence Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -578,9 +580,31 @@ PATCH individual vnfInstance ${template}= Get File jsons/patchBodyRequest.json ${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfdVersion= ${Descriptor_Version} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST conflicting operation + Log Trying to create conflicting operation. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/terminateVnfRequest.json + ${body}= Format String ${template} terminationType=${terminationType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${anotherInstantiatedVnfInstanceId}/terminate ${body} + +PATCH individual vnfInstance with conflict + POST conflicting operation + log Trying to modify an individual VNF instance with conflict + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/patchBodyRequest.json + ${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfdVersion= ${Descriptor_Version} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${anotherInstantiatedVnfInstanceId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - + PATCH individual vnfInstance - Etag mismatch log Trying to modify an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} @@ -601,6 +625,7 @@ DELETE individual vnfInstance Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + DELETE individual vnfInstance in INSTANTIATED state log Trying to delete an individual VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} @@ -1252,7 +1277,7 @@ Post Create subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -1272,7 +1297,7 @@ Post Create subscription - DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -1292,7 +1317,7 @@ Post Create subscription - NO-DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -1515,8 +1540,16 @@ Fetch Information from SOL001 descriptor file @{VirtualLink_labels}= Create List @{CP_labels}= Create List @{Storage_labels}= Create List + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + FOR ${key} IN @{topology_template.node_templates.keys()} - ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${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} @@ -1538,12 +1571,12 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 [Arguments] ${VNF_label} Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${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} + ${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} @@ -2069,8 +2102,9 @@ GET VNF State Snapshot - Range Request Set Headers {"Range":"${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId}/vnf_state_snapshot + Unset Headers ["Range"] ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Global Variable ${response} ${outputResponse} GET VNF State Snapshot - Invalid Range Pass Execution If ${VNFM_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. @@ -2079,8 +2113,9 @@ GET VNF State Snapshot - Invalid Range Set Headers {"Range":"${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId}/vnf_state_snapshot + Unset Headers ["Range"] ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Global Variable ${response} ${outputResponse} GET VNF State Snapshot - Conflict in State Log Trying to get information about a VNF State Snapshot whose creation process is not completed @@ -2132,4 +2167,4 @@ Check HTTP Content-Length Header Is Set Log Check Content-Range HTTP Header Should Contain ${response['headers']} Content-Length Should Be Equal As Strings ${response['headers']['Content-Length']} ${full_length} - Log Header Content-Length is present \ No newline at end of file + Log Header Content-Length is present diff --git a/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..0e0688b940d87c39d626a0a7db0970af8a9fe9f8 100644 --- a/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,73 +1,114 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v3.3.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + + node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 1 requirements: - virtual_link_right: - virtual_binding: VDU-B-2 + - virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 0 requirements: - virtual_link_management: - virtual_binding: VDU-B-1 + - virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] 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: + - virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: - size_of_storage: 20 + size_of_storage: 20 GB rdma_enabled: false sw_image_data: name: "vdu-b-1 image" @@ -76,63 +117,15 @@ topology_template: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' + 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_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-2 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 - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" - descriptor: "Description of VDU-B-1" + description: "Description of VDU-B-1" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 2 @@ -140,29 +133,33 @@ topology_template: virtual_compute: properties: virtual_memory: - virtual_mem_size: 4096 + virtual_mem_size: 4096 MB 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" + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" 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 + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/environment/variables.txt b/SOL003/VNFLifecycleManagement-API/environment/variables.txt index 53851db2a32f681983d834419babf6ced35e6393..2c277829eb37d1818fbcbe58cbca2a4f6bbd3241 100644 --- a/SOL003/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL003/VNFLifecycleManagement-API/environment/variables.txt @@ -44,11 +44,12 @@ ${erroneousRange} bytes=10000000-1000000000 # Requesting a out of range nu ${full_length} 2000 #Full size of the content file to be transmitted using partial downloads ${instantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${anotherInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${notExistingVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${conflicVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${conflictOperationVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${vnfInstanceId_NoSnapshotTask} no-snapshot-task-supported ${vnfSnapshotInfoId} ${vnfSnapshotInfoId_InUse} snapshotId-of-a-resource-AlreadyInUse-bySomeOther-operation @@ -140,20 +141,22 @@ ${callbackResp} localhost ${descriptorType} SOL001 ${check_descriptors} 1 +#############internal variables used for descriptor parsing################ ${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} +${tosca_type_derived_from_VNF} + +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} ${Descriptor_ID} ${Provider} diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index 09cc71681afb9f4b0dad01947e2e1d24746469ef..d8636fb1836687388e5ca53365b1735006d45c47 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -1,6 +1,7 @@ *** Settings *** Library String -Resource environment/variables.txt +Resource environment/variables.txt +Resource VNFLifecycleOperationGrantingKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary @@ -12,7 +13,6 @@ Documentation This resource represents grants. The client can use this resour ... from the NFVO to perform a particular VNF lifecycle operation. *** Variables *** -${response} {} ${retry} 2 min ${polling} 10 sec @@ -109,135 +109,4 @@ DELETE Grants - Method not implemented *** Keywords *** Wait for individual grant successful notification - Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful -Send Request Grant Request in Synchronous mode - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants - Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request - ${template}= Get File jsons/grantRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Send Request Grant Request in Asynchronous mode - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants - Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request - ${template}= Get File jsons/grantRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Send Request for a new Grant Forbiden Operation - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants - Log The grant request should be rejected - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request - ${template}= Get File jsons/grantRejectedRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check Operation Occurrence Id existence - ${occId}= Get Value From Json ${response['headers']} $..Location - Should Not Be Empty ${occId} - -Check HTTP Response Header Contains - [Arguments] ${CONTENT_TYPE} - Should Contain ${response['headers']} ${CONTENT_TYPE} - Log Header is present - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate SEPARATOR= ${input} .schema.json - Validate Json ${schema} ${response['body']} - -Get an individual grant - Successful - log Trying to read an individual grant - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${response['headers']['Location']} - Log Validate Status code - Integer response status 200 - -Get Grants - Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants - ${body}= Output response - Set Suite Variable ${response} ${body} - -Put Grants - Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants - ${body}= Output response - Set Suite Variable ${response} ${body} - -Patch Grants - Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants - ${body}= Output response - Set Suite Variable ${response} ${body} - -Delete Grants - Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants - ${body}= Output response - Set Suite Variable ${response} ${body} - -Add VNF Descriptor Content to Grant Request - PARSE the Descriptor File - -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 - Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} - ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} - ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} - ${software_version}= Get Variable Value ${topology_template.node_templates.properties.software_version} - ${descriptor_version}= Get Variable Value ${topology_template.node_templates.properties.descriptor_version} - ${flavour_id}= Get Variable Value ${topology_template.node_templates.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 - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - ${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} - 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} \ No newline at end of file + Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index 5f78fe347d0c2d04c651826278572ec7dfcb16b6..cf4e7d0266fb43acb2c214c3fccda1e8d713707b 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -1,5 +1,6 @@ *** Settings *** -Resource environment/variables.txt +Resource environment/variables.txt +Resource VNFLifecycleOperationGrantingKeywords.robot Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -100,145 +101,4 @@ DELETE an individual grant - Method not implemented ... Applicability: none ... Post-Conditions: none Delete individual Grant - Check HTTP Response Status Code Is 405 - -*** Keywords *** -Get individual grant - log Trying to read an individual grant - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - -Post individual Grant - log Trying to read an individual grant - Pass Execution If ${SYNC_MODE} == 1 Skipping. Synchronous mode is supported - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Put individual Grant - Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Patch individual Grant - Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Delete individual Grant - Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable ${response} ${body} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Header Contains - [Arguments] ${CONTENT_TYPE} - Should Contain ${response['headers']} ${CONTENT_TYPE} - Log Header is present - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate SEPARATOR= ${input} .schema.json - Validate Json ${schema} ${response['body']} - -Check HTTP Response Body grant content against VNF Descriptor - Run Keyword If ${check_descriptors} == 1 Check Individual grant Content - -Check Individual grant Content - PARSE the Descriptor File - Match the grant 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 - Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - @{VDU_labels}= Create List - @{VirtualLink_labels}= Create List - @{CP_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} - ${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} - Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} - Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} - Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} - END - Set Global Variable @{VDU_IDs} @{VDU_labels} - Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} - Set Global Variable @{CP_IDs} @{CP_labels} - -Fetch Information from SOL006 descriptor file - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - ${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']} - 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} - END - -Get VDU IDs - [Arguments] ${count} - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - @{VDU_labels}= Create List - @{Compute_labels}= Create List - FOR ${i} IN RANGE ${count} - Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} - Append To List ${Compute_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-compute-desc']} - END - Set Global Variable ${VDU_IDs} ${VDU_labels} - Set Global Variable ${Compute_IDs} ${Compute_labels} - -Get External CP IDs - [Arguments] ${count} - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - @{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} - Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml - ${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} - -Match the grant Response Attributes with Descriptors - Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} - Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} - List Should Contain Value ${VirtualLink_IDs} ${response['body']['extManagedVirtualLinkData'][0]['vnfVirtualLinkDescId']} - List Should Contain value ${Compute_IDs} ${response['body']['vimAssets']['computeResourceFlavours'][0]['vnfdVirtualComputeDescId']} + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot b/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot new file mode 100644 index 0000000000000000000000000000000000000000..bcc612f9f7733757352ef0fd23853a79af1c54a6 --- /dev/null +++ b/SOL003/VNFLifecycleOperationGranting-API/VNFLifecycleOperationGrantingKeywords.robot @@ -0,0 +1,311 @@ +*** Settings *** +Library String +Resource environment/variables.txt +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library Collections + +*** Variables *** +${retry} 2 min +${polling} 10 sec + +*** Keywords *** +Wait for individual grant successful notification + Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful +Send Request Grant Request in Synchronous mode + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants + Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/grantRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Send Request Grant Request in Asynchronous mode + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants + Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/grantRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Send Request for a new Grant Forbiden Operation + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants + Log The grant request should be rejected + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/grantRejectedRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check Operation Occurrence Id existence + ${occId}= Get Value From Json ${response['headers']} $..Location + Should Not Be Empty ${occId} + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + +Get an individual grant - Successful + log Trying to read an individual grant + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${response['headers']['Location']} + Log Validate Status code + Integer response status 200 + +Get Grants + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants + ${body}= Output response + Set Suite Variable ${response} ${body} + +Put Grants + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants + ${body}= Output response + Set Suite Variable ${response} ${body} + +Patch Grants + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants + ${body}= Output response + Set Suite Variable ${response} ${body} + +Delete Grants + Log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants + ${body}= Output response + Set Suite Variable ${response} ${body} + + +Get individual grant + log Trying to read an individual grant + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Check resource existence + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + +Post individual Grant + log Trying to read an individual grant + Pass Execution If ${SYNC_MODE} == 1 Skipping. Synchronous mode is supported + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Put individual Grant + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Patch individual Grant + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Delete individual Grant + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} + ${body}= Output response + Set Suite Variable ${response} ${body} + +Check HTTP Response Body grant content against VNF Descriptor + Run Keyword If ${check_descriptors} == 1 Check Individual grant Content + +Check Individual grant Content + PARSE the Descriptor File + Match the grant 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 + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + 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} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + ${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 + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${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} + ${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} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{VDU_labels}= Create List + ${Storage_labels}= Create List + ${Compute_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 ${Compute_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-compute-desc']} + Get Internal CPs for each VDU ${i} + END + Set Global Variable ${VDU_IDs} ${VDU_labels} + Set Global Variable ${Storage_IDs} ${Storage_labels} + Set Global Variable ${Compute_IDs} ${Compute_labels} + +Get Internal CPs for each VDU + [Arguments] ${vdu} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${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} + +Get External CP IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{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} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${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} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{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 grant Response Attributes with Descriptors + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['extManagedVirtualLinkData'][0]['vnfVirtualLinkDescId']} + List Should Contain value ${Compute_IDs} ${response['body']['vimAssets']['computeResourceFlavours'][0]['vnfdVirtualComputeDescId']} \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..603b1887d8a21e38d2c072e1184b780fc2f143dd 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,73 +1,114 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v3.3.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 1 requirements: - virtual_link_right: - virtual_binding: VDU-B-2 + - virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 0 requirements: - virtual_link_management: - virtual_binding: VDU-B-1 + - virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] 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: + - virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: - size_of_storage: 20 + size_of_storage: 20 GB rdma_enabled: false sw_image_data: name: "vdu-b-1 image" @@ -76,63 +117,15 @@ topology_template: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' + 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_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-2 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 - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" - descriptor: "Description of VDU-B-1" + description: "Description of VDU-B-1" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 2 @@ -140,29 +133,33 @@ topology_template: virtual_compute: properties: virtual_memory: - virtual_mem_size: 4096 + virtual_mem_size: 4096 MB 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" + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" 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 + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt index dbbedb4bf30bfb0e61f3b57331fd1a55d76f4771..61ccb5695f76b0c010bc3386f41b1fe0080216db 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt +++ b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt @@ -51,11 +51,11 @@ ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp -@{VDU_IDs} -@{virtualLink_IDs} -@{CP_IDs} -@{externalCP_IDs} -@{Compute_IDs} +${VDU_IDs} +${virtualLink_IDs} +${CP_IDs} +${externalCP_IDs} +${Compute_IDs} ${Descriptor_ID} ${Provider} diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 244baea75129043212a0a0db00936b1cf0721884..e2cf20f879352dcad973f2e20e366f7fb7f51e78 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -279,6 +279,7 @@ GET Individual VNF Package Content with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -288,6 +289,7 @@ GET Individual VNF Package Content with explicit Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -311,6 +313,7 @@ GET Individual VNF Package Content with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -415,7 +418,7 @@ Send Post Request for VNF Package Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -434,7 +437,7 @@ Send Post Request for Duplicated VNF Package Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -581,6 +584,7 @@ GET Individual VNF Package Artifact with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -591,6 +595,7 @@ GET Individual VNF Package Artifact with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -648,7 +653,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -1053,6 +1059,7 @@ GET Individual OnBoarded VNF Package Content with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1063,6 +1070,7 @@ GET Individual OnBoarded VNF Package Content with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1102,6 +1110,7 @@ GET Individual OnBoarded VNF Package Artifact with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1112,6 +1121,7 @@ GET Individual OnBoarded VNF Package Artifact with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1396,6 +1406,7 @@ Get Artifact in VNF Package with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1429,6 +1440,7 @@ GET VNF Package Artifact with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1519,6 +1531,7 @@ Get Artifact in OnBoarded VNF Package with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1552,6 +1565,7 @@ GET OnBoarded VNF Package Artifact with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1613,16 +1627,54 @@ PARSE the Descriptor File Fetch Information from SOL001 descriptor file Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} - ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} - ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} - ${software_version}= Get Variable Value ${topology_template.node_templates.properties.software_version} - ${descriptor_version}= Get Variable Value ${topology_template.node_templates.properties.descriptor_version} + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + 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} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL001.yaml + ${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 Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @@ -1630,13 +1682,78 @@ Fetch Information from SOL006 descriptor file ${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} + ${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} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{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} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${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} + +Get External CP IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{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} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${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} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{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 Package Response Attributes with Descriptors #Checking Response attributes with VNF Descriptors Should Be Equal As Strings ${response['body']['vnfdId']} ${Descriptor_ID} @@ -1660,4 +1777,4 @@ Match the VNF subscription Response Attributes with Descriptors Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProducts'][0]['vnfProductName']} ${Product_Name} Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProducts']['versions'][0]['vnfSoftwareVersion']} ${Software_Version} Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProducts']['versions'][0]['vnfdVersion']} ${Descriptor_Version} - \ No newline at end of file + diff --git a/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..1d38787320b38741c3919deb05effb540437c773 100644 --- a/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,73 +1,114 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v3.3.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 1 requirements: - virtual_link_right: - virtual_binding: VDU-B-2 + - virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 0 requirements: - virtual_link_management: - virtual_binding: VDU-B-1 + - virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] 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: + - virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: - size_of_storage: 20 + size_of_storage: 20 GB rdma_enabled: false sw_image_data: name: "vdu-b-1 image" @@ -76,63 +117,15 @@ topology_template: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' + 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_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-2 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 - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" - descriptor: "Description of VDU-B-1" + description: "Description of VDU-B-1" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 2 @@ -140,29 +133,33 @@ topology_template: virtual_compute: properties: virtual_memory: - virtual_mem_size: 4096 + virtual_mem_size: 4096 MB 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" + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" 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 + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/environment/variables.txt b/SOL003/VNFPackageManagement-API/environment/variables.txt index 0f3ab14e534150d6fc1f54e19dd9fd4c2e6c80f9..367da1ee02c049fba6a058349edd373f9275a60b 100644 --- a/SOL003/VNFPackageManagement-API/environment/variables.txt +++ b/SOL003/VNFPackageManagement-API/environment/variables.txt @@ -95,9 +95,26 @@ ${callbackResp} localhost ${descriptorType} SOL001 ${check_descriptors} 1 +#############internal variables used for descriptor parsing################ +${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 +${tosca_type_derived_from_VNF} + +${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} -${Flavour_ID} +${Flavour_ID} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot index 8e672dda59e8e4a71af79bc20d497ffe816c6aa5..bda65d8b15f6309e39290fb4f6de286d9f027a51 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -250,7 +250,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot index 9136851805e24520c2a5a6c1beb8c260fcba0f7b..f75b0d0f46e786d6aa174b53e3199e041d2afd97 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot @@ -144,7 +144,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot index ccfbc2cc8bca4f4dce59fe4b72bc76a5d001ab0b..c991eb86381e6ed06a6467810a608e7231e5015f 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -239,7 +239,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/PMJobs.robot b/SOL003/VNFPerformanceManagement-API/PMJobs.robot index 62f90e04343888157dc993797289abb216829f31..49c284c4ce1e9898c20f7623bdb23334115d54b9 100644 --- a/SOL003/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL003/VNFPerformanceManagement-API/PMJobs.robot @@ -445,7 +445,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/Thresholds.robot b/SOL003/VNFPerformanceManagement-API/Thresholds.robot index 191540a1d3dc2bf2657e638a9f84d8890b75e7b9..230ae23006ddcb927402aaabec012980df8e65d6 100644 --- a/SOL003/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL003/VNFPerformanceManagement-API/Thresholds.robot @@ -262,7 +262,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL003/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot b/SOL003/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot index 0a68e14515d976ceb004bc9d093f173eb7e882bf..cc739c3af381d61d6f81e2aa2d69ccbce5ccb74b 100644 --- a/SOL003/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot +++ b/SOL003/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot @@ -84,6 +84,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -283,6 +285,7 @@ GET VNF Snapshot Package Content - Range Request Set Headers {"Range":"${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content + Unset Headers ["Range"] ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -293,6 +296,7 @@ GET VNF Snapshot Package Content - Invalid Range Set Headers {"Range":"${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content + Unset Headers ["Range"] ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -372,6 +376,7 @@ GET Individual VNF Snapshot Package Artifact - Range Request Set Headers {"Range":"${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -382,6 +387,7 @@ GET Individual VNF Snapshot Package Artifact - Invalid Range Set Headers {"Range":"${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot index 82d28996e108c7b23385c9b0c71ecba8f2b7de67..9c405cd24799fbfb96a415415cd8d3d69df8ab53 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot @@ -34,6 +34,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -101,7 +103,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -119,7 +121,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -137,7 +139,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} diff --git a/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot b/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot index 1efc69be40110b51f5486b9b9385cd5153ab6a18..d4ce40ea15adfc90e0a0747fab991e7fb287748d 100644 --- a/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot +++ b/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot @@ -86,6 +86,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index fa450c157f33e329ca5a8a02ddc1fa72a28708a0..e05cfa8b9656d61e5f8a9e3ac5798db8360d0543 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -346,6 +346,7 @@ GET NSD Content with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -356,6 +357,7 @@ GET NSD Content with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -658,6 +660,7 @@ Get PNFD Content with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -667,6 +670,7 @@ Get PNFD Content with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -784,7 +788,7 @@ Send Post Request for NSD Management Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -805,7 +809,7 @@ Send POST Request for Duplicated NSD Management Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -853,7 +857,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Log ${response['body']} Validate Json ${schema} ${response['body']} @@ -1378,6 +1383,7 @@ GET Individual PNFD Archive Artifact with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1410,6 +1416,7 @@ GET Individual PNFD Archive Artifact with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/artifacts/${pnfd_artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1449,6 +1456,7 @@ GET Individual NSD Archive Artifact with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1493,6 +1501,7 @@ GET Individual NSD Archive Artifact with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot index 8584aaec204e9139b8e55a386b01c4d2cfd5f503..939ddbeebb15caf6942bafc68c3fbf50928538e6 100644 --- a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot +++ b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot @@ -35,6 +35,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -220,7 +222,7 @@ POST Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} diff --git a/SOL005/NSFaultManagement-API/schemas/alarm.schema.json b/SOL005/NSFaultManagement-API/schemas/alarm.schema.json index 76fc395048b4f6a0b7d4a5ad2e7bfc127f7be059..5aadd14cd7b2e0f32beb78a7d6084972770added 100644 --- a/SOL005/NSFaultManagement-API/schemas/alarm.schema.json +++ b/SOL005/NSFaultManagement-API/schemas/alarm.schema.json @@ -157,7 +157,10 @@ }, "faultDetails": { "description": "Provides additional information about the fault..\n", - "type": "string" + "type": "array", + "items": { + "type": "string" + } }, "_links": { "description": "Links for this resource.\n", diff --git a/SOL005/NSFaultManagement-API/schemas/alarms.schema.json b/SOL005/NSFaultManagement-API/schemas/alarms.schema.json index 716025e5775725df1c3b92c4213841ac67ee3fdf..b43c87fb1721b96df740c6947c620eb715767bc7 100644 --- a/SOL005/NSFaultManagement-API/schemas/alarms.schema.json +++ b/SOL005/NSFaultManagement-API/schemas/alarms.schema.json @@ -159,7 +159,10 @@ }, "faultDetails": { "description": "Provides additional information about the fault..\n", - "type": "string" + "type": "array", + "items": { + "type": "string" + } }, "_links": { "description": "Links for this resource.\n", diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index bbde72695fcdc135a2dc8d6af1deaa83c536cbf8..3fd36dfce7e21f10c2b408f10f88bc4abbb3949c 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -198,6 +198,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -245,8 +247,17 @@ Fetch Information from SOL001 descriptor file @{VirtualLink_labels}= Create List @{CP_labels}= Create List @{Storage_labels}= Create List + + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + FOR ${key} IN @{topology_template.node_templates.keys()} - ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${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} @@ -268,12 +279,12 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 [Arguments] ${VNF_label} Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${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} + ${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} @@ -1127,7 +1138,7 @@ POST subscriptions &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -1146,7 +1157,7 @@ POST subscriptions DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -1165,7 +1176,7 @@ POST subscriptions NO DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} diff --git a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index 3a90f45bf32fdb008af0ea698fc1affa8bc4da12..838bea448dbc7726ffbf899d1e1fb68609a356b2 100644 --- a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,73 +1,114 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v3.3.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 1 requirements: - virtual_link_right: - virtual_binding: VDU-B-2 + - virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 0 requirements: - virtual_link_management: - virtual_binding: VDU-B-1 + - virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] 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: + - virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: - size_of_storage: 20 + size_of_storage: 20 GB rdma_enabled: false sw_image_data: name: "vdu-b-1 image" @@ -76,63 +117,15 @@ topology_template: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' + 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_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-2 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: - type: "tosca.nodes.nfv.VNF" - properties: - descriptor_id: "VNF_B" - 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 - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" - descriptor: "Description of VDU-B-1" + description: "Description of VDU-B-1" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 2 @@ -140,29 +133,33 @@ topology_template: virtual_compute: properties: virtual_memory: - virtual_mem_size: 4096 + virtual_mem_size: 4096 MB 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" + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" 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 + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/environment/variables.txt b/SOL005/NSLifecycleManagement-API/environment/variables.txt index 5576d1622b79260f490c07bdfd1c21eff3b46efb..7e11084e3f28344e4f424c6b3b8898ac167e93b5 100644 --- a/SOL005/NSLifecycleManagement-API/environment/variables.txt +++ b/SOL005/NSLifecycleManagement-API/environment/variables.txt @@ -101,28 +101,30 @@ ${callbackResp} 127.0.0.1 ${check_descriptors} 1 ${descriptorType} SOL006 +#############internal variables used for descriptor parsing################ ${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 +${tosca_type_derived_from_VNF} ${tosca_type_NS} tosca.nodes.nfv.NS ${tosca_type_NsVirtualLink} tosca.nodes.nfv.NsVirtualLink ${tosca_type_NsCP} tosca.nodes.nfv.Cp -@{VDU_IDs} -@{VNF_IDs} -@{virtualLink_IDs} -@{CP_IDs} -@{Storage_IDs} -@{internalCP_IDs} -@{externalCP_IDs} -@{InstantiationLevel_IDs} - -@{NS_VirtualLink_IDs} -@{NsCP_IDs} -@{SAP_IDs} +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} + +${NS_VirtualLink_IDs} +${NsCP_IDs} +${SAP_IDs} ${NS_DescriptorID} ${Designer} @@ -130,7 +132,6 @@ ${NS_Name} ${NS_Version} ${NS_InvariantId} - ${Descriptor_ID} ${Provider} ${Product_Name} diff --git a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot index 8c566c0d40acde108e445f600f7ed738708ee264..69f8826c5d3852df49b281da638ea2a73721a85f 100644 --- a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot +++ b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot @@ -556,7 +556,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 9cd205605237291429f2c278a5077cfbe840b56f..661f409bbdb3164a1d3cc0a6cc4b053bf92e6fc8 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -197,11 +197,46 @@ PARSE the Descriptor File Fetch Information from SOL001 descriptor file Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml - ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} - ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} - ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} - ${software_version}= Get Variable Value ${topology_template.node_templates.properties.software_version} - ${descriptor_version}= Get Variable Value ${topology_template.node_templates.properties.descriptor_version} + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{node_types.keys()} + ${node_type}= Get Variable Value ${node_types['${key}']['derived_from']} + ${is_VNF}= Run Keyword And Return Status Should Be Equal As Strings ${node_type} ${tosca_type_VNF} + Run Keyword If ${is_VNF} Set Global Variable ${tosca_type_derived_from_VNF} ${key} + END + ${derived_type_is_used}= Run Keyword And Return Status Should not be empty ${tosca_type_derived_from_VNF} + Run Keyword If ${derived_type_is_used} Set Global Variable ${tosca_type_VNF} ${tosca_type_derived_from_VNF} + 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} + Set Global Variable ${Descriptor_ID} ${descriptor_id} Set Global Variable ${Provider} ${provider} @@ -213,15 +248,75 @@ Fetch Information from SOL006 descriptor file Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${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} + ${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']} + 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} + +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 Response Attributes of vnfPkgInfo with Descriptors #Checking Response attributes with VNF Descriptors Should Be Equal As Strings ${response['body']['vnfdId']} ${Descriptor_Id} @@ -457,6 +552,7 @@ GET Individual VNF Package Content with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -466,6 +562,7 @@ GET Individual VNF Package Content with explicit Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -489,6 +586,7 @@ GET Individual VNF Package Content with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -586,6 +684,7 @@ GET Individual VNF Package Artifact with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -596,6 +695,7 @@ GET Individual VNF Package Artifact with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -742,7 +842,7 @@ Send Post Request for VNF Package Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -761,7 +861,7 @@ Send Post Request for Duplicated VNF Package Subscription &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} @@ -921,7 +1021,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -1132,6 +1233,7 @@ Get Artifact in VNF Package with Range Request Set Headers {"Range": "${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} @@ -1165,6 +1267,7 @@ GET VNF Package Artifact with invalid Range Request Set Headers {"Range": "${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + Unset Headers ["Range"] ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..603b1887d8a21e38d2c072e1184b780fc2f143dd 100644 --- a/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,73 +1,114 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v3.3.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 1 requirements: - virtual_link_right: - virtual_binding: VDU-B-2 + - virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] order: 0 requirements: - virtual_link_management: - virtual_binding: VDU-B-1 + - virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: + layer_protocols: [ ipv4 ] 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: + - virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: - size_of_storage: 20 + size_of_storage: 20 GB rdma_enabled: false sw_image_data: name: "vdu-b-1 image" @@ -76,63 +117,15 @@ topology_template: algorithm: "sha-224" hash: "somehashfortst010" container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' + 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_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-2 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 - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" - descriptor: "Description of VDU-B-1" + description: "Description of VDU-B-1" vdu_profile: min_number_of_instances: 1 max_number_of_instances: 2 @@ -140,29 +133,33 @@ topology_template: virtual_compute: properties: virtual_memory: - virtual_mem_size: 4096 + virtual_mem_size: 4096 MB 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" + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" 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 + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/environment/variables.txt b/SOL005/VNFPackageManagement-API/environment/variables.txt index 8846ff677a503681e3f8717c184849b8551a53cf..f2c1e1446d99d2043dcb2675153075770e82e23c 100644 --- a/SOL005/VNFPackageManagement-API/environment/variables.txt +++ b/SOL005/VNFPackageManagement-API/environment/variables.txt @@ -93,20 +93,22 @@ ${callbackResp} 127.0.0.1 ${check_descriptors} 1 ${descriptorType} SOL006 +#############internal variables used for descriptor parsing################ ${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 +${tosca_type_derived_from_VNF} -@{VDU_IDs} -@{VNF_IDs} -@{virtualLink_IDs} -@{CP_IDs} -@{Storage_IDs} -@{internalCP_IDs} -@{externalCP_IDs} -@{InstantiationLevel_IDs} +${VDU_IDs} +${VNF_IDs} +${virtualLink_IDs} +${CP_IDs} +${Storage_IDs} +${internalCP_IDs} +${externalCP_IDs} +${InstantiationLevel_IDs} ${Descriptor_ID} ${Provider} diff --git a/SOL005/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot b/SOL005/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot index 165ffc5bba09b260e18d55da11fc4fbafd049b7e..e5c9cf02e87a6b9417af6fae57572e8425499eec 100644 --- a/SOL005/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot +++ b/SOL005/VNFSnapshotPackageManagement-API/VnfSnapshotPackageManagementKeywords.robot @@ -87,6 +87,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -322,6 +324,7 @@ GET VNF Snapshot Package Content - Range Request Set Headers {"Range":"${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content + Unset Headers ["Range"] ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -332,6 +335,7 @@ GET VNF Snapshot Package Content - Invalid Range Set Headers {"Range":"${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content + Unset Headers ["Range"] ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -436,6 +440,7 @@ GET Individual VNF Snapshot Package Artifact - Range Request Set Headers {"Range":"${range}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -446,6 +451,7 @@ GET Individual VNF Snapshot Package Artifact - Invalid Range Set Headers {"Range":"${erroneousRange}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath} + Unset Headers ["Range"] ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -823,4 +829,4 @@ DELETE Access Configuration for External Artifacts Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/ext_artifacts_access ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} \ No newline at end of file + Set Global Variable ${response} ${outputResponse} diff --git a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot index a83c15dd467329d47b69717bbf57f9b2b6cd50bd..66a27222489283dd0c900a6be18235db8afe8adf 100644 --- a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot @@ -39,6 +39,8 @@ GET Fault Management Alarms Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json Validate Json ${schema} ${response[0]['body']} Log Json Schema Validation OK @@ -220,7 +222,7 @@ POST Subscription Duplication not permitted Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template}= Get File jsons/fmSubscriptionRequest.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} diff --git a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot index f1ea06205dd1d2a92ae4a75b46006d0598ef6c21..e1be24d63e3215fb0619a4d1a0bfb3f7b527c53c 100644 --- a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot +++ b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot @@ -24,7 +24,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -473,7 +474,7 @@ Send Post Request for Duplicated Subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${template}= Get File jsons/subscriptions.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot index 7b7b2564e658e5e5609cc43ca8a1957c8de5e00e..fb16841cf35e7afa58b68a481f652084110616b6 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot @@ -177,7 +177,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot index b11f802b7178bdf5ac716ef8d02d448ff4172e93..873fa6f4fd2329fb9ac68511721a34b146f259b0 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot @@ -143,7 +143,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualSubscription.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualSubscription.robot index 0092c466bbed3ba33bb219894f9cb6ece1782ed3..2e0558a517626509cb301f28093c1d7c84cdba7a 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/IndividualSubscription.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualSubscription.robot @@ -102,7 +102,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot index 1e8c9a94e58d3e10a592317d6540036a7e7b7621..d66a5f55526bfc0fc5e7fbd0074be5c8ac6a0d03 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot @@ -177,7 +177,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot b/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot index f9be6fcb02522265619959dc39cc8ba985c32f1c..66281f44ce22c9597edac6cd3dcbbad5dca48054 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot @@ -403,7 +403,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL009/NFVMANOPerformanceManagement-API/Subscriptions.robot b/SOL009/NFVMANOPerformanceManagement-API/Subscriptions.robot index c3ae8e0db29aa8cd600cf441286677c84598748b..013db6210a89f34e175faa6f11026f22c98249fe 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/Subscriptions.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/Subscriptions.robot @@ -204,7 +204,8 @@ Check HTTP Response Header Contains Link Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -276,7 +277,7 @@ Send Post Request for Duplicated Performance Subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} ${template}= Get File jsons/subscriptions.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot b/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot index a96ea74c25253fab81c7736e7ae3911b51ba4419..71a956bf4e461e412f9a7de111036440df4fcf19 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot @@ -213,7 +213,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot b/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot index 0689396c5aeeb1a97a92a837b3de4eb6eaab6b80..44fb391061073acbdba0adc6728fb659ce3624f1 100644 --- a/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot @@ -24,7 +24,8 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response['headers']['Content-Type']} application/json + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -695,7 +696,7 @@ Send Post Request for Duplicated Subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${template}= Get File jsons/CimSubscriptionRequest.json ${body_request}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} allow_redirects=false ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot b/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot index dd61944508300ffba05861441ca4999557f5f02b..87ccabc70035778456267642a6eff955112445dd 100644 --- a/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot +++ b/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot @@ -35,6 +35,8 @@ Check HTTP Response Header Contains Link Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json Validate Json ${schema} ${response['body']} @@ -44,7 +46,7 @@ POST subscriptions Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/NsInstanceUsageSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -55,7 +57,7 @@ POST subscriptions DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/NsInstanceUsageSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -66,7 +68,7 @@ POST subscriptions NO DUPLICATION Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/NsInstanceUsageSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot index 45b83dff17b47bc1cd3f01b19891ca7a741c1d6e..7ad64adf52138c9e40164380816a2912377803c4 100644 --- a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot +++ b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot @@ -49,7 +49,6 @@ POST Create a new Subscription - NO-DUPLICATION ... Applicability: Duplication NOT supported by NFVO-C ... Post-Conditions: Duplicate subscription is not created in the NFVO POST subscriptions NO DUPLICATION - Check Subscription Existence Check HTTP Response Status Code Is 303 Check HTTP Response Header Contains Location Check Postcondition Subscription Is Set diff --git a/SOL011/NSLifecycleOperationGranting-API/NSLCOperationGrantingKeywords.robot b/SOL011/NSLifecycleOperationGranting-API/NSLCOperationGrantingKeywords.robot index 9d29ab9d9dc8108e9785de6ffa33c642e7111b44..9838b930b4a6edcf90a3a18669ae269eb5c713ca 100644 --- a/SOL011/NSLifecycleOperationGranting-API/NSLCOperationGrantingKeywords.robot +++ b/SOL011/NSLifecycleOperationGranting-API/NSLCOperationGrantingKeywords.robot @@ -43,6 +43,8 @@ Check Resource URI existence Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json Validate Json ${schema} ${response['body']} diff --git a/SOL012/PolicyManagement-API/PolicyManagementKeywords.robot b/SOL012/PolicyManagement-API/PolicyManagementKeywords.robot index 2de04c7994696412dbece9b19b3eb1bcec479544..b6fd1f0e88eb2b072ca01b4dee311c60592e1be8 100644 --- a/SOL012/PolicyManagement-API/PolicyManagementKeywords.robot +++ b/SOL012/PolicyManagement-API/PolicyManagementKeywords.robot @@ -91,6 +91,8 @@ Check HTTP Response Status Code Is Check HTTP Response Body Json Schema Is [Arguments] ${input} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -152,7 +154,7 @@ POST subscriptions &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} @@ -173,7 +175,7 @@ POST subscriptions NO DUPLICATION &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request Create Mock Expectation ${notification_request} ${notification_response} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} allow_redirects=false ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Clear Requests ${callback_endpoint} diff --git a/SOL012/PolicyManagement-API/Subscriptions.robot b/SOL012/PolicyManagement-API/Subscriptions.robot index 2e10d4b8953d7cafec8cd1e4a18d7059a1887903..f0267cc12b1fef4ef67c31648e906ce9c06fef1c 100644 --- a/SOL012/PolicyManagement-API/Subscriptions.robot +++ b/SOL012/PolicyManagement-API/Subscriptions.robot @@ -31,7 +31,6 @@ POST Create a new Subscription - DUPLICATION NOT ALLOWED ... Applicability: Duplication is not supported by NFVMANO. ... Post-Conditions: Individual subscription resource returned in the location header is available. POST subscriptions NO DUPLICATION - Check Subscription Existence Check HTTP Response Status Code Is 303 Check HTTP Response Header Contains Location Check Postcondition Individual Subscription Resource Returned in Location Header Is Available diff --git a/internal_variables.txt b/internal_variables.txt new file mode 100644 index 0000000000000000000000000000000000000000..9838cae329645f2ab69a725e61c3628b6b00168d --- /dev/null +++ b/internal_variables.txt @@ -0,0 +1,561 @@ +################################################################ +####################### v3.3.1-fix-plu ######################### +################################################################ + + +######################### SOL002 ############################### + + +### SOL002 VNFConfiguration-API ### + +${response}= httpresponse +${ACCEPT} application/json +${CONTENT_TYPE} application/json + +### SOL002 VNFFaultManagement-API ### + +${ACCEPT} application/json +${ACCEPT_JSON} application/json +${CONTENT_TYPE} application/json +${origResponse}= httpresponse +${CONTENT_TYPE_PATCH} application/merge-patch+json +${notification_request} [] +${notification_response} [] +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +${AlarmNotification} {} +${AlarmClearedNotification} {} +${AlarmListRebuiltNotification} {} +#${response}= httpresponse + +### SOL002 VNFIndicator-API ### + +${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} some_response_object +#${origResponse}= httpresponse +${vnfIndicators} = + +### SOL002 VNFIndicatorNotification-API ### + +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +### SOL002 VNFLifecycleManagement-API ### + +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +${ACCEPT_PLAIN} text/plain +${ACCEPT_ZIP} application/zip +${ARTIFACT_TYPE} application/octet-stream +${WRONG_ACCEPT} application/json +${VnfLcmOperationOccurrenceNotification} {} +${VnfIdentifierCreationNotification} {} +${VnfIdentifierDeletionNotification} {} +#${notification_request} [] +#${notification_response} [] +#${response}= httpresponse +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +${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} + +${scaleVnfRequesttype} SCALE_OUT +${scaleVnfRequestAspect} Aspect + + +### SOL002 VNFPerformanceManagement-API ### + +#${CONTENT_TYPE_JSON} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} http-response +${subscribe} /subscribe +${OrigResponse}= httpresponse + +### SOL002 VNFPerformanceManagementNotification-API ### + +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + + +######################### SOL003 ############################### + + +### SOL003 VirtualizedQuotaAvailableNotification-API ### + +#${CONTENT_TYPE} application/json +#${ACCEPT} application/json +#${notification_request} [] +#${notification_response} [] +${VrQuotaAvailNotification} {} +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} {} + + +### SOL003 VNFFaultManagement-API ### + +#${CONTENT_TYPE} application/json +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${AlarmNotification} {} +#${AlarmClearedNotification} {} +#${AlarmListRebuiltNotification} {} +#${response} {} +${req_mock} {} +${resp_mock} {} +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + + +### SOL003 VNFFaultManagementNotification-API ### + +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + + +### SOL003 VNFIndicator-API ### + +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE_JSON} application/json +#${response} +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${origResponse} httpresponse + + +### SOL003 VNFLifecycleManagement-API ### + +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ARTIFACT_TYPE} application/octet-stream +#${WRONG_ACCEPT} application/json +${ACCEPT_OCTET} application/octet-stream + +${CONTENT_TYPE_OCTET} application/octet-stream +${VnfLcmOperationOccurrenceNotification} {} +${VnfIdentifierCreationNotification} {} +${VnfIdentifierDeletionNotification} {} +#${response} {} +${json} {} + +${changeVnfFlavourRequest} {} +${changeVnfOperateRequest} {} +${requestedState} test +${changeVnfExtConnectivityRequest} {} +${patchBodyRequest} {} + +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +${LccnSubscriptions} +${scaleInfo} +${element} +${scaleOutResponse} + +#${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +#${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +#${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp + +#${VDU_IDs} +#${virtualLink_IDs} +#${CP_IDs} +#${externalCP_IDs} + +#${Descriptor_ID} +#${Provider} +#${Product_Name} +#${Software_Version} +#${Descriptor_Version} + + +### SOL003 VNFLifecycleOperationGranting-API ### + +#${CONTENT_TYPE} application/json +#${ACCEPT} application/json +#${response} {} +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ARTIFACT_TYPE} application/octet-stream +#${WRONG_ACCEPT} application/json +#${VrQuotaAvailNotification} {} + +#${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +#${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +#${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp + +#${VDU_IDs} +#${virtualLink_IDs} +#${CP_IDs} +#${externalCP_IDs} + +#${Descriptor_ID} +#${Provider} +#${Product_Name} +#${Software_Version} +#${Descriptor_Version} + + +### SOL003 VNFPackageManagement-API ### + +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE_JSON} application/json +#${response} httpresponse +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${notification_request} [] +#${notification_response} [] +#${origResponse} httpresponse +#${ACCEPT_PLAIN} text/plain +${CONTENT_TYPE_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +${CONTENT_TYPE_ZIP} application/zip +#${artifactPath} artifactPath +#${CONTENT_TYPE_OCTET} application/octet-stream + +#${Descriptor_ID} +#${Provider} +#${Product_Name} +#${Software_Version} +#${Descriptor_Version} + +### SOL003 VNFPerformanceManagement-API ### + + +#${CONTENT_TYPE_JSON} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response}= httpresponse +#${OrigResponse}= httpresponse +#${notification_request} [] +#${notification_response} [] + + +### SOL003 VNFSnapshotPackages-API ### + +#${ACCEPT_JSON} application/json +#${AUTH_USAGE} 1 +#${CONTENT_TYPE_JSON} application/json +#${response} httpresponse +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${notification_request} [] +#${notification_response} [] +#${origResponse} httpresponse +#${ACCEPT_PLAIN} text/plain +#${CONTENT_TYPE_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ACCEPT_OCTET} application/octet-stream +#${CONTENT_TYPE_ZIP} application/zip +#${CONTENT_TYPE_OCTET} application/octet-stream + + +######################### SOL005 ############################### + + +### SOL005 NFVICapacityInformation-API ### + +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE_JSON} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${response} httpresponse +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${notification_request} [] +#${notification_response} [] +#${origResponse} httpresponse +#${ACCEPT_PLAIN} text/plain +#${CONTENT_TYPE_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ACCEPT_OCTET} application/octet-stream +#${CONTENT_TYPE_ZIP} application/zip +#${CONTENT_TYPE_OCTET} application/octet-stream + + +### SOL005 NSDManagement-API ### + +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${notification_request} [] +#${notification_response} [] +#${response} httpresponse +#${origResponse} httpresponse +#${ACCEPT_ZIP} application/zip +#${ACCEPT_PLAIN} text/plain +#${CONTENT_TYPE_ZIP} application/zip +#${CONTENT_TYPE_PLAIN} text/plain +#${CONTENT_TYPE_OCTET} application/octet-stream + +${NS_DescriptorID} +${Designer} +${NS_Name} +${NS_Version} +${NS_InvariantId} + + +### SOL005 NSFaultManagement-API ### + +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${AlarmNotification} {} +#${AlarmClearedNotification} {} +#${AlarmListRebuiltNotification} {} +#${response} {} +#${req_mock} {} +#${resp_mock} {} +#${notification_request} [] +#${notification_response} [] + + +### SOL005 NSLifecycleManagement-API ### + +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_JSON} application/json +#${ACCEPT} application/json +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ARTIFACT_TYPE} application/octet-stream +#${WRONG_ACCEPT} application/json +#${VnfLcmOperationOccurrenceNotification} {} +#${VnfIdentifierCreationNotification} {} +#${VnfIdentifierDeletionNotification} {} +#${notification_request} {} +#${notification_response} {} +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} {} +#${json} {"notificationStatus": ""} + +#${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +#${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +#${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +#${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +#${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +${tosca_type_NS} tosca.nodes.nfv.NS +${tosca_type_NsVirtualLink} tosca.nodes.nfv.NsVirtualLink +${tosca_type_NsCP} tosca.nodes.nfv.Cp + +${NS_VirtualLink_IDs} +${NsCP_IDs} +${SAP_IDs} + +#${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} + +#${NS_DescriptorID} +#${Designer} +#${NS_Name} +#${NS_Version} +#${NS_InvariantId} + + +### SOL005 NSPerformanceManagement-API ### + +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +#${response} {} +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${origResponse}= httpresponse +#${notification_request} [] +#${notification_response} [] + + +### SOL005 VNFPackageManagement-API ### + +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} +#${notification_request} [] +#${notification_response} [] +#${origResponse} httpresponse +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${CONTENT_TYPE_PLAIN} text/plain +#${CONTENT_TYPE_ZIP} application/zip +#${CONTENT_TYPE_OCTET} application/octet-stream + +#${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} + +### SOL005 VNFSnapshotPackageManagement-API ### + +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE_JSON} application/json +#${response} httpresponse +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${notification_request} [] +#${notification_response} [] +#${origResponse} httpresponse +#${ACCEPT_PLAIN} text/plain +#${CONTENT_TYPE_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ACCEPT_OCTET} application/octet-stream +#${CONTENT_TYPE_ZIP} application/zip +#${CONTENT_TYPE_OCTET} application/octet-stream + + +######################### SOL009 ############################### + +### SOL009 NFVManoConfigurationAndInformationManagement-API ### + +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${response} +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${origResponse} {} + + +### SOL009 NFVMANOFaultManagement-API ### + +#${CONTENT_TYPE} application/json +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +#${response} {} +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + + +### SOL009 NFVMANOLogManagement-API ### + +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${ACCEPT} application/json +#${response} {} +#${origResponse} {} +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + + +### SOL009 NFVMANOPerformanceManagement-API ### + +#${response}= httpresponse +#${OrigResponse}= httpresponse +#${notification_request} [] +#${notification_response} [] +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT_JSON} application/json +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +#${response} + + +######################### SOL011 ############################### + + +### SOL011 NSInstanceUsageNotification-API ### + +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +#${response} {} +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ARTIFACT_TYPE} application/octet-stream +#${WRONG_ACCEPT} application/json +#${VrQuotaAvailNotification} {} +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +### SOL011 NSLifecycleOperationGranting-API ### + +#${CONTENT_TYPE} application/json +#${ACCEPT} application/json +#${response} +#${CONTENT_TYPE_PATCH} application/merge-patch+json +#${ACCEPT_PLAIN} text/plain +#${ACCEPT_ZIP} application/zip +#${ARTIFACT_TYPE} application/octet-stream +#${WRONG_ACCEPT} application/json +#${VrQuotaAvailNotification} {} + + +######################### SOL012 ############################### + + +### SOL012 PolicyManagement-API ### + +#${CONTENT_TYPE} application/json +#${CONTENT_TYPE_JSON} application/json +#${ACCEPT} application/json +#${ACCEPT_JSON} application/json +${POLICY_CONTENT_TYPE} application/json +#${response} {} +#${VrQuotaAvailNotification} {} +#${notification_request} [] +#${notification_response} [] +#${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index bafc102d3843316cb6cca0a589fffb5deb65e8f5..4f00299b7ec3c17280e3269345fe687d2d7815e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ ## To install the libraries, use: # pip -r requirements.txt - +git+https://github.com/etsi-cti-admin/RESTinstance robotframework==3.1 -RESTinstance==1.0.0rc4 +#RESTinstance==1.0.0rc4 robotframework-dependencylibrary==1.0.0.post1 robotframework-jsonlibrary==0.3 robotframework-jsonschemalibrary==1.0 diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index bf5f18016e4e9c9175fbc6ee663c262a3e3009fd..9f082157bc7b1e5c57c486bc7d932e86f7177057 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 MAINTAINER ETSI STF 583