Commit 2ec13a0a authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch '2.8.1-fix-plu' into '2.8.1-dev'

merge 2.8.1 fix plu into 2.8.1 dev

See merge request !197
parents 8198d2e7 dde654fd
......@@ -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
......@@ -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
......
......@@ -19,8 +19,4 @@ ${apiRoot} /
${apiName} vnfconfig
${apiMajorVersion} v1
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
\ No newline at end of file
......@@ -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
......
......@@ -112,7 +112,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
\ No newline at end of file
......@@ -192,7 +192,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
......
......@@ -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
......
......@@ -317,7 +317,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}
......@@ -424,7 +424,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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -337,7 +338,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}
......@@ -357,7 +358,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}
......
......@@ -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
......
......@@ -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
......
......@@ -40,6 +40,8 @@ Check Operation Occurrence Id
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
......@@ -854,7 +856,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}
......@@ -872,7 +874,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}
......@@ -1130,8 +1132,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}
......@@ -1153,12 +1163,12 @@ Fetch Information from SOL001 descriptor file
Get VNF Attributes from SOL001
Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml
[Arguments] ${VNF_label}
${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id}
${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider}
${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name}
${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version}
${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version}
${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id}
${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}
......
......@@ -2,7 +2,7 @@ tosca_definitions_version: tosca_simple_yaml_1_2
description: "TST010 reference VNF-B"
imports:
- https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml
- https://forge.etsi.org/rep/nfv/SOL001/raw/v2.8.1/etsi_nfv_sol001_vnfd_types.yaml
metadata:
descriptor_id: "VNF-B"
......@@ -90,7 +90,6 @@ topology_template:
order: 1
requirements:
- virtual_binding: VDU-B
vdu-b-1-vsd:
management:
type: "tosca.nodes.nfv.VduCp"
properties:
......@@ -98,7 +97,6 @@ topology_template:
order: 0
requirements:
- virtual_binding: VDU-B
vdu-b-1-vsd:
left:
type: "tosca.nodes.nfv.VduCp"
properties:
......
......@@ -87,20 +87,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} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder
${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}
......
......@@ -241,7 +241,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
......
......@@ -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
......
......@@ -243,7 +243,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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment