Commit 710a4b2a authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Merge branch 'v2.2.1-dev' into 'master'

V2.2.1 dev

Closes #35, #37, #34, #36, #33, #39, #30, #32, and #28

See merge request !2
parents 5d7b0b75 980cf761
Pipeline #10878 passed with stage
in 0 seconds
......@@ -9,7 +9,24 @@ cd "$(dirname "$0")"
run_dir="$(pwd)"
echo "Using git branch $GIT_BRANCH"
./scripts/build-container.sh
./scripts/run-container.sh "${run_dir}"
exit $?
if [[ "$GIT_BRANCH" =~ .*fix-plu$ ]]; then
apiTestsVersion=$(echo $GIT_BRANCH | cut -d'/' -f 2)
apiTestsVersion=$(echo $apiTestsVersion | cut -d'-' -f 1)
echo apiTestsVersion
curl -X POST \
-F token=${ROBOT_HIVE_TAP_TT_TOKEN} \
-F ref=master \
-F "variables[API_TESTS_VERSION]=$apiTestsVersion" \
-F "variables[TEST_SUITE]=MEC" \
https://forge.etsi.org/rep/api/v4/projects/484/trigger/pipeline
fi
ret=$?
echo "Final validation result: $ret"
exit $ret
......@@ -25,7 +25,8 @@ Should Be Present In Json List
[Arguments] ${expr} ${json_field} ${json_value}
Log Check if ${json_field} is present in ${expr} with the value ${json_value}
:FOR ${item} IN @{expr}
\ Exit For Loop If ${item[${json_field}]} == ${json_value}
\ ${are_equal}= Should Be Equal As Strings ${item["${json_field}"]} ${json_value}
\ Exit For Loop If ${are_equal}
Log Item found ${item}
[return] ${item}
......
''[Documentation] robot --outputdir ./outputs ./SRV/UETAG/PlatUeIdentity.robot
... Test Suite to validate UE Identity Tag (UETAG) operations.
''[Documentation] robot --outputdir ./outputs ./Grant.robot
... Test Suite to validate Grant operations.
*** Settings ***
Resource environment/variables.txt
Resource ../../GenericKeywords.robot
Resource ../../../GenericKeywords.robot
Library REST ${MEO_SCHEMA}://${MEO_HOST}:${MEO_PORT} ssl_verify=false
Library OperatingSystem
*** Test Cases ***
Request a new Grant - Synchronous mode
[Documentation] TP_MEC_MEO_GRANT_001_OK
TC_MEC_MEC010p2_MEO_GRANT_001_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_001_OK
... Check that MEO sends a synchronous grant response when a grant request is requested
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.1
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.2.2-1 (GrantRequest)
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1 (Grant)
... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 (GrantRequest)
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 Note 2 (GrantRequest)
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant)
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRequest
Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is Grant
Request a new Grant - Malformed request
[Documentation] TP_MEC_MEO_GRANT_001_BR
TC_MEC_MEC010p2_MEO_GRANT_001_BR
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_001_BR
... Check that MEO responds with an error when it receives a malformed request when a new grant request is performed
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1 (Grant)
... ETSI GS MEC 010-2 2.2.1, clause 7.6.1.3.2
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant)
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRejectedRequest
Create a GRANT request grantBadRequest
Check HTTP Response Status Code Is 400
TC_MEC_MEC010p2_MEO_GRANT_002_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_002_OK
... Check that MEO sends a synchronous grant response when a grant request is requested
... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 //GrantRequest
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRequest2
Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is Grant
Request a new Grant - Asynchronous mode
[Documentation] TP_MEC_MEO_GRANT_002_OK
... Check that MEO sends a asynchronous grant response when a grant request is requested
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.1
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1 (Grant)
TC_MEC_MEC010p2_MEO_GRANT_003_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_003_OK
... Check that MEO sends an asynchronous grant response when a grant request is requested
... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 (GrantRequest)
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 Note 2 (GrantRequest)
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant)
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRequest
Create a GRANT request grantRequestAsynchronous
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check HTTP Response Body is Empty
Request an individual grant - Ongoing process
[Documentation] TP_MEC_MEO_GRANT_003_OK
TC_MEC_MEC010p2_MEO_GRANT_004_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_004_OK
... Check that MEO sends an asynchronous grant response when a grant request is requested
... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 (GrantRequest)
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant)
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRequestAsynchronous2
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
TC_MEC_MEC010p2_MEO_GRANT_005_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_005_OK
... Check that MEO sends the status of a grant request when a query on a granting ID is performed.
... The process of creating the grant is ongoing, no grant is available yet
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2
... ETSI GS MEC 010-2 2.2.1, clause 7.5.2.3.2
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Get an individual grant ${grantId}
Get an individual grant ${GRANT_ID_ACCEPTED}
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check HTTP Response Body is Empty
TC_MEC_MEC010p2_MEO_GRANT_006_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_006_OK
... Check that MEO sends the status of a grant request when a query on a granting ID is performed.
... The process of creating the grant is ongoing, no grant is available yet
... ETSI GS MEC 010-2 2.2.1, clause 7.5.2.3.2
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Get an individual grant ${GRANT_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is Grant
Request an individual grant using non existant grant identifier
[Documentation] TP_MEC_MEO_GRANT_003_NF
... Check that MEO responds with an error when it receives a request for returning a grant referred with a wrong ID
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2
TC_MEC_MEC010p2_MEO_GRANT_006_NF
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_006_NF
... Check that MEO responds with an error when it receives
... a request for returning a grant referred with a wrong ID
... ETSI GS MEC 010-2 2.1.1, clause 7.5.2.3.2
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Get an individual grant ${non_existant_grant_id}
Get an individual grant ${NOT_EXISTING_GRANT_ID}
Check HTTP Response Status Code Is 404
Request an individual grant - Successful
[Documentation] TP_MEC_MEO_GRANT_004_OK
... Check that MEO sends the status of a grant request when a query on a granting ID is performed
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Get an individual grant ${grantId}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is Grant
*** Keywords ***
Create a GRANT request
......@@ -99,7 +121,7 @@ Create a GRANT request
Get an individual grant
[Arguments] ${grantId}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} allow_redirects=false
${output}= Output response
......
*** Variables ***
# Generic variables
${MEO_SCHEMA} http
${MEO_HOST} 10.192.2.172
#${MEO_HOST} 10.192.2.172
${MEO_HOST} 127.0.0.1
${MEO_PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
......@@ -10,8 +11,10 @@ ${apiName} granting
${apiVersion} v1
# Specific variables
${grantId} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${non_existant_grant_id} non_existant_grant_id
${GRANT_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${GRANT_ID_ACCEPTED} abcdee2b-6e50-4f33-ab09-8bf05850abcd
${NOT_EXISTING_GRANT_ID} NOT_EXISTING_GRANT_ID
${APP_INSTANCE_ID} 456
# Notifications variables
......
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operationERROR":"INSTANTIATE"
}
\ No newline at end of file
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operationERROR":"INSTANTIATE"
}
\ No newline at end of file
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"appDId":"appDId",
"operation":"INSTANTIATE",
"addResources": [
{
"resourceDefinitionId": "resourceDefinitionId",
"vimConnectionId": "vimConnectionId",
"resourceGroupId": "resourceGroupId",
"zoneId": "zoneId"
}
],
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operation": "OPERATE",
"addResources": [
{
"resourceDefinitionId": "resourceDefinitionId",
"vimConnectionId": "vimConnectionId",
"resourceGroupId": "resourceGroupId",
"zoneId": "zoneId"
}
],
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
{
"id": "456",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operation": "INSTANTIATE",
"addResources": [
{
"resourceDefinitionId": "resourceDefinitionId",
"vimConnectionId": "vimConnectionId",
"resourceGroupId": "resourceGroupId",
"zoneId": "zoneId"
}
],
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
{
"id": "456",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operation": "OPERATE",
"addResources": [
{
"resourceDefinitionId": "resourceDefinitionId",
"vimConnectionId": "vimConnectionId",
"resourceGroupId": "resourceGroupId",
"zoneId": "zoneId"
}
],
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operation": "INSTANTIATE",
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
{
"description": "'This type represents a grant. Refer to clause 9.5.2.3 of ETSI GS NFV-SOL 003 '",
"type": "object",
"required": [
"id",
"appInstanceId",
"appLcmOpOccId",
"_links"
],
"properties": {
"id": {
"type": "string"
},
"appInstanceId": {
"description": "Identifier of application instance.",
"type": "string"
},
"appLcmOpOccId": {
"description": "Identifier of application lifecycle management operation occurrence.",
"type": "string"
},
"vimConnections": {
"type": "array",
"items": {
"properties": {
"accessInfo": {
"description": "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'",
"type": "object",
"additionalProperties": true
},
"extra": {
"description": "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'",
"type": "object",
"additionalProperties": true
},
"id": {
"description": "The identifier of the VIM Connection. This identifier is managed by the MEO.",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"interfaceInfo": {
"description": "'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'",
"type": "object",
"additionalProperties": true
},
"vimId": {
"description": "The identifier of the VIM instance. This identifier is managed by the MEO.Shall be present to address additional information about the VIM if such information has been configured into the MEPM by means outside the scope of the present document, and should be absent otherwise.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"vimType": {
"description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM.The set of permitted values is expected to change over time as new types or versions of VIMs become available. ",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"id",
"vimType"
],
"type": "object",
"x-etsi-ref": "6.2.2.18"
}
},
"zones": {
"type": "array",
"items": {
"properties": {
"id": {
"description": "The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the \"Grant\" structure.",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"vimConnectionId": {
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"zoneId": {
"description": "The identifier of the resource zone, as managed by the resource management layer (typically, the VIM).",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"id",
"zoneId"
],
"type": "object",
"x-etsi-ref": "6.2.4.6f"
}
},
"zoneGroups": {
"type": "array",
"items": {
"properties": {
"zoneId": {
"description": "References of identifiers of \"ZoneInfo\" structures, each of which provides information about a resource zone that belongs to this group.",
"items": {
"type": "string"
},
"minItems": 1,
"type": "array",
"x-etsi-mec-cardinality": "1..N",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"zoneId"
],
"type": "object",
"x-etsi-ref": "6.2.4.7"
}
},
"addResources": {
"type": "array",
"items": {
"properties": {
"resourceDefinitionId": {
"description": "Identifier of the related \"ResourceDefinition\" structure from the related \"GrantRequest\" structure.",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"resourceGroupId": {
"description": "Identifier of the \"infrastructure resource group\", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource.If the VIM connection referenced by \"vimConnectionId\" applies to multiple infrastructure resource groups, this attribute shall be present for new resources.If the VIM connection referenced by \"vimConnectionId\" applies to a single infrastructure resource group, this attribute may be present for new resources. This attribute shall be absent for resources that have already been allocated.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"vimConnectionId": {
"description": "Identifier of the VIM connection to be used to manage this resource. Shall be present for new resources, and shall be absent for resources that have already been allocated.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"zoneId": {
"description": "Reference to the identifier of the \"ZoneInfo\" structure in the \"Grant\" structure defining the resource zone into which this resource is to be placed. Shall be present for new resources if the zones concept is applicable to them (typically, Compute resources), and shall be absent for resources that have already been allocated.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"resourceDefinitionId"
],
"type": "object",
"x-etsi-ref": "6.2.4.5"
}
},
"tempResources": {
"type": "array",
"items": {
"properties": {
"resourceDefinitionId": {
"description": "Identifier of the related \"ResourceDefinition\" structure from the related \"GrantRequest\" structure.",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"resourceGroupId": {
"description": "Identifier of the \"infrastructure resource group\", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource.If the VIM connection referenced by \"vimConnectionId\" applies to multiple infrastructure resource groups, this attribute shall be present for new resources.If the VIM connection referenced by \"vimConnectionId\" applies to a single infrastructure resource group, this attribute may be present for new resources. This attribute shall be absent for resources that have already been allocated.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"vimConnectionId": {
"description": "Identifier of the VIM connection to be used to manage this resource. Shall be present for new resources, and shall be absent for resources that have already been allocated.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"zoneId": {
"description": "Reference to the identifier of the \"ZoneInfo\" structure in the \"Grant\" structure defining the resource zone into which this resource is to be placed. Shall be present for new resources if the zones concept is applicable to them (typically, Compute resources), and shall be absent for resources that have already been allocated.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"resourceDefinitionId"
],
"type": "object",
"x-etsi-ref": "6.2.4.5"
}
},
"removeResources": {
"type": "array",
"items": {
"properties": {
"resourceDefinitionId": {
"description": "Identifier of the related \"ResourceDefinition\" structure from the related \"GrantRequest\" structure.",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"resourceGroupId": {
"description": "Identifier of the \"infrastructure resource group\", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource.If the VIM connection referenced by \"vimConnectionId\" applies to multiple infrastructure resource groups, this attribute shall be present for new resources.If the VIM connection referenced by \"vimConnectionId\" applies to a single infrastructure resource group, this attribute may be present for new resources. This attribute shall be absent for resources that have already been allocated.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"vimConnectionId": {
"description": "Identifier of the VIM connection to be used to manage this resource. Shall be present for new resources, and shall be absent for resources that have already been allocated.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"zoneId": {
"description": "Reference to the identifier of the \"ZoneInfo\" structure in the \"Grant\" structure defining the resource zone into which this resource is to be placed. Shall be present for new resources if the zones concept is applicable to them (typically, Compute resources), and shall be absent for resources that have already been allocated.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"resourceDefinitionId"
],
"type": "object",
"x-etsi-ref": "6.2.4.5"
}
},
"updateResources": {
"type": "array",
"items": {
"properties": {
"resourceDefinitionId": {
"description": "Identifier of the related \"ResourceDefinition\" structure from the related \"GrantRequest\" structure.",
"type": "string",