Commit 3eaea384 authored by piscione's avatar piscione
Browse files

First draft of MEC015 robot tests based on available MEC015 TPs.

parent 03fd2f26
Pipeline #6976 passed with stage
in 0 seconds
''[Documentation] robot --outputdir ../../../outputs ./MultiAccessTrafficSteering.robot
... Test Suite to validate Multi-access traffic steering API (MTS) operations.
*** Settings ***
Resource environment/variables.txt
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
##GET on ${apiRoot}/${apiName}/${apiVersion}/mts_info
*** Test Cases ***
TP_MEC_MEC015_SRV_MTS_001_OK
[Documentation]
... Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 9.3.3.1
... https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
Retrieve MTS capability information
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is MtsCapabilityInfo
##GET on ${apiRoot}/${apiName}/${apiVersion}/mts_sessions
TP_MEC_MEC015_SRV_MTS_002_OK
[Documentation]
... Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 9.5.3.1
... https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
Retrieve MTS session list information
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is MtsSessionInfo
FOR ${mstSessionInfo} IN @{response['body']}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${mstSessionInfo['appInsId']} ${APP_INSTANCE_ID}
Exit For Loop If ${passed}
END
Should Be True ${passed}
TP_MEC_MEC015_SRV_MTS_003_OK
[Documentation]
... Check that the IUT responds with a configured Multi-access Traffic Steering when queried by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 9.5.3.1
... https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
Retrieve MTS session list information using filter ${CORRECT_FILTER} ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is MtsSessionInfo
FOR ${mstSessionInfo} IN @{response['body']}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${mstSessionInfo['appInsId']} ${APP_INSTANCE_ID}
Exit For Loop If ${passed}
END
Should Be True ${passed}
TP_MEC_MEC015_SRV_MTS_003_BR
[Documentation]
... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 9.5.3.1
... https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
Retrieve MTS session list information using filter ${BAD_FILTER} ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 400
TP_MEC_MEC015_SRV_MTS_003_NF
[Documentation]
... Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 9.5.3.1
... https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
Retrieve MTS session list information using filter ${CORRECT_FILTER} ${NOT_EXISTING_APP_INSTANCE_ID}
Check HTTP Response Status Code Is 404
##POST on ${apiRoot}/${apiName}/${apiVersion}/mts_sessions
TP_MEC_MEC015_SRV_MTS_004_OK_01
[Documentation]
... Check that the IUT responds with a registration and initialisation approval for the requested MTS session requirements sent by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 9.5.3.2
... https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
Register MTS session MtsSessionInfoApplicationSpecific.json
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is MtsSessionInfo
Should Be Equal As Strings ${response['body']['appInsId']} ${APP_INSTANCE_ID}
TP_MEC_MEC015_SRV_MTS_004_OK_02
[Documentation]
... Check that the IUT responds with a registration and initialisation approval for the requested MTS session requirements sent by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 9.5.3.2
... https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
Register MTS session MtsSessionInfoSessionSpecific.json
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is MtsSessionInfo
Should Be Equal As Strings ${response['body']['appInsId']} ${APP_INSTANCE_ID}
TP_MEC_MEC015_SRV_MTS_004_NF
[Documentation]
... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 9.5.3.2
... https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
Register MTS session wrong URI MtsSessionInfoSessionSpecific.json
Check HTTP Response Status Code Is 404
*** Keywords ***
Retrieve MTS capability information
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get ${apiRoot}/${apiName}/${apiVersion}/mts_info
${output}= Output response
Set Suite Variable ${response} ${output}
Retrieve MTS session list information
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get ${apiRoot}/${apiName}/${apiVersion}/mts_session
${output}= Output response
Set Suite Variable ${response} ${output}
Retrieve MTS session list information using filter
[Arguments] ${filter} ${value}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get ${apiRoot}/${apiName}/${apiVersion}/mts_session?${filter}=${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Register MTS session
[Arguments] ${content}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
${path} Catenate SEPARATOR= jsons/ ${content}
${body} Get File ${path}
POST ${apiRoot}/${apiName}/${apiVersion}/mts_session ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Register MTS session wrong URI
[Arguments] ${content}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
#Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
${path} Catenate SEPARATOR= jsons/ ${content}
${body} Get File ${path}
POST ${apiRoot}/${apiName}/v0/mts_session ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
\ No newline at end of file
*** Variables ***
# Generic variables
${SCHEMA} http
${HOST} 127.0.0.1
${PORT} 8082
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} mts
${apiVersion} v1
# Specific variables
${APP_INSTANCE_ID} appInstId01
${NOT_EXISTING_APP_INSTANCE_ID} NOT_EXISTING_APP_INS_ID
${CORRECT_FILTER} app_instance_id
${BAD_FILTER} app_id
\ No newline at end of file
{
"appInsId": "myAppInstId",
"requestType": 0,
"qosD": {
"minTpt": 10
},
"mtsMode": 0,
"trafficDirection": "00",
"flowFilter": [{
"dstPort": [8081],
"protocol": 41,
"sourcePort": [8081],
"dstIp": "10.10.0.10",
"dscp": 40,
"sourceIp": "10.10.0.30"
}
],
"qosD":{
"minTpt":10
}
}
\ No newline at end of file
{
"appInsId": "myAppInstId",
"requestType": 1,
"mtsMode":4,
"trafficDirection":"00",
"qosD": {
"minTpt": 10
},
"mtsMode": 0,
"trafficDirection": "00",
"flowFilter": [{
"dstPort": [8081],
"protocol": 41,
"sourcePort": [8081],
"dstIp": "10.10.0.10",
"dscp": 40,
"sourceIp": "10.10.0.30"
}
],
"qosD":{
"minTpt":10
}
}
\ No newline at end of file
{
"properties": {
"mtsAccessInfo": {
"description": "The information on access network connection as defined below",
"items": {
"type": "object",
"properties": {
"accessId": {
"format": "uint32",
"type": "integer",
"description": "Unique identifier for the access network connection",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
},
"accessType": {
"format": "uint32",
"type": "integer",
"description": "Numeric value (0-255) corresponding to specific type of access network as following: 0 = Unknown 1 = Any IEEE802.11-based WLAN technology 2 = Any 3GPP-based Cellular technology 3 = Any Fixed Access 11 = IEEE802.11 a/b/g WLAN 12 = IEEE 802.11 a/b/g/n WLAN 13 = IEEE 802.11 a/b/g/n/ac WLAN 14 = IEEE 802.11 a/b/g/n/ac/ax WLAN (Wi-Fi 6) 15 = IEEE 802.11 b/g/n WLAN 31 = 3GPP GERAN/UTRA (2G/3G) 32 = 3GPP E-UTRA (4G/LTE) 33 = 3GPP NR (5G)",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
},
"metered": {
"format": "uint32",
"type": "integer",
"description": "Numeric value (0-255) corresponding to the following: 0: the connection is not metered (see note) 1: the connection is metered 2: unknown ",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
}
}
},
"required": [
"accessId",
"accessType",
"metered"
],
"minItems": 1,
"type": "array",
"x-etsi-mec-cardinality": "1..N",
"x-etsi-mec-origin-type": "Structure (inlined)"
},
"mtsMode": {
"description": "Numeric value corresponding to a specific MTS operation supported by the TMS 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or/and multiple access network connection simultaneously if supported 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for highreliability and low-latency applications 4 = QoS, i.e. performing MTS based on the specific QoS requirements from the app",
"items": {
"type": "integer",
"format": "uint32"
},
"minItems": 1,
"type": "array",
"x-etsi-mec-cardinality": "1..N",
"x-etsi-mec-origin-type": "Uint32"
},
"timeStamp": {
"description": "Time stamp to indicate when the corresponding information elements are sent",
"properties": {
"nanoSeconds": {
"format": "uint32",
"type": "integer",
"description": "Time in nanoseconds in Unix-time since January 1, 1970, 00:00:00 UTC",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
},
"seconds": {
"description": "Time in seconds in Unix-time since January 1, 1970, 00:00:00 UTC",
"format": "uint32",
"type": "integer",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
}
},
"required": [
"seconds",
"nanoSeconds"
],
"type": "object",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Structure (inlined)"
}
},
"required": [
"mtsAccessInfo",
"mtsMode"
],
"type": "object",
"x-etsi-notes": "NOTE:\tA metered connection is a network connection that has a maximum data usage in a specific period, e.g. per hour/day/week/month. The user may get billed extra charges if they go over the allotted amount.",
"x-etsi-ref": "7.2.4"
}
\ No newline at end of file
{
"items":{
"properties": {
"appInsId": {
"description": "Application instance identifier",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"flowFilter": {
"description": "Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION. Any filtering criteria shall define a single session only. In case multiple sessions match flowFilter the request shall be rejected. If the flowFilter field is included, at least one of its subfields shall be included. Any flowFilter subfield that is not included shall be ignored in traffic flow filtering",
"items": {
"type": "object",
"properties": {
"dscp": {
"format": "uint32",
"type": "integer",
"description": "DSCP in the IPv4 header or Traffic Class in the IPv6 header",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
},
"dstIp": {
"description": "Destination address identity of session (including range)",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"dstPort": {
"description": "Destination port identity of session",
"items": {
"type": "integer",
"format": "uint32"
},
"minItems": 0,
"type": "array",
"x-etsi-mec-cardinality": "0..N",
"x-etsi-mec-origin-type": "Uint32"
},
"flowlabel": {
"format": "uint32",
"type": "integer",
"description": "Flow Label in the IPv6 header, applicable only if the flow is IPv6",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
},
"protocol": {
"format": "uint32",
"type": "integer",
"description": "Protocol number",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
},
"sourceIp": {
"description": "Source address identity of session (including range)",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"sourcePort": {
"description": "Source port identity of session",
"items": {
"type": "integer",
"format": "uint32"
},
"minItems": 0,
"type": "array",
"x-etsi-mec-cardinality": "0..N",
"x-etsi-mec-origin-type": "Uint32"
}
}
},
"minItems": 1,
"type": "array",
"x-etsi-mec-cardinality": "1..N",
"x-etsi-mec-origin-type": "Structure (inlined)"
},
"mtsMode": {
"format": "uint32",
"type": "integer",
"description": "Numeric value (0 - 255) corresponding to a specific MTS mode of the MTS session: 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or multiple access network connection simultaneously 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for high-reliability and low-latency applications 4 = QoS, i.e. performing MTS based on the QoS requirement (qosD)",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
},
"qosD": {
"description": "QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS). If the qosD field is included, at least one of its subfields shall be included. Any qosD subfield that is not included shall be ignored in Multi-access Traffic Steering (MTS)",
"properties": {
"maxJitter": {
"description": "tolerable jitter in [10 nanoseconds]",
"type": "integer",
"format": "uint32",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
},
"maxLatency": {
"description": "tolerable (one-way) delay in [10 nanoseconds]",
"type": "integer",
"format": "uint32",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
},
"maxLoss": {
"description": "tolerable packet loss rate in [1/10^x]",
"type": "integer",
"format": "uint32",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
},
"minTpt": {
"description": "minimal throughput in [kbps]",
"type": "integer",
"format": "uint32",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
},
"priority": {
"description": "numeric value (0 - 255) corresponding to the traffic priority 0: low; 1: medium; 2: high; 3: critical",
"type": "integer",
"format": "uint32",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
}
},
"type": "object",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Structure"
},
"requestType": {
"description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_MTS_SESSION 1 = FLOW_SPECIFIC_MTS_SESSION",
"enum": [
0,
1
],
"type": "integer",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Enum_inlined"
},
"timeStamp": {
"description": "Time stamp to indicate when the corresponding information elements are sent ",
"properties": {
"nanoSeconds": {
"format": "uint32",
"type": "integer",
"description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
},
"seconds": {
"format": "uint32",
"type": "integer",
"description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
}
},
"required": [
"seconds",
"nanoSeconds"
],
"type": "object",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Structure (inlined)"
},
"trafficDirection": {
"description": "The direction of the requested MTS session: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical (see note) ",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"appInsId",
"requestType",
"flowFilter",
"qosD",
"mtsMode",
"trafficDirection"
],
"type": "object",
"x-etsi-notes": "NOTE:\tFor the downlink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" in the \"flowFilter\" structure are used for source address and port, respectively; \"dstIp\" and \"dstPort\" are used for destination address and port, respectively. For the uplink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" are used for destination address and port, respectively; \"dstIp\" and \"dstPort\" are used for source address and port, respectively.",
"x-etsi-ref": "7.2.5"
}
}
\ No newline at end of file
''[Documentation] robot --outputdir ../../../outputs ./PlatBandwidthManager.robot
... Test Suite to validate Bandwidth Management API (BWA) operations.
*** Settings ***
Resource environment/variables.txt
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
##GET on ${apiRoot}/${apiName}/${apiVersion}/bw_allocations
*** Test Cases ***
TP_MEC_MEC015_SRV_TM_001_OK
[Documentation]
... Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application
... Reference ETSI GS MEC 015 V2.1.1, clause 8.4.3.1
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Retrieve the list of configured bandwidth allocations
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is BwInfo
FOR ${bwInfo} IN @{response['body']}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${bwInfo['appInsId']} ${APP_INSTANCE_ID}
Exit For Loop If ${passed}
END
Should Be True ${passed}
TP_MEC_MEC015_SRV_TM_002_OK
[Documentation]
... Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application
... Reference ETSI GS MEC 015 V2.1.1, clause 8.4.3.1
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Retrieve the list of configured bandwidth using filter ${CORRECT_FILTER} ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is BwInfo
FOR ${bwInfo} IN @{response['body']}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${bwInfo['appInsId']} ${APP_INSTANCE_ID}
Exit For Loop If ${passed}
END
Should Be True ${passed}
TP_MEC_MEC015_SRV_TM_002_BR
[Documentation]
... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
... Reference ETSI GS MEC 015 V2.1.1, clause 8.4.3.1
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Retrieve the list of configured bandwidth using filter ${BAD_FILTER} ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 400
TP_MEC_MEC015_SRV_TM_002_NF
[Documentation]
... Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
... Reference ETSI GS MEC 015 V2.1.1, clause 8.4.3.1
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Retrieve the list of configured bandwidth using filter ${CORRECT_FILTER} ${NON_EXISTENT_APP_INSTANCE_ID}
Check HTTP Response Status Code Is 404
##POST on ${apiRoot}/${apiName}/${apiVersion}/bw_allocations
TP_MEC_MEC015_SRV_TM_003_OK_01
[Documentation]
... Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 8.4.3.4
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Register Bandwidth Management Service BwInfoApplicationSpecific ${REQUEST_TYPE_APPLICATION}
TP_MEC_MEC015_SRV_TM_003_OK_02
[Documentation]
... Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application
... ETSI GS MEC 015 V2.1.1, clause 8.4.3.4
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Register Bandwidth Management Service BwInfoSessionSpecific ${REQUEST_TYPE_SESSION}
TP_MEC_MEC015_SRV_TM_003_BR_01