Skip to content
Snippets Groups Projects
Commit 6ff2d981 authored by piscione's avatar piscione
Browse files

MEC013 v3.1.1 UEZONESUB Draft TCs available

parent 8a4e5498
No related branches found
No related tags found
1 merge request!3Merge of TT027 branch into master
Showing
with 1034 additions and 0 deletions
*** Settings ***
Documentation
... A test suite for validating UE Zone Lookup (UEZONELOOK) operations.
Resource ../../../GenericKeywords.robot
Resource ../../../pics.txt
Resource environment/variables.txt
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
Library String
Library libraries/Server.py
Default Tags TC_MEC_SRV_RLOCLOOK
*** Test Cases ***
TC_MEC_MEC013_SRV_UEZONESUB_001_OK
[Documentation]
... Check that the IUT acknowledges the creation of UE zone subscription request
... when commanded by a MEC Application
... ETSI GS MEC 013 3.1.1 Clause 5.3.11
... ETSI GS MEC 013 3.1.1 Clause 6.3.6
... ETSI GS MEC 013 3.1.1 Clause 6.4.6
... ETSI GS MEC 013 3.1.1 Clause 7.11.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
Create new subscription and get sub id ZoneLocationEventSubscription
Check HTTP Response Body Json Schema Is ZoneLocationEventSubscription
Check HTTP Response Status Code Is 201
Spawn Notification Server ZoneLocationEventNotification
Validate Json ZoneLocationEventNotification.schema.json ${payload_notification}
[TearDown] Remove subscription ${SUB_ID}
TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01
[Documentation]
... Check that the IUT acknowledges the creation of UE zone subscription request
... when commanded by a MEC Application - OperationStatus constraint
... ETSI GS MEC 013 3.1.1 Clause 5.3.11
... ETSI GS MEC 013 3.1.1 Clause 6.3.7
... ETSI GS MEC 013 3.1.1 Clause 6.4.7
... ETSI GS MEC 013 3.1.1 Clause 7.11.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
Create new subscription ZoneStatusSubscriptionOperationStatus
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is ZoneLocationEventSubscription
Spawn Notification Server ZoneStatusNotificationOperationStatus
Validate Json ZoneStatusNotification.schema.json ${payload_notification}
[TearDown] Remove subscription ${SUB_ID}
TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02
[Documentation]
... Check that the IUT acknowledges the creation of UE zone subscription request
... when commanded by a MEC Application - UserNumEvent constraint
... ETSI GS MEC 013 3.1.1 Clause 5.3.11
... ETSI GS MEC 013 3.1.1 Clause 6.3.7
... ETSI GS MEC 013 3.1.1 Clause 6.4.7
... ETSI GS MEC 013 3.1.1 Clause 7.11.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
Create new subscription and get sub id ZoneStatusSubscriptionUserConstraints
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is ZoneLocationEventSubscription
Spawn Notification Server ZoneStatusNotificationUserConstraints
Validate Json ZoneStatusNotification.schema.json ${payload_notification}
[TearDown] Remove subscription ${SUB_ID}
TC_MEC_MEC013_SRV_UEZONESUB_001_BR
[Documentation]
... Check that the IUT responds with an error
... when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided
... ETSI GS MEC 013 3.1.1 Clause 5.3.11
... ETSI GS MEC 013 3.1.1 Clause 6.3.6
... ETSI GS MEC 013 3.1.1 Clause 6.4.6
... ETSI GS MEC 013 3.1.1 Clause 7.11.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
Create new subscription ZoneLocationEventSubscriptionError
Check HTTP Response Status Code Is 400
TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01
[Documentation]
... Check that the IUT acknowledges the change of UE area subscription request
... when commanded by a MEC Application
... ETSI GS MEC 013 3.1.1 Clause 6.3.6
... ETSI GS MEC 013 3.1.1 Clause 6.4.6
... ETSI GS MEC 013 3.1.1 Clause 7.11.3.2
[Tags] PIC_MEC_PLAT PIC_SERVICES
[Setup] Create new subscription and get sub id ZoneLocationEventSubscription
Update existing subscription ${SUB_ID} ZoneLocationEventSubscriptionUpdate
Check HTTP Response Body Json Schema Is ZoneLocationEventSubscription
Check HTTP Response Status Code Is 200
[TearDown] Remove subscription ${SUB_ID}
TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02
[Documentation]
... Check that the IUT acknowledges the change of UE area subscription request
... when commanded by a MEC Application
... ETSI GS MEC 013 3.1.1 Clause 6.3.7
... ETSI GS MEC 013 3.1.1 Clause 6.4.7
... ETSI GS MEC 013 3.1.1 Clause 7.11.3.2
[Tags] PIC_MEC_PLAT PIC_SERVICES
[Setup] Create new subscription and get sub id ZoneStatusSubscriptionUserConstraints
Update existing subscription ${SUB_ID} ZoneStatusSubscriptionUpdate
Check HTTP Response Body Json Schema Is ZoneStatusSubscription
Check HTTP Response Status Code Is 200
[TearDown] Remove subscription ${SUB_ID}
TC_MEC_MEC013_SRV_UEZONESUB_002_NF
[Documentation]
... Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI
... is sent by a MEC Application
... ETSI GS MEC 013 3.1.1 Clause 6.3.6
... ETSI GS MEC 013 3.1.1 Clause 6.4.6
... ETSI GS MEC 013 3.1.1 Clause 7.11.3.2
[Tags] PIC_MEC_PLAT PIC_SERVICES
Update existing subscription ${NOT_EXISTING_SUB_ID} ZoneStatusSubscriptionUpdate
Check HTTP Response Status Code Is 404
TC_MEC_MEC013_SRV_UEZONESUB_003_OK
[Documentation]
... Check that the IUT acknowledges the cancellation of UE area change notifications
... when commanded by a MEC Application
... ETSI GS MEC 013 3.1.1 Clause 5.3.6
... ETSI GS MEC 013 3.1.1 Clause 6.3.6
... ETSI GS MEC 013 3.1.1 Clause 6.4.6
... ETSI GS MEC 013 3.1.1 Clause 7.11.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
[Setup] Create new subscription and get sub id ZoneStatusSubscriptionUserConstraints
Remove subscription ${SUB_ID}
Check HTTP Response Status Code Is 204
TC_MEC_MEC013_SRV_UEZONESUB_003_NF
[Documentation]
... Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI
... is sent by a MEC Application
... ETSI GS MEC 013 3.1.1 Clause 5.3.6
... ETSI GS MEC 013 3.1.1 Clause 6.3.6
... ETSI GS MEC 013 3.1.1 Clause 6.4.6
... ETSI GS MEC 013 3.1.1 Clause 7.11.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
Remove subscription ${NOT_EXISTING_SUB_ID}
Check HTTP Response Status Code Is 404
*** Keywords ***
Create new subscription and get sub id
[Arguments] ${content}
Create new subscription ${content}
${elements} = Split String ${response['headers']['Location']} /
Set Suite Variable ${SUB_ID} ${elements[3]}
Create new subscription
[Arguments] ${content}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${file}
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/zones ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Update existing subscription
[Arguments] ${sub_id} ${content}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${file}
Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/zones/${sub_id} ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Remove subscription
[Arguments] ${subscription_id}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/zones/${subscription_id}
${output}= Output response
Set Suite Variable ${response} ${output}
Spawn Notification Server
[Arguments] ${payload_notification}
${output} Spawn Web Server ${NOTIFICATION_SERVER_IP} ${NOTIFICATION_SERVER_PORT} ${NOTIFICATION_SERVER_TIMEOUT} ${NOTIFICATION_SERVER_HTTP_METHOD} ${NOTIFICATION_SERVER_URI} ${payload_notification}
${length} = Get Length ${output}
Set Suite Variable ${payload_notification} ${output}
Run Keyword If ${length} == 0 Skip
\ No newline at end of file
*** Variables ***
# Generic variables
${SCHEMA} http
${HOST} 127.0.0.1
${PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} location
${apiVersion} v3
# Specific variables
${NOT_EXISTING_SUB_ID} NOT_EXISTING_SUB_ID
##Notification Server variables
${NOTIFICATION_SERVER_IP} 127.0.0.1
${NOTIFICATION_SERVER_PORT} 8888
${NOTIFICATION_SERVER_HTTP_METHOD} POST
${NOTIFICATION_SERVER_URI} /callback_url
${NOTIFICATION_SERVER_TIMEOUT} 5
{
"notificationType": "ZoneLocationEventNotification",
"address": "acr:10.0.0.1",
"zoneId": "zone01",
"userLocationEvent": "ENTERING_AREA_EVENT",
"_links": {
"subscription": {
"href": "http://meAppServer.example.com/location/v3/subscriptions/zone/subscription123"
}
}
}
\ No newline at end of file
{
"subscriptionType": "ZoneLocationEventSubscription",
"callbackReference": "http://my.callback.com/zone-notification/some-id",
"zoneId": "zone01",
"locationEventCriteria": [
"ENTERING_AREA_EVENT"
]
}
\ No newline at end of file
{
"subscriptionType": "ZoneLocationEventSubscription",
"zoneId": "zone01",
"locationEventCriteria": [
"ENTERING_AREA_EVENT"
]
}
\ No newline at end of file
{
"subscriptionType": "ZoneLocationEventSubscription",
"clientCorrelator":"clientCorrelator",
"callbackReference": "http://my.callback.com/zone-notification/some-id",
"zoneId": "zone01",
"addressList": [
"address01","address02"
]
}
\ No newline at end of file
{
"_links": {
"subscription": {
"href": "http://someurl.com/subscriptions/zones/ZoneStatusSubscriptionId"
}
},
"accessPointId": "accessPointId",
"notificationType": "ZoneStatusNotification",
"zoneId": "zoneId",
"operationStatus":"Serviceable"
}
\ No newline at end of file
{
"_links": {
"subscription": {
"href": "http://someurl.com/subscriptions/zones/ZoneStatusSubscriptionId"
}
},
"accessPointId": "accessPointId",
"notificationType": "ZoneStatusNotification",
"zoneId": "zoneId",
"userNumEvent":1
}
\ No newline at end of file
{
"callbackReference": "http://someurl.com/callback_uri",
"operationStatus": [
"Unknown"
],
"subscriptionType": "ZoneStatusSubscription",
"zoneId": "zoneId",
"operationStatus":"Serviceable"
}
\ No newline at end of file
{
"callbackReference": "http://someurl.com/callback_uri",
"clientCorrelator":"clientCorrelator",
"operationStatus": [
"Unknown"
],
"subscriptionType": "ZoneStatusSubscription",
"zoneId": "zoneId",
"operationStatus": ["Serviceable"]
}
\ No newline at end of file
{
"callbackReference": "http://someurl.com/callback_uri",
"operationStatus": [
"Unknown"
],
"subscriptionType": "ZoneStatusSubscription",
"zoneId": "zoneId",
"upperNumberOfUser": 10,
"lowerNumberOfUser": 20
}
\ No newline at end of file
#!/usr/bin/python3
from http.server import BaseHTTPRequestHandler, HTTPServer
import json, os
import logging
# Library version
__version__ = '0.0.1'
def import_notification_json(subscription_type):
notification_type = subscription_type.split("Subscription")[0]
file_path = "./jsons/"+notification_type+".json"
logging.info(file_path)
logging.info(os.listdir())
try:
with open(file_path, 'r') as json_file:
# Load the JSON data
data = json.load(json_file)
logging.info(data)
return data
except FileNotFoundError:
logging.error(f"Error: File not found at {file_path}")
class Server ( object ):
ROBOT_LIBRARY_VERSION = '0.0.1'
def spawn_web_server (self, host="127.0.0.1", port=8080, timeout=15, method="POST", endpoint="/callback_url", resp_body=None):
class GET_Server(BaseHTTPRequestHandler):
def __call__(self, *args, **kwargs):
"""Handle a request."""
super().__init__(*args, **kwargs)
def __init__(self, endpoint, resp_body):
self.resp_body = resp_body
self.endpoint = endpoint
def do_GET(self):
self.send_response(200)
self.send_header('Content-Type', 'application/json')
self.end_headers()
if self.path == self.endpoint:
self.wfile.write(json.dumps(self.resp_body).encode(encoding='utf_8'))
else:
self.wfile.write(json.dumps("wrong endpoint").encode(encoding='utf_8'))
class POST_Server(BaseHTTPRequestHandler):
def __call__(self, *args, **kwargs):
"""Handle a request."""
super().__init__(*args, **kwargs)
def __init__(self, endpoint, resp_body):
self.resp_body = resp_body
self.endpoint = endpoint
self.req_body = None
def do_POST(self):
self.send_response(200)
self.send_header('Content-Type', 'application/json')
self.end_headers()
#if self.path == self.endpoint:
# self.wfile.write(json.dumps(self.resp_body).encode(encoding='utf_8'))
#else:
# self.wfile.write(json.dumps("wrong endpoint").encode(encoding='utf_8'))
content_len = int(self.headers.get('Content-Length'))
post_body = self.rfile.read(content_len)
self.req_body=post_body
def get_req_body(self):
return self.req_body
def get_resp_body(self):
return self.resp_body
class PUT_Server(BaseHTTPRequestHandler):
def __call__(self, *args, **kwargs):
"""Handle a request."""
super().__init__(*args, **kwargs)
def __init__(self, endpoint, resp_body):
self.resp_body = resp_body
self.endpoint = endpoint
def do_PUT(self):
self.send_response(200)
self.send_header('Content-Type', 'application/json')
self.end_headers()
if self.path == self.endpoint:
self.wfile.write(json.dumps(self.resp_body).encode(encoding='utf_8'))
else:
self.wfile.write(json.dumps("wrong endpoint").encode(encoding='utf_8'))
class DELETE_Server(BaseHTTPRequestHandler):
def __call__(self, *args, **kwargs):
"""Handle a request."""
super().__init__(*args, **kwargs)
def __init__(self, endpoint, resp_body):
self.resp_body = resp_body
self.endpoint = endpoint
def do_DELETE(self):
self.send_response(200)
self.send_header('Content-Type', 'application/json')
self.end_headers()
if self.path == self.endpoint:
self.wfile.write(json.dumps(self.resp_body).encode(encoding='utf_8'))
else:
self.wfile.write(json.dumps("wrong endpoint").encode(encoding='utf_8'))
if method == "GET":
self.handler = GET_Server(endpoint, resp_body)
elif method == "POST":
self.handler = POST_Server(endpoint, resp_body)
elif method == "PUT":
self.handler = PUT_Server(endpoint, resp_body)
elif method == "DELETE":
self.handler = DELETE_Server(endpoint, resp_body)
else:
logging.info("Error, unknown endpoint")
exit(1)
self.app = HTTPServer((host, int(port)), self.handler)
self.app.timeout = int(timeout)
self.app.handle_request()
self.app.server_close()
logging.info(self.handler.get_resp_body())
## If a notification is received, then is returned. Otherwise an empty dictionary.
if(self.handler.get_req_body()!=None):
return json.loads(self.handler.get_req_body().decode("windows-1252"))
##OLD mechanism commented: if no response is received, then read the Notification JSON file and return it.
notification_json= import_notification_json(self.handler.get_resp_body())
#return notification_json
return {}
{
"description": "This type contains a list of subscriptions.",
"properties": {
"resourceURL": {
"properties": {
"href": {
"description": "URI referring to a resource.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uri"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.7.2"
},
"subscription": {
"items": {
"description": "",
"minItems": 0,
"properties": {
"href": {
"description": "The URI referring to the subscription.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uri"
},
"subscriptionType": {
"description": "Type of the subscription. The string shall be set according to the \"subscriptionType\" attribute of the associated subscription data type defined in clauses 6.3.4, 6.3.5, 6.3.6, 6.3.7 6.3.8 and 6.3.9:\n\"UserLocationEventSubscription\"\n\"UserLocationPeriodicSubscription\"\n\"ZoneLocationEventSubscription\"\n\"ZoneStatusSubscription\"\n\"UserAreaSubscription\"\n\"UserDistanceSubscription\"",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"href",
"subscriptionType"
],
"type": "object",
"x-etsi-mec-cardinality": "0..N",
"x-etsi-mec-origin-type": "Structure (inlined)"
},
"type": "array"
}
},
"required": [
"resourceURL"
],
"type": "object",
"x-etsi-ref": "6.3.3"
}
\ No newline at end of file
{
"properties": {
"_links": {
"description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.",
"properties": {
"subscription": {
"properties": {
"href": {
"description": "URI referring to a resource.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uri"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.7.2"
}
},
"required": [
"subscription"
],
"type": "object",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Structure (inlined)"
},
"address": {
"description": "Address of user (e.g. ‘sip’ URI, ‘tel’ URI, ‘acr’ URI).",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uri"
},
"notificationType": {
"description": "Shall be set to \"ZoneLocationEventNotification\".",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"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": "uint32",
"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": "uint32",
"type": "integer",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
}
},
"required": [
"seconds",
"nanoSeconds"
],
"type": "object",
"x-etsi-ref": "6.5.2"
},
"userLocationEvent": {
"description": "This type represents specified event types for UE location report.",
"enum": [
"ENTERING_AREA_EVENT",
"LEAVING_AREA_EVENT"
],
"type": "string"
},
"zoneId": {
"description": "The identity of the zone. ",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"notificationType",
"address",
"userLocationEvent",
"zoneId",
"_links"
],
"type": "object",
"x-etsi-ref": "6.4.6"
}
\ No newline at end of file
{
"properties": {
"_links": {
"description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.",
"properties": {
"self": {
"properties": {
"href": {
"description": "URI referring to a resource.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uri"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.7.2"
}
},
"required": [
"self"
],
"type": "object",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Structure (inlined)"
},
"addressList": {
"description": "List of the users to be monitored. If not present, all the users need to be monitored.",
"items": {
"type": "string"
},
"minItems": 0,
"type": "array",
"x-etsi-mec-cardinality": "0..N",
"x-etsi-mec-origin-type": "Array(Uri)"
},
"callbackReference": {
"description": "URI exposed by the client on which to receive notifications via HTTP. See note 1.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uri"
},
"clientCorrelator": {
"description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server. See note 2.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"expiryDeadline": {
"properties": {
"nanoSeconds": {
"description": "The nanoseconds part of the time. Time is defined as 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"
},
"seconds": {
"description": "The seconds part of the time. Time is defined as 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-ref": "6.5.2"
},
"locationEventCriteria": {
"description": "List of user event values to generate notifications for. ",
"items": {
"description": "This type represents specified event types for UE location report.",
"enum": [
"ENTERING_AREA_EVENT",
"LEAVING_AREA_EVENT"
],
"type": "string"
},
"minItems": 0,
"type": "array",
"x-etsi-mec-cardinality": "0..N",
"x-etsi-mec-origin-type": "Array(LocationEventType)"
},
"reportingCtrl": {
"properties": {
"maximumCount": {
"description": "Maximum number of notifications. For no maximum, either do not include this element or specify a value of zero. Default value is 0.",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
},
"maximumFrequency": {
"description": "Maximum frequency (in seconds) of notifications per subscription.",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
},
"minimumInterval": {
"description": "Minimum interval between reports in case frequently reporting. Unit is second.",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
}
},
"type": "object",
"x-etsi-ref": "6.5.6"
},
"requestTestNotification": {
"description": "Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4], clause 6.12a.",
"type": "boolean",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Boolean"
},
"subscriptionType": {
"description": "Shall be set to \"ZoneLocationEventSubscription\".",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"websockNotifConfig": {
"properties": {
"requestWebsocketUri": {
"description": "Set to true by the service consumer to indicate that Websocket delivery is requested.",
"type": "boolean",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Boolean"
},
"websocketUri": {
"description": "Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uri"
}
},
"type": "object",
"x-etsi-ref": "6.5.4"
},
"zoneId": {
"description": "Identifier of zone (e.g. zone001) to monitor.",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"subscriptionType",
"zoneId"
],
"type": "object",
"x-etsi-notes": "NOTE 1:\tAt least one of callbackReference and websockNotifConfig shall be provided by the service consumer. If both are provided, it is up to location server to select an alternative and return only that alternative in the response, as specified in ETSI GS MEC 009 [4], clause 6.12a.\nNOTE 2:\tThis allows the client to recover from communication failures during resource creation and therefore avoids duplicate subscription creation in such situations. In case the element is present, the server shall not alter its value, and shall provide it as part of the representation of this resource. In case the element is not present, the server shall not generate it.",
"x-etsi-ref": "6.3.6"
}
\ No newline at end of file
{
"properties": {
"_links": {
"description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.",
"properties": {
"subscription": {
"properties": {
"href": {
"description": "URI referring to a resource.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uri"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.7.2"
}
},
"required": [
"subscription"
],
"type": "object",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Structure (inlined)"
},
"accessPointId": {
"description": "Identifier of an access point (e.g. ap01). Shall be included when userNumEvent related with access point or operationStatus is included.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"notificationType": {
"description": "Shall be set to \"ZoneStatusNotification\".",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"operationStatus": {
"description": "An enumeration defining the operations status of an access point.",
"enum": [
"Serviceable",
"Unserviceable",
"Unknown"
],
"type": "string"
},
"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": "uint32",
"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": "uint32",
"type": "integer",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uint32"
}
},
"required": [
"seconds",
"nanoSeconds"
],
"type": "object",
"x-etsi-ref": "6.5.2"
},
"userNumEvent": {
"description": "Shall be present when ZoneStatusSubscription includes upperNumberOfUsersZoneThreshold, lowerNumberOfUsersZoneThreshold, upperNumberOfUsersAPThreshold or lowerNumberOfUsersAPThreshold, and the number of users in a zone or an access point crosses the threshold defined in the subscription: 1 = OVER_ZONE_UPPER_THD. 2 = UNDER_ZONE_LOWER_THD. 3 = OVER_AP_UPPER_THD. 4 = UNDER_AP_LOWER_THD.",
"enum": [
1,
2,
3,
4
],
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Enum(inlined)"
},
"zoneId": {
"description": "The identity of the zone. ",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"notificationType",
"zoneId",
"_links"
],
"type": "object",
"x-etsi-notes": "NOTE:\tAs specified in [5], clause 5.2.3.2.",
"x-etsi-ref": "6.4.7"
}
\ No newline at end of file
{
"properties": {
"_links": {
"description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.",
"properties": {
"self": {
"properties": {
"href": {
"description": "URI referring to a resource.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uri"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.7.2"
}
},
"required": [
"self"
],
"type": "object",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Structure (inlined)"
},
"callbackReference": {
"description": "URI exposed by the client on which to receive notifications via HTTP. See note 1.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uri"
},
"clientCorrelator": {
"description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server. See note 2.",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"expiryDeadline": {
"properties": {
"nanoSeconds": {
"description": "The nanoseconds part of the time. Time is defined as 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"
},
"seconds": {
"description": "The seconds part of the time. Time is defined as 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-ref": "6.5.2"
},
"lowerNumberOfUsersAPThreshold": {
"description": "Threshold number of users in an access point which if crossed downward shall cause a notification",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
},
"lowerNumberOfUsersZoneThreshold": {
"description": "Threshold number of users in a zone which if crossed downward shall cause a notification",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
},
"operationStatus": {
"description": "List of operation status values to generate notifications for (these apply to all access points within a zone). See note 3.",
"items": {
"description": "An enumeration defining the operations status of an access point.",
"enum": [
"Serviceable",
"Unserviceable",
"Unknown"
],
"type": "string"
},
"minItems": 0,
"type": "array",
"x-etsi-mec-cardinality": "0..N",
"x-etsi-mec-origin-type": "OperationStatus"
},
"reportingCtrl": {
"properties": {
"maximumCount": {
"description": "Maximum number of notifications. For no maximum, either do not include this element or specify a value of zero. Default value is 0.",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
},
"maximumFrequency": {
"description": "Maximum frequency (in seconds) of notifications per subscription.",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
},
"minimumInterval": {
"description": "Minimum interval between reports in case frequently reporting. Unit is second.",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
}
},
"type": "object",
"x-etsi-ref": "6.5.6"
},
"requestTestNotification": {
"description": "Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4], clause 6.12a.",
"type": "boolean",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Boolean"
},
"subscriptionType": {
"description": "Shall be set to \"ZoneStatusSubscription\".",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
},
"upperNumberOfUsersAPThreshold": {
"description": "Threshold number of users in an access point which if crossed upward shall cause a notification.",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
},
"upperNumberOfUsersZoneThreshold": {
"description": "Threshold number of users in a zone which if crossed upward shall cause a notification.",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "UnsignedInt"
},
"websockNotifConfig": {
"properties": {
"requestWebsocketUri": {
"description": "Set to true by the service consumer to indicate that Websocket delivery is requested.",
"type": "boolean",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Boolean"
},
"websocketUri": {
"description": "Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uri"
}
},
"type": "object",
"x-etsi-ref": "6.5.4"
},
"zoneId": {
"description": "Identifier of zone (e.g. zone001) to monitor.",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"subscriptionType",
"zoneId"
],
"type": "object",
"x-etsi-notes": "NOTE 1:\tAt least one of callbackReference and websockNotifConfig shall be provided by the service consumer. If both are provided, it is up to location server to select an alternative and return only that alternative in the response, as specified in ETSI GS MEC 009 [4], clause 6.12a.\nNOTE 2:\tThis allows the client to recover from communication failures during resource creation and therefore avoids duplicate subscription creation in such situations. In case the element is present, the server shall not alter its value, and shall provide it as part of the representation of this resource. In case the element is not present, the server shall not generate it.\nNOTE 3:\tAs specified in [5], clause 5.2.3.2.",
"x-etsi-ref": "6.3.7"
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment