From 1795252bc7fc7a06617cbb5371e98a6a755374ef Mon Sep 17 00:00:00 2001 From: piscione Date: Fri, 5 Jan 2024 10:04:25 +0100 Subject: [PATCH] MEC013 v3.1.1 RLOCKLOOK Draft TCs avaialable. --- .../SRV/RLOCLOOK/PlatRadioNodeLocation.robot | 68 ++- MEC013/SRV/RLOCLOOK/environment/variables.txt | 6 +- .../schemas/AccessPointList.schema.json | 523 +++++++++--------- 3 files changed, 317 insertions(+), 280 deletions(-) diff --git a/MEC013/SRV/RLOCLOOK/PlatRadioNodeLocation.robot b/MEC013/SRV/RLOCLOOK/PlatRadioNodeLocation.robot index 11e4ced..4ad2c8b 100644 --- a/MEC013/SRV/RLOCLOOK/PlatRadioNodeLocation.robot +++ b/MEC013/SRV/RLOCLOOK/PlatRadioNodeLocation.robot @@ -14,35 +14,77 @@ Default Tags TC_MEC_SRV_RLOCLOOK *** Test Cases *** + TC_MEC_MEC013_SRV_RLOCLOOK_001_OK [Documentation] ... Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.7 - ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList + ... Reference + ... ETSI GS MEC 013 3.1.1 Clause 5.3.7 + ... ETSI GS MEC 013 3.1.1 Clause 6.2.1 + ... ETSI GS MEC 013 3.1.1 Clause 7.9.3.1 - [Tags] PIC_MEC_PLAT PIC_SERVICES INCLUDE_UNDEFINED_SCHEMAS - Get the access points list ${ZONE_ID} + [Tags] PIC_MEC_PLAT PIC_SERVICES + Get the access points list by zone identifier ${ZONE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AccessPointList - Should Be Equal As Strings ${response['body']['accessPointList']['zoneId']} ${ZONE_ID} + Should Be Equal As Strings ${response['body']['zoneId']} ${ZONE_ID} + TC_MEC_MEC013_SRV_RLOCLOOK_001_NF [Documentation] ... Check that the IUT responds with an error when - ... a request for an unknown URI is sent by a MEC Application + ... a request for an URI that cannot be mapped to a valid resource URI + ... is sent by a MEC Application ... - ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.7 + ... Reference + ... ETSI GS MEC 013 3.1.1 Clause 5.3.7 + ... ETSI GS MEC 013 3.1.1 Clause 6.2.1 + ... ETSI GS MEC 013 3.1.1 Clause 7.9.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - Get the access points list ${NON_EXISTENT_ZONE_ID} + Get the access points list by zone identifier ${NON_EXISTENT_ZONE_ID} Check HTTP Response Status Code Is 404 + +TC_MEC_MEC013_SRV_RLOCLOOK_002_OK + [Documentation] + ... Check that the IUT responds with the radio nodes when queried + ... by a MEC Application + ... + ... Reference + ... ETSI GS MEC 013 3.1.1 Clause 5.3.7 + ... ETSI GS MEC 013 3.1.1 Clause 6.2.1 + ... ETSI GS MEC 013 3.1.1 Clause 7.10.3.1 + + [Tags] PIC_MEC_PLAT PIC_SERVICES + Get the access points list by zone identifier and access point ${ZONE_ID} ${AP_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AccessPointList + Should Be Equal As Strings ${response['body']['zoneId']} ${ZONE_ID} + Should Be Equal As Strings ${response['body']['accessPoint'][0]['accessPointId']} ${AP_ID} + + +TC_MEC_MEC013_SRV_RLOCLOOK_002_NF + [Documentation] + ... Check that the IUT responds with an error when the + ... radio nodes does not exist + ... + ... Reference + ... ETSI GS MEC 013 3.1.1 Clause 5.3.7 + ... ETSI GS MEC 013 3.1.1 Clause 6.2.1 + ... ETSI GS MEC 013 3.1.1 Clause 7.10.3.1 + + [Tags] PIC_MEC_PLAT PIC_SERVICES + Get the access points list by zone identifier and access point ${ZONE_ID} ${NON_EXISTENT_AP_ID} + Check HTTP Response Status Code Is 404 + + *** Keywords *** -Get the access points list +Get the access points list by zone identifier [Arguments] ${zoneId} Set Headers {"Accept":"application/json"} Set Headers {"Authorization":"${TOKEN}"} @@ -51,5 +93,13 @@ Get the access points list Set Suite Variable ${response} ${output} +Get the access points list by zone identifier and access point + [Arguments] ${zoneId} ${accessPointId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/zones/${zoneId}/accessPoints/${accessPointId} + ${output}= Output response + Set Suite Variable ${response} ${output} + diff --git a/MEC013/SRV/RLOCLOOK/environment/variables.txt b/MEC013/SRV/RLOCLOOK/environment/variables.txt index a9bf262..58b7040 100644 --- a/MEC013/SRV/RLOCLOOK/environment/variables.txt +++ b/MEC013/SRV/RLOCLOOK/environment/variables.txt @@ -1,14 +1,16 @@ *** Variables *** # Generic variables ${SCHEMA} http -${HOST} 10.192.2.172 +${HOST} 127.0.0.1 ${PORT} 8081 ${response} {} ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l ${apiRoot} ${apiName} location -${apiVersion} v2 +${apiVersion} v3 # Specific variables ${ZONE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f ${NON_EXISTENT_ZONE_ID} NON_EXISTENT_ZONE_ID +${AP_ID} ap01 +${NON_EXISTENT_AP_ID} NON_EXISTENT_AP_ID \ No newline at end of file diff --git a/MEC013/SRV/RLOCLOOK/schemas/AccessPointList.schema.json b/MEC013/SRV/RLOCLOOK/schemas/AccessPointList.schema.json index 2a37408..f321b15 100644 --- a/MEC013/SRV/RLOCLOOK/schemas/AccessPointList.schema.json +++ b/MEC013/SRV/RLOCLOOK/schemas/AccessPointList.schema.json @@ -1,270 +1,255 @@ { - "accessPointList": { - "description": "A type containing list of access points.", - "properties": { - "accessPoint": { - "description": "Collection of the access point information list.", - "items": { - "description": "A type containing access point information.", - "properties": { - "accessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "connectionType": { - "description": "The connection type for the access point", - "enum": [ - "Femto", - "LTE-femto", - "Smallcell", - "LTE-smallcell", - "Wifi", - "Pico", - "Micro", - "Macro", - "Wimax", - "Unknown" - ], - "type": "string" - }, - "interestRealm": { - "description": "Interest realm of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "locationInfo": { - "properties": { - "accuracy": { - "description": "Horizontal accuracy / (semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "accuracyAltitude": { - "description": "Altitude accuracy / uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 3 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "accuracySemiMinor": { - "description": "Horizontal accuracy / (semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "altitude": { - "description": "Location altitude relative to the WGS84 ellipsoid surface.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Float" - }, - "confidence": { - "description": "Confidence by which the position of a target entity is known to be within the shape description, expressed as a percentage and defined in [14]. Present only if \"shape\" equals 1, 4 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "includedAngle": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "innerRadius": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "latitude": { - "description": "Location latitude, expressed in the range -90� to +90�. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "format": "float", - "type": "number" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "longitude": { - "description": "Location longitude, expressed in the range -180� to +180�. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "format": "float", - "type": "number" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "offsetAngle": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "orientationMajorAxis": { - "description": "Angle of orientation of the major axis, expressed in the range 0� to 180�, as defined in [14]. Present only if \"shape\" equals 4 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "shape": { - "description": "Shape information, as detailed in [14], associated with the reported location coordinate:

1 = ELLIPSOID_ARC

2 = ELLIPSOID_POINT

3 = ELLIPSOID_POINT_ALTITUDE

4 = ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID

5 = ELLIPSOID_POINT_UNCERT_CIRCLE

6 = ELLIPSOID_POINT_UNCERT_ELLIPSE

7 = POLYGON", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "timestamp": { - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "int32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "int32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-ref": "6.5.2" - }, - "uncertaintyRadius": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "velocity": { - "description": "Structure with attributes relating to the target entity's velocity, as defined in [14].", - "properties": { - "bearing": { - "description": "Bearing, expressed in the range 0 deg to 360 deg, as defined in [14].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "horizontalSpeed": { - "description": "Horizontal speed, expressed in km/h and defined in [14].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "uncertainty": { - "description": "Horizontal uncertainty, as defined in [14]. Present only if \"velocityType\" equals 3 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "velocityType": { - "description": "Velocity information, as detailed in [14], associated with the reported location coordinate:

1 = HORIZONTAL

2 = HORIZONTAL_VERTICAL

3 = HORIZONTAL_UNCERT

4 = HORIZONTAL_VERTICAL_UNCERT", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "verticalSpeed": { - "description": "Vertical speed, expressed in km/h and defined in [14]. Present only if \"velocityType\" equals 2 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Int" - }, - "verticalUncertainty": { - "description": "Vertical uncertainty, as defined in [14]. Present only if \"velocityType\" equals 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - } - }, - "required": [ - "velocityType", - "bearing", - "horizontalSpeed" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "latitude", - "longitude", - "shape" - ], - "type": "object", - "x-etsi-ref": "6.5.3" - }, - "numberOfUsers": { - "description": "Number of users currently on the access point.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "integer" - }, - "operationStatus": { - "enum": [ - "Serviceable", - "Unserviceable", - "Unknown" - ], - "type": "string" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "timezone": { - "description": "Time zone of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "dateTimeStamp" - } - }, - "required": [ - "accessPointId", - "connectionType", - "operationStatus", - "numberOfUsers", - "resourceURL" - ], - "type": "object" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "AccessPointInfo" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "resourceURL" - ], - "type": "object" - } -} \ No newline at end of file + "description": "A type containing list of access points.", + "properties": { + "accessPoint": { + "description": "Collection of the access point information list.", + "items": { + "description": "A type containing access point information.", + "properties": { + "accessPointId": { + "description": "Identifier of access point.", + "type": "string", + "x-etsi-mec-cardinality": 1, + "x-etsi-mec-origin-type": "string" + }, + "connectionType": { + "description": "This enumeration represents the connection type of an access point", + "enum": [ + "LTE", + "Wifi", + "Wimax", + "5G NR", + "UNKNOWN" + ], + "type": "string" + }, + "interestRealm": { + "description": "Interest realm of access point.", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "string" + }, + "locationInfo": { + "properties": { + "accuracy": { + "description": "Horizontal accuracy/(semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "accuracyAltitude": { + "description": "Altitude accuracy/uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 3 or 4.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "accuracySemiMinor": { + "description": "Horizontal accuracy/(semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "altitude": { + "description": "Location altitude relative to the WGS84 ellipsoid surface.", + "format": "float", + "type": "number", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Float" + }, + "confidence": { + "description": "Confidence by which the position of a target entity is known to be within the shape description, expressed as a percentage and defined in [14]. Present only if \"shape\" equals 1, 4 or 6.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "includedAngle": { + "description": "Present only if \"shape\" equals 6.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "innerRadius": { + "description": "Present only if \"shape\" equals 6.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "latitude": { + "description": "Location latitude, expressed in the range -90° to +90°. Cardinality greater than one only if \"shape\" equals 7.", + "format": "float", + "items": { + "type": "number" + }, + "minItems": 1, + "type": "array", + "x-etsi-mec-cardinality": "1..N", + "x-etsi-mec-origin-type": "Float" + }, + "longitude": { + "description": "Location longitude, expressed in the range -180° to +180°. Cardinality greater than one only if \"shape\" equals 7.", + "format": "float", + "items": { + "type": "number" + }, + "minItems": 1, + "type": "array", + "x-etsi-mec-cardinality": "1..N", + "x-etsi-mec-origin-type": "Float" + }, + "offsetAngle": { + "description": "Present only if \"shape\" equals 6.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "orientationMajorAxis": { + "description": "Angle of orientation of the major axis, expressed in the range 0° to 180°, as defined in [14]. Present only if \"shape\" equals 4 or 6.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "shape": { + "description": "Shape information, as detailed in [14], associated with the reported location coordinate: 1 = Ellipsoid_Arc 2 = ellipsoid_Point 3 = ellipsoid_Point_Altitude 4 = ellipsoid_Point_Altitude_Uncert_Ellipsoid 5 = ellipsoid_Point_Uncert_Circle 6 = ellipsoid_Point_Uncert_Ellipse 7 = polygon", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "type": "integer", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Enum_inlined" + }, + "uncertaintyRadius": { + "description": "Present only if \"shape\" equals 6.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "velocity": { + "description": "Structure with attributes relating to the target entity’s velocity, as defined in [14].", + "properties": { + "bearing": { + "description": "Bearing, expressed in the range 0° to 360°, as defined in [14].", + "type": "integer", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "horizontalSpeed": { + "description": "Horizontal speed, expressed in km/h and defined in [14].", + "type": "integer", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "uncertainty": { + "description": "Horizontal uncertainty, as defined in [14]. Present only if \"velocityType\" equals 3 or 4.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + }, + "velocityType": { + "description": "Velocity information, as detailed in [14], associated with the reported location coordinate: 1 = Horizontal 2 = Horizontal_Vertical 3 = Horizontal_Uncert 4 = Horizontal_Vertical_Uncert", + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Enum_inlined" + }, + "verticalSpeed": { + "description": "Vertical speed, expressed in km/h and defined in [14]. Present only if \"velocityType\" equals 2 or 4.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Int" + }, + "verticalUncertainty": { + "description": "Vertical uncertainty, as defined in [14]. Present only if \"velocityType\" equals 4.", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "UnsignedInt" + } + }, + "required": [ + "velocityType", + "bearing", + "horizontalSpeed" + ], + "type": "object", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Structure (inlined)" + } + }, + "required": [ + "latitude", + "longitude", + "shape" + ], + "type": "object", + "x-etsi-ref": "6.5.3" + }, + "numberOfUsers": { + "description": "Number of users currently on the access point.", + "type": "integer", + "x-etsi-mec-cardinality": 1, + "x-etsi-mec-origin-type": "integer" + }, + "operationStatus": { + "description": "An enumeration defining the operations status of an access point.", + "enum": [ + "Serviceable", + "Unserviceable", + "Unknown" + ], + "type": "string" + }, + "resourceURL": { + "description": "Self referring URL", + "type": "string", + "x-etsi-mec-cardinality": 1, + "x-etsi-mec-origin-type": "anyURI" + }, + "timezone": { + "description": "Time zone of access point.", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "dateTimeStamp" + } + }, + "required": [ + "accessPointId", + "connectionType", + "operationStatus", + "numberOfUsers", + "resourceURL" + ], + "type": "object" + }, + "type": "array", + "x-etsi-mec-cardinality": "0..N", + "x-etsi-mec-origin-type": "AccessPointInfo" + }, + "resourceURL": { + "description": "Self referring URL", + "type": "string", + "x-etsi-mec-cardinality": 1, + "x-etsi-mec-origin-type": "anyURI" + }, + "zoneId": { + "description": "Identifier of zone", + "type": "string", + "x-etsi-mec-cardinality": 1, + "x-etsi-mec-origin-type": "string" + } + }, + "required": [ + "zoneId", + "resourceURL" + ], + "type": "object" + } \ No newline at end of file -- GitLab