From 0196cc50a92f82b016e46a84d3c6c41cfff518ff Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Mon, 13 Dec 2021 14:35:20 +0100 Subject: [PATCH 1/3] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4109ae9..1e7bf13 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,10 @@ This repository contains OpenAPIs descriptions for the interfaces specified in E ## Online resources * [Specification document](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf) -* [Navigate the MEC Application Support API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/master/MecAppSupportApi.yaml). -* [Navigate the MEC Service Management API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/master/MecServiceMgmtApi.yaml). -* [Edit the MEC Application Support API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/master/MecAppSupportApi.yaml). -* [Edit the MEC Service Management API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/master/MecServiceMgmtApi.yaml). +* [Navigate the MEC Application Support API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/stf606-draft/MecAppSupportApi.yaml). +* [Navigate the MEC Service Management API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/stf606-draft/MecServiceMgmtApi.yaml). +* [Edit the MEC Application Support API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/stf606-draft/MecAppSupportApi.yaml). +* [Edit the MEC Service Management API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/stf606-draft/MecServiceMgmtApi.yaml). ## License -- GitLab From 8a59a1ae235c9faf301ce2c414822fc796cf22ca Mon Sep 17 00:00:00 2001 From: piscione Date: Wed, 26 Jan 2022 15:20:58 +0100 Subject: [PATCH 2/3] Updated MEC011 OAS3.1 specification from version V2.1.1 to version V2.2.1 --- MecAppSupportApi.json | 26 ++--- MecAppSupportApi.yaml | 25 ++--- MecServiceMgmtApi.json | 221 ++++++++++++++++++++++++++++++++++++++--- MecServiceMgmtApi.yaml | 155 ++++++++++++++++++++++++++--- 4 files changed, 376 insertions(+), 51 deletions(-) diff --git a/MecAppSupportApi.json b/MecAppSupportApi.json index 5c09128..24029ad 100644 --- a/MecAppSupportApi.json +++ b/MecAppSupportApi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "MEC Application Support API", - "version": "2.1.1", + "version": "2.2.1", "description": "The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI", "license": { "name": "BSD-3-Clause", @@ -13,8 +13,8 @@ } }, "externalDocs": { - "description": "ETSI GS MEC011 Application Enablement API, V2.1.1", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf" + "description": "ETSI GS MEC011 Application Enablement API, V2.2.1", + "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.02.01_60/gs_MEC011v020201p.pdf" }, "tags": [ { @@ -77,7 +77,6 @@ "content": { "application/json": { "schema": { - "minItems": 0, "type": "array", "items": { "$ref": "#/components/schemas/TrafficRule" @@ -500,7 +499,6 @@ "content": { "application/json": { "schema": { - "minItems": 0, "type": "array", "items": { "$ref": "#/components/schemas/DnsRule" @@ -2054,7 +2052,7 @@ }, "minPollingInterval": { "type": "integer", - "description": "Minimum poll interval for NTP messages, in seconds as a power of two. Range 3...17", + "description": "Minimum poll interval for NTP messages, in seconds as a power of two. Range 3 to 17", "contentEncoding": "int32", "examples": [ 3 @@ -2062,7 +2060,7 @@ }, "maxPollingInterval": { "type": "integer", - "description": "Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17", + "description": "Maximum poll interval for NTP messages, in seconds as a power of two. Range 3 to 17", "contentEncoding": "int32", "examples": [ 17 @@ -2101,14 +2099,14 @@ "properties": { "ptpMasterIpAddress": { "type": "string", - "description": "PTP Master IP Address", + "description": "PTP Server (referred to as \"master\" in IEEE 1588-2019) IP Address", "examples": [ "192.0.2.0" ] }, "ptpMasterLocalPriority": { "type": "integer", - "description": "PTP Master local priority", + "description": "PTP Server (referred to as \"master\" in IEEE 1588-2019 ) local priority", "contentEncoding": "int32", "examples": [ 1 @@ -2171,7 +2169,7 @@ "items": { "$ref": "#/components/schemas/TimingCaps_PtpMasters" }, - "description": "Available PTP Masters" + "description": "Number of available PTP Servers (referred to as \"masters\" in IEEE 1588-2019)" } }, "description": "This type represents the information provided by the MEC platform in response to the Timing capabilities Query message." @@ -2341,7 +2339,7 @@ }, "priority": { "type": "integer", - "description": "Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence", + "description": "Priority of this traffic rule within the range 0 to 255. If traffic rules conflict, the one with higher priority take precedence. Value indicates the priority in descending order, i.e. with 0 as the highest priority and 255 as the lowest priority.", "contentEncoding": "int32", "examples": [ 1 @@ -2358,7 +2356,11 @@ "$ref": "#/components/schemas/TrafficRule.Action" }, "dstInterface": { - "$ref": "#/components/schemas/DestinationInterface" + "type": "array", + "items": { + "$ref": "#/components/schemas/DestinationInterface" + }, + "maxItems": 2 }, "state": { "$ref": "#/components/schemas/TrafficRule.State" diff --git a/MecAppSupportApi.yaml b/MecAppSupportApi.yaml index 21013fe..8d37b41 100644 --- a/MecAppSupportApi.yaml +++ b/MecAppSupportApi.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: MEC Application Support API - version: '2.1.1' + version: '2.2.1' description: The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI license: name: BSD-3-Clause @@ -9,8 +9,8 @@ info: contact: email: cti_support@etsi.org externalDocs: - description: ETSI GS MEC011 Application Enablement API, V2.1.1 - url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf + description: ETSI GS MEC011 Application Enablement API, V2.2.1 + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.02.01_60/gs_MEC011v020201p.pdf tags: - name: appTrafficRules - name: appDnsRules @@ -47,7 +47,6 @@ paths: content: application/json: schema: - minItems: 0 type: array items: $ref: '#/components/schemas/TrafficRule' @@ -328,7 +327,6 @@ paths: content: application/json: schema: - minItems: 0 type: array items: $ref: '#/components/schemas/DnsRule' @@ -1401,13 +1399,13 @@ components: - 192.0.2.0 minPollingInterval: type: integer - description: Minimum poll interval for NTP messages, in seconds as a power of two. Range 3...17 + description: Minimum poll interval for NTP messages, in seconds as a power of two. Range 3 to 17 contentEncoding: int32 examples: - 3 maxPollingInterval: type: integer - description: Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17 + description: Maximum poll interval for NTP messages, in seconds as a power of two. Range 3 to 17 contentEncoding: int32 examples: - 17 @@ -1436,12 +1434,12 @@ components: properties: ptpMasterIpAddress: type: string - description: PTP Master IP Address + description: PTP Server (referred to as "master" in IEEE 1588-2019) IP Address examples: - 192.0.2.0 ptpMasterLocalPriority: type: integer - description: PTP Master local priority + description: PTP Server (referred to as "master" in IEEE 1588-2019 ) local priority contentEncoding: int32 examples: - 1 @@ -1487,7 +1485,7 @@ components: type: array items: $ref: '#/components/schemas/TimingCaps_PtpMasters' - description: Available PTP Masters + description: Number of available PTP Servers (referred to as "masters" in IEEE 1588-2019) description: This type represents the information provided by the MEC platform in response to the Timing capabilities Query message. TrafficFilter: title: TrafficFilter @@ -1613,7 +1611,7 @@ components: $ref: '#/components/schemas/TrafficRule.FilterType' priority: type: integer - description: Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence + description: Priority of this traffic rule within the range 0 to 255. If traffic rules conflict, the one with higher priority take precedence. Value indicates the priority in descending order, i.e. with 0 as the highest priority and 255 as the lowest priority. contentEncoding: int32 examples: - 1 @@ -1625,7 +1623,10 @@ components: action: $ref: '#/components/schemas/TrafficRule.Action' dstInterface: - $ref: '#/components/schemas/DestinationInterface' + type: array + items: + $ref: '#/components/schemas/DestinationInterface' + maxItems: 2 state: $ref: '#/components/schemas/TrafficRule.State' description: This type represents the general information of a traffic rule. diff --git a/MecServiceMgmtApi.json b/MecServiceMgmtApi.json index d9e11f1..9286259 100644 --- a/MecServiceMgmtApi.json +++ b/MecServiceMgmtApi.json @@ -10,11 +10,11 @@ "contact": { "email": "cti_support@etsi.org" }, - "version": "2.1.1" + "version": "2.2.1" }, "externalDocs": { - "description": "ETSI GS MEC011 Application Enablement API, V2.1.1", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf" + "description": "ETSI GS MEC011 Application Enablement API, V2.2.1", + "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.02.01_60/gs_MEC011v020201p.pdf" }, "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema", "servers": [ @@ -42,6 +42,9 @@ }, { "name": "callbacks" + }, + { + "name": "individualMECservice" } ], "paths": { @@ -504,7 +507,6 @@ "content": { "application/json": { "schema": { - "minItems": 0, "type": "array", "items": { "$ref": "#/components/schemas/ServiceInfo" @@ -1256,7 +1258,6 @@ "content": { "application/json": { "schema": { - "minItems": 0, "type": "array", "items": { "$ref": "#/components/schemas/ServiceInfo" @@ -1557,7 +1558,6 @@ "content": { "application/json": { "schema": { - "minItems": 0, "type": "array", "items": { "$ref": "#/components/schemas/TransportInfo" @@ -1619,6 +1619,142 @@ "deprecated": false }, "parameters": [] + }, + "/resource_uri_allocated_by_MEC_platform": { + "get": { + "tags": [ + "individualMECservice" + ], + "description": "This method retrieves information about an \"Individual mecServiceLiveness\" resource", + "operationId": "get_individual_MEC_service", + "responses": { + "200": { + "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceLivenessInfo" + } + } + } + }, + "400": { + "description": "It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "403": { + "description": "The operation is not allowed given the current status of the resource. More information shall be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "patch": { + "tags": [ + "individualMECservice" + ], + "description": "This method updates a resource on top of the existing resource state with partial changes described by the client.", + "operationId": "patch_individual_MEC_service", + "requestBody": { + "description": "It contains an update of the liveness state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceLivenessUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Upon success, a response body is returned containing the updated liveness interval value of the service Instance.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceLivenessInfo" + } + } + } + }, + "204": { + "description": "Successful response sent when there is no need to provide a new liveness interval value to the service Instance.", + "headers": {}, + "content": {} + }, + "400": { + "description": "It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "403": { + "description": "The operation is not allowed given the current status of the resource. More information shall be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "409": { + "description": "The operation is not allowed due to a conflict with the state of the resource. The MEC platform shall respond with this code if the service instance is in \"INACTIVE\" state. More information shall be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "412": { + "description": "It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } } }, "components": { @@ -1698,7 +1834,6 @@ "type": "object", "properties": { "addresses": { - "minItems": 0, "type": "array", "items": { "$ref": "#/components/schemas/EndPointInfo.Address" @@ -1729,7 +1864,6 @@ "type": "object", "properties": { "uris": { - "minItems": 0, "type": "array", "items": { "type": "string" @@ -1932,7 +2066,6 @@ "type": "object", "properties": { "serInstanceIds": { - "minItems": 0, "type": "array", "items": { "type": "string" @@ -1940,7 +2073,6 @@ "description": "Identifiers of service instances about which to report events." }, "serNames": { - "minItems": 0, "type": "array", "items": { "type": "string" @@ -1948,7 +2080,6 @@ "description": "Names of services about which to report events." }, "serCategories": { - "minItems": 0, "type": "array", "items": { "$ref": "#/components/schemas/CategoryRef" @@ -1956,7 +2087,6 @@ "description": "Categories of services about which to report events." }, "states": { - "minItems": 0, "type": "array", "items": { "$ref": "#/components/schemas/ServiceState" @@ -2047,7 +2177,7 @@ "ATTRIBUTES_CHANGED" ], "type": "string", - "description": "Type of the change. Valid values:\n ADDED: The service was newly added.\n REMOVED: The service was removed.\n STATE_CHANGED: Only the state of the service was changed. \n ATTRIBUTES_CHANGED: At least one attribute of the service other than state was changed. The change may or may not include changing the state.", + "description": "Type of the change. Valid values:\n 1. ADDED: The service was newly added.\n 2. REMOVED: The service was removed.\n 3. STATE_CHANGED: Only the state of the service was changed. \n 4. ATTRIBUTES_CHANGED: At least one attribute of the service other than state was changed. The change may or may not include changing the state.", "examples": [ "ADDED" ] @@ -2085,7 +2215,8 @@ "title": "ServiceState", "enum": [ "ACTIVE", - "INACTIVE" + "INACTIVE", + "SUSPENDED" ], "type": "string", "description": "This enumeration defines the possible states of a service.", @@ -2153,10 +2284,72 @@ "examples": [ true ] + }, + "livenessInterval": { + "type": "integer", + "description": "Interval (in seconds) between two consecutive \"heartbeat\" messages (see clause 8.2.10.3.3). If the service-producing application supports sending \"heartbeat\" messages, it shall include this attribute in the registration request. In this case, the application shall either set the value of this attribute to zero or shall use this attribute to propose a non-zero positive value for the liveness interval. If the application has provided this attribute in the request and the MEC platform requires \"heartbeat\" messages, the MEC platform shall return this attribute value in the HTTP responses. The MEC platform may use the value proposed in the request or may choose a different value. If the MEC platform does not require \"heartbeat\" messages for this service instance it shall omit the attribute in responses." + }, + "_links": { + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "$ref": "#/components/schemas/LinkType" + }, + "liveness": { + "$ref": "#/components/schemas/LinkType" + } + } } }, "description": "This type represents the general information of a MEC service." }, + "ServiceLivenessInfo": { + "type": "object", + "required": [ + "state", + "timeStamp", + "interval" + ], + "properties": { + "state": { + "$ref": "#/components/schemas/ServiceState" + }, + "timeStamp": { + "type": "object", + "description": "The time when the last \"heartbeat\" message was received by MEC platform", + "required": [ + "seconds", + "nanoSeconds" + ], + "properties": { + "seconds": { + "type": "integer" + }, + "nanoSeconds": { + "type": "integer" + } + } + }, + "interval": { + "type": "integer", + "description": "The interval (in seconds) between two consecutive \"heartbeat\" messages (see clause 8.2.10.3.3) that MEC platform has determined." + } + } + }, + "ServiceLivenessUpdate": { + "type": "object", + "required": [ + "state" + ], + "properties": { + "state": { + "$ref": "#/components/schemas/ServiceState" + } + } + }, "Subscription": { "title": "Subscription", "required": [ diff --git a/MecServiceMgmtApi.yaml b/MecServiceMgmtApi.yaml index 855bbab..c3fbca0 100644 --- a/MecServiceMgmtApi.yaml +++ b/MecServiceMgmtApi.yaml @@ -7,10 +7,10 @@ info: url: 'https://forge.etsi.org/legal-matters' contact: email: cti_support@etsi.org - version: '2.1.1' + version: '2.2.1' externalDocs: - description: ETSI GS MEC011 Application Enablement API, V2.1.1 - url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf + description: ETSI GS MEC011 Application Enablement API, V2.2.1 + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.02.01_60/gs_MEC011v020201p.pdf jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema servers: - url: http://127.0.0.1:8081/mec_service_mgmt/v1 @@ -23,6 +23,7 @@ tags: - name: services - name: transports - name: callbacks +- name: individualMECservice paths: /applications/{appInstanceId}/subscriptions: @@ -351,7 +352,6 @@ paths: content: application/json: schema: - minItems: 0 type: array items: $ref: '#/components/schemas/ServiceInfo' @@ -861,7 +861,6 @@ paths: content: application/json: schema: - minItems: 0 type: array items: $ref: '#/components/schemas/ServiceInfo' @@ -1067,7 +1066,6 @@ paths: content: application/json: schema: - minItems: 0 type: array items: $ref: '#/components/schemas/TransportInfo' @@ -1106,6 +1104,93 @@ paths: contentMediaType: text/plain deprecated: false parameters: [] + + /resource_uri_allocated_by_MEC_platform: + get: + tags: + - individualMECservice + description: This method retrieves information about an "Individual mecServiceLiveness" resource + operationId: get_individual_MEC_service + responses: + '200': + description: It is used to indicate nonspecific success. The response body contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceLivenessInfo' + '400': + description: It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '403': + description: The operation is not allowed given the current status of the resource. + More information shall be provided in the "detail" attribute of the "ProblemDetails" structure. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + patch: + tags: + - individualMECservice + description: This method updates a resource on top of the existing resource state with partial changes described by the client. + operationId: patch_individual_MEC_service + requestBody: + description: It contains an update of the liveness state. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceLivenessUpdate' + required: true + responses: + '200': + description: Upon success, a response body is returned containing the updated liveness interval value of the service Instance. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceLivenessInfo' + '204': + description: Successful response sent when there is no need to provide a new liveness interval value to the service Instance. + headers: {} + content: {} + '400': + description: It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '403': + description: The operation is not allowed given the current status of the resource. More information shall be provided in the "detail" attribute of the "ProblemDetails" structure. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '409': + description: The operation is not allowed due to a conflict with the state of the resource. The MEC platform shall respond with this code if the service instance is in "INACTIVE" state. More information shall be provided in the "detail" attribute of the "ProblemDetails" structure. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '412': + description: It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + components: schemas: CategoryRef: @@ -1164,7 +1249,6 @@ components: type: object properties: addresses: - minItems: 0 type: array items: $ref: '#/components/schemas/EndPointInfo.Address' @@ -1186,7 +1270,6 @@ components: type: object properties: uris: - minItems: 0 type: array items: type: string @@ -1334,25 +1417,21 @@ components: type: object properties: serInstanceIds: - minItems: 0 type: array items: type: string description: Identifiers of service instances about which to report events. serNames: - minItems: 0 type: array items: type: string description: Names of services about which to report events. serCategories: - minItems: 0 type: array items: $ref: '#/components/schemas/CategoryRef' description: Categories of services about which to report events. states: - minItems: 0 type: array items: $ref: '#/components/schemas/ServiceState' @@ -1418,7 +1497,7 @@ components: - STATE_CHANGED - ATTRIBUTES_CHANGED type: string - description: "Type of the change. Valid values:\n ADDED: The service was newly added.\n REMOVED: The service was removed.\n STATE_CHANGED: Only the state of the service was changed. \n ATTRIBUTES_CHANGED: At least one attribute of the service other than state was changed. The change may or may not include changing the state." + description: "Type of the change. Valid values:\n 1. ADDED: The service was newly added.\n 2. REMOVED: The service was removed.\n 3. STATE_CHANGED: Only the state of the service was changed. \n 4. ATTRIBUTES_CHANGED: At least one attribute of the service other than state was changed. The change may or may not include changing the state." examples: - ADDED SerializerType: @@ -1449,6 +1528,7 @@ components: enum: - ACTIVE - INACTIVE + - SUSPENDED type: string description: This enumeration defines the possible states of a service. examples: @@ -1498,7 +1578,56 @@ components: description: Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application. examples: - true + livenessInterval: + type: integer + description: Interval (in seconds) between two consecutive "heartbeat" messages (see clause 8.2.10.3.3). + If the service-producing application supports sending "heartbeat" messages, it shall include this attribute in the registration request. In this case, the application shall either set the value of this attribute to zero or shall use this attribute to propose a non-zero positive value for the liveness interval. + If the application has provided this attribute in the request and the MEC platform requires "heartbeat" messages, the MEC platform shall return this attribute value in the HTTP responses. The MEC platform may use the value proposed in the request or may choose a different value. + If the MEC platform does not require "heartbeat" messages for this service instance it shall omit the attribute in responses. + _links: + type: object + required: + - self + properties: + self: + $ref: '#/components/schemas/LinkType' + liveness: + $ref: '#/components/schemas/LinkType' description: This type represents the general information of a MEC service. + + ServiceLivenessInfo: + type: object + required: + - state + - timeStamp + - interval + properties: + state: + $ref: '#/components/schemas/ServiceState' + timeStamp: + type: object + description: The time when the last "heartbeat" message was received by MEC platform + required: + - seconds + - nanoSeconds + properties: + seconds: + type: integer + nanoSeconds: + type: integer + interval: + type: integer + description: The interval (in seconds) between two consecutive "heartbeat" messages (see clause 8.2.10.3.3) that MEC platform has determined. + + ServiceLivenessUpdate: + type: object + required: + - state + properties: + state: + $ref: '#/components/schemas/ServiceState' + + Subscription: title: Subscription required: -- GitLab From 2017d413f0f84bd137d52b1a2c34abc4352e62ef Mon Sep 17 00:00:00 2001 From: piscione Date: Fri, 28 Jan 2022 09:49:11 +0100 Subject: [PATCH 3/3] Fixes on examples. --- MecAppSupportApi.json | 49 +++++++++++++++++++++++++++++-------------- MecAppSupportApi.yaml | 23 +++++++++++++------- 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/MecAppSupportApi.json b/MecAppSupportApi.json index 24029ad..2daeee8 100644 --- a/MecAppSupportApi.json +++ b/MecAppSupportApi.json @@ -104,10 +104,18 @@ } ], "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, + "dstInterface": [ + { + "dstInterface0": null, + "interfaceType": "IP", + "dstIpAddress": "20.1.1.1" + }, + { + "dstInterface1": null, + "interfaceType": "IP", + "dstIpAddress": "20.1.1.2" + } + ], "state": "ACTIVE" } ] @@ -137,10 +145,13 @@ } ], "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, + "dstInterface": [ + { + "dstInterface0": null, + "interfaceType": "IP", + "dstIpAddress": "20.1.1.1" + } + ], "state": "ACTIVE" } ] @@ -261,10 +272,13 @@ } ], "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, + "dstInterface": [ + { + "dstInterface0": null, + "interfaceType": "IP", + "dstIpAddress": "20.1.1.1" + } + ], "state": "ACTIVE" } } @@ -392,10 +406,13 @@ } ], "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, + "dstInterface": [ + { + "dstInterface0": null, + "interfaceType": "IP", + "dstIpAddress": "20.1.1.1" + } + ], "state": "ACTIVE" } } diff --git a/MecAppSupportApi.yaml b/MecAppSupportApi.yaml index 8d37b41..7accb37 100644 --- a/MecAppSupportApi.yaml +++ b/MecAppSupportApi.yaml @@ -66,8 +66,12 @@ paths: - '80' action: FORWARD_DECAPSULATED dstInterface: - interfaceType: IP - dstIpAddress: 20.1.1.1 + - dstInterface0: + interfaceType: IP + dstIpAddress: 20.1.1.1 + - dstInterface1: + interfaceType: IP + dstIpAddress: 20.1.1.2 state: ACTIVE contentMediaType: application/json examples: @@ -87,8 +91,9 @@ paths: - '80' action: FORWARD_DECAPSULATED dstInterface: - interfaceType: IP - dstIpAddress: 20.1.1.1 + - dstInterface0: + interfaceType: IP + dstIpAddress: 20.1.1.1 state: ACTIVE '400': description: Bad Request. It is used to indicate that incorrect parameters were passed to the request. @@ -170,8 +175,9 @@ paths: - '80' action: FORWARD_DECAPSULATED dstInterface: - interfaceType: IP - dstIpAddress: 20.1.1.1 + - dstInterface0: + interfaceType: IP + dstIpAddress: 20.1.1.1 state: ACTIVE '400': description: Bad Request. It is used to indicate that incorrect parameters were passed to the request. @@ -258,8 +264,9 @@ paths: - '80' action: FORWARD_DECAPSULATED dstInterface: - interfaceType: IP - dstIpAddress: 20.1.1.1 + - dstInterface0: + interfaceType: IP + dstIpAddress: 20.1.1.1 state: ACTIVE '400': description: Bad Request. It is used to indicate that incorrect parameters were passed to the request. -- GitLab