diff --git a/MEC033/MEX/IOTS/IOTPLAT/RegisteredIoTPlatform.robot b/MEC033/MEX/IOTS/IOTPLAT/RegisteredIoTPlatform.robot new file mode 100644 index 0000000000000000000000000000000000000000..7c9e13b2f23fe0573af65545f4a7c57ab859f876 --- /dev/null +++ b/MEC033/MEX/IOTS/IOTPLAT/RegisteredIoTPlatform.robot @@ -0,0 +1,165 @@ +Y''[Documentation] robot --outputdir ../../../outputs ./RegisteredIoTPlatform.robot +... Test Suite to validate the Registered IOT Platform (IOTPLAT) operations. + +*** Settings *** +Resource environment/variables.txt +Resource ../../../../pics.txt +Resource ../../../../GenericKeywords.robot +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem + +*** Test Cases *** +TP_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK + [Documentation] + ... Check that the IUT responds with the list of registered IoT platforms + ... when queried by a Service Consumer + ... ETSI GS MEC 033 V3.1.1, clause 7.5.3.1 + ... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + Retrieve all registered IOT Platform information + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is IotPlatformInfoList + + +TP_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK + [Documentation] + ... Check that the IUT registers the information of a new IoT platform + ... when requested by a Service Consumer + ... ETSI GS MEC 033 V3.1.1, clause 7.5.3.4 + ... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + Register IOT Platform information IotPlatformInfo + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is IotPlatformInfo + + +TP_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR + [Documentation] + ... Check that the IUT returns an error + ... when Service Consumer request to register an IoT device with incorrect parameters + ... ETSI GS MEC 033 V3.1.1, clause 7.5.3.4 + ... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + Register IOT Platform information IotPlatformInfoBR + Check HTTP Response Status Code Is 400 + + +TP_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK + [Documentation] + ... Check that the IUT returns the IoT platform information + ... when requested by Service Consumer specifying the IoT platform identifier + ... ETSI GS MEC 033 V3.1.1, clause 7.5.3.1 + ... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + Retrieve specific registered IOT Platform information ${IOT_PLATFORM_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is IotPlatformInfo + + +TP_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF + [Documentation] + ... Check that the IUT returns the IoT platform information + ... when requested by Service Consumer specifying the IoT platform identifier + ... ETSI GS MEC 033 V3.1.1, clause 7.5.3.1 + ... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + Retrieve specific registered IOT Platform information ${NOT_EXISTING_IOT_PLATFORM_ID} + Check HTTP Response Status Code Is 404 + + +TP_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK + [Documentation] + ... Check that the IUT updates the information about a registered IoT platform + ... when requested by a Service Consumer + ... ETSI GS MEC 033 V3.1.1, clause 7.5.3.2 + ... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + Update registered IOT Platform information ${IOT_PLATFORM_ID} IotPlatformInfoUpdate + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is IotPlatformInfo + +TP_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF + [Documentation] + ... Check that the IUT returns an error + ... when a Service Consumer requests to update a not registered IoT platform + ... ETSI GS MEC 033 V3.1.1, clause 7.5.3.2 + ... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + Update registered IOT Platform information ${NOT_EXISTING_IOT_PLATFORM_ID} IotPlatformInfoUpdate + Check HTTP Response Status Code Is 404 + + +TP_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK + [Documentation] + ... Check that the IUT deregisters an IoT platform information + ... when requested by a Service Consumer specifying the registered IoT platform identifier + ... ETSI GS MEC 033 V3.1.1, clause 7.5.3.5 + ... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + Deregister IOT Platform information ${IOT_PLATFORM_ID} + Check HTTP Response Status Code Is 204 + + +TP_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF + [Documentation] + ... Check that the IUT returns an error + ... when a Service Consumer request to deregister an IoT platform using incorrect parameters + ... ETSI GS MEC 033 V3.1.1, clause 7.5.3.5 + ... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + Deregister IOT Platform information ${NOT_EXISTING_IOT_PLATFORM_ID} + Check HTTP Response Status Code Is 404 + + +############################################################################ + +*** Keywords *** +Retrieve all registered IOT Platform 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}"} + GET ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms + ${output}= Output response + Set Suite Variable ${response} ${output} + +Retrieve specific registered IOT Platform information + [Arguments] ${registeredPlatformId} + 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}"} + GET ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms/${registeredPlatformId} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Update registered IOT Platform information + [Arguments] ${registeredPlatformId} ${content} + 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}"} + PUT ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms/${registeredPlatformId} ${content} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Register IOT Platform information + [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}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + POST ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + + + Deregister IOT Platform information + [Arguments] ${registeredPlatformId} + 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}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms/${registeredPlatformId} + ${output}= Output response + Set Suite Variable ${response} ${output} diff --git a/MEC033/MEX/IOTS/IOTPLAT/environment/variables.txt b/MEC033/MEX/IOTS/IOTPLAT/environment/variables.txt new file mode 100644 index 0000000000000000000000000000000000000000..1bc068b30ec077f8eef4dee4adf2e6ca2e1ccd2d --- /dev/null +++ b/MEC033/MEX/IOTS/IOTPLAT/environment/variables.txt @@ -0,0 +1,13 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 127.0.0.1 +${PORT} 8084 +${response} {} +${TOKEN} asic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} amsi +${apiVersion} v1 + +${IOT_PLATFORM_ID} iotPlatformId +${NOT_EXISTING_IOT_PLATFORM_ID} notExistingIotPlatformId \ No newline at end of file diff --git a/MEC033/MEX/IOTS/IOTPLAT/jsons/IoTPlatformInfo.json b/MEC033/MEX/IOTS/IOTPLAT/jsons/IoTPlatformInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..23dc2d794d43e7ee5ca66d74fdec900ed6cb7657 --- /dev/null +++ b/MEC033/MEX/IOTS/IOTPLAT/jsons/IoTPlatformInfo.json @@ -0,0 +1,47 @@ +[{ + "iotPlatformId": "cupidatat", + "userTransportInfo": [ + { + "id": "IoTPlatformId", + "name": "nameUserTransportInfo", + "type": "REST_HTTP", + "protocol": "HTTP", + "version": "1.00", + "endpoint": { + "alternative": "amet commodo ad qui cupidatat", + "fqdn": [ + "fqdn" + ], + "addresses": [ + { + "host": "somehost.com", + "port": 1234 + } + ] + }, + "security": { + "oAuth2Info": { + "grantTypes": [ + "OAUTH2_AUTHORIZATION_CODE", + "OAUTH2_RESOURCE_OWNER", + "OAUTH2_RESOURCE_OWNER" + ], + "tokenEndpoint": "https://IqNooo.tosnwuA0fdU9jlKNmu3uyYD" + } + }, + "implSpecificInfo": { + "downlinkTopics": [ + "downlinkTopic01" + ], + "uplinkTopics": [ + "uplinkTopic01" + ], + "eventTopics": [ + "eventTopics" + ] + }, + "description": "desc" + } + ] +} +] \ No newline at end of file diff --git a/MEC033/MEX/IOTS/IOTPLAT/jsons/IoTPlatformInfoBR.json b/MEC033/MEX/IOTS/IOTPLAT/jsons/IoTPlatformInfoBR.json new file mode 100644 index 0000000000000000000000000000000000000000..095b1d8ead61c1cddf8ac13e894bd6087f5b607c --- /dev/null +++ b/MEC033/MEX/IOTS/IOTPLAT/jsons/IoTPlatformInfoBR.json @@ -0,0 +1,47 @@ +{ + "iotPlatformId": "IoTPlatformId", + "enable":true, + "userTransportInfo": [ + { + "id": "IoTPlatformId", + "name": "nameUserTransportInfo", + "type": "REST_HTTP", + "protocol": "HTTP", + "version": "1.00", + "endpoint": { + "alternative": "amet commodo ad qui cupidatat", + "fqdn": [ + "fqdn" + ], + "addresses": [ + { + "host": "somehost.com", + "port": 1234 + } + ] + }, + "security": { + "oAuth2Info": { + "grantTypes": [ + "OAUTH2_AUTHORIZATION_CODE", + "OAUTH2_RESOURCE_OWNER", + "OAUTH2_RESOURCE_OWNER" + ], + "tokenEndpoint": "https://IqNooo.tosnwuA0fdU9jlKNmu3uyYD" + } + }, + "implSpecificInfo": { + "downlinkTopics": [ + "downlinkTopic01" + ], + "uplinkTopics": [ + "uplinkTopic01" + ], + "eventTopics": [ + "eventTopics" + ] + }, + "description": "desc" + } + ] +} \ No newline at end of file diff --git a/MEC033/MEX/IOTS/IOTPLAT/jsons/IoTPlatformInfoUpdate.json b/MEC033/MEX/IOTS/IOTPLAT/jsons/IoTPlatformInfoUpdate.json new file mode 100644 index 0000000000000000000000000000000000000000..c08b9fb478461642870e486de01134c258c90cf4 --- /dev/null +++ b/MEC033/MEX/IOTS/IOTPLAT/jsons/IoTPlatformInfoUpdate.json @@ -0,0 +1,44 @@ +{ + "iotPlatformId": "newIoTPlatformId", + "userTransportInfo": [ + { + "id": "IoTPlatformId", + "name": "nameUserTransportInfo", + "type": "REST_HTTP", + "protocol": "HTTP", + "version": "1.00", + "endpoint": { + "alternative": "alternative", + "fqdn": [ + "fqdn" + ], + "addresses": [ + { + "host": "somehost.com", + "port": 1234 + } + ] + }, + "security": { + "oAuth2Info": { + "grantTypes": [ + "OAUTH2_AUTHORIZATION_CODE" + ], + "tokenEndpoint": "https://IqNooo.tosnwuA0fdU9jlKNmu3uyYD" + } + }, + "implSpecificInfo": { + "downlinkTopics": [ + "downlinkTopic01" + ], + "uplinkTopics": [ + "uplinkTopic01" + ], + "eventTopics": [ + "eventTopics" + ] + }, + "description": "desc" + } + ] +} \ No newline at end of file diff --git a/MEC033/MEX/IOTS/IOTPLAT/schemas/IotPlatformInfo.schema.json b/MEC033/MEX/IOTS/IOTPLAT/schemas/IotPlatformInfo.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..93828b01f02d3f56ffddd0dde6fcb7becf20c318 --- /dev/null +++ b/MEC033/MEX/IOTS/IOTPLAT/schemas/IotPlatformInfo.schema.json @@ -0,0 +1,328 @@ +{ + "title": "IotPlatformInfo", + "type": "object", + "properties": { + "iotPlatformId": { + "description": "Identifier of the IoT platform.", + "type": "string" + }, + "userTransportInfo": { + "description": "Information about the user transport(s) provided by the IoT platform.", + "type": "array", + "minItems": 1, + "items": { + "title": "MBTransportInfo", + "type": "object", + "properties": { + "id": { + "description": "The identifier of this transport as per ETSI GS MEC 011 [i.2].", + "type": "string" + }, + "name": { + "description": "The name of this transport as per ETSI GS MEC 011 [i.2].", + "type": "string" + }, + "description": { + "description": "Human-readable description of this transport as per ETSI GS MEC 011 [i.2].", + "type": "string" + }, + "type": { + "description'": "Type of the transport. The attribute shall be set to \"MB_TOPIC_BASED.\"", + "type": "string", + "enum": [ + "REST_HTTP", + "MB_TOPIC_BASED", + "MB_ROUTING", + "MB_PUBSUB", + "RPC", + "RPC_STREAMING", + "WEBSOCKET" + ], + "description": "Enumeration representing types of transports." + }, + "protocol": { + "description": "The name of the protocol used. Being the transport of MB_TOPIC_BASED type, this attribute should be typically set to \"MQTT\" or \"AMQP.\"", + "type": "string" + }, + "version": { + "description": "The version of the protocol used as per ETSI GS MEC 011 [i.2].", + "type": "string" + }, + "endpoint": { + "description'": "Information about the endpoint to access the transport as per ETSI GS MEC 011 [i.2].", + "title": "EndPointInfo", + "type": "object", + "properties": { + "uris": { + "description": "Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST APIs. See note.", + "type": "array", + "items": { + "type": "string" + } + }, + "fqdn": { + "description": "Fully Qualified Domain Name of the service. See note.", + "type": "array", + "items": { + "type": "string" + } + }, + "addresses": { + "type": "array", + "items": { + "description": "Entry point information of the service as one or more pairs of IP address and port. See note.", + "type": "object", + "properties": { + "host": { + "description": "Host portion of the address.", + "type": "string" + }, + "port": { + "description": "Port portion of the address.", + "type": "integer" + } + }, + "required": [ + "host", + "port" + ] + } + }, + "alternative": { + "description": "Entry point information of the service in a format defined by an implementation, or in an external specification. See note.", + "type": "string" + } + }, + "description": "NOTE: Exactly one of \"uris\", \"fqdn\", \"addresses\" or \"alternative\" shall be present. \n" + }, + "security": { + "description": "Information about the security used by the transport as per ETSI GS MEC 011 [i.2].", + "type": "object", + "properties": { + "oAuth2Info": { + "description": "Parameters related to use of OAuth 2.0. Shall be present in case OAuth 2.0 (see IETF RFC 6749 [13]) is supported to secure the provision of the service over the transport.", + "type": "object", + "properties": { + "grantTypes": { + "type": "array", + "description": "List of supported OAuth 2.0 grant types.\nEach entry shall be one of the following permitted values:\n- OAUTH2_AUTHORIZATION_CODE: Authorization code grant type\n- OAUTH2_IMPLICIT_GRANT: Implicit grant type\n- OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant type\n- OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type\nOnly the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present document.\n", + "items": { + "type": "string", + "enum": [ + "OAUTH2_AUTHORIZATION_CODE", + "OAUTH2_IMPLICIT_GRANT", + "OAUTH2_RESOURCE_OWNER", + "OAUTH2_CLIENT_CREDENTIALS" + ] + } + }, + "tokenEndpoint": { + "description": "The token endpoint. Shall be present unless the grant type is OAUTH2_IMPLICIT_GRANT.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "grantTypes" + ] + }, + "extensions": { + "description": "Extensions for alternative transport mechanisms. These extensions depend on the actual transport and are out of scope of the present document. For instance, such extensions may be used to signal the necessary parameters for the client to use TLS-based authorization defined for alternative transports (see ETSI GS MEC 009 [5] for more information).\n", + "type": "string" + } + } + }, + "implSpecificInfo": { + "description": "Additional implementation specific details of the transport.", + "type": "object", + "properties": { + "eventTopics": { + "description": "Topics used to publish events related to the established session between the IoT device(s) and the end IoT application(s) on the user transport.", + "type": "array", + "minItems": 0, + "items": { + "type": "string" + } + }, + "uplinkTopics": { + "description": "Topics used to publish data generated by the IoT device(s) on the user transport, in order to be consumed by the end IoT application(s).", + "type": "array", + "items": { + "type": "string" + } + }, + "downlinkTopics": { + "description": "Topics used to publish data generated by the IoT applications(s) on the user transport, in order to be consumed by the end IoT device(s).", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "required": [ + "id", + "name", + "type", + "protocol", + "version", + "endpoint", + "security", + "implSpecificInfo" + ] + } + }, + "customServicesTransportInfo": { + "description": "Transport enabling access to vendor-specific services provided by the IoT platform. The data type definition is as per ETSI GS MEC 011 [i.2].", + "type": "array", + "minItems": 0, + "items": { + "title": "TransportInfo", + "type": "object", + "properties": { + "id": { + "description": "The identifier of this transport.", + "type": "string" + }, + "name": { + "description": "The name of this transport.", + "type": "string" + }, + "description": { + "description": "Human-readable description of this transport.", + "type": "string" + }, + "type": { + "description'": "Type of the transport.", + "type": "string", + "enum": [ + "REST_HTTP", + "MB_TOPIC_BASED", + "MB_ROUTING", + "MB_PUBSUB", + "RPC", + "RPC_STREAMING", + "WEBSOCKET" + ], + "description": "Enumeration representing types of transports." + }, + "protocol": { + "description": "The name of the protocol used. Shall be set to \"HTTP\" for a REST API.", + "type": "string" + }, + "version": { + "description": "The version of the protocol used.", + "type": "string" + }, + "endpoint": { + "description'": "Information about the endpoint to access the transport.", + "title": "EndPointInfo", + "type": "object", + "properties": { + "uris": { + "description": "Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST APIs. See note.", + "type": "array", + "items": { + "type": "string" + } + }, + "fqdn": { + "description": "Fully Qualified Domain Name of the service. See note.", + "type": "array", + "items": { + "type": "string" + } + }, + "addresses": { + "type": "array", + "items": { + "description": "Entry point information of the service as one or more pairs of IP address and port. See note.", + "type": "object", + "properties": { + "host": { + "description": "Host portion of the address.", + "type": "string" + }, + "port": { + "description": "Port portion of the address.", + "type": "integer" + } + }, + "required": [ + "host", + "port" + ] + } + }, + "alternative": { + "description": "Entry point information of the service in a format defined by an implementation, or in an external specification. See note.", + "type": "string" + } + }, + "description": "NOTE: Exactly one of \"uris\", \"fqdn\", \"addresses\" or \"alternative\" shall be present. \n" + }, + "security": { + "description'": "Information about the security used by the transport.", + "type": "object", + "properties": { + "oAuth2Info": { + "description": "Parameters related to use of OAuth 2.0. Shall be present in case OAuth 2.0 (see IETF RFC 6749 [13]) is supported to secure the provision of the service over the transport.", + "type": "object", + "properties": { + "grantTypes": { + "type": "array", + "description": "List of supported OAuth 2.0 grant types.\nEach entry shall be one of the following permitted values:\n- OAUTH2_AUTHORIZATION_CODE: Authorization code grant type\n- OAUTH2_IMPLICIT_GRANT: Implicit grant type\n- OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant type\n- OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type\nOnly the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present document.\n", + "items": { + "type": "string", + "enum": [ + "OAUTH2_AUTHORIZATION_CODE", + "OAUTH2_IMPLICIT_GRANT", + "OAUTH2_RESOURCE_OWNER", + "OAUTH2_CLIENT_CREDENTIALS" + ] + } + }, + "tokenEndpoint": { + "description": "The token endpoint. Shall be present unless the grant type is OAUTH2_IMPLICIT_GRANT.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "grantTypes" + ] + }, + "extensions": { + "description": "Extensions for alternative transport mechanisms. These extensions depend on the actual transport and are out of scope of the present document. For instance, such extensions may be used to signal the necessary parameters for the client to use TLS-based authorization defined for alternative transports (see ETSI GS MEC 009 [5] for more information).\n", + "type": "string" + } + } + }, + "implSpecificInfo": { + "description": "Additional implementation specific details of the transport.", + "type": "string" + } + }, + "required": [ + "id", + "name", + "type", + "protocol", + "version", + "endpoint", + "security" + ] + } + }, + "enabled": { + "description": "Indication whether the IoT platform is capable of providing user transports and vendor-specific services (TRUE) or not (FALSE).", + "type": "boolean" + } + }, + "required": [ + "iotPlatformId", + "userTransportInfo", + "enabled" + ] + } \ No newline at end of file diff --git a/MEC033/MEX/IOTS/IOTPLAT/schemas/IotPlatformInfoList.schema.json b/MEC033/MEX/IOTS/IOTPLAT/schemas/IotPlatformInfoList.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..f92e6bb654cb97e5343e849e160939d9f9c89933 --- /dev/null +++ b/MEC033/MEX/IOTS/IOTPLAT/schemas/IotPlatformInfoList.schema.json @@ -0,0 +1,331 @@ +{ + "type": "array", + "items": { + "title": "IotPlatformInfo", + "type": "object", + "properties": { + "iotPlatformId": { + "description": "Identifier of the IoT platform.", + "type": "string" + }, + "userTransportInfo": { + "description": "Information about the user transport(s) provided by the IoT platform.", + "type": "array", + "minItems": 1, + "items": { + "title": "MBTransportInfo", + "type": "object", + "properties": { + "id": { + "description": "The identifier of this transport as per ETSI GS MEC 011 [i.2].", + "type": "string" + }, + "name": { + "description": "The name of this transport as per ETSI GS MEC 011 [i.2].", + "type": "string" + }, + "description": { + "description": "Human-readable description of this transport as per ETSI GS MEC 011 [i.2].", + "type": "string" + }, + "type": { + "description'": "Type of the transport. The attribute shall be set to \"MB_TOPIC_BASED.\"", + "type": "string", + "enum": [ + "REST_HTTP", + "MB_TOPIC_BASED", + "MB_ROUTING", + "MB_PUBSUB", + "RPC", + "RPC_STREAMING", + "WEBSOCKET" + ], + "description": "Enumeration representing types of transports." + }, + "protocol": { + "description": "The name of the protocol used. Being the transport of MB_TOPIC_BASED type, this attribute should be typically set to \"MQTT\" or \"AMQP.\"", + "type": "string" + }, + "version": { + "description": "The version of the protocol used as per ETSI GS MEC 011 [i.2].", + "type": "string" + }, + "endpoint": { + "description'": "Information about the endpoint to access the transport as per ETSI GS MEC 011 [i.2].", + "title": "EndPointInfo", + "type": "object", + "properties": { + "uris": { + "description": "Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST APIs. See note.", + "type": "array", + "items": { + "type": "string" + } + }, + "fqdn": { + "description": "Fully Qualified Domain Name of the service. See note.", + "type": "array", + "items": { + "type": "string" + } + }, + "addresses": { + "type": "array", + "items": { + "description": "Entry point information of the service as one or more pairs of IP address and port. See note.", + "type": "object", + "properties": { + "host": { + "description": "Host portion of the address.", + "type": "string" + }, + "port": { + "description": "Port portion of the address.", + "type": "integer" + } + }, + "required": [ + "host", + "port" + ] + } + }, + "alternative": { + "description": "Entry point information of the service in a format defined by an implementation, or in an external specification. See note.", + "type": "string" + } + }, + "description": "NOTE: Exactly one of \"uris\", \"fqdn\", \"addresses\" or \"alternative\" shall be present. \n" + }, + "security": { + "description": "Information about the security used by the transport as per ETSI GS MEC 011 [i.2].", + "type": "object", + "properties": { + "oAuth2Info": { + "description": "Parameters related to use of OAuth 2.0. Shall be present in case OAuth 2.0 (see IETF RFC 6749 [13]) is supported to secure the provision of the service over the transport.", + "type": "object", + "properties": { + "grantTypes": { + "type": "array", + "description": "List of supported OAuth 2.0 grant types.\nEach entry shall be one of the following permitted values:\n- OAUTH2_AUTHORIZATION_CODE: Authorization code grant type\n- OAUTH2_IMPLICIT_GRANT: Implicit grant type\n- OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant type\n- OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type\nOnly the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present document.\n", + "items": { + "type": "string", + "enum": [ + "OAUTH2_AUTHORIZATION_CODE", + "OAUTH2_IMPLICIT_GRANT", + "OAUTH2_RESOURCE_OWNER", + "OAUTH2_CLIENT_CREDENTIALS" + ] + } + }, + "tokenEndpoint": { + "description": "The token endpoint. Shall be present unless the grant type is OAUTH2_IMPLICIT_GRANT.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "grantTypes" + ] + }, + "extensions": { + "description": "Extensions for alternative transport mechanisms. These extensions depend on the actual transport and are out of scope of the present document. For instance, such extensions may be used to signal the necessary parameters for the client to use TLS-based authorization defined for alternative transports (see ETSI GS MEC 009 [5] for more information).\n", + "type": "string" + } + } + }, + "implSpecificInfo": { + "description": "Additional implementation specific details of the transport.", + "type": "object", + "properties": { + "eventTopics": { + "description": "Topics used to publish events related to the established session between the IoT device(s) and the end IoT application(s) on the user transport.", + "type": "array", + "minItems": 0, + "items": { + "type": "string" + } + }, + "uplinkTopics": { + "description": "Topics used to publish data generated by the IoT device(s) on the user transport, in order to be consumed by the end IoT application(s).", + "type": "array", + "items": { + "type": "string" + } + }, + "downlinkTopics": { + "description": "Topics used to publish data generated by the IoT applications(s) on the user transport, in order to be consumed by the end IoT device(s).", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "required": [ + "id", + "name", + "type", + "protocol", + "version", + "endpoint", + "security", + "implSpecificInfo" + ] + } + }, + "customServicesTransportInfo": { + "description": "Transport enabling access to vendor-specific services provided by the IoT platform. The data type definition is as per ETSI GS MEC 011 [i.2].", + "type": "array", + "minItems": 0, + "items": { + "title": "TransportInfo", + "type": "object", + "properties": { + "id": { + "description": "The identifier of this transport.", + "type": "string" + }, + "name": { + "description": "The name of this transport.", + "type": "string" + }, + "description": { + "description": "Human-readable description of this transport.", + "type": "string" + }, + "type": { + "description'": "Type of the transport.", + "type": "string", + "enum": [ + "REST_HTTP", + "MB_TOPIC_BASED", + "MB_ROUTING", + "MB_PUBSUB", + "RPC", + "RPC_STREAMING", + "WEBSOCKET" + ], + "description": "Enumeration representing types of transports." + }, + "protocol": { + "description": "The name of the protocol used. Shall be set to \"HTTP\" for a REST API.", + "type": "string" + }, + "version": { + "description": "The version of the protocol used.", + "type": "string" + }, + "endpoint": { + "description'": "Information about the endpoint to access the transport.", + "title": "EndPointInfo", + "type": "object", + "properties": { + "uris": { + "description": "Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST APIs. See note.", + "type": "array", + "items": { + "type": "string" + } + }, + "fqdn": { + "description": "Fully Qualified Domain Name of the service. See note.", + "type": "array", + "items": { + "type": "string" + } + }, + "addresses": { + "type": "array", + "items": { + "description": "Entry point information of the service as one or more pairs of IP address and port. See note.", + "type": "object", + "properties": { + "host": { + "description": "Host portion of the address.", + "type": "string" + }, + "port": { + "description": "Port portion of the address.", + "type": "integer" + } + }, + "required": [ + "host", + "port" + ] + } + }, + "alternative": { + "description": "Entry point information of the service in a format defined by an implementation, or in an external specification. See note.", + "type": "string" + } + }, + "description": "NOTE: Exactly one of \"uris\", \"fqdn\", \"addresses\" or \"alternative\" shall be present. \n" + }, + "security": { + "description'": "Information about the security used by the transport.", + "type": "object", + "properties": { + "oAuth2Info": { + "description": "Parameters related to use of OAuth 2.0. Shall be present in case OAuth 2.0 (see IETF RFC 6749 [13]) is supported to secure the provision of the service over the transport.", + "type": "object", + "properties": { + "grantTypes": { + "type": "array", + "description": "List of supported OAuth 2.0 grant types.\nEach entry shall be one of the following permitted values:\n- OAUTH2_AUTHORIZATION_CODE: Authorization code grant type\n- OAUTH2_IMPLICIT_GRANT: Implicit grant type\n- OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant type\n- OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type\nOnly the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present document.\n", + "items": { + "type": "string", + "enum": [ + "OAUTH2_AUTHORIZATION_CODE", + "OAUTH2_IMPLICIT_GRANT", + "OAUTH2_RESOURCE_OWNER", + "OAUTH2_CLIENT_CREDENTIALS" + ] + } + }, + "tokenEndpoint": { + "description": "The token endpoint. Shall be present unless the grant type is OAUTH2_IMPLICIT_GRANT.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "grantTypes" + ] + }, + "extensions": { + "description": "Extensions for alternative transport mechanisms. These extensions depend on the actual transport and are out of scope of the present document. For instance, such extensions may be used to signal the necessary parameters for the client to use TLS-based authorization defined for alternative transports (see ETSI GS MEC 009 [5] for more information).\n", + "type": "string" + } + } + }, + "implSpecificInfo": { + "description": "Additional implementation specific details of the transport.", + "type": "string" + } + }, + "required": [ + "id", + "name", + "type", + "protocol", + "version", + "endpoint", + "security" + ] + } + }, + "enabled": { + "description": "Indication whether the IoT platform is capable of providing user transports and vendor-specific services (TRUE) or not (FALSE).", + "type": "boolean" + } + }, + "required": [ + "iotPlatformId", + "userTransportInfo", + "enabled" + ] + } +} \ No newline at end of file