From a2a822dc767e1c3183b4833eeb891f49f1a7d7dc Mon Sep 17 00:00:00 2001 From: Ikram Ul Haq Date: Fri, 13 Sep 2024 04:52:04 +0000 Subject: [PATCH 1/7] CAPIF API swagger file v1 --- config/api/capif-mgmt.yaml | 1584 ++++++++++++++++++++++++++++++++++++ 1 file changed, 1584 insertions(+) create mode 100644 config/api/capif-mgmt.yaml diff --git a/config/api/capif-mgmt.yaml b/config/api/capif-mgmt.yaml new file mode 100644 index 0000000..b2cd817 --- /dev/null +++ b/config/api/capif-mgmt.yaml @@ -0,0 +1,1584 @@ +openapi: 3.0.0 +info: + title: MEC service management realized by CAPIF APIs + description: The ETSI MEC ISG MEC011 MEC Service Management realized by CAPIF APIs + described using OpenAPI + contact: + email: cti_support@etsi.org + license: + name: BSD-3-Clause + url: https://forge.etsi.org/legal-matters + version: 3.2.1 +externalDocs: + description: "ETSI GS MEC011 Application Enablement API, V3.2.1" + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/03.02.01_60/gs_mec011v030201p.pdf +servers: +- url: https://localhost/sandboxname/service-apis/v1 + description: Service APIs +- url: https://localhost/sandboxname/published-apis/v1 + description: Published APIs +- url: https://localhost/sandboxname/capif-events/v1 + description: CAPIF Events APIs +tags: +- name: services +- name: appServices +- name: appSubscriptions +- name: callbacks +paths: + /allServiceAPIs: + get: + tags: + - services + description: This method retrieves information about a list of mecService resources. + This method is typically used in "service availability query" procedure + operationId: Services_GET + parameters: + - name: vend-spec-etsi-mec-serinstance-id + in: query + description: Vendor-specific query parameter for service instance ID. The + "target" attribute shall be set to "/apiId". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/apiId\", \"value\": \"serviceInstanceId\"}" + - name: api-name + in: query + description: "This query parameter corresponds to the parameter \"ser_name\"\ + \ as defined in clause 8.2.3.3.1. As opposed to the cardinality of ser_instance_id\ + \ defined in clause 8.2.3.3.1 that is 0..N, this parameter only supports\ + \ a cardinality of 0..1." + required: false + style: form + explode: true + schema: + type: array + items: + type: string + - name: api-invoker-id + in: query + description: "If the Discover_Service_API is produced by the MEC platform\ + \ towards the MEC applications, this identifier shall be set to the value\ + \ of the \"appInstanceId\" (see clause 7.1.2.6). If the Discover_Service_API\ + \ is produced by the CCF, the provisions in clause 8.1.2.2.3.1 of 3GPP TS\ + \ 29.222 [21] apply. " + required: false + style: form + explode: true + schema: + type: string + - name: vend-spec-etsi-mec-sercategory-id + in: query + description: Vendor-specific query parameter for service category ID. The + "target" attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/serCategory/id". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/serCategory/id\"\ + , \"value\": \"serviceCategoryId\"}" + - name: vend-spec-etsi-mec-consumed-local-only + in: query + description: Vendor-specific query parameter for consumed local only. The + "target" attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/consumedLocalOnly". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/consumedLocalOnly\"\ + , \"value\": \"true\"}" + - name: vend-spec-etsi-mec-is-local + in: query + description: Vendor-specific query parameter for is local. The "target" attribute + shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/isLocal". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/isLocal\"\ + , \"value\": \"true\"}" + - name: vend-spec-etsi-mec-scope-of-locality + in: query + description: Vendor-specific query parameter for scope of locality. The "target" + attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/scopeOfLocality". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/scopeOfLocality\"\ + , \"value\": \"scopeOfLocalityValue\"}" + responses: + "200": + description: | + The response body contains the result of the search over the list of registered APIs. + content: + application/json: + schema: + $ref: '#/components/schemas/DiscoveredAPIs' + "307": + description: | + Temporary redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: Contains an alternative target URI of the resource located + in an alternative CCF. + style: simple + explode: false + schema: + type: string + "308": + description: | + Permanent redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: Contains an alternative target URI of the resource located + in an alternative CCF. + style: simple + explode: false + schema: + type: string + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: Forbidden. The operation is not allowed given the current status + of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "414": + description: It is used to indicate that the server is refusing to process + the request because the request URI is longer than the server is willing + or able to process. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + servers: + - url: https://localhost/sandboxname/service-apis/v1 + /{apfId}/service-apis: + get: + tags: + - appServices + summary: get services + description: This method retrieves information about a list of mecService resources. + This method is typically used in "service availability query" procedure + operationId: AppServices_GET + parameters: + - name: apfId + in: path + description: "Identifier of the entity that registers the service API. If\ + \ the MEC app plays the role of the APF, this variable shall be set to the\ + \ value of the \"appInstanceId\" (see clause 7.1.2.6). If the MEC platform\ + \ plays the role of the APF, this variable shall be set to a specific identifier\ + \ that identifies the MEC platform. " + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: | + Successful case. The representation(s) of the "Individual APF published API" resource(s) of the requested service API(s) shall be returned in the response body. If there are no active "Individual APF published API" resources at the CCF, an empty array is returned. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ServiceAPIDescription' + x-content-type: application/json + "307": + description: | + Temporary redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "308": + description: | + Permanent redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: Forbidden. The operation is not allowed given the current status + of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - appServices + summary: Publish a new API + description: Enables a service consumer to request to publish a new API at the + CCF. + operationId: AppServices_POST + parameters: + - name: apfId + in: path + description: "Identifier of the entity that registers the service API. If\ + \ the MEC app plays the role of the APF, this variable shall be set to the\ + \ value of the \"appInstanceId\" (see clause 7.1.2.6). If the MEC platform\ + \ plays the role of the APF, this variable shall be set to a specific identifier\ + \ that identifies the MEC platform. " + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAPIDescription' + required: true + responses: + "201": + description: | + Successful case. The service API is successfully published. The URI of the created "Individual APF published API" resource shall be returned in an HTTP "Location" header. + headers: + Location: + description: | + Contains the URI of the newly created resource, according to the structure: {apiRoot}/published-apis//{apfId}/service-apis/{serviceApiId} + style: simple + explode: false + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAPIDescription' + servers: + - url: https://localhost/sandboxname/published-apis/v1 + /{apfId}/service-apis/{serviceApiId}: + get: + tags: + - appServices + description: The HTTP GET method allows a service consumer to retrieve an existing + "Individual APF published API" resource at the CCF. + operationId: AppServicesServiceId_GET + parameters: + - name: apfId + in: path + description: "Identifier of the entity that registers the service API. If\ + \ the MEC app plays the role of the APF, this variable shall be set to the\ + \ value of the \"appInstanceId\" (see clause 7.1.2.6). If the MEC platform\ + \ plays the role of the APF, this variable shall be set to a specific identifier\ + \ that identifies the MEC platform. " + required: true + style: simple + explode: false + schema: + type: string + - name: serviceApiId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: | + Successful case. The service API is successfully published and a representation of the created "Individual APF published API" resource shall be returned. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ServiceAPIDescription' + x-content-type: application/json + "307": + description: | + Temporary redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "308": + description: | + Permanent redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: Forbidden. The operation is not allowed given the current status + of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - appServices + description: The HTTP PUT method allows a service consumer to update an existing + "Individual APF published API" resource at the CCF. + operationId: AppServicesServiceId_PUT + parameters: + - name: apfId + in: path + description: "Identifier of the entity that registers the service API. If\ + \ the MEC app plays the role of the APF, this variable shall be set to the\ + \ value of the \"appInstanceId\" (see clause 7.1.2.6). If the MEC platform\ + \ plays the role of the APF, this variable shall be set to a specific identifier\ + \ that identifies the MEC platform. " + required: true + style: simple + explode: false + schema: + type: string + - name: serviceApiId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAPIDescription' + required: true + responses: + "200": + description: | + Successful case. The service API is successfully published and a representation of the created "Individual APF published API" resource shall be returned. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ServiceAPIDescription' + x-content-type: application/json + "204": + description: Successful case. The "Individual APF published API" resource + is successfully updated and no content is returned in the response body. + "307": + description: | + Temporary redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "308": + description: | + Permanent redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: Forbidden. The operation is not allowed given the current status + of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "412": + description: "Precondition Failed. It is used when a condition has failed\ + \ during conditional requests, e.g. when using ETags to avoid write conflicts." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - appServices + description: The HTTP DELETE method allows a service consumer to delete an existing + "Individual APF published API" resource at the CCF + operationId: AppServicesServiceId_DELETE + parameters: + - name: apfId + in: path + description: "Identifier of the entity that registers the service API. If\ + \ the MEC app plays the role of the APF, this variable shall be set to the\ + \ value of the \"appInstanceId\" (see clause 7.1.2.6). If the MEC platform\ + \ plays the role of the APF, this variable shall be set to a specific identifier\ + \ that identifies the MEC platform. " + required: true + style: simple + explode: false + schema: + type: string + - name: serviceApiId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: Successful case. The "Individual APF published API" resource + is successfully deleted. + "307": + description: | + Temporary redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "308": + description: | + Permanent redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "403": + description: Forbidden. The operation is not allowed given the current status + of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + patch: + tags: + - appServices + description: The HTTP PATCH method allows a service consumer to modify an existing + "Individual APF published API" resource at the CCF. + operationId: AppServicesServiceId_PATCH + parameters: + - name: apfId + in: path + description: "Identifier of the entity that registers the service API. If\ + \ the MEC app plays the role of the APF, this variable shall be set to the\ + \ value of the \"appInstanceId\" (see clause 7.1.2.6). If the MEC platform\ + \ plays the role of the APF, this variable shall be set to a specific identifier\ + \ that identifies the MEC platform. " + required: true + style: simple + explode: false + schema: + type: string + - name: serviceApiId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAPIDescriptionPatch' + required: true + responses: + "200": + description: "Successful case. The \"Individual APF published API\"\n resource\ + \ is successfully modified and a representation of \n the updated resource\ + \ shall be returned in the response \n body.\n" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ServiceAPIDescription' + x-content-type: application/json + "204": + description: Successful case. The "Individual APF published API" resource + is successfully updated and no content is returned in the response body. + "307": + description: | + Temporary redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "308": + description: | + Permanent redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + headers: + Location: + description: | + Contains an alternative target URI of the resource located in an alternative CCF. + style: simple + explode: false + schema: + type: string + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: Forbidden. The operation is not allowed given the current status + of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "412": + description: "Precondition Failed. It is used when a condition has failed\ + \ during conditional requests, e.g. when using ETags to avoid write conflicts." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + servers: + - url: https://localhost/sandboxname/published-apis/v1 + /{subscriberId}/subscriptions: + post: + tags: + - appSubscriptions + summary: Create a new CAPIF Events Subscription + description: Create a new CAPIF Events Subscription resource. + operationId: ApplicationsSubscriptions_POST + parameters: + - name: subscriberId + in: path + description: 'This variable shall be set to the value of the "appInstanceId" + (see clause 7.1.2.6). ' + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EventSubscription' + required: true + responses: + "201": + description: | + CAPIF Events Subscription resource created successfully. The URI of the created resource shall be returned in the "Location" HTTP header + headers: + Location: + description: | + Contains the URI of the newly created resource, according to the structure: {apiRoot}/capif-events//{subscriberId}/subscriptions/{subscriptionId} + style: simple + explode: false + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/EventSubscription' + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: Forbidden. The operation is not allowed given the current status + of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + callbacks: + EventNotification: + '{$request.body#/callbackReference}': + post: + tags: + - callbacks + summary: Create callback + description: "The values SERVICE_API_AVAILABLE, SERVICE_API_UNAVAILABLE,\ + \ and SERVICE_API_UPDATE defined in the type \"CAPIFEvent\" shall\ + \ be supported. The remaining values of that type need not be supported." + operationId: EventNotification_POST + requestBody: + $ref: '#/components/requestBodies/EventNotification' + responses: + "204": + description: ' The receipt of the Notification is acknowledged.' + deprecated: false + servers: + - url: https://localhost/sandboxname/capif-events/v1 + '/{subscriberId}/subscriptions/{subscriptionId} ': + put: + tags: + - appSubscriptions + summary: The PUT method is used to update an existing subscription resource. + description: The susbcribing entity shall initiate the HTTP PUT request message + and the CAPIF core function shall respond to the message. + operationId: ApplicationsSubscriptions_PUT + parameters: + - name: subscriberId + in: path + description: 'This variable shall be set to the value of the "appInstanceId" + (see clause 7.1.2.6). ' + required: true + style: simple + explode: false + schema: + type: string + - name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EventSubscription' + required: true + responses: + "200": + description: "The event subscription was successfully updated, and a representation\ + \ of the updated resource is returned." + content: + application/json: + schema: + $ref: '#/components/schemas/EventSubscription' + "204": + description: The event subscription was successfully updated and no content + is returned in the response body. + "307": + description: Temporary redirection. The response shall include a Location + header field containing an alternative URI of the resource located in + an alternative CAPIF core function. + headers: + Location: + description: Contains an alternative URI of the resource located in + an alternative CAPIF core function. + style: simple + explode: false + schema: + type: string + "308": + description: Permanent redirection. The response shall include a Location + header field containing an alternative URI of the resource located in + an alternative CAPIF core function. + headers: + Location: + description: Contains an alternative URI of the resource located in + an alternative CAPIF core function. + style: simple + explode: false + schema: + type: string + "400": + description: Bad Request. It is used to indicate that incorrect parameters + were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: Forbidden. The operation is not allowed given the current status + of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - appSubscriptions + summary: Delete an existing CAPIF Event Subscription + description: This endpoint deletes an existing CAPIF Event Subscription resource. + operationId: ApplicationsSubscription_DELETE + parameters: + - name: subscriberId + in: path + description: 'This variable shall be set to the value of the "appInstanceId" + (see clause 7.1.2.6). ' + required: true + style: simple + explode: false + schema: + type: string + - name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: The individual CAPIF Events Subscription matching the subscriptionId + is deleted. + "307": + description: "Temporary redirection, during resource termination. The response\ + \ shall include a Location header field containing an alternative URI\ + \ of the resource located in an alternative CAPIF core function." + headers: + Location: + description: An alternative URI of the resource located in an alternative + CAPIF core function. + style: simple + explode: false + schema: + type: string + "308": + description: "Permanent redirection, during resource termination. The response\ + \ shall include a Location header field containing an alternative URI\ + \ of the resource located in an alternative CAPIF core function." + headers: + Location: + description: An alternative URI of the resource located in an alternative + CAPIF core function. + style: simple + explode: false + schema: + type: string + "400": + description: Bad Request. The request was invalid or cannot be served. The + exact error should be explained in the error payload. + "401": + description: Unauthorized. The request requires user authentication. + "403": + description: Forbidden. The server understood the request but refuses to + authorize it. + "404": + description: Not Found. The server has not found anything matching the Request-URI. + "500": + description: Internal Server Error. The server encountered an unexpected + condition which prevented it from fulfilling the request. + patch: + tags: + - appSubscriptions + summary: Modify an existing CAPIF Event Subscription + description: This endpoint modifies an existing CAPIF Event Subscription resource. + operationId: ApplicationsSubscription_patch + parameters: + - name: subscriberId + in: path + description: 'This variable shall be set to the value of the "appInstanceId" + (see clause 7.1.2.6). ' + required: true + style: simple + explode: false + schema: + type: string + - name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EventSubscriptionPatch' + required: true + responses: + "200": + description: The subscription was successfully modified and a representation + of the updated resource is returned in the response body. + content: + application/json: + schema: + $ref: '#/components/schemas/EventSubscription' + "204": + description: The subscription was successfully modified and no content was + returned in the response body. + "307": + description: Temporary redirection. The response shall include a Location + header field containing an alternative URI of the resource located in + an alternative CAPIF core function. + headers: + Location: + description: Contains an alternative URI of the resource located in + an alternative CAPIF core function. + style: simple + explode: false + schema: + type: string + "308": + description: Permanent redirection. The response shall include a Location + header field containing an alternative URI of the resource located in + an alternative CAPIF core function. + headers: + Location: + description: Contains an alternative URI of the resource located in + an alternative CAPIF core function. + style: simple + explode: false + schema: + type: string + servers: + - url: https://localhost/sandboxname/capif-events/v1 +components: + schemas: + EventSubscriptionPatch: + required: + - events + type: object + properties: + events: + type: array + description: | + The events for which the subscription is modified. + items: + $ref: '#/components/schemas/CAPIFEvent' + notificationDestination: + type: string + description: | + URI to which notifications will be sent. Shall be set to the value of the "callbackReference" attribute in the "SerAvailabilityNotificationSubscription" structure. + format: uri + CAPIFEventFilter: + title: CAPIFEventFilter + type: object + properties: + apiIds: + type: array + description: Identifiers of service instances about which to report events. + items: + type: string + EventSubscription: + required: + - events + - notificationDestination + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/CAPIFEvent' + eventFilters: + type: array + items: + $ref: '#/components/schemas/CAPIFEventFilter' + notificationDestination: + type: string + description: | + URI selected by the MEC application instance to receive notifications on the subscribed MEC service availability information. This shall be included in both the request and the response. + format: uri + requestTestNotification: + type: boolean + websocketNotifConfig: + type: string + example: + notificationDestination: http://example.com/aeiou + websocketNotifConfig: websocketNotifConfig + events: + - SERVICE_API_AVAILABLE + - SERVICE_API_AVAILABLE + requestTestNotification: true + CAPIFEvent: + type: string + description: | + The CAPIFEvent data type represents the type of events for which the subscription is made. + enum: + - SERVICE_API_AVAILABLE + - SERVICE_API_UNAVAILABLE + - SERVICE_API_UPDATE + CategoryRef: + required: + - href + - id + - name + - version + type: object + properties: + href: + type: string + description: Reference of the catalogue + format: uri + id: + type: string + description: Unique identifier of the category + name: + type: string + description: "Name of the category, example values include RNI, Location\ + \ & Bandwidth Management" + version: + type: string + description: Category version + description: This type represents the category reference + example: + name: name + href: http://example.com/aeiou + id: id + version: version + ProblemDetails: + required: + - detail + - status + type: object + properties: + type: + type: string + description: A URI reference according to IETF RFC 3986 that identifies + the problem type + format: uri + title: + type: string + description: "A short, human-readable summary of the problem type" + status: + type: integer + description: The HTTP status code for this occurrence of the problem + format: uint32 + detail: + type: string + description: A human-readable explanation specific to this occurrence of + the problem + instance: + type: string + description: A URI reference that identifies the specific occurrence of + the problem + format: uri + EventNotification: + type: object + properties: + events: + type: array + description: | + The values SERVICE_API_AVAILABLE, SERVICE_API_UNAVAILABLE, and SERVICE_API_UPDATE defined in the type "CAPIFEvent" shall be supported. The remaining values of that type need not be supported. + items: + $ref: '#/components/schemas/CAPIFEvent' + SerializerType: + type: string + description: | + The enumeration SerializerType represents types of serializers. This enumeration shall be extensible. + enum: + - JSON + - XML + - PROTOBUF3 + LocalityType: + type: string + description: | + The enumeration LocalityType represents types of locality. + enum: + - MEC_SYSTEM + - MEC_HOST + - NFVI_POP + - ZONE + - ZONE_GROUP + - NFVI_NODE + ServiceState: + type: string + description: | + The enumeration ServiceState represents possible states of a MEC service instance. + enum: + - ACTIVE + - INACTIVE + - SUSPENDED + DiscoveredAPIs: + type: object + properties: + serviceAPIDescriptions: + type: array + items: + $ref: '#/components/schemas/ServiceAPIDescription' + example: + serviceAPIDescriptions: + - apiName: apiName + vendorSpecific-urn:etsi:mec:capifext:service-info: + scopeOfLocality: MEC_SYSTEM + serializer: JSON + state: ACTIVE + consumedLocalOnly: true + category: + name: name + href: http://example.com/aeiou + id: id + version: version + isLocal: true + apiId: apiId + - apiName: apiName + vendorSpecific-urn:etsi:mec:capifext:service-info: + scopeOfLocality: MEC_SYSTEM + serializer: JSON + state: ACTIVE + consumedLocalOnly: true + category: + name: name + href: http://example.com/aeiou + id: id + version: version + isLocal: true + apiId: apiId + ServiceAPIDescriptionPatch: + type: object + properties: + vendorSpecific-urn:etsi:mec:capifext:service-info: + $ref: '#/components/schemas/MecServiceInfoCapifExtPatch' + ServiceAPIDescription: + type: object + properties: + apiName: + type: string + description: | + Shall be set to the value of the "serName" attribute as defined in clause 8.1.2.2. + apiId: + type: string + description: | + If present, shall be set to the value of the "serInstanceId" attribute as defined in clause 8.1.2.2. + aefProfiles: + type: array + items: + $ref: '#/components/schemas/AefProfile' + description: "AEF profile information, which includes the exposed API details (e.g., protocol). For CAPIF-4/4e interface, API publishing function shall provide this attribute to the CCF in service API publishing. For CAPIF-1/1e interface, the CCF shall provide this attribute to the API Invoker during service API discovery." + vendorSpecific-urn:etsi:mec:capifext:service-info: + $ref: '#/components/schemas/MecServiceInfoCapifExt' + example: + apiName: apiName + vendorSpecific-urn:etsi:mec:capifext:service-info: + scopeOfLocality: MEC_SYSTEM + serializer: JSON + state: ACTIVE + consumedLocalOnly: true + category: + name: name + href: http://example.com/aeiou + id: id + version: version + isLocal: true + apiId: apiId + MecServiceInfoCapifExtPatch: + type: object + properties: + serializer: + $ref: '#/components/schemas/SerializerType' + state: + $ref: '#/components/schemas/ServiceState' + scopeOfLocality: + $ref: '#/components/schemas/LocalityType' + consumedLocalOnly: + type: boolean + isLocal: + type: boolean + category: + $ref: '#/components/schemas/CategoryRef' + + MecServiceInfoCapifExt: + type: object + properties: + serializer: + $ref: '#/components/schemas/SerializerType' + state: + $ref: '#/components/schemas/ServiceState' + scopeOfLocality: + $ref: '#/components/schemas/LocalityType' + consumedLocalOnly: + type: boolean + isLocal: + type: boolean + category: + $ref: '#/components/schemas/CategoryRef' + example: + scopeOfLocality: MEC_SYSTEM + serializer: JSON + state: ACTIVE + consumedLocalOnly: true + category: + name: name + href: http://example.com/aeiou + id: id + version: version + isLocal: true + AefProfile: + type: object + properties: + aefId: + type: string + description: "AEF identifier. Shall be set to the value of the 'id' attribute as defined in clause 8.1.2.3." + versions: + type: array + items: + type: string + description: "API version. This array shall contain a single entry." + minItems: 1 + maxItems: 1 + interfaceDescriptions: + description: This type represents information about a transport endpoint + oneOf: + - $ref: '#/components/schemas/EndPointInfo.Uris' + - $ref: '#/components/schemas/EndPointInfo.Fqdn' + - $ref: '#/components/schemas/EndPointInfo.Addresses' + - $ref: '#/components/schemas/EndPointInfo.Alternative' + x-etsi-notes: "NOTE:\tExactly one of \"uris\", \"fqdn\", \"addresses\" or\ + \ \"alternative\" shall be present." + vendorSpecific-urn:etsi:mec:capifext:transport-info : + $ref: '#/components/schemas/MecTransportInfoCapifExt' + description: "Additional attribute of data type MecTransportInfoCapifExt for MEC-specific CAPIF extensions related to alternative transports." + required: + - aefId + - versions + MecTransportInfoCapifExt: + type: object + properties: + name: + type: string + description: "Name of the transport info." + description: + type: string + description: "Description of the transport info." + type: + $ref: '#/components/schemas/TransportType' + protocol: + type: string + description: The name of the protocol used. Shall be set to HTTP for a REST + API. + example: "[\"HTTP\"]" + version: + type: string + description: The version of the protocol used + example: "[\"2.0\"]" + security: + $ref: '#/components/schemas/SecurityInfo' + description: "Security information of the transport." + implSpecificInfo: + type: string + description: Additional implementation specific details of the transport + description: This type represents the general information of a MEC service. + SecurityInfo.OAuth2Info.GrantType: + title: SecurityInfo.OAuth2Info.GrantType + type: string + description: OAuth 2.0 grant type + example: "[\"OAUTH2_CLIENT_CREDENTIALS\"]" + enum: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_IMPLICIT_GRANT + - OAUTH2_RESOURCE_OWNER + - OAUTH2_CLIENT_CREDENTIALS + SecurityInfo.OAuth2Info: + title: SecurityInfo.OAuth2Info + required: + - grantTypes + - tokenEndpoint + type: object + properties: + grantTypes: + maxItems: 4 + minItems: 1 + type: array + description: List of supported OAuth 2.0 grant types. + items: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info.GrantType' + tokenEndpoint: + type: string + description: The token endpoint + example: "[\"/mecSerMgmtApi/security/TokenEndPoint\"]" + description: Parameters related to use of OAuth 2.0 + example: + tokenEndpoint: "[\"/mecSerMgmtApi/security/TokenEndPoint\"]" + grantTypes: + - "[\"OAUTH2_CLIENT_CREDENTIALS\"]" + - "[\"OAUTH2_CLIENT_CREDENTIALS\"]" + - "[\"OAUTH2_CLIENT_CREDENTIALS\"]" + - "[\"OAUTH2_CLIENT_CREDENTIALS\"]" + SecurityInfo: + title: SecurityInfo + type: object + properties: + oAuth2Info: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info' + description: This type represents security information related to a transport + example: + oAuth2Info: + tokenEndpoint: "[\"/mecSerMgmtApi/security/TokenEndPoint\"]" + grantTypes: + - "[\"OAUTH2_CLIENT_CREDENTIALS\"]" + - "[\"OAUTH2_CLIENT_CREDENTIALS\"]" + - "[\"OAUTH2_CLIENT_CREDENTIALS\"]" + - "[\"OAUTH2_CLIENT_CREDENTIALS\"]" + TransportType: + title: TransportType + type: string + description: The enumeration TransportType represents types of transports + example: "[\"REST_HTTP\"]" + enum: + - REST_HTTP + - MB_TOPIC_BASED + - MB_ROUTING + - MB_PUBSUB + - RPC + - RPC_STREAMING + - WEBSOCKET + EndPointInfo.Alternative: + title: EndPointInfo.Alternative + required: + - alternative + type: object + properties: + alternative: + type: object + description: "Entry point information of the service in a format defined\ + \ by an implementation, or in an external specification. See note." + description: This type represents information about a transport endpoint. + EndPointInfo.Address: + title: EndPointInfo.Address + required: + - host + - port + type: object + properties: + host: + type: string + description: Host portion of the address + example: "[\"192.0.2.0\"]" + port: + type: integer + description: Port portion of the address + description: A IP address and port pair + EndPointInfo.Addresses: + title: EndPointInfo.Addresses + required: + - addresses + type: object + properties: + addresses: + type: array + description: Entry point information of the service as one or more pairs + of IP address and port. See note. + items: + $ref: '#/components/schemas/EndPointInfo.Address' + EndPointInfo.Fqdn: + title: EndPointInfo.Fqdn + required: + - fqdn + type: object + properties: + fqdn: + type: array + description: Fully Qualified Domain Name of the service. See note. + items: + type: string + description: 'This type represents information about a transport endpoint. ' + EndPointInfo.Uris: + title: EndPointInfo.Uris + required: + - uris + type: object + properties: + uris: + type: array + description: "Entry point information of the service as string, formatted\ + \ according to URI syntax" + items: + type: string + description: This type represents information about a transport endpoint. + responses: + "400": + description: Bad Request. It is used to indicate that incorrect parameters were + passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "401": + description: Unauthorized. It is used when the client did not submit the appropriate + credentials. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: Forbidden. The operation is not allowed given the current status + of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: Not Found. It is used when a client provided a URI that cannot + be mapped to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "409": + description: "Conflict. The operation cannot be executed currently, due to a\ + \ conflict with the state of the resource. Typically, this is because the\ + \ application instance resource is in NOT_INSTANTIATED state." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "412": + description: "Precondition Failed. It is used when a condition has failed during\ + \ conditional requests, e.g. when using ETags to avoid write conflicts." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "414": + description: It is used to indicate that the server is refusing to process the + request because the request URI is longer than the server is willing or able + to process. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "429": + description: Too Many Requests. It is used when a rate limiter has triggered. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + parameters: + Path.apfId: + name: apfId + in: path + description: "Identifier of the entity that registers the service API. If the\ + \ MEC app plays the role of the APF, this variable shall be set to the value\ + \ of the \"appInstanceId\" (see clause 7.1.2.6). If the MEC platform plays\ + \ the role of the APF, this variable shall be set to a specific identifier\ + \ that identifies the MEC platform. " + required: true + style: simple + explode: false + schema: + type: string + Path.subscriberId: + name: subscriberId + in: path + description: 'This variable shall be set to the value of the "appInstanceId" + (see clause 7.1.2.6). ' + required: true + style: simple + explode: false + schema: + type: string + Path.SubscriptionId: + name: subscriptionId + in: path + description: Represents a subscription to the notifications from the MEC platform. + required: true + style: simple + explode: false + schema: + type: string + Path.serviceApiId: + name: serviceApiId + in: path + description: Represents a MEC service instance. + required: true + style: simple + explode: false + schema: + type: string + Query.vend-spec-etsi-mec-sercategory-id: + name: vend-spec-etsi-mec-sercategory-id + in: query + description: Vendor-specific query parameter for service category ID. The "target" + attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/serCategory/id". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/serCategory/id\"\ + , \"value\": \"serviceCategoryId\"}" + Query.vend-spec-etsi-mec-serinstance-id: + name: vend-spec-etsi-mec-serinstance-id + in: query + description: Vendor-specific query parameter for service instance ID. The "target" + attribute shall be set to "/apiId". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/apiId\", \"value\": \"serviceInstanceId\"}" + Query.api-name: + name: api-name + in: query + description: "This query parameter corresponds to the parameter \"ser_name\"\ + \ as defined in clause 8.2.3.3.1. As opposed to the cardinality of ser_instance_id\ + \ defined in clause 8.2.3.3.1 that is 0..N, this parameter only supports a\ + \ cardinality of 0..1." + required: false + style: form + explode: true + schema: + type: array + items: + type: string + Query.api-invoker-id: + name: api-invoker-id + in: query + description: "If the Discover_Service_API is produced by the MEC platform towards\ + \ the MEC applications, this identifier shall be set to the value of the \"\ + appInstanceId\" (see clause 7.1.2.6). If the Discover_Service_API is produced\ + \ by the CCF, the provisions in clause 8.1.2.2.3.1 of 3GPP TS 29.222 [21]\ + \ apply. " + required: false + style: form + explode: true + schema: + type: string + Query.vend-spec-etsi-mec-scope-of-locality: + name: vend-spec-etsi-mec-scope-of-locality + in: query + description: Vendor-specific query parameter for scope of locality. The "target" + attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/scopeOfLocality". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/scopeOfLocality\"\ + , \"value\": \"scopeOfLocalityValue\"}" + Query.vend-spec-etsi-mec-is-local: + name: vend-spec-etsi-mec-is-local + in: query + description: Vendor-specific query parameter for is local. The "target" attribute + shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/isLocal". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/isLocal\"\ + , \"value\": \"true\"}" + Query.vend-spec-etsi-mec-consumed-local-only: + name: vend-spec-etsi-mec-consumed-local-only + in: query + description: Vendor-specific query parameter for consumed local only. The "target" + attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/consumedLocalOnly". + required: false + style: form + explode: true + schema: + type: string + example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/consumedLocalOnly\"\ + , \"value\": \"true\"}" + requestBodies: + EventNotification: + content: + application/json: + schema: + $ref: '#/components/schemas/EventNotification' + required: true -- GitLab From 8886770b1c81321b0d1899367b4398a73cd1e140 Mon Sep 17 00:00:00 2001 From: Ikram Ul Haq Date: Fri, 13 Sep 2024 05:39:40 +0000 Subject: [PATCH 2/7] Update configuration file for the newly CAPIF service API --- config/.meepctl-repocfg.yaml | 74 ++++++------------- config/permissions.yaml | 55 ++++++++++++++ .../frontend/src/js/util/scenario-utils.js | 15 ++++ 3 files changed, 92 insertions(+), 52 deletions(-) diff --git a/config/.meepctl-repocfg.yaml b/config/.meepctl-repocfg.yaml index 8bde14e..d037d08 100644 --- a/config/.meepctl-repocfg.yaml +++ b/config/.meepctl-repocfg.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2024 The AdvantEDGE Authors +# Copyright (c) 2022 The AdvantEDGE Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -38,9 +38,9 @@ repo: # platform ingress configuration ingress: # host name - host: mec-platform.etsi.org + host: 172.30.225.7 # enable https only (redirect http requests to https port) - https-only: true + https-only: false # bind to host ports (true) or node ports (false) host-ports: true # http port number @@ -48,7 +48,7 @@ repo: # https config https-port: 443 # certificate authority (none|self-signed|lets-encrypt) default: none - ca: lets-encrypt + ca: self-signed # lets-encrypt production server (true) or staging server (false) le-server-prod: true @@ -87,7 +87,7 @@ repo: # access token url token-url: https://forge.etsi.org/rep/oauth/token # OAuth redirect URI - redirect-uri: https://mec-platform.etsi.org/platform-ctrl/v1/authorize + redirect-uri: https://try-mec.etsi.org/platform-ctrl/v1/authorize # GitLab api url api-url: https://forge.etsi.org/rep/api/v4 # OAuth k8s secret (data: client-id, secret) @@ -98,9 +98,9 @@ repo: # Influx configuration influx: # enable influx data backups - enabled: true + enabled: false # object store url - url: https://metrics.mec-platform.etsi.org/ + url: https://metrics.try-mec.etsi.org/ # object store configuration secret secret: meep-influx-objstore-config # Number of days to retain daily data backups @@ -116,7 +116,7 @@ repo: # prometheus environment (dev|prod) promenv: prod # unique deployment identifier - replica: 172.29.10.52 + replica: platform-ip # Thanos long-term storage thanos: # enable Thanos @@ -148,11 +148,11 @@ repo: # 1h downsampled data retention resolution-1h: 10y # Thanos long-term storage archive - thanos-archive: + #thanos-archive: # enable Thanos archive - enabled: false + # enabled: true # archive object store configuration secret - secret: meep-thanos-archive-objstore-config + #secret: meep-thanos-archive-objstore-config # Garbage Collection configuration gc: @@ -286,7 +286,6 @@ repo: core-pods: - meep-mon-engine - meep-platform-ctrl - - meep-sandbox-api - meep-virt-engine - meep-webhook # list of sandbox pods to monitor @@ -347,39 +346,6 @@ repo: swagger: js-apps/meep-swagger-ui # location of AdvantEDGE frontend frontend: bin/meep-frontend - meep-sandbox-api: - # location of source code - src: go-apps/meep-sandbox-api - # location of binary - bin: bin/meep-sandbox-api - # location of deployment chart - chart: charts/meep-sandbox-api - # user supplied value file located @ .meep/user/values (use below file name) - chart-user-values: meep-sandbox-api.yaml - # enable meepctl build - build: true - # enable meepctl dockerize - dockerize: true - # enable meepctl deploy/delete - deploy: true - # supports code coverage measurement when built in codecov mode - codecov: true - # supports linting - lint: true - # location of API specifications - api: - - name: 'AdvantEDGE Platform Controller REST API' - file: go-apps/meep-sandbox-api/api/swagger.yaml - # location of user supplied API specifications - user-api: - # resources available to docker container image - docker-data: - # location of entry script - 'entrypoint.sh': go-apps/meep-sandbox-api/entrypoint.sh - # location of Swagger UI - #swagger: js-apps/meep-swagger-ui - # location of AdvantEDGE frontend - #frontend: bin/meep-frontend meep-virt-engine: # location of source code src: go-apps/meep-virt-engine @@ -550,12 +516,16 @@ repo: file: go-apps/meep-app-enablement/api/app-support/swagger.yaml - name: 'AdvantEDGE MEC Service Management REST API' file: go-apps/meep-app-enablement/api/service-mgmt/swagger.yaml + - name: 'AdvantEDGE MEC service management realized by CAPIF APIs' + file: go-apps/meep-app-enablement/api/capif-mgmt/swagger.yaml # location of user supplied API specifications user-api: - name: 'MEC Application Support API' file: config/api/app-support.yaml - name: 'MEC Service Management API' file: config/api/service-mgmt.yaml + - name: 'MEC Capif Management API' + file: config/api/capif-mgmt.yaml # resources available to docker container image docker-data: # location of entry script @@ -1074,7 +1044,7 @@ repo: # enable meepctl dockerize -> deps are never dockerized dockerize: false # enable meepctl deploy/delete - deploy: true + deploy: false # location of deployment chart chart: charts/thanos # user supplied value file located @ .meep/user/values (use below file name) @@ -1085,7 +1055,7 @@ repo: # enable meepctl dockerize -> deps are never dockerized dockerize: false # enable meepctl deploy/delete - deploy: true + deploy: false # location of deployment chart chart: charts/thanos # user supplied value file located @ .meep/user/values (use below file name) @@ -1247,6 +1217,11 @@ repo: src: go-packages/meep-service-mgmt-client # supports linting lint: false + meep-capif-mgmt-client: + # location of source code + src: go-packages/meep-capif-mgmt-client + # supports linting + lint: false meep-sessions: # location of source code src: go-packages/meep-sessions @@ -1325,11 +1300,6 @@ repo: src: js-packages/meep-platform-ctrl-client # supports linting lint: false - meep-sandbox-api-client: - # location of source code - src: go-packages/meep-sandbox-api-client - # supports linting - lint: false meep-sandbox-ctrl-client: # location of source code src: js-packages/meep-sandbox-ctrl-client diff --git a/config/permissions.yaml b/config/permissions.yaml index 59731f7..0a9e411 100644 --- a/config/permissions.yaml +++ b/config/permissions.yaml @@ -236,6 +236,61 @@ services: method: 'GET' mode: 'block' #------------------------------ + # MEC-CAPIF Service Management (Sbox) + #------------------------------ + - name: 'meep-app-enablement' + api: 'service-apis' + path: '/service-apis/v1' + sbox: true + default: + mode: 'allow' + fileservers: + - name: 'Api' + path: '/api' + mode: 'verify' + roles: + admin: 'allow' + user: 'block' + - name: 'UserApi' + path: '/user-api' + mode: 'verify' + roles: + admin: 'allow' + user: 'allow' + endpoints: + - name: 'Index' + path: '/' + method: 'GET' + mode: 'block' + + #------------------------------ + # MEC-CAPIF Service Management (Sbox) + #------------------------------ + - name: 'meep-app-enablement' + api: 'published-apis' + path: '/published-apis/v1' + sbox: true + default: + mode: 'allow' + fileservers: + - name: 'Api' + path: '/api' + mode: 'verify' + roles: + admin: 'allow' + user: 'block' + - name: 'UserApi' + path: '/user-api' + mode: 'verify' + roles: + admin: 'allow' + user: 'allow' + endpoints: + - name: 'Index' + path: '/' + method: 'GET' + mode: 'block' + #------------------------------ # GIS Engine (Sbox) #------------------------------ - name: 'meep-gis-engine' diff --git a/js-apps/frontend/src/js/util/scenario-utils.js b/js-apps/frontend/src/js/util/scenario-utils.js index 769e565..ec0daa0 100644 --- a/js-apps/frontend/src/js/util/scenario-utils.js +++ b/js-apps/frontend/src/js/util/scenario-utils.js @@ -641,6 +641,21 @@ export function parseEdgeApps(scenario) { enableInProgressCount: -1, disableInProgressCount: -1 }); + edgeApps.push({ + id: proc.id, + name: proc.name+'-capif-mgmt', + instance: '', + img: proc.image, + mepName: pl.name, + env: proc.environment, + url: 'api/?urls.primaryName='+pl.name+'%20-%20MEC%20Capif%20Management%20API', + path: pl.name+'/service-apis/v1', + pseudoName: 'MEC-CAPIF Service Management (011) on ' + pl.name, + dropDownName: 'MEC-CAPIF Service Management (011)', + enabled: true, // always running + enableInProgressCount: -1, + disableInProgressCount: -1 + }); } } } -- GitLab From de23f4c07c6d9de740186da1aea087779851ea69 Mon Sep 17 00:00:00 2001 From: Ikram Ul Haq Date: Thu, 19 Sep 2024 07:09:05 +0000 Subject: [PATCH 3/7] add example schemas for the request bodies in GET PUT AND PATCH methods --- config/api/capif-mgmt.yaml | 86 +++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/config/api/capif-mgmt.yaml b/config/api/capif-mgmt.yaml index b2cd817..263264b 100644 --- a/config/api/capif-mgmt.yaml +++ b/config/api/capif-mgmt.yaml @@ -273,6 +273,34 @@ paths: application/json: schema: $ref: '#/components/schemas/ServiceAPIDescription' + example: + apiName: "mec030-1-new" + aefProfiles: + - aefId: "sandboxTransport" + versions: + - "3.1.1" + interfaceDescriptions: + uris: + - "http://my.callback.com/sbx2cmq8bn/mep1/vis/v2/" + fqdn: null + addresses: null + alternative: null + vendorSpecific-urn:etsi:mec:capifext:transport-info: + name: "REST" + type: "REST_HTTP" + protocol: "HTTP" + version: "2.0" + vendorSpecific-urn:etsi:mec:capifext:service-info: + serializer: "JSON" + state: "ACTIVE" + scopeOfLocality: "MEC_SYSTEM" + consumedLocalOnly: true + isLocal: true + category: + href: "catalogueHref" + id: "visId" + name: "V2XI" + version: "v2" required: true responses: "201": @@ -406,6 +434,34 @@ paths: application/json: schema: $ref: '#/components/schemas/ServiceAPIDescription' + example: + apiName: "mec030-1-new" + aefProfiles: + - aefId: "sandboxTransport" + versions: + - "3.1.1" + interfaceDescriptions: + uris: + - "http://my.callback.com/sbx2cmq8bn/mep1/vis/v2/" + fqdn: null + addresses: null + alternative: null + vendorSpecific-urn:etsi:mec:capifext:transport-info: + name: "REST" + type: "REST_HTTP" + protocol: "HTTP" + version: "2.0" + vendorSpecific-urn:etsi:mec:capifext:service-info: + serializer: "JSON" + state: "ACTIVE" + scopeOfLocality: "MEC_SYSTEM" + consumedLocalOnly: true + isLocal: true + category: + href: "catalogueHref" + id: "visId" + name: "V2XI" + version: "v2" required: true responses: "200": @@ -569,7 +625,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ServiceAPIDescriptionPatch' + $ref: '#/components/schemas/ServiceAPIDescription' + example: + apiName: "mec030-1-new" + aefProfiles: + - aefId: "sandboxTransport" + versions: + - "3.1.1" + interfaceDescriptions: + uris: + - "http://my.callback.com/sbx2cmq8bn/mep1/vis/v2/" + fqdn: null + addresses: null + alternative: null + vendorSpecific-urn:etsi:mec:capifext:transport-info: + name: "REST" + type: "REST_HTTP" + protocol: "HTTP" + version: "2.0" + vendorSpecific-urn:etsi:mec:capifext:service-info: + serializer: "JSON" + state: "ACTIVE" + scopeOfLocality: "MEC_SYSTEM" + consumedLocalOnly: true + isLocal: true + category: + href: "catalogueHref" + id: "visId" + name: "V2XI" + version: "v2" required: true responses: "200": -- GitLab From b2a73bac9c52e5d40d3f7c3ebf670a30231d5d0f Mon Sep 17 00:00:00 2001 From: Ikram Ul Haq Date: Fri, 20 Sep 2024 05:05:53 +0000 Subject: [PATCH 4/7] Add example schemas for the subscription resource --- config/api/capif-mgmt.yaml | 42 +++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/config/api/capif-mgmt.yaml b/config/api/capif-mgmt.yaml index 263264b..36ff8a9 100644 --- a/config/api/capif-mgmt.yaml +++ b/config/api/capif-mgmt.yaml @@ -627,22 +627,6 @@ paths: schema: $ref: '#/components/schemas/ServiceAPIDescription' example: - apiName: "mec030-1-new" - aefProfiles: - - aefId: "sandboxTransport" - versions: - - "3.1.1" - interfaceDescriptions: - uris: - - "http://my.callback.com/sbx2cmq8bn/mep1/vis/v2/" - fqdn: null - addresses: null - alternative: null - vendorSpecific-urn:etsi:mec:capifext:transport-info: - name: "REST" - type: "REST_HTTP" - protocol: "HTTP" - version: "2.0" vendorSpecific-urn:etsi:mec:capifext:service-info: serializer: "JSON" state: "ACTIVE" @@ -744,7 +728,16 @@ paths: application/json: schema: $ref: '#/components/schemas/EventSubscription' + example: + notificationDestination: "http://my.callback.com/mec_capif_mgmt_ser_availabilities/some-id" + events: + - "SERVICE_API_UNAVAILABLE" + eventFilters: + - apiIds: + - "0a0faac0-bcbb-4d45-b673-d37ac6d3dc13" + requestTestNotification: true required: true + responses: "201": description: | @@ -832,6 +825,14 @@ paths: application/json: schema: $ref: '#/components/schemas/EventSubscription' + example: + notificationDestination: "http://my.callback.com/mec_capif_mgmt_ser_availabilities/some-id" + events: + - "SERVICE_API_UNAVAILABLE" + eventFilters: + - apiIds: + - "0a0faac0-bcbb-4d45-b673-d37ac6d3dc13" + requestTestNotification: true required: true responses: "200": @@ -982,7 +983,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EventSubscriptionPatch' + $ref: '#/components/schemas/EventSubscription' + example: + notificationDestination: "http://my.callback.com/mec_capif_mgmt_ser_availabilities/some-id" + events: + - "SERVICE_API_UNAVAILABLE" + eventFilters: + - apiIds: + - "0a0faac0-bcbb-4d45-b673-d37ac6d3dc13" required: true responses: "200": -- GitLab From 3d805b6065f3428feea8dcc0bb810350062cf8dd Mon Sep 17 00:00:00 2001 From: Ikram Ul Haq Date: Wed, 16 Oct 2024 08:26:09 +0000 Subject: [PATCH 5/7] Update request body of PATCH method of resource Published service API --- config/api/capif-mgmt.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config/api/capif-mgmt.yaml b/config/api/capif-mgmt.yaml index 36ff8a9..56ca967 100644 --- a/config/api/capif-mgmt.yaml +++ b/config/api/capif-mgmt.yaml @@ -627,6 +627,21 @@ paths: schema: $ref: '#/components/schemas/ServiceAPIDescription' example: + aefProfiles: + - aefId: "sandboxTransport" + versions: + - "3.1.1" + interfaceDescriptions: + uris: + - "http://my.callback.com/sbx2cmq8bn/mep1/vis/v2/" + fqdn: null + addresses: null + alternative: null + vendorSpecific-urn:etsi:mec:capifext:transport-info: + name: "REST" + type: "REST_HTTP" + protocol: "HTTP" + version: "2.0" vendorSpecific-urn:etsi:mec:capifext:service-info: serializer: "JSON" state: "ACTIVE" -- GitLab From 77fff2616846d34f3a1db16be75ea04f6e3a4892 Mon Sep 17 00:00:00 2001 From: Ikram Ul Haq Date: Wed, 30 Oct 2024 07:49:01 +0000 Subject: [PATCH 6/7] Add request body examples for registration resource --- config/api/app-support.yaml | 193 ++++++++++++++++++++++++++++++++++-- 1 file changed, 183 insertions(+), 10 deletions(-) diff --git a/config/api/app-support.yaml b/config/api/app-support.yaml index fb7bb25..8aa6e9f 100644 --- a/config/api/app-support.yaml +++ b/config/api/app-support.yaml @@ -1067,9 +1067,9 @@ paths: - mec_app_support summary: Register the MEC application instance to the MEC platform description: >- - The POST method may be used by the MEC application instance to request its registration to the MEC platform. + The POST method may be used by the MEC application instance to request its registration to the MEC platform. operationId: ApplicationsRegistrations_POST - parameters: [] + parameters: [] requestBody: description: >- The message content in the request contains the profile of the MEC application instance, calling the MEC platform to register the MEC application instance. @@ -1077,7 +1077,96 @@ paths: application/json: schema: $ref: '#/components/schemas/AppInfo' - required: false + example: + appName: "appName" + appProvider: "appProvider1" + appCategory: + href: "/example/catalogue1" + id: "id12345" + name: "RNI" + version: "version1" + appDId: "TODO" + appInstanceId: "ID1" + endpoint: + uris: + - "mecAppSuptApi/example" + appServiceRequired: + - requestedPermissions: "string" + serCategory: + href: "/example/catalogue1" + id: "id12345" + name: "RNI" + version: "version1" + serName: "string" + serTransportDependencies: + - labels: + - "string" + serializers: + - "JSON" + transport: + protocol: "string" + security: + oAuth2Info: + grantTypes: + - "OAUTH2_CLIENT_CREDENTIALS" + tokenEndpoint: "/mecSerMgmtApi/security/TokenEndPoint" + type: "REST_HTTP" + version: "string" + version: "string" + appServiceOptional: + - requestedPermissions: "string" + serCategory: + href: "/example/catalogue1" + id: "id12345" + name: "RNI" + version: "version1" + serName: "string" + serTransportDependencies: + - labels: + - "string" + serializers: + - "JSON" + transport: + protocol: "string" + security: + oAuth2Info: + grantTypes: + - "OAUTH2_CLIENT_CREDENTIALS" + tokenEndpoint: "/mecSerMgmtApi/security/TokenEndPoint" + type: "REST_HTTP" + version: "string" + version: "string" + appFeatureRequired: + - featureName: "string" + version: "string" + appFeatureOptional: + - featureName: "string" + version: "string" + isInsByMec: false + appProfile: + easId: "appName" + endPt: + uris: + - "string" + acIds: + - "string" + provId: "appProvider1" + type: "string" + scheds: + - "string" + svcArea: "string" + svcKpi: "string" + permLvl: + - "string" + easFeats: + - "string" + svcContSupp: + - "string" + appLocs: + - "string" + avlRep: 1577836800 + status: "string" + required: true responses: '201': description: >- @@ -1097,7 +1186,6 @@ paths: '400': description: >- Bad Request. It is used to indicate that incorrect parameters were passed to the request. - headers: {} content: application/problem+json: schema: @@ -1109,7 +1197,6 @@ paths: '401': description: >- Unauthorized. It is used when the client did not submit the appropriate credentials. - headers: {} content: application/problem+json: schema: @@ -1121,15 +1208,13 @@ paths: '403': description: >- Forbidden. The operation is not allowed given the current status of the resource. - headers: {} content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: >- - Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI. - headers: {} + Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI. content: application/problem+json: schema: @@ -1138,8 +1223,7 @@ paths: schema: type: object description: Empty schema - deprecated: false - parameters: [] + deprecated: false /registrations/{appInstanceId}: get: tags: @@ -1222,6 +1306,95 @@ paths: application/json: schema: $ref: '#/components/schemas/AppInfo' + example: + appName: "appName" + appProvider: "appProvider1" + appCategory: + href: "/example/catalogue1" + id: "id12345" + name: "RNI" + version: "version1" + appDId: "TODO" + appInstanceId: "ID1" + endpoint: + uris: + - "mecAppSuptApi/example" + appServiceRequired: + - requestedPermissions: "string" + serCategory: + href: "/example/catalogue1" + id: "id12345" + name: "RNI" + version: "version1" + serName: "string" + serTransportDependencies: + - labels: + - "string" + serializers: + - "JSON" + transport: + protocol: "string" + security: + oAuth2Info: + grantTypes: + - "OAUTH2_CLIENT_CREDENTIALS" + tokenEndpoint: "/mecSerMgmtApi/security/TokenEndPoint" + type: "REST_HTTP" + version: "string" + version: "string" + appServiceOptional: + - requestedPermissions: "string" + serCategory: + href: "/example/catalogue1" + id: "id12345" + name: "RNI" + version: "version1" + serName: "string" + serTransportDependencies: + - labels: + - "string" + serializers: + - "JSON" + transport: + protocol: "string" + security: + oAuth2Info: + grantTypes: + - "OAUTH2_CLIENT_CREDENTIALS" + tokenEndpoint: "/mecSerMgmtApi/security/TokenEndPoint" + type: "REST_HTTP" + version: "string" + version: "string" + appFeatureRequired: + - featureName: "string" + version: "string" + appFeatureOptional: + - featureName: "string" + version: "string" + isInsByMec: false + appProfile: + easId: "appName" + endPt: + uris: + - "string" + acIds: + - "string" + provId: "appProvider1" + type: "string" + scheds: + - "string" + svcArea: "string" + svcKpi: "string" + permLvl: + - "string" + easFeats: + - "string" + svcContSupp: + - "string" + appLocs: + - "string" + avlRep: 1577836800 + status: "string" required: true responses: '204': -- GitLab From e7b2f7f7b6aa9291bdf42293c8397e0fbe9802f6 Mon Sep 17 00:00:00 2001 From: Ikram Ul Haq Date: Wed, 6 Nov 2024 09:38:08 +0000 Subject: [PATCH 7/7] Updated query parameter descriptions with examples and removed examples from schemas --- build.sh | 2 +- config/api/capif-mgmt.yaml | 87 +++++++++++++++++++------------------- deploy.sh | 2 +- 3 files changed, 46 insertions(+), 45 deletions(-) diff --git a/build.sh b/build.sh index da9fc7a..2f69bca 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ SCRIPT=$(readlink -f "$0") BASEDIR=$(dirname "$SCRIPT") -MEEPDIR=~/AdvantEDGE +MEEPDIR=~/etsi-mec-sandbox install_package() { echo "" diff --git a/config/api/capif-mgmt.yaml b/config/api/capif-mgmt.yaml index 56ca967..d823b21 100644 --- a/config/api/capif-mgmt.yaml +++ b/config/api/capif-mgmt.yaml @@ -29,26 +29,28 @@ paths: get: tags: - services - description: This method retrieves information about a list of mecService resources. - This method is typically used in "service availability query" procedure + description: | + This method retrieves information about a list of mecService resources. + This method is typically used in the "service availability query" procedure. + **Example:** Retrieve all available services with specific parameters for filtering. operationId: Services_GET parameters: - name: vend-spec-etsi-mec-serinstance-id in: query - description: Vendor-specific query parameter for service instance ID. The - "target" attribute shall be set to "/apiId". + description: | + Vendor-specific query parameter for service instance ID. The "target" attribute shall be set to "/apiId". + **Example:** {\"target\": \"/apiId\", \"value\": \"serviceInstanceId\"} required: false style: form explode: true schema: type: string - example: "{\"target\": \"/apiId\", \"value\": \"serviceInstanceId\"}" - name: api-name in: query - description: "This query parameter corresponds to the parameter \"ser_name\"\ - \ as defined in clause 8.2.3.3.1. As opposed to the cardinality of ser_instance_id\ - \ defined in clause 8.2.3.3.1 that is 0..N, this parameter only supports\ - \ a cardinality of 0..1." + description: | + This query parameter corresponds to the parameter "ser_name" as defined in clause 8.2.3.3.1. + As opposed to the cardinality of ser_instance_id defined in clause 8.2.3.3.1 that is 0..N, this parameter only supports a cardinality of 0..1. + **Example:** ["ServiceName1"] required: false style: form explode: true @@ -58,11 +60,10 @@ paths: type: string - name: api-invoker-id in: query - description: "If the Discover_Service_API is produced by the MEC platform\ - \ towards the MEC applications, this identifier shall be set to the value\ - \ of the \"appInstanceId\" (see clause 7.1.2.6). If the Discover_Service_API\ - \ is produced by the CCF, the provisions in clause 8.1.2.2.3.1 of 3GPP TS\ - \ 29.222 [21] apply. " + description: | + If the Discover_Service_API is produced by the MEC platform towards the MEC applications, this identifier shall be set to the value of the "appInstanceId" (see clause 7.1.2.6). + If the Discover_Service_API is produced by the CCF, the provisions in clause 8.1.2.2.3.1 of 3GPP TS 29.222 [21] apply. + **Example:** "InvokerAppInstanceId" required: false style: form explode: true @@ -70,52 +71,49 @@ paths: type: string - name: vend-spec-etsi-mec-sercategory-id in: query - description: Vendor-specific query parameter for service category ID. The - "target" attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/serCategory/id". + description: | + Vendor-specific query parameter for service category ID. The "target" attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/serCategory/id". + **Example:** {\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/serCategory/id\", \"value\": \"serviceCategoryId\"} required: false style: form explode: true schema: type: string - example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/serCategory/id\"\ - , \"value\": \"serviceCategoryId\"}" - name: vend-spec-etsi-mec-consumed-local-only in: query - description: Vendor-specific query parameter for consumed local only. The - "target" attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/consumedLocalOnly". + description: | + Vendor-specific query parameter for consumed local only. The "target" attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/consumedLocalOnly". + **Example:** {\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/consumedLocalOnly\", \"value\": \"true\"} required: false style: form explode: true schema: type: string - example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/consumedLocalOnly\"\ - , \"value\": \"true\"}" - name: vend-spec-etsi-mec-is-local in: query - description: Vendor-specific query parameter for is local. The "target" attribute - shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/isLocal". + description: | + Vendor-specific query parameter for is local. The "target" attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/isLocal". + **Example:** {\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/isLocal\", \"value\": \"true\"} required: false style: form explode: true schema: type: string - example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/isLocal\"\ - , \"value\": \"true\"}" - name: vend-spec-etsi-mec-scope-of-locality in: query - description: Vendor-specific query parameter for scope of locality. The "target" - attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/scopeOfLocality". + description: | + Vendor-specific query parameter for scope of locality. The "target" attribute shall be set to "/vendorSpecific-urn:etsi:mec:capifext:service-info/scopeOfLocality". + **Example:** {\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/scopeOfLocality\", \"value\": \"scopeOfLocalityValue\"} required: false style: form explode: true schema: type: string - example: "{\"target\": \"/vendorSpecific-urn:etsi:mec:capifext:service-info/scopeOfLocality\"\ - , \"value\": \"scopeOfLocalityValue\"}" responses: "200": description: | The response body contains the result of the search over the list of registered APIs. + **Example:** JSON array of discovered APIs with details like "apiId", "serName", "scopeOfLocality", etc. content: application/json: schema: @@ -123,10 +121,10 @@ paths: "307": description: | Temporary redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + **Example:** "https://alternative-ccf.example.com/resource" headers: Location: - description: Contains an alternative target URI of the resource located - in an alternative CCF. + description: Contains an alternative target URI of the resource located in an alternative CCF. style: simple explode: false schema: @@ -134,39 +132,42 @@ paths: "308": description: | Permanent redirection. The response shall include a Location header field containing an alternative target URI of the resource located in an alternative CCF. + **Example:** "https://permanent-ccf.example.com/resource" headers: Location: - description: Contains an alternative target URI of the resource located - in an alternative CCF. + description: Contains an alternative target URI of the resource located in an alternative CCF. style: simple explode: false schema: type: string "400": - description: Bad Request. It is used to indicate that incorrect parameters - were passed to the request. + description: | + Bad Request. It is used to indicate that incorrect parameters were passed to the request. + **Example:** Invalid "vend-spec-etsi-mec-serinstance-id" format. content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' "403": - description: Forbidden. The operation is not allowed given the current status - of the resource. + description: | + Forbidden. The operation is not allowed given the current status of the resource. + **Example:** Access restricted to registered users only. content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' "404": - description: Not Found. It is used when a client provided a URI that cannot - be mapped to a valid resource URI. + description: | + Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI. + **Example:** Non-existent service identifier provided in the URI. content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' "414": - description: It is used to indicate that the server is refusing to process - the request because the request URI is longer than the server is willing - or able to process. + description: | + Request URI Too Long. Indicates that the server is refusing to process the request because the URI is too long. + **Example:** Excessive query parameters length in the request URI. content: application/problem+json: schema: diff --git a/deploy.sh b/deploy.sh index f8a873b..dc26119 100755 --- a/deploy.sh +++ b/deploy.sh @@ -4,7 +4,7 @@ SCRIPT=$(readlink -f "$0") BASEDIR=$(dirname "$SCRIPT") -MEEPDIR=~/AdvantEDGE +MEEPDIR=~/etsi-mec-sandbox CONFIGDIR=$MEEPDIR/config DASHBOARDDIR=$MEEPDIR/charts/grafana/dashboards APIDIR=$MEEPDIR/config/api -- GitLab