From ee0e98ab122d49df529fca0f3742794f31803a3f Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Sun, 28 Dec 2025 20:51:46 +0100 Subject: [PATCH 01/19] Add args to be able to pish the image to the i2cat's container registry --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1f5859f..1cf3455 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,8 +40,9 @@ RUN apt-get update && apt-get install -y \ # Copy application code COPY . . +ARG PIP_INDEX_URL # Install Python dependencies -RUN python -m pip install --no-cache-dir -r requirements.txt +RUN python -m pip install --no-cache-dir -r requirements.txt --extra-index-url ${PIP_INDEX_URL} --trusted-host gitlab.i2cat.net # Set working directory for application execution WORKDIR /usr/app/src/ -- GitLab From d51fc7cd146e9729357a01792c26d82c9d2b6d2b Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Sun, 28 Dec 2025 20:51:55 +0100 Subject: [PATCH 02/19] Add new TF-SDK version --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index f512ac6..4fd66b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ attrs==23.1.0 Authlib==1.2.1 certifi==2023.11.17 -cffi==1.16.0 +cffi==2.0.0 charset-normalizer==3.3.2 click==8.1.7 clickclick==20.10.2 @@ -27,7 +27,7 @@ MarkupSafe==2.1.3 mongoengine==0.29.1 packaging==23.2 pkgutil-resolve-name==1.3.10 -pycparser==2.21 +pycparser==2.23 PyJWT==2.8.0 pymongo==4.13.2 python-dateutil==2.9.0 @@ -36,7 +36,7 @@ referencing==0.32.0 requests==2.32.4 rpds-py==0.13.2 six==1.16.0 -sunrise6g-opensdk==1.0.8 +sunrise6g-opensdk==1.0.21 swagger-ui-bundle==0.0.9 urllib3==2.1.0 Werkzeug==2.2.3 -- GitLab From 7d116cc4aab1d719820cd6918a9246d4b1a7d799 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Mon, 29 Dec 2025 12:49:26 +0100 Subject: [PATCH 03/19] Add extra information when 422 happens --- src/adapters/tf_adapter/federation_management.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/adapters/tf_adapter/federation_management.py b/src/adapters/tf_adapter/federation_management.py index 7d490e5..ce24fe2 100644 --- a/src/adapters/tf_adapter/federation_management.py +++ b/src/adapters/tf_adapter/federation_management.py @@ -84,8 +84,8 @@ def create_federation(body, bearer_token, partner_api_root=None): # noqa: E501 # Retrieve zone list from Edge Cloud Platform try: zones_list = prepare_offered_availability_zones() - except Exception: - raise APIError(422, "Unable to get zones list from Edge Cloud Platform") + except Exception as e: + raise APIError(422, f"Unable to get zones list from Edge Cloud Platform. Error: {e}") # Create a new MongoEngine document and save it to MongoDB new_federation = OriginatingOperatorPlatform(**federation_data) -- GitLab From e1c050f9fa182e25a51927d7f345697aaa1c0f75 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Mon, 29 Dec 2025 15:21:09 +0100 Subject: [PATCH 04/19] Allow config file passed by env var, that way we can have several conf files. --- .../fm_adapter/federation_management.py | 4 ++- .../tf_adapter/artefact_management.py | 7 +++-- .../tf_adapter/federation_management.py | 4 ++- src/api/federation_management.py | 4 ++- src/clients/artefact_manager.py | 4 ++- src/clients/tf_sdk.py | 28 +++++++++++++------ src/main.py | 4 ++- 7 files changed, 40 insertions(+), 15 deletions(-) diff --git a/src/adapters/fm_adapter/federation_management.py b/src/adapters/fm_adapter/federation_management.py index a59b2ac..bbde45b 100644 --- a/src/adapters/fm_adapter/federation_management.py +++ b/src/adapters/fm_adapter/federation_management.py @@ -15,6 +15,7 @@ # -------------------------------------------------------------------------- # from configparser import ConfigParser from mongoengine.errors import ValidationError +import os from models.federation_context_id import FederationContextId # noqa: E501 @@ -27,7 +28,8 @@ from adapters.error import APIError CONFIG = ConfigParser() -CONFIG.read("conf/config.cfg") +config_file = os.environ.get("FM_CONFIG_FILE", "conf/config.cfg") +CONFIG.read(config_file) partnerOPFederationId = CONFIG.get("op_data", "partnerOPFederationId") partnerOPCountryCode = CONFIG.get("op_data", "partnerOPCountryCode") partnerOPMobileNetworkCode_MCC = CONFIG.get("op_data", "partnerOPMobileNetworkCode_MCC") diff --git a/src/adapters/tf_adapter/artefact_management.py b/src/adapters/tf_adapter/artefact_management.py index 8b720f2..9017adf 100644 --- a/src/adapters/tf_adapter/artefact_management.py +++ b/src/adapters/tf_adapter/artefact_management.py @@ -26,9 +26,11 @@ from models.mongo_document import OriginatingApplicationOnboardingManagement from clients import artefact_manager from clients import tf_sdk from configparser import ConfigParser +import os CONFIG = ConfigParser() -CONFIG.read("conf/config.cfg") +config_file = os.environ.get("FM_CONFIG_FILE", "conf/config.cfg") +CONFIG.read(config_file) ARTEFACT_MANAGER_ENABLED = CONFIG.getboolean("artefact_manager", "enabled") DST_REGISTRY = CONFIG.get("artefact_manager", "dst_registry") DST_USERNAME = CONFIG.get("artefact_manager", "dst_username") @@ -271,7 +273,8 @@ def upload_artefact(body, federation_context_id, bearer_token=None, partner_api_ # Onboarding artefact to Edge Cloud Platform try: response = tf_sdk.onboarding_artefact(body.to_gsma_input()) - if response.status_code != 200: + print(f"DEBUG: ECP response status: {response.status_code}, body: {response.text}") + if response.status_code not in [200, 201]: response_data = response.json() return response_data, 409 except Exception as error: diff --git a/src/adapters/tf_adapter/federation_management.py b/src/adapters/tf_adapter/federation_management.py index ce24fe2..e11bb83 100644 --- a/src/adapters/tf_adapter/federation_management.py +++ b/src/adapters/tf_adapter/federation_management.py @@ -16,6 +16,7 @@ import json from configparser import ConfigParser from mongoengine.errors import ValidationError +import os from models.federation_context_id import FederationContextId # noqa: E501 from models.federation_response_data import FederationResponseData # noqa: E501 @@ -28,7 +29,8 @@ from adapters.error import APIError from clients import tf_sdk CONFIG = ConfigParser() -CONFIG.read("conf/config.cfg") +config_file = os.environ.get("FM_CONFIG_FILE", "conf/config.cfg") +CONFIG.read(config_file) partnerOPFederationId = CONFIG.get("op_data", "partnerOPFederationId") partnerOPCountryCode = CONFIG.get("op_data", "partnerOPCountryCode") partnerOPMobileNetworkCode_MCC = CONFIG.get("op_data", "partnerOPMobileNetworkCode_MCC") diff --git a/src/api/federation_management.py b/src/api/federation_management.py index 499aa78..739dc73 100644 --- a/src/api/federation_management.py +++ b/src/api/federation_management.py @@ -16,6 +16,7 @@ import connexion from configparser import ConfigParser from flask import abort +import os from adapters.error import APIError import util @@ -25,7 +26,8 @@ from models.federation_context_id_partner_body import FederationContextIdPartner from adapters.injector import resolve_adapter CONFIG = ConfigParser() -CONFIG.read("conf/config.cfg") +config_file = os.environ.get("FM_CONFIG_FILE", "conf/config.cfg") +CONFIG.read(config_file) partnerOPFederationId = CONFIG.get("op_data", "partnerOPFederationId") partnerOPCountryCode = CONFIG.get("op_data", "partnerOPCountryCode") partnerOPMobileNetworkCode_MCC = CONFIG.get("op_data", "partnerOPMobileNetworkCode_MCC") diff --git a/src/clients/artefact_manager.py b/src/clients/artefact_manager.py index 2c9735f..0a35c01 100644 --- a/src/clients/artefact_manager.py +++ b/src/clients/artefact_manager.py @@ -15,11 +15,13 @@ # -------------------------------------------------------------------------- # import requests from configparser import ConfigParser +import os from requests import Response CONFIG = ConfigParser() -CONFIG.read("conf/config.cfg") +config_file = os.environ.get("FM_CONFIG_FILE", "conf/config.cfg") +CONFIG.read(config_file) HOST = CONFIG.get("artefact_manager", "host") PORT = int(CONFIG.get("artefact_manager", "port")) TIMEOUT_REQUESTS = 20 diff --git a/src/clients/tf_sdk.py b/src/clients/tf_sdk.py index ce432f7..d9a00b0 100644 --- a/src/clients/tf_sdk.py +++ b/src/clients/tf_sdk.py @@ -16,11 +16,13 @@ from configparser import ConfigParser from sunrise6g_opensdk.common.sdk import Sdk as sdkclient import logging +import os logger = logging.getLogger(__name__) - +# TODO This is not mandatory for all TF SDK clients, adjust as needed CONFIG = ConfigParser() -CONFIG.read("conf/config.cfg") +config_file = os.environ.get("FM_CONFIG_FILE", "conf/config.cfg") +CONFIG.read(config_file) HOST = CONFIG.get("edge_cloud_platform", "host") PORT = int(CONFIG.get("edge_cloud_platform", "port")) CLIENT_NAME = CONFIG.get("edge_cloud_platform", "client_name") @@ -53,7 +55,7 @@ class EdgeCloudClient: "edgecloud": { "client_name": client_name, "base_url": self.base_url, - "flavour_id": FLAVOUR_ID + "flavour_id": FLAVOUR_ID, } } @@ -131,7 +133,9 @@ class EdgeCloudClient: def update_onboarding(self, app_id, onboarding_data): """Update application onboarding using GSMA-compliant API""" try: - return self.edgecloud_client.patch_onboarded_app_gsma(app_id, onboarding_data) + return self.edgecloud_client.patch_onboarded_app_gsma( + app_id, onboarding_data + ) except Exception as e: logger.error(f"Error updating onboarding for app {app_id}: {e}") raise @@ -156,15 +160,21 @@ class EdgeCloudClient: def get_app_by_zone_app_instance_id(self, app_id, app_instance_id, zone_id): """Get application instance details using GSMA-compliant API""" try: - return self.edgecloud_client.get_deployed_app_gsma(app_id, app_instance_id, zone_id) + return self.edgecloud_client.get_deployed_app_gsma( + app_id, app_instance_id, zone_id + ) except Exception as e: - logger.error(f"Error getting app instance {app_instance_id} in zone {zone_id}: {e}") + logger.error( + f"Error getting app instance {app_instance_id} in zone {zone_id}: {e}" + ) raise def delete_app(self, app_id, app_instance_id, zone_id): """Delete application instance using GSMA-compliant API""" try: - return self.edgecloud_client.undeploy_app_gsma(app_id, app_instance_id, zone_id) + return self.edgecloud_client.undeploy_app_gsma( + app_id, app_instance_id, zone_id + ) except Exception as e: logger.error(f"Error deleting app instance {app_instance_id}: {e}") raise @@ -235,7 +245,9 @@ def post_app_command(deployment_data): def get_app_by_zone_app_instance_id(app_id, app_instance_id, zone_id): """Get application instance details""" - return get_client().get_app_by_zone_app_instance_id(app_id, app_instance_id, zone_id) + return get_client().get_app_by_zone_app_instance_id( + app_id, app_instance_id, zone_id + ) def delete_app(app_id, app_instance_id, zone_id): diff --git a/src/main.py b/src/main.py index 566bc84..1f2645f 100644 --- a/src/main.py +++ b/src/main.py @@ -23,10 +23,12 @@ import encoder import yaml from flask_mongoengine import MongoEngine from configparser import ConfigParser +import os CONFIG = ConfigParser() -CONFIG.read("conf/config.cfg") +config_file = os.environ.get("FM_CONFIG_FILE", "conf/config.cfg") +CONFIG.read(config_file) HOST = CONFIG.get("server", "host") PORT = int(CONFIG.get("server", "port")) MONGO_HOST = CONFIG.get("mongodb", "host") -- GitLab From 402de297db3ec7dde618c079546c3b6f8b8748c6 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Tue, 30 Dec 2025 11:55:11 +0100 Subject: [PATCH 05/19] Needed for TF-SDK from i2cat repo --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1cf3455..5d6af43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,8 +41,9 @@ RUN apt-get update && apt-get install -y \ COPY . . ARG PIP_INDEX_URL +ARG PIP_EXTRA_INDEX_URL # Install Python dependencies -RUN python -m pip install --no-cache-dir -r requirements.txt --extra-index-url ${PIP_INDEX_URL} --trusted-host gitlab.i2cat.net +RUN python -m pip install --no-cache-dir -r requirements.txt --extra-index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} --trusted-host gitlab.i2cat.net # Set working directory for application execution WORKDIR /usr/app/src/ -- GitLab From b4e81b50c69d5c16c59e84d3946cddcc68f29064 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Tue, 30 Dec 2025 11:55:24 +0100 Subject: [PATCH 06/19] Bump to latest TFSDK and lite2edge versions --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4fd66b5..1e2ca6f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,7 +36,8 @@ referencing==0.32.0 requests==2.32.4 rpds-py==0.13.2 six==1.16.0 -sunrise6g-opensdk==1.0.21 +sunrise6g-opensdk==1.0.23 +lite2edge-adapter==0.0.2 swagger-ui-bundle==0.0.9 urllib3==2.1.0 Werkzeug==2.2.3 -- GitLab From e0174ba0e9320941fc440a8b0befb0393e350107 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Tue, 30 Dec 2025 11:57:01 +0100 Subject: [PATCH 07/19] Add another realm so keycloak ahve both credentials --- keycloak/realm-import.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/keycloak/realm-import.json b/keycloak/realm-import.json index b0cd248..d7eace0 100644 --- a/keycloak/realm-import.json +++ b/keycloak/realm-import.json @@ -21,6 +21,18 @@ "serviceAccountsEnabled": true, "defaultClientScopes": ["fed-mgmt"], "webOrigins": ["*"] + }, + { + "clientId": "originating-op-2", + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "2mhznERfWclLDuVojY77Lp4Qd2r4e8Ms", + "redirectUris": ["http://localhost:8080/*"], + "publicClient": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": true, + "defaultClientScopes": ["fed-mgmt"], + "webOrigins": ["*"] } ] } -- GitLab From 427e8c73d3732720fc7c80149d42501c81cccb6b Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Tue, 30 Dec 2025 11:57:31 +0100 Subject: [PATCH 08/19] Add lite2edge sqlite path --- src/clients/tf_sdk.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/clients/tf_sdk.py b/src/clients/tf_sdk.py index d9a00b0..1769fed 100644 --- a/src/clients/tf_sdk.py +++ b/src/clients/tf_sdk.py @@ -56,6 +56,7 @@ class EdgeCloudClient: "client_name": client_name, "base_url": self.base_url, "flavour_id": FLAVOUR_ID, + "DB_PATH": "/tmp/edgecloud.db" } } -- GitLab From 0786ad03ebf715a6082a0df204dac4193022d715 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Tue, 30 Dec 2025 11:58:07 +0100 Subject: [PATCH 09/19] 27017 because is the internal container port --- src/conf/config-fm-remote.cfg | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/conf/config-fm-remote.cfg diff --git a/src/conf/config-fm-remote.cfg b/src/conf/config-fm-remote.cfg new file mode 100644 index 0000000..031e55d --- /dev/null +++ b/src/conf/config-fm-remote.cfg @@ -0,0 +1,52 @@ +[keycloak] +client1_id = originating-op-1 +client1_secret = dd7vNwFqjNpYwaghlEwMbw10g0klWDHb +client2_id = originating-op-2 +client2_secret = 2mhznERfWclLDuVojY77Lp4Qd2r4e8Ms +scope = fed-mgmt +host = keycloak-remote +port = 8080 +realm = federation + +[server] +host = 0.0.0.0 +port = 8989 +prefix = api +version = v1.0 +protocol = http + +[mongodb] +host = mongodb-remote +# host = 127.0.0.1 +port = 27017 + +[op_data] +partnerOPFederationId = i2cat +partnerOPCountryCode = ES +partnerOPMobileNetworkCode_MCC = 001 +partnerOPMobileNetworkCode_MNC = 01 +partnerOPFixedNetworkCode = 34 +platformCaps = homeRouting +edgeDiscoveryServiceEndPoint_port = +edgeDiscoveryServiceEndPoint_fqdn = discovery.operator1.com +edgeDiscoveryServiceEndPoint_ipv4Addresses = +edgeDiscoveryServiceEndPoint_ipv6Addresses = +lcmServiceEndPoint_port = 8989 +lcmServiceEndPoint_fqdn = +lcmServiceEndPoint_ipv4Addresses = 127.0.0.1 +lcmServiceEndPoint_ipv6Addresses = + +[edge_cloud_platform] +host = 192.168.123.237 +port = 30769 +flavour_id = 694ad7d90e7025838c6af76b +client_name = lite2edge + +[artefact_manager] +enabled = false +host = 192.168.123.188 +port = 30080 +dst_registry = +dst_username = +dst_password = +dst_token = -- GitLab From fa0e007a68ee467725c1c157e60347e9411ac23a Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Tue, 30 Dec 2025 11:58:42 +0100 Subject: [PATCH 10/19] Add tf_sdk for quick development --- src/test/local-deployment/docker-compose.yml | 121 +++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 src/test/local-deployment/docker-compose.yml diff --git a/src/test/local-deployment/docker-compose.yml b/src/test/local-deployment/docker-compose.yml new file mode 100644 index 0000000..e12ae46 --- /dev/null +++ b/src/test/local-deployment/docker-compose.yml @@ -0,0 +1,121 @@ +services: + mongodb-local: + image: mongo + container_name: mongodb-local + restart: unless-stopped + ports: + - "27017:27017" + environment: + MONGO_INITDB_DATABASE: federation-manager + MONGODB_DATA_DIR: /data/db + MONDODB_LOG_DIR: /dev/null + volumes: + - smdbdata-local:/data/db + networks: + - local-net + + mongodb-remote: + image: mongo + container_name: mongodb-remote + restart: unless-stopped + ports: + - "27018:27017" + environment: + MONGO_INITDB_DATABASE: federation-manager + MONGODB_DATA_DIR: /data/db + MONDODB_LOG_DIR: /dev/null + volumes: + - smdbdata-remote:/data/db + networks: + - remote-net + + keycloak-local: + image: quay.io/keycloak/keycloak:26.1.4 + container_name: keycloak-local + environment: + - KC_BOOTSTRAP_ADMIN_USERNAME=admin + - KC_BOOTSTRAP_ADMIN_PASSWORD=admin + - KC_IMPORT=/opt/keycloak/data/import/realm-import.json + ports: + - "8080:8080" + command: ["start-dev", "--import-realm"] + volumes: + - ../../../keycloak/realm-import.json:/opt/keycloak/data/import/realm-import.json + networks: + - local-net + + keycloak-remote: + image: quay.io/keycloak/keycloak:26.1.4 + container_name: keycloak-remote + environment: + - KC_BOOTSTRAP_ADMIN_USERNAME=admin + - KC_BOOTSTRAP_ADMIN_PASSWORD=admin + - KC_IMPORT=/opt/keycloak/data/import/realm-import.json + ports: + - "8081:8080" + command: ["start-dev", "--import-realm"] + volumes: + - ../../../keycloak/realm-import.json:/opt/keycloak/data/import/realm-import.json + networks: + - remote-net + + federation-manager-remote: + build: + context: ../../../ + dockerfile: Dockerfile + args: + PIP_INDEX_URL: https://gitlab-ci-token:glpat-Gm4adH6E5xJGt51zZDEs@gitlab.i2cat.net/api/v4/projects/2512/packages/pypi/simple + PIP_EXTRA_INDEX_URL: https://gitlab-ci-token:glpat-Gm4adH6E5xJGt51zZDEs@gitlab.i2cat.net/api/v4/projects/2514/packages/pypi/simple + container_name: federation-manager-remote + restart: unless-stopped + ports: + - "30990:8989" + volumes: + - ../../conf/config-fm-remote.cfg:/usr/app/src/conf/config.cfg + - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py + - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config + # For local deployment, changes in lite2edge are automatically reflected and no need to push new Pipy package to Gitlab packet repo + - ../../../../kubernetes-adapter/lite2edge:/usr/local/lib/python3.12/site-packages/lite2edge + + depends_on: + - mongodb-remote + - keycloak-remote + networks: + - remote-net + + federation-manager-local: + build: + context: ../../../ + dockerfile: Dockerfile + args: + PIP_INDEX_URL: https://gitlab-ci-token:glpat-Gm4adH6E5xJGt51zZDEs@gitlab.i2cat.net/api/v4/projects/2512/packages/pypi/simple + PIP_EXTRA_INDEX_URL: https://gitlab-ci-token:glpat-Gm4adH6E5xJGt51zZDEs@gitlab.i2cat.net/api/v4/projects/2514/packages/pypi/simple + container_name: federation-manager-local + restart: unless-stopped + ports: + - "8989:8989" + environment: + - KUBECONFIG=/root/.kube/config + volumes: + - ../../conf/config-fm-local.cfg:/usr/app/src/conf/config.cfg + - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py + - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config + # For local deployment, changes in lite2edge are automatically reflected and no need to push new Pipy package to Gitlab packet repo + - ../../../../kubernetes-adapter/lite2edge:/usr/local/lib/python3.12/site-packages/lite2edge + depends_on: + - mongodb-local + - keycloak-local + networks: + - local-net + +volumes: + smdbdata-local: + driver: local + smdbdata-remote: + driver: local + +networks: + local-net: + driver: bridge + remote-net: + driver: bridge -- GitLab From 69fed06b916f7951cfee162c7381ee6669f08318 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Tue, 30 Dec 2025 15:36:29 +0100 Subject: [PATCH 11/19] Use latest version of TF_SDK, remote lite2edge from deps --- requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 1e2ca6f..698504f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,8 +36,7 @@ referencing==0.32.0 requests==2.32.4 rpds-py==0.13.2 six==1.16.0 -sunrise6g-opensdk==1.0.23 -lite2edge-adapter==0.0.2 +sunrise6g-opensdk==1.0.24 swagger-ui-bundle==0.0.9 urllib3==2.1.0 Werkzeug==2.2.3 -- GitLab From 0f52fa2ce052b71a38738222f371b4ed6debcf08 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Tue, 30 Dec 2025 15:36:42 +0100 Subject: [PATCH 12/19] Add lite2edge in local confs --- src/conf/config-fm-local.cfg | 51 +++++++++++++++++++++++++++++++++++ src/conf/config-fm-remote.cfg | 6 ++--- 2 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 src/conf/config-fm-local.cfg diff --git a/src/conf/config-fm-local.cfg b/src/conf/config-fm-local.cfg new file mode 100644 index 0000000..e676d61 --- /dev/null +++ b/src/conf/config-fm-local.cfg @@ -0,0 +1,51 @@ +[keycloak] +client1_id = originating-op-1 +client1_secret = dd7vNwFqjNpYwaghlEwMbw10g0klWDHb +client2_id = originating-op-2 +client2_secret = 2mhznERfWclLDuVojY77Lp4Qd2r4e8Ms +scope = fed-mgmt +host = keycloak-local +port = 8080 +realm = federation + +[server] +host = 0.0.0.0 +port = 8989 +prefix = api +version = v1.0 +protocol = http + +[mongodb] +host = mongodb-local +port = 27017 + +[op_data] +partnerOPFederationId = i2cat +partnerOPCountryCode = ES +partnerOPMobileNetworkCode_MCC = 001 +partnerOPMobileNetworkCode_MNC = 01 +partnerOPFixedNetworkCode = 34 +platformCaps = homeRouting +edgeDiscoveryServiceEndPoint_port = +edgeDiscoveryServiceEndPoint_fqdn = discovery.operator1.com +edgeDiscoveryServiceEndPoint_ipv4Addresses = +edgeDiscoveryServiceEndPoint_ipv6Addresses = +lcmServiceEndPoint_port = 8989 +lcmServiceEndPoint_fqdn = +lcmServiceEndPoint_ipv4Addresses = 127.0.0.1 +lcmServiceEndPoint_ipv6Addresses = + +[edge_cloud_platform] +host = lite2edge-local +port = 8080 +client_name = i2edge +flavour_id = 67f3a0b0e3184a85952e174d + +[artefact_manager] +host = 192.168.123.237 +port = 30769 +enabled = false +dst_registry = +dst_username = +dst_password = +dst_token = diff --git a/src/conf/config-fm-remote.cfg b/src/conf/config-fm-remote.cfg index 031e55d..ef807e6 100644 --- a/src/conf/config-fm-remote.cfg +++ b/src/conf/config-fm-remote.cfg @@ -37,8 +37,8 @@ lcmServiceEndPoint_ipv4Addresses = 127.0.0.1 lcmServiceEndPoint_ipv6Addresses = [edge_cloud_platform] -host = 192.168.123.237 -port = 30769 +host = lite2edge-remote +port = 8080 flavour_id = 694ad7d90e7025838c6af76b client_name = lite2edge @@ -48,5 +48,5 @@ host = 192.168.123.188 port = 30080 dst_registry = dst_username = -dst_password = dst_token = +dst_password = -- GitLab From a48fa9d7727032fed518dec96b7cc50d30b1b9c0 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Tue, 30 Dec 2025 15:37:05 +0100 Subject: [PATCH 13/19] Add lite2edge and remove old code passed as bind volumes --- src/test/local-deployment/docker-compose.yml | 36 +++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/src/test/local-deployment/docker-compose.yml b/src/test/local-deployment/docker-compose.yml index e12ae46..6eb60fe 100644 --- a/src/test/local-deployment/docker-compose.yml +++ b/src/test/local-deployment/docker-compose.yml @@ -74,8 +74,6 @@ services: - ../../conf/config-fm-remote.cfg:/usr/app/src/conf/config.cfg - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config - # For local deployment, changes in lite2edge are automatically reflected and no need to push new Pipy package to Gitlab packet repo - - ../../../../kubernetes-adapter/lite2edge:/usr/local/lib/python3.12/site-packages/lite2edge depends_on: - mongodb-remote @@ -100,14 +98,44 @@ services: - ../../conf/config-fm-local.cfg:/usr/app/src/conf/config.cfg - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config - # For local deployment, changes in lite2edge are automatically reflected and no need to push new Pipy package to Gitlab packet repo - - ../../../../kubernetes-adapter/lite2edge:/usr/local/lib/python3.12/site-packages/lite2edge depends_on: - mongodb-local - keycloak-local networks: - local-net + lite2edge-local: + build: + context: ../../../../lite2edge + dockerfile: Dockerfile + container_name: lite2edge-local + restart: unless-stopped + ports: + - "8752:8080" + environment: + - KUBECONFIG=/root/.kube/config + - LOG_LEVEL=INFO + volumes: + - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config:ro + networks: + - local-net + + lite2edge-remote: + build: + context: ../../../../lite2edge + dockerfile: Dockerfile + container_name: lite2edge-remote + restart: unless-stopped + ports: + - "8751:8080" + environment: + - KUBECONFIG=/root/.kube/config + - LOG_LEVEL=INFO + volumes: + - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config:ro + networks: + - remote-net + volumes: smdbdata-local: driver: local -- GitLab From e130da00851b2815e95dc826a704528523d5c633 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Fri, 2 Jan 2026 16:14:19 +0100 Subject: [PATCH 14/19] Fix Dockerfile --- Dockerfile | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5d6af43..79047af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,11 +22,7 @@ ######################################################### FROM python:3.12 - -# Set working directory WORKDIR /usr/app - -# Install system dependencies RUN apt-get update && apt-get install -y \ bash \ build-essential \ @@ -36,20 +32,12 @@ RUN apt-get update && apt-get install -y \ libcurl4-openssl-dev \ libssl-dev \ && rm -rf /var/lib/apt/lists/* - # Copy application code -COPY . . - -ARG PIP_INDEX_URL -ARG PIP_EXTRA_INDEX_URL +COPY . . +ARG PIP_TF_SDK_INDEX_URL # Install Python dependencies -RUN python -m pip install --no-cache-dir -r requirements.txt --extra-index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} --trusted-host gitlab.i2cat.net - -# Set working directory for application execution +RUN python -m pip install --no-cache-dir -r requirements.txt --extra-index-url ${PIP_TF_SDK_INDEX_URL} --trusted-host gitlab.i2cat.net WORKDIR /usr/app/src/ - -# Expose application port EXPOSE 8989 - # Set Gunicorn as the entrypoint ENTRYPOINT ["gunicorn", "wsgi:app", "--bind", "0.0.0.0:8989", "--workers", "4", "--log-level", "debug", "--timeout", "1000"] -- GitLab From 7d11ddbd027aec304407314470bbb72e33fe30f5 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Fri, 2 Jan 2026 16:14:27 +0100 Subject: [PATCH 15/19] Update TF-SDK version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 698504f..9fc12d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,7 +36,7 @@ referencing==0.32.0 requests==2.32.4 rpds-py==0.13.2 six==1.16.0 -sunrise6g-opensdk==1.0.24 +sunrise6g-opensdk==1.0.27 swagger-ui-bundle==0.0.9 urllib3==2.1.0 Werkzeug==2.2.3 -- GitLab From bc668fca10be193fcb077df50abd3e99d7608f3a Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Fri, 2 Jan 2026 16:14:41 +0100 Subject: [PATCH 16/19] DB PATH not needed since lite2edge exposes API --- src/clients/tf_sdk.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/clients/tf_sdk.py b/src/clients/tf_sdk.py index 1769fed..856b206 100644 --- a/src/clients/tf_sdk.py +++ b/src/clients/tf_sdk.py @@ -55,8 +55,7 @@ class EdgeCloudClient: "edgecloud": { "client_name": client_name, "base_url": self.base_url, - "flavour_id": FLAVOUR_ID, - "DB_PATH": "/tmp/edgecloud.db" + "flavour_id": FLAVOUR_ID } } -- GitLab From 284e7b905bb1cc8aa2b395ff582b47c344e31579 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Wed, 7 Jan 2026 11:16:44 +0100 Subject: [PATCH 17/19] chore: enable local SDK mounting for integration testing --- src/test/local-deployment/docker-compose.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test/local-deployment/docker-compose.yml b/src/test/local-deployment/docker-compose.yml index 6eb60fe..74ef25b 100644 --- a/src/test/local-deployment/docker-compose.yml +++ b/src/test/local-deployment/docker-compose.yml @@ -73,7 +73,8 @@ services: volumes: - ../../conf/config-fm-remote.cfg:/usr/app/src/conf/config.cfg - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py - - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config + - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config + - ../../../../tf-sdk/src/sunrise6g_opensdk:/usr/local/lib/python3.12/site-packages/sunrise6g_opensdk depends_on: - mongodb-remote @@ -97,7 +98,8 @@ services: volumes: - ../../conf/config-fm-local.cfg:/usr/app/src/conf/config.cfg - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py - - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config + - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config + - ../../../../tf-sdk/src/sunrise6g_opensdk:/usr/local/lib/python3.12/site-packages/sunrise6g_opensdk depends_on: - mongodb-local - keycloak-local @@ -116,7 +118,7 @@ services: - KUBECONFIG=/root/.kube/config - LOG_LEVEL=INFO volumes: - - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config:ro + - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config networks: - local-net @@ -132,7 +134,7 @@ services: - KUBECONFIG=/root/.kube/config - LOG_LEVEL=INFO volumes: - - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml:/root/.kube/config:ro + - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config networks: - remote-net -- GitLab From c61125ba3210e66fb8978cbdd8f989ea4b2c1916 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Fri, 30 Jan 2026 18:42:04 +0100 Subject: [PATCH 18/19] Bump sunrise6g-opensdk to 1.0.29 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9fc12d3..f6ac059 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,7 +36,7 @@ referencing==0.32.0 requests==2.32.4 rpds-py==0.13.2 six==1.16.0 -sunrise6g-opensdk==1.0.27 +sunrise6g-opensdk==1.0.29 swagger-ui-bundle==0.0.9 urllib3==2.1.0 Werkzeug==2.2.3 -- GitLab From b206f43051951de8551b237ecb57aa07ba461e39 Mon Sep 17 00:00:00 2001 From: Sergio Gimenez Date: Fri, 30 Jan 2026 18:43:46 +0100 Subject: [PATCH 19/19] Update federation manager integration settings --- AGENTS.md | 297 ++ Dockerfile | 20 +- Dockerfile.dev | 57 + .../application_onboarding_management.py | 9 + src/clients/fed_manager.py | 5 +- src/conf/config-fm-local.cfg | 2 +- src/static/openapi.yaml | 3664 ++++++++++++----- src/swagger/swagger.yaml | 2 +- 8 files changed, 3047 insertions(+), 1009 deletions(-) create mode 100644 AGENTS.md create mode 100644 Dockerfile.dev diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..4a81844 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,297 @@ +# Agent Guidelines for Federation Manager + +This document provides coding agents with essential information for working in the Federation Manager codebase. + +## Project Overview + +**Federation Manager** is a Python-based component implementing Federation Management functionality for the GSMA Operator Platform (OP). It supports dual-role architecture: +- **Partner OP Mode**: Handles external federation partner requests (without `X-Internal` header) +- **Originating OP Mode**: Handles internal service requests (with `X-Internal` and `X-Partner-API-Root` headers) + +## Build/Run Commands + +### Setup +```bash +# Create virtual environment +python -m venv venv +source venv/bin/activate # On Windows: venv\Scripts\activate + +# Install dependencies +pip install -r requirements.txt + +# Configure application +cp src/conf/config.cfg.sample src/conf/config.cfg +# Edit config.cfg with your specific settings +``` + +### Run Application +```bash +# Local development +cd src/ +python main.py + +# Using Docker Compose (recommended) +docker compose up -d + +# Build Docker image +docker build -t federation-manager . +``` + +### Testing + +**Run all tests:** +```bash +cd src/ +python test/run_all_tests.py --verbose --coverage +``` + +**Run specific test module:** +```bash +cd src/ +python -m unittest test.test_federation_management -v +``` + +**Run single test case:** +```bash +cd src/ +python -m unittest test.test_federation_management.TestFederationManagementController.test_01_create_federation -v +``` + +**Test execution order** (tests run sequentially): +1. `test_federation_management` +2. `test_availability_zone_info_synchronization` +3. `test_artefact_management` +4. `test_application_onboarding_management` +5. `test_application_deployment_management` + +**Coverage reports:** +- Terminal output with coverage percentage +- HTML report in `src/htmlcov/` directory + +### Linting +```bash +# No formal linting configured, but PEP8 style is followed +# Use flake8 or pylint manually if needed +flake8 src/ --max-line-length=120 +``` + +## Architecture + +``` +API Layer (src/api/) + ↓ +Adapter Layer (src/adapters/) + ├── tf_adapter/ (Partner OP mode - external requests) + └── fm_adapter/ (Originating OP mode - internal requests) + ↓ +Client Layer (src/clients/) + ├── fed_manager.py (Federation Manager client) + └── tf_sdk.py (Edge Cloud Platform SDK) +``` + +**Request routing** via `adapters.injector.resolve_adapter()`: +- Without `X-Internal` header → `tf_adapter` (Partner OP) +- With `X-Internal` header → `fm_adapter` (Originating OP) + +## Code Style Guidelines + +### General Python Standards +- Follow **PEP8** coding conventions +- Python **3.12+** required +- Use **snake_case** for functions and variables +- Use **PascalCase** for class names +- Maximum line length: **120 characters** (flexible) + +### Imports +```python +# Standard library imports (absolute) +from __future__ import absolute_import +import os +import sys +from configparser import ConfigParser +from datetime import date, datetime # noqa: F401 + +# Third-party imports +import connexion +from flask import abort, render_template +from flask_mongoengine import MongoEngine + +# Local application imports +from adapters.injector import resolve_adapter +from adapters.error import APIError +from models.federation_request_data import FederationRequestData # noqa: E501 +import util +``` + +**Import ordering:** +1. `from __future__` imports (if needed for compatibility) +2. Standard library imports +3. Third-party library imports +4. Local application imports + +**Import conventions:** +- Use explicit imports from packages +- Long model imports are acceptable with `# noqa: E501` to suppress line length warnings +- Use `# noqa: F401` for imports needed only for type hints + +### File Headers +All Python files must include the Apache 2.0 license header: +```python +# -------------------------------------------------------------------------- # +# Copyright 2025-present, Federation Manager, by Software Networks, i2CAT # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# -------------------------------------------------------------------------- # +``` + +### Type Hints +```python +# Function signatures with type hints +def create_federation(body: FederationRequestData) -> FederationResponseData: + """Creates one direction federation with partner operator platform.""" + pass + +# Model classes use swagger_types for type information +class CountryCode(Model): + def __init__(self): + self.swagger_types = {} + self.attribute_map = {} +``` + +### Docstrings +```python +def create_federation(body): # noqa: E501 + """Creates one direction federation with partner operator platform. + + # noqa: E501 + + :param body: + :type body: dict | bytes + + :rtype: FederationResponseData + """ + pass +``` + +### Configuration Management +```python +# Use ConfigParser for configuration +from configparser import ConfigParser + +CONFIG = ConfigParser() +config_file = os.environ.get("FM_CONFIG_FILE", "conf/config.cfg") +CONFIG.read(config_file) +HOST = CONFIG.get("server", "host") +PORT = int(CONFIG.get("server", "port")) +``` + +### Error Handling +```python +# Use custom APIError for API errors +from adapters.error import APIError + +try: + adapter = resolve_adapter(headers) + return adapter.federation_management.create_federation(body, bearer_token, partner_api_root) +except APIError as error: + abort(error.status_code, error.detail_error) + +# Use abort() for HTTP errors +from flask import abort + +try: + body = FederationRequestData.from_dict(connexion.request.get_json()) +except Exception as error: + abort(422, f"Federation Validation Error. Message: {error}") +``` + +### Testing Conventions +```python +# Test classes inherit from BaseTestCase +from test import BaseTestCase + +class TestFederationManagementController(BaseTestCase): + """FederationManagementController integration test stubs""" + + BaseTestCase.federation_context_id_partner = "" + BaseTestCase.token = "" + + def test_01_create_federation(self): + """Test case for create_federation in both Partner OP and Originating OP modes""" + # Test both roles + pass +``` + +**Dual role testing:** +- All integration tests must validate both Partner OP and Originating OP modes +- Use `make_request_partner_op()` for external requests (no `X-Internal` header) +- Use `make_request_originating_op()` for internal requests (with `X-Internal` header) + +### Naming Conventions +- **Functions/Methods**: `snake_case` (e.g., `create_federation`, `get_federation_details`) +- **Classes**: `PascalCase` (e.g., `FederationRequestData`, `BaseTestCase`) +- **Constants**: `UPPER_CASE` (e.g., `CONFIG`, `HOST`, `PORT`) +- **Variables**: `snake_case` (e.g., `bearer_token`, `partner_api_root`) +- **Test methods**: Prefix with `test_` and optionally number for execution order (e.g., `test_01_create_federation`) + +## Key Files and Locations + +- **Application entry**: `src/main.py` +- **API endpoints**: `src/api/` +- **Business logic**: `src/adapters/fm_adapter/` and `src/adapters/tf_adapter/` +- **Client SDKs**: `src/clients/` +- **Data models**: `src/models/` +- **Tests**: `src/test/` +- **Configuration**: `src/conf/config.cfg` +- **OpenAPI spec**: `src/swagger/swagger.yaml` + +## Development Workflow + +1. **Before making changes**: Review the dual-role architecture to understand request routing +2. **Configuration**: Always use `ConfigParser` to read from `conf/config.cfg` +3. **Adding endpoints**: Update `src/swagger/swagger.yaml` first, then implement in `src/api/` +4. **Adding business logic**: Implement in both adapters if applicable (fm_adapter and tf_adapter) +5. **Testing**: Write integration tests that validate both Partner OP and Originating OP modes +6. **Documentation**: Update docstrings and inline comments; avoid creating unnecessary markdown files + +## Common Patterns + +### Request Header Extraction +```python +bearer_token = util.get_token_from_request(connexion) +headers = dict(connexion.request.headers) +partner_api_root = headers.get("X-Partner-Api-Root") +``` + +### Adapter Resolution +```python +from adapters.injector import resolve_adapter + +adapter = resolve_adapter(headers) # Returns tf_adapter or fm_adapter based on X-Internal header +return adapter.federation_management.create_federation(body, bearer_token, partner_api_root) +``` + +### Model Deserialization +```python +body = FederationRequestData.from_dict(connexion.request.get_json()) +``` + +## Notes for AI Agents + +- **Never skip the Apache 2.0 license header** when creating new files +- **Always test both dual roles** when modifying API or adapter code +- **Configuration changes** should be documented and may require updates to `config.cfg.sample` +- **Docker builds** use `gunicorn` as the WSGI server (see `Dockerfile`) +- **Authentication** via OAuth 2.0 with Keycloak integration +- **Database**: MongoDB with MongoEngine ORM +- **API Framework**: Connexion (Flask-based) with OpenAPI/Swagger specifications diff --git a/Dockerfile b/Dockerfile index 79047af..18478cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,19 +24,19 @@ FROM python:3.12 WORKDIR /usr/app RUN apt-get update && apt-get install -y \ - bash \ - build-essential \ - git \ - wget \ - iptables \ - libcurl4-openssl-dev \ - libssl-dev \ - && rm -rf /var/lib/apt/lists/* + bash \ + build-essential \ + git \ + wget \ + iptables \ + libcurl4-openssl-dev \ + libssl-dev \ + && rm -rf /var/lib/apt/lists/* # Copy application code COPY . . -ARG PIP_TF_SDK_INDEX_URL +ARG PIP_INDEX_URL # Install Python dependencies -RUN python -m pip install --no-cache-dir -r requirements.txt --extra-index-url ${PIP_TF_SDK_INDEX_URL} --trusted-host gitlab.i2cat.net +RUN python -m pip install --no-cache-dir -r requirements.txt --trusted-host gitlab.i2cat.net --extra-index-url ${PIP_INDEX_URL} WORKDIR /usr/app/src/ EXPOSE 8989 # Set Gunicorn as the entrypoint diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..5defc51 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- # +# Copyright 2025-present, Federation Manager, by Software Networks, i2CAT # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# -------------------------------------------------------------------------- # + +######################################################### +# # +# Dev Dockerfile for creating a container image # +# for the federation-manager with local TF-SDK # +# # +######################################################### + +FROM python:3.12 +WORKDIR /usr/app +RUN apt-get update && apt-get install -y \ + bash \ + build-essential \ + git \ + wget \ + iptables \ + libcurl4-openssl-dev \ + libssl-dev \ + && rm -rf /var/lib/apt/lists/* + +# Copy local TF-SDK first +COPY ../tf-sdk /tmp/tf-sdk + +# Copy application code +COPY . . + +ARG PIP_INDEX_URL +ARG PIP_EXTRA_INDEX_URL + +# Install local TF-SDK instead of the published version +RUN pip install --no-cache-dir /tmp/tf-sdk + +# Install remaining Python dependencies (TF-SDK will be skipped since already installed) +RUN python -m pip install --no-cache-dir -r requirements.txt --trusted-host gitlab.i2cat.net --extra-index-url ${PIP_EXTRA_INDEX_URL} + +# Clean up +RUN rm -rf /tmp/tf-sdk + +WORKDIR /usr/app/src/ +EXPOSE 8989 +# Set Gunicorn as the entrypoint +ENTRYPOINT ["gunicorn", "wsgi:app", "--bind", "0.0.0.0:8989", "--workers", "4", "--log-level", "debug", "--timeout", "1000"] diff --git a/src/adapters/fm_adapter/application_onboarding_management.py b/src/adapters/fm_adapter/application_onboarding_management.py index 770787a..cd1cb07 100644 --- a/src/adapters/fm_adapter/application_onboarding_management.py +++ b/src/adapters/fm_adapter/application_onboarding_management.py @@ -14,6 +14,7 @@ # limitations under the License. # # -------------------------------------------------------------------------- # import json +import logging from mongoengine.errors import ValidationError from models.mongo_document import OriginatingOperatorPlatformOriginatingOP @@ -23,6 +24,9 @@ from adapters.error import APIError from clients import fed_manager as fm_client +logger = logging.getLogger(__name__) + + def verify_required_header(partner_api_root): if not partner_api_root: raise APIError(400, "X-Partner-API-Root header is missing") @@ -51,6 +55,11 @@ def delete_app(federation_context_id, app_id, bearer_token, partner_api_root): raise APIError(404, "Federation not found") originating_op_instance = originating_op_objects[0] + logger.info( + "Onboarding partner application using federation_id=%s partner_api_root=%s", + originating_op_instance.partner_federation_id, + partner_api_root, + ) # Find application onboarding at partner response_get = fm_client.get_profile(originating_op_instance.partner_federation_id, app_id, bearer_token, partner_api_root) diff --git a/src/clients/fed_manager.py b/src/clients/fed_manager.py index a2ebc54..d3e1f51 100644 --- a/src/clients/fed_manager.py +++ b/src/clients/fed_manager.py @@ -266,7 +266,10 @@ def create_profile(federation_id, body, token, api_root): # Handle different HTTP status codes if response.status_code == 404: - return {"error": "Federation not found", "status_code": 404} + return { + "error": f"Federation not found: {response.text}", + "status_code": 404 + } elif response.status_code >= 400: return {"error": f"HTTP {response.status_code}: {response.text}", "status_code": response.status_code} diff --git a/src/conf/config-fm-local.cfg b/src/conf/config-fm-local.cfg index e676d61..c56da9d 100644 --- a/src/conf/config-fm-local.cfg +++ b/src/conf/config-fm-local.cfg @@ -38,7 +38,7 @@ lcmServiceEndPoint_ipv6Addresses = [edge_cloud_platform] host = lite2edge-local port = 8080 -client_name = i2edge +client_name = lite2edge flavour_id = 67f3a0b0e3184a85952e174d [artefact_manager] diff --git a/src/static/openapi.yaml b/src/static/openapi.yaml index faabcef..8fb301c 100644 --- a/src/static/openapi.yaml +++ b/src/static/openapi.yaml @@ -1,21 +1,4 @@ components: - parameters: - XInternalHeader: - description: Internal request flag - example: 'true' - in: header - name: X-Internal - required: false - schema: - type: string - XPartnerApiRootHeader: - description: Base URL of the partner API - example: http://192.168.123.212:31989 - in: header - name: X-Partner-API-Root - required: false - schema: - type: string responses: '400': content: @@ -86,39 +69,53 @@ components: internally. App providers are required to provide details about all these components, their associated descriptors and their DNS names. items: - properties: - artefactId: - $ref: '#/components/schemas/ArtefactId' - componentName: - description: Must be a valid RFC 1035 label name. Component name must - be unique with an application - pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ - type: string - serviceNameEW: - description: Must be a valid RFC 1035 label name. This defines the DNS - name via which the component can be accessed via peer components. Access - via serviceNameEW is open on all ports. Platform shall not expose - serviceNameEW externally outside edge. - pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ - type: string - serviceNameNB: - description: Must be a valid RFC 1035 label name. This defines the DNS - name via which the component can be accessed over NBI. Access via serviceNameNB - is restricted on specific ports. Platform shall expose component access - externally via this DNS name - pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ - type: string - required: - - artefactId - type: object + $ref: '#/components/schemas/AppComponentSpecs_inner' minItems: 1 type: array + AppComponentSpecs_inner: + example: + artefactId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + componentName: componentName + serviceNameEW: serviceNameEW + serviceNameNB: serviceNameNB + properties: + artefactId: + $ref: '#/components/schemas/ArtefactId' + componentName: + description: Must be a valid RFC 1035 label name. Component name must be + unique with an application + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ + type: string + serviceNameEW: + description: Must be a valid RFC 1035 label name. This defines the DNS name + via which the component can be accessed via peer components. Access via + serviceNameEW is open on all ports. Platform shall not expose serviceNameEW + externally outside edge. + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ + type: string + serviceNameNB: + description: Must be a valid RFC 1035 label name. This defines the DNS name + via which the component can be accessed over NBI. Access via serviceNameNB + is restricted on specific ports. Platform shall expose component access + externally via this DNS name + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ + type: string + required: + - artefactId + type: object AppIdentifier: description: Identifier used to refer to an application. - pattern: ^[A-Za-z][A-Za-z0-9_]{7,63}$ + pattern: ^(?:[A-Za-z][A-Za-z0-9_]{7,63}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$ type: string AppMetaData: description: Application metadata details + example: + accessToken: accessToken + appDescription: appDescription + appName: appName + category: IOT + mobilitySupport: false + version: version properties: accessToken: description: An application Access key, to be used with UNI interface to @@ -161,9 +158,9 @@ components: description: Version info of the application type: string required: + - accessToken - appName - version - - accessToken type: object AppProviderId: description: UserId of the app provider. Identifier is relevant only in context @@ -173,6 +170,12 @@ components: AppQoSProfile: description: Parameters corresponding to the performance constraints, tenancy details etc. + example: + appProvisioning: true + bandwidthRequired: 1 + latencyConstraints: NONE + multiUserClients: APP_TYPE_SINGLE_USER + noOfUsersPerAppInst: 6 properties: appProvisioning: default: true @@ -234,11 +237,10 @@ components: type: string tokenUrl: $ref: '#/components/schemas/Uri' - description: Oauth2 token endpoint. required: - - tokenUrl - clientId - clientSecret + - tokenUrl type: object CommandLineParams: description: List of commands and arguments that shall be invoked when the component @@ -282,8 +284,8 @@ components: pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ type: string required: - - envVarName - envValueType + - envVarName type: object ComponentSpec: description: Details about compute, networking and storage requirements for @@ -302,7 +304,6 @@ components: componentName: description: Must be a valid RFC 1035 label name. Component name must be unique with an application - pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ type: string computeResourceProfile: $ref: '#/components/schemas/ComputeResourceInfo' @@ -344,12 +345,34 @@ components: type: string required: - componentName + - computeResourceProfile - images - numOfInstances - restartPolicy - - computeResourceProfile type: object ComputeResourceInfo: + example: + cpuArchType: ISA_X86_64 + cpuExclusivity: true + diskStorage: 6 + fpga: 2 + gpu: + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + hugepages: + - number: 7 + pageSize: 2MB + - number: 7 + pageSize: 2MB + memory: 0 + numCPU: '{"whole":{"value":2},"decimal":{"value":0.5},"millivcpu":{"value":"500m"}}' + vpu: 5 properties: cpuArchType: description: CPU Instruction Set Architecture (ISA) E.g., Intel, Arm etc. @@ -386,8 +409,8 @@ components: type: integer required: - cpuArchType - - numCPU - memory + - numCPU type: object CountryCode: description: ISO 3166-1 Alpha-2 code for the country of Partner operator @@ -425,18 +448,28 @@ components: - FAULTMGMT type: string FederationAPIResources: + example: + apiOperations: + - href: href + httpMethods: + - POST + - POST + - href: href + httpMethods: + - POST + - POST + name: FEDERATION properties: apiOperations: description: List of HTTP Methods supported for the given API category items: $ref: '#/components/schemas/HttpResources' - minItems: 1 type: array name: $ref: '#/components/schemas/FederationAPINames' required: - - name - apiOperations + - name type: object FederationContextId: description: This identifier shall be provided by the partner OP on successful @@ -448,6 +481,12 @@ components: readOnly: true type: string FederationHealthInfo: + example: + federationStatus: + alarmState: RAISED + numOfAcceptedZones: numOfAcceptedZones + numOfActiveAlarms: numOfActiveAlarms + numOfApplications: numOfApplications properties: federationStatus: $ref: '#/components/schemas/State' @@ -486,11 +525,43 @@ components: partnerStatusLink: $ref: '#/components/schemas/Uri' required: - - origOPFederationId - initialDate + - origOPFederationId - partnerStatusLink type: object FederationResponseData: + example: + edgeDiscoveryServiceEndPoint: + fqdn: fqdn + ipv4Addresses: + - 198.51.100.1 + - 198.51.100.1 + ipv6Addresses: + - 2001:db8:85a3::8a2e:370:7334 + - 2001:db8:85a3::8a2e:370:7334 + port: 0 + federationContextId: federationContextId + lcmServiceEndPoint: null + offeredAvailabilityZones: + - geographyDetails: geographyDetails + geolocation: geolocation + zoneId: zoneId + - geographyDetails: geographyDetails + geolocation: geolocation + zoneId: zoneId + partnerOPCountryCode: partnerOPCountryCode + partnerOPFederationId: partnerOPFederationId + partnerOPFixedNetworkCodes: + - partnerOPFixedNetworkCodes + - partnerOPFixedNetworkCodes + partnerOPMobileNetworkCodes: + mcc: mcc + mncs: + - mncs + - mncs + platformCaps: + - homeRouting + - homeRouting properties: edgeDiscoveryServiceEndPoint: $ref: '#/components/schemas/ServiceEndpoint' @@ -534,11 +605,31 @@ components: type: string type: array required: - - partnerOPFederationId - federationContextId + - partnerOPFederationId - platformCaps type: object FederationSupportedAPIs: + example: + artefactAPI: null + availabilityZoneAPI: null + edgeApplicationAPI: null + eventManagementAPI: null + faultManagementAPI: null + federationBaseAPI: + apiOperations: + - href: href + httpMethods: + - POST + - POST + - href: href + httpMethods: + - POST + - POST + name: FEDERATION + fileAPI: null + resourceMonitoringAPI: null + serviceAPIFederation: null properties: artefactAPI: $ref: '#/components/schemas/FederationAPIResources' @@ -559,10 +650,10 @@ components: serviceAPIFederation: $ref: '#/components/schemas/FederationAPIResources' required: - - federationBaseAPI + - artefactAPI - availabilityZoneAPI - edgeApplicationAPI - - artefactAPI + - federationBaseAPI - fileAPI type: object FileId: @@ -578,6 +669,30 @@ components: minItems: 1 type: array Flavour: + example: + cpuArchType: ISA_X86 + cpuExclusivity: true + flavourId: flavourId + fpga: 4 + gpu: + - null + - null + hugepages: + - null + - null + memorySize: 3 + numCPU: 9 + storageSize: 2 + supportedOSTypes: + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + vpu: 7 properties: cpuArchType: $ref: '#/components/schemas/CPUArchType' @@ -621,12 +736,12 @@ components: description: Number of Intel VPUs available type: integer required: - - flavourId - cpuArchType - - supportedOSTypes - - numCPU + - flavourId - memorySize + - numCPU - storageSize + - supportedOSTypes type: object FlavourId: description: An identifier to refer to a specific combination of compute resources @@ -638,6 +753,11 @@ components: pattern: ^([-+]?)([\d]{1,2})((((\.)([\d]{1,4}))?(,)))(([-+]?)([\d]{1,3})((\.)([\d]{1,4}))?)$ type: string GpuInfo: + example: + gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 properties: gpuMemory: description: GPU memory in Mbytes @@ -652,14 +772,15 @@ components: enum: - GPU_PROVIDER_NVIDIA - GPU_PROVIDER_AMD + example: Nvidia type: string numGPU: description: Number of GPUs type: integer required: - - gpuVendorType - - gpuModeName - gpuMemory + - gpuModeName + - gpuVendorType - numGPU type: object HttpMethods: @@ -671,6 +792,11 @@ components: - GET type: string HttpResources: + example: + href: href + httpMethods: + - POST + - POST properties: href: $ref: '#/components/schemas/Uri' @@ -678,13 +804,15 @@ components: description: List of HTTP Methods supported for the given API category items: $ref: '#/components/schemas/HttpMethods' - minItems: 1 type: array required: - href - httpMethods type: object HugePage: + example: + number: 7 + pageSize: 2MB properties: number: description: Total number of huge pages @@ -697,8 +825,8 @@ components: - 1GB type: string required: - - pageSize - number + - pageSize type: object InstanceIdentifier: description: Unique identifier generated by the partner OP to identify an instance @@ -761,9 +889,9 @@ components: - VISIBILITY_INTERNAL type: string required: - - interfaceId - - commProtocol - commPort + - commProtocol + - interfaceId - visibilityType type: object InvalidParam: @@ -792,6 +920,11 @@ components: pattern: ^\d{2,3}$ type: string MobileNetworkIds: + example: + mcc: mcc + mncs: + - mncs + - mncs properties: mcc: $ref: '#/components/schemas/Mcc' @@ -802,6 +935,11 @@ components: type: array type: object OSType: + example: + architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS properties: architecture: enum: @@ -837,10 +975,15 @@ components: required: - architecture - distribution - - version - license + - version type: object ObjectRepoLocation: + example: + password: password + repoURL: repoURL + token: token + userName: userName properties: password: description: Password to access the repository @@ -891,9 +1034,9 @@ components: - 100Gi type: string required: - - volumeSize - volumeMountPath - volumeName + - volumeSize type: object Port: minimum: 0 @@ -920,6 +1063,15 @@ components: - ipv4Addresses - required: - ipv6Addresses + example: + fqdn: fqdn + ipv4Addresses: + - 198.51.100.1 + - 198.51.100.1 + ipv6Addresses: + - 2001:db8:85a3::8a2e:370:7334 + - 2001:db8:85a3::8a2e:370:7334 + port: 0 properties: fqdn: $ref: '#/components/schemas/Fqdn' @@ -939,6 +1091,8 @@ components: - port type: object State: + example: + alarmState: RAISED properties: alarmState: description: Defines the alarm state during its life cycle (raised | updated @@ -964,13 +1118,7 @@ components: Vcpu: description: Number of vcpus in whole, decimal up to millivcpu, or millivcpu format. - example: - decimal: - value: 0.5 - millivcpu: - value: 500m - whole: - value: 2 + example: '{"whole":{"value":2},"decimal":{"value":0.5},"millivcpu":{"value":"500m"}}' pattern: ^\d+((\.\d{1,3})|(m))?$ type: string Version: @@ -985,6 +1133,10 @@ components: - OVA type: string ZoneDetails: + example: + geographyDetails: geographyDetails + geolocation: geolocation + zoneId: zoneId properties: geographyDetails: description: Details about cities or state covered by the edge. Details @@ -996,15 +1148,125 @@ components: zoneId: $ref: '#/components/schemas/ZoneIdentifier' required: - - zoneId - - geolocation - geographyDetails + - geolocation + - zoneId type: object ZoneIdentifier: description: Human readable name of the zone. pattern: ^[A-Za-z0-9][A-Za-z0-9-]*$ type: string ZoneRegisteredData: + example: + computeResourceQuotaLimits: + - null + - null + flavoursSupported: + - cpuArchType: ISA_X86 + cpuExclusivity: true + flavourId: flavourId + fpga: 4 + gpu: + - null + - null + hugepages: + - null + - null + memorySize: 3 + numCPU: 9 + storageSize: 2 + supportedOSTypes: + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + vpu: 7 + - cpuArchType: ISA_X86 + cpuExclusivity: true + flavourId: flavourId + fpga: 4 + gpu: + - null + - null + hugepages: + - null + - null + memorySize: 3 + numCPU: 9 + storageSize: 2 + supportedOSTypes: + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + vpu: 7 + networkResources: + dedicatedNIC: 1 + egressBandWidth: 1 + supportDPDK: true + supportSriov: true + reservedComputeResources: + - cpuArchType: ISA_X86_64 + cpuExclusivity: true + diskStorage: 6 + fpga: 2 + gpu: + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + hugepages: + - number: 7 + pageSize: 2MB + - number: 7 + pageSize: 2MB + memory: 0 + numCPU: '{"whole":{"value":2},"decimal":{"value":0.5},"millivcpu":{"value":"500m"}}' + vpu: 5 + - cpuArchType: ISA_X86_64 + cpuExclusivity: true + diskStorage: 6 + fpga: 2 + gpu: + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + hugepages: + - number: 7 + pageSize: 2MB + - number: 7 + pageSize: 2MB + memory: 0 + numCPU: '{"whole":{"value":2},"decimal":{"value":0.5},"millivcpu":{"value":"500m"}}' + vpu: 5 + zoneId: zoneId + zoneServiceLevelObjsInfo: + jitterRanges: + maxJitter: 1 + minJitter: 1 + latencyRanges: + maxLatency: 6 + minLatency: 1 + throughputRanges: + maxThroughput: 5 + minThroughput: 1 properties: computeResourceQuotaLimits: description: Max quota on resources partner OP allows over reserved resources. @@ -1018,30 +1280,7 @@ components: minItems: 1 type: array networkResources: - properties: - dedicatedNIC: - description: Number of network interface cards which can be dedicatedly - assigned to application pods on isolated networks. This includes virtual - as well physical NICs - format: int32 - type: integer - egressBandWidth: - description: Max dl throughput that this edge can offer. It is defined - in Mbps. - format: int32 - type: integer - supportDPDK: - description: If this zone supports DPDK based networking. - type: boolean - supportSriov: - description: If this zone support SRIOV networks or not - type: boolean - required: - - egressBandWidth - - dedicatedNIC - - supportSriov - - supportDPDK - type: object + $ref: '#/components/schemas/ZoneRegisteredData_networkResources' reservedComputeResources: description: Resources exclusively reserved for the originator OP. items: @@ -1051,62 +1290,118 @@ components: zoneId: $ref: '#/components/schemas/ZoneIdentifier' zoneServiceLevelObjsInfo: - description: "It is a measure of the actual amount of data that is being\ - \ sent over a network per unit of time and indicates m\xE1ximum supported\ - \ value for a zone" - properties: - jitterRanges: - properties: - maxJitter: - description: The maximum limit of network jitter between UC and - Edge App in milli seconds. - format: int32 - type: integer - minJitter: - format: int32 - minimum: 1 - type: integer - type: object - latencyRanges: - properties: - maxLatency: - description: The maximum limit of latency between UC and Edge App - in milli seconds. - format: int32 - type: integer - minLatency: - description: "The time for data/packet to reach from UC to edge\ - \ application. It represent m\xEDnimum latency in milli seconds\ - \ that may exist between UCs and edge apps in this zone but it\ - \ can be higher in actual." - format: int32 - minimum: 1 - type: integer - type: object - throughputRanges: - properties: - maxThroughput: - description: The maximum limit of network throughput between UC - and Edge App in Mega bits per seconds (Mbps). - format: int32 - type: integer - minThroughput: - description: The minimum limit of network throughput between UC - and Edge App in Mega bits per seconds (Mbps). - format: int32 - minimum: 1 - type: integer - type: object - required: - - latencyRanges - - jitterRanges - - throughputRanges - type: object + $ref: '#/components/schemas/ZoneRegisteredData_zoneServiceLevelObjsInfo' required: - - zoneId - - reservedComputeResources - computeResourceQuotaLimits - flavoursSupported + - reservedComputeResources + - zoneId + type: object + ZoneRegisteredData_networkResources: + example: + dedicatedNIC: 1 + egressBandWidth: 1 + supportDPDK: true + supportSriov: true + properties: + dedicatedNIC: + description: Number of network interface cards which can be dedicatedly + assigned to application pods on isolated networks. This includes virtual + as well physical NICs + format: int32 + type: integer + egressBandWidth: + description: Max dl throughput that this edge can offer. It is defined in + Mbps. + format: int32 + type: integer + supportDPDK: + description: If this zone supports DPDK based networking. + type: boolean + supportSriov: + description: If this zone support SRIOV networks or not + type: boolean + required: + - dedicatedNIC + - egressBandWidth + - supportDPDK + - supportSriov + type: object + ZoneRegisteredData_zoneServiceLevelObjsInfo: + description: "It is a measure of the actual amount of data that is being sent\ + \ over a network per unit of time and indicates m\xE1ximum supported value\ + \ for a zone" + example: + jitterRanges: + maxJitter: 1 + minJitter: 1 + latencyRanges: + maxLatency: 6 + minLatency: 1 + throughputRanges: + maxThroughput: 5 + minThroughput: 1 + properties: + jitterRanges: + $ref: '#/components/schemas/ZoneRegisteredData_zoneServiceLevelObjsInfo_jitterRanges' + latencyRanges: + $ref: '#/components/schemas/ZoneRegisteredData_zoneServiceLevelObjsInfo_latencyRanges' + throughputRanges: + $ref: '#/components/schemas/ZoneRegisteredData_zoneServiceLevelObjsInfo_throughputRanges' + required: + - jitterRanges + - latencyRanges + - throughputRanges + type: object + ZoneRegisteredData_zoneServiceLevelObjsInfo_jitterRanges: + example: + maxJitter: 1 + minJitter: 1 + properties: + maxJitter: + description: The maximum limit of network jitter between UC and Edge App + in milli seconds. + format: int32 + type: integer + minJitter: + format: int32 + minimum: 1 + type: integer + type: object + ZoneRegisteredData_zoneServiceLevelObjsInfo_latencyRanges: + example: + maxLatency: 6 + minLatency: 1 + properties: + maxLatency: + description: The maximum limit of latency between UC and Edge App in milli + seconds. + format: int32 + type: integer + minLatency: + description: "The time for data/packet to reach from UC to edge application.\ + \ It represent m\xEDnimum latency in milli seconds that may exist between\ + \ UCs and edge apps in this zone but it can be higher in actual." + format: int32 + minimum: 1 + type: integer + type: object + ZoneRegisteredData_zoneServiceLevelObjsInfo_throughputRanges: + example: + maxThroughput: 5 + minThroughput: 1 + properties: + maxThroughput: + description: The maximum limit of network throughput between UC and Edge + App in Mega bits per seconds (Mbps). + format: int32 + type: integer + minThroughput: + description: The minimum limit of network throughput between UC and Edge + App in Mega bits per seconds (Mbps). + format: int32 + minimum: 1 + type: integer type: object ZoneRegistrationRequestData: properties: @@ -1122,6 +1417,226 @@ components: - availZoneNotifLink type: object ZoneRegistrationResponseData: + example: + acceptedZoneResourceInfo: + - computeResourceQuotaLimits: + - null + - null + flavoursSupported: + - cpuArchType: ISA_X86 + cpuExclusivity: true + flavourId: flavourId + fpga: 4 + gpu: + - null + - null + hugepages: + - null + - null + memorySize: 3 + numCPU: 9 + storageSize: 2 + supportedOSTypes: + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + vpu: 7 + - cpuArchType: ISA_X86 + cpuExclusivity: true + flavourId: flavourId + fpga: 4 + gpu: + - null + - null + hugepages: + - null + - null + memorySize: 3 + numCPU: 9 + storageSize: 2 + supportedOSTypes: + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + vpu: 7 + networkResources: + dedicatedNIC: 1 + egressBandWidth: 1 + supportDPDK: true + supportSriov: true + reservedComputeResources: + - cpuArchType: ISA_X86_64 + cpuExclusivity: true + diskStorage: 6 + fpga: 2 + gpu: + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + hugepages: + - number: 7 + pageSize: 2MB + - number: 7 + pageSize: 2MB + memory: 0 + numCPU: '{"whole":{"value":2},"decimal":{"value":0.5},"millivcpu":{"value":"500m"}}' + vpu: 5 + - cpuArchType: ISA_X86_64 + cpuExclusivity: true + diskStorage: 6 + fpga: 2 + gpu: + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + hugepages: + - number: 7 + pageSize: 2MB + - number: 7 + pageSize: 2MB + memory: 0 + numCPU: '{"whole":{"value":2},"decimal":{"value":0.5},"millivcpu":{"value":"500m"}}' + vpu: 5 + zoneId: zoneId + zoneServiceLevelObjsInfo: + jitterRanges: + maxJitter: 1 + minJitter: 1 + latencyRanges: + maxLatency: 6 + minLatency: 1 + throughputRanges: + maxThroughput: 5 + minThroughput: 1 + - computeResourceQuotaLimits: + - null + - null + flavoursSupported: + - cpuArchType: ISA_X86 + cpuExclusivity: true + flavourId: flavourId + fpga: 4 + gpu: + - null + - null + hugepages: + - null + - null + memorySize: 3 + numCPU: 9 + storageSize: 2 + supportedOSTypes: + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + vpu: 7 + - cpuArchType: ISA_X86 + cpuExclusivity: true + flavourId: flavourId + fpga: 4 + gpu: + - null + - null + hugepages: + - null + - null + memorySize: 3 + numCPU: 9 + storageSize: 2 + supportedOSTypes: + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + - architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + vpu: 7 + networkResources: + dedicatedNIC: 1 + egressBandWidth: 1 + supportDPDK: true + supportSriov: true + reservedComputeResources: + - cpuArchType: ISA_X86_64 + cpuExclusivity: true + diskStorage: 6 + fpga: 2 + gpu: + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + hugepages: + - number: 7 + pageSize: 2MB + - number: 7 + pageSize: 2MB + memory: 0 + numCPU: '{"whole":{"value":2},"decimal":{"value":0.5},"millivcpu":{"value":"500m"}}' + vpu: 5 + - cpuArchType: ISA_X86_64 + cpuExclusivity: true + diskStorage: 6 + fpga: 2 + gpu: + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + - gpuMemory: 1 + gpuModeName: gpuModeName + gpuVendorType: Nvidia + numGPU: 5 + hugepages: + - number: 7 + pageSize: 2MB + - number: 7 + pageSize: 2MB + memory: 0 + numCPU: '{"whole":{"value":2},"decimal":{"value":0.5},"millivcpu":{"value":"500m"}}' + vpu: 5 + zoneId: zoneId + zoneServiceLevelObjsInfo: + jitterRanges: + maxJitter: 1 + minJitter: 1 + latencyRanges: + maxLatency: 6 + minLatency: 1 + throughputRanges: + maxThroughput: 5 + minThroughput: 1 properties: acceptedZoneResourceInfo: items: @@ -1131,99 +1646,899 @@ components: required: - acceptedZoneResourceInfo type: object - serviceAPINameVal: - description: Name of the Service API - enum: - - QualityOnDemand - - DeviceLocation - - DeviceStatus - - SimSwap - - NumberVerification - - DeviceIdentifier - type: string - serviceAPINames: - description: List of Service API capability names an OP supports and offers - to other OPs "quality_on_demand", "device_location" etc. - items: - enum: - - QualityOnDemand - - DeviceLocation - - DeviceStatus - - SimSwap - - NumberVerification - - DeviceIdentifier - type: string - minItems: 1 - type: array - serviceRoutingInfo: - description: List of public IP addresses MNO manages for UEs to connect with - public data networks + appId_zoneForbid_body: items: - pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))?$ - type: string + description: List of zones where application instantiation shall be forbidden + or allowed. + type: object minItems: 1 + properties: + forbid: + description: Value 'true' will forbid application instantiation on this + zone. No new instance of the application can be created on this zone. + type: boolean + zoneId: + $ref: '#/components/schemas/ZoneIdentifier' + required: + - forbid + - zoneId type: array - serviceType: - description: An identifier to refer to partner OP capabilities for application - providers. - enum: - - api_federation - type: string - securitySchemes: - oAuth2ClientCredentials: - flows: - clientCredentials: - scopes: - fed-mgmt: Access to the federation APIs - tokenUrl: http://localhost:8080/realms/federation/protocol/openid-connect/token - type: oauth2 -externalDocs: - description: GSMA, E/WBI APIs v1.3.1 - url: http://www.xxxx.com -info: - description: "# Introduction\n---\nRESTful APIs that allow an OP to share the edge\ - \ cloud resources and capabilities securely to other partner OPs over E/WBI.\n\ - \n---\n# API Scope\n\n---\nAPIs defined in this version of the implementation\ - \ can be categorized into the following areas:\n* __FederationManagement__ - Create\ - \ and manage directed federation relationship with a partner OP\n* __AvailabilityZoneInfoSynchronization__\ - \ - Management of resources of partner OP zones and status updates\n* __ArtefactManagement__\ - \ - Upload, remove, retrieve and update application descriptors, charts and packages\ - \ over E/WBI towards a partner OP\n* __ApplicationOnboardingManagement__ - Register,\ - \ retrieve, update and remove applications over E/WBI towards a partner OP\n*\ - \ __ApplicationDeploymentManagement__ - Create, update, retrieve and terminate\ - \ application instances over E/WBI towards a partner OP\n\n---\n# Definitions\n\ - ---\nThis section provides definitions of terminologies commonly referred to throughout\ - \ the API descriptions.\n\n* __Accepted Zones__ - List of partner OP zones, which\ - \ the originating OP has confirmed to use for its edge applications.\n* __Application\ - \ Provider__ - An application developer, onboarding his/her edge application on\ - \ a partner operator platform (MEC).\n* __Artefact__ - Descriptor, charts or any\ - \ other package associated with the application.\n* __Availability Zone__ - Zones\ - \ that partner OP can offer to share with originating OP.\n* __Device__ - Refers\ - \ to user equipment like mobile phone, tablet, IOT kit, AR/VR device etc. In context\ - \ of MEC users use these devices to access edge applications.\n* __Directed Federation__\ - \ - A Federation between two OP instances A and B, in which edge compute resources\ - \ are shared by B to A, but not from A to B.\n* __Edge Application__ - Application\ - \ designed to run on MEC edge cloud.\n* __E/WBI__ - East west bound interface.\n\ - * __Federation__ - Relationship among member OPs who agrees to offer services\ - \ and capabilities to the application providers and end users of member OPs.\n\ - * __FederationContextId__ - Partner OP defined string identifier representing\ - \ a certain federation relationship.\n* __Federation Identifier__ - Identify an\ - \ operator platform in federation context.\n* __Flavour__ - A group of compute,\ - \ network and storage resources that can be requested or granted as a single unit.\n\ - * __FlavourIdentifier__ - An OP defined string identifier representing a set of\ - \ compute, storage and networking resources.\n* __Home OP__ - Used in federation\ - \ context to identify the OP with which the application developers or user clients\ - \ are registered.\n* __Instance__ - Application process running on an edge.\n\ - * __LCM Service__ - Partner OP service responsible for life cycle management of\ - \ edge applications. LCM service is defined as HTTP based API endpoint identified\ - \ by a well-defined FQDN or IP.\n* __Offered Zones__ - Zones that partner OP offer\ - \ to share to the Originating OP based on the prior agreement and local configuration.\n\ - * __Onboarding__ - Submitting an application to MEC platform.\n* __OP__ - Operator\ - \ platform.\n* __OperatorIdentifier__ - String identifier representing the owner\ - \ of MEC platform. Owner could be an enterprise, a TSP or some other organization.\n\ - * __Originating OP__ - The OP when initiating the federation creation request\ - \ towards the partner OP is defined as the Originating OP.\n* __Partner OP__ -\ - \ Operator Platform which offers its Edge Cloud capabilities to the other Operator\ + app_appId_body: + minProperties: 1 + properties: + appComponentSpecs: + $ref: '#/components/schemas/AppComponentSpecs' + appUpdQoSProfile: + $ref: '#/components/schemas/federationContextIdapplicationonboardingappappId_appUpdQoSProfile' + type: object + application_lcm_body: + properties: + appId: + $ref: '#/components/schemas/AppIdentifier' + appInstCallbackLink: + $ref: '#/components/schemas/Uri' + appProviderId: + $ref: '#/components/schemas/AppProviderId' + appVersion: + description: Version info of the application + type: string + zoneInfo: + $ref: '#/components/schemas/federationContextIdapplicationlcm_zoneInfo' + required: + - appId + - appInstCallbackLink + - appProviderId + - appVersion + - zoneInfo + type: object + application_onboarding_body: + properties: + appComponentSpecs: + $ref: '#/components/schemas/AppComponentSpecs' + appDeploymentZones: + description: Details about partner OP zones where the application should + be made available; This field when specified will instruct the OP to + restrict application instantiation only on the listed zones. + items: + $ref: '#/components/schemas/ZoneIdentifier' + minItems: 1 + type: array + appId: + $ref: '#/components/schemas/AppIdentifier' + appMetaData: + $ref: '#/components/schemas/AppMetaData' + appProviderId: + $ref: '#/components/schemas/AppProviderId' + appQoSProfile: + $ref: '#/components/schemas/AppQoSProfile' + appStatusCallbackLink: + $ref: '#/components/schemas/Uri' + required: + - appComponentSpecs + - appId + - appMetaData + - appProviderId + - appQoSProfile + - appStatusCallbackLink + type: object + federationContextId_artefact_body: + properties: + appProviderId: + $ref: '#/components/schemas/AppProviderId' + artefactDescription: + description: Brief description of the artefact by the application provider + maxLength: 256 + type: string + artefactDescriptorType: + description: Type of descriptor present in the artefact. App provider can + either define either a Helm chart or a Terraform script or container spec. + enum: + - HELM + - TERRAFORM + - ANSIBLE + - SHELL + - COMPONENTSPEC + type: string + artefactFile: + description: Helm archive/Terraform archive/container spec file or Binary + image associated with an application component. + format: binary + type: string + artefactFileFormat: + description: Artefacts like Helm charts or Terraform scripts may need compressed + format. + enum: + - WINZIP + - TAR + - TEXT + - TARGZ + type: string + artefactFileName: + description: Name of the file. + maxLength: 32 + minLength: 8 + type: string + artefactId: + $ref: '#/components/schemas/ArtefactId' + artefactName: + description: Name of the artefact. + type: string + artefactRepoLocation: + $ref: '#/components/schemas/ObjectRepoLocation' + artefactVersionInfo: + description: Artefact version information + type: string + artefactVirtType: + enum: + - VM_TYPE + - CONTAINER_TYPE + type: string + componentSpec: + description: Details about compute, networking and storage requirements + for each component of the application. App provider should define all + information needed to instantiate the component. If artefact is being + defined at component level this section should have information just about + the component. In case the artefact is being defined at application level + the section should provide details about all the components. + items: + $ref: '#/components/schemas/ComponentSpec' + minItems: 1 + type: array + repoType: + description: "Artefact or file repository location. PUBLICREPO is used of\ + \ public URLs like GitHub, Helm repo, docker registry etc., PRIVATEREPO\ + \ is used for private repo managed by the application developer, UPLOAD\ + \ is for the case when artefact/file is uploaded from MEC web portal.\ + \ OP should pull the image from \u2018repoUrl' immediately after receiving\ + \ the request and then send back the response. In case the repoURL corresponds\ + \ to a docker registry, use docker v2 http api to do the pull." + enum: + - PRIVATEREPO + - PUBLICREPO + - UPLOAD + type: string + required: + - appProviderId + - artefactDescriptorType + - artefactId + - artefactName + - artefactVersionInfo + - artefactVirtType + - componentSpec + type: object + federationContextId_files_body: + properties: + appProviderId: + $ref: '#/components/schemas/AppProviderId' + checksum: + description: MD5 checksum for VM and file-based images, sha256 digest for + containers + type: string + file: + description: Binary image associated with an application component. + format: binary + type: string + fileDescription: + description: Brief description about the image file. + maxLength: 128 + minLength: 8 + type: string + fileId: + $ref: '#/components/schemas/FileId' + fileName: + description: Name of the image file. App provides specifies this name + when image is uploaded on originating OP over NBI. + pattern: ^[A-Za-z][A-Za-z0-9_]{7,31}$ + type: string + fileRepoLocation: + $ref: '#/components/schemas/ObjectRepoLocation' + fileType: + $ref: '#/components/schemas/VirtImageType' + fileVersionInfo: + description: File version information + type: string + imgInsSetArch: + $ref: '#/components/schemas/CPUArchType' + imgOSType: + $ref: '#/components/schemas/OSType' + repoType: + description: "Artefact or file repository location. PUBLICREPO is used of\ + \ public URLs like GitHub, Helm repo, docker registry etc., PRIVATEREPO\ + \ is used for private repo managed by the application developer, UPLOAD\ + \ is for the case when artefact/file is uploaded from MEC web portal.\ + \ OP should pull the image from \u2018repoUrl' immediately after receiving\ + \ the request and then send back the response. In case the repoURL corresponds\ + \ to a docker registry, use docker v2 http api to do the pull." + enum: + - PRIVATEREPO + - PUBLICREPO + - UPLOAD + type: string + required: + - appProviderId + - fileId + - fileName + - fileType + - fileVersionInfo + - imgInsSetArch + - imgOSType + type: object + federationContextId_partner_body: + properties: + addFixedNetworkIds: + $ref: '#/components/schemas/FixedNetworkIds' + addMobileNetworkIds: + $ref: '#/components/schemas/MobileNetworkIds' + modificationDate: + description: Date and time of the federation modification by the originating + partner OP + format: date-time + type: string + objectType: + enum: + - MOBILE_NETWORK_CODES + - FIXED_NETWORK_CODES + type: string + operationType: + enum: + - ADD_CODES + - REMOVE_CODES + - UPDATE_CODES + type: string + removeFixedNetworkIds: + $ref: '#/components/schemas/FixedNetworkIds' + removeMobileNetworkIds: + $ref: '#/components/schemas/MobileNetworkIds' + required: + - modificationDate + - objectType + - operationType + type: object + federationContextIdapplicationlcm_zoneInfo: + properties: + flavourId: + $ref: '#/components/schemas/FlavourId' + resPool: + description: Resource pool to be used for application instantiation on this + zone. Valid only if IE 'resourceConsumption' is set to 'RESERVED_RES_SHALL' + or 'RESERVED_RES_PREFER' + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,30}[A-Za-z0-9]$ + type: string + resourceConsumption: + default: RESERVED_RES_AVOID + description: Specifies if the application can be instantiated using pre-reserved + resource or not. App provider can pre-reserve a pool of compute resource + on each zone. 'RESERVED_RES_SHALL' instruct OP to use only the pre-reserved + resources. 'RESERVED_RES_PREFER' instruct to first try using pre-reserved + resource, if none available go for non-reserved resources. 'RESERVED_RES_AVOID' + instruct OP not to use pre-reserved resource if possible, it is a choice + depending upon circumstances 'RESERVED_RES_FORBID' instruct OP not to + use pre-reserved resources. + enum: + - RESERVED_RES_SHALL + - RESERVED_RES_PREFER + - RESERVED_RES_AVOID + - RESERVED_RES_FORBID + type: string + zoneId: + type: string + required: + - flavourId + type: object + federationContextIdapplicationlcmappappIdappProviderappProviderId_appInstanceInfo: + example: + appInstIdentifier: appInstIdentifier + appInstanceState: PENDING + properties: + appInstIdentifier: + $ref: '#/components/schemas/InstanceIdentifier' + appInstanceState: + $ref: '#/components/schemas/InstanceState' + required: + - appInstIdentifier + - appInstanceState + type: object + federationContextIdapplicationonboardingappappId_appComponentSpecs: + properties: + artefactId: + $ref: '#/components/schemas/ArtefactId' + componentName: + description: Must be a valid RFC 1035 label name. Component name must be + unique with an application + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ + type: string + serviceNameEW: + description: Must be a valid RFC 1035 label name. This defines the DNS + name via which the component can be accessed via peer components. Access + via serviceNameEW is open on all ports. Platform shall not expose serviceNameEW + externally outside edge. + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ + type: string + serviceNameNB: + description: Must be a valid RFC 1035 label name. This defines the DNS + name via which the component can be accessed over NBI. Access via serviceNameNB + is restricted on specific ports. Platform shall expose component access + externally via this DNS name + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,62}[A-Za-z0-9]$ + type: string + required: + - artefactId + type: object + federationContextIdapplicationonboardingappappId_appUpdQoSProfile: + description: Parameters corresponding to the performance constraints, tenancy + details etc. + properties: + appProvisioning: + default: true + description: Define if application can be instantiated or not + type: boolean + bandwidthRequired: + description: Data transfer bandwidth requirement (minimum limit) for the + application. It should in Mbits/sec + format: int32 + minimum: 1 + type: integer + latencyConstraints: + description: Latency requirements for the application.Allowed values (non-standardized) + are none, low and ultra-low. Ultra-Low may corresponds to range 15 - 30 + msec, Low correspond to range 30 - 50 msec. None means 51 and above + enum: + - NONE + - LOW + - ULTRALOW + type: string + mobilitySupport: + default: false + description: "Indicates if an application is sensitive to user mobility\ + \ and can be relocated. Default is \u201CFALSE\u201D" + type: boolean + multiUserClients: + description: Single user type application are designed to serve just one + client. Multi user type application is designed to serve multiple clients + enum: + - APP_TYPE_SINGLE_USER + - APP_TYPE_MULTI_USER + type: string + noOfUsersPerAppInst: + default: 1 + description: Maximum no of clients that can connect to an instance of this + application. This parameter is relevant only for application of type multi + user + type: integer + type: object + inline_response_200: + example: + federationSupportedAPIs: + artefactAPI: null + availabilityZoneAPI: null + edgeApplicationAPI: null + eventManagementAPI: null + faultManagementAPI: null + federationBaseAPI: + apiOperations: + - href: href + httpMethods: + - POST + - POST + - href: href + httpMethods: + - POST + - POST + name: FEDERATION + fileAPI: null + resourceMonitoringAPI: null + serviceAPIFederation: null + properties: + federationSupportedAPIs: + $ref: '#/components/schemas/FederationSupportedAPIs' + required: + - federationSupportedAPIs + type: object + inline_response_200_1: + example: + allowedFixedNetworkIds: + - allowedFixedNetworkIds + - allowedFixedNetworkIds + allowedMobileNetworkIds: + mcc: mcc + mncs: + - mncs + - mncs + edgeDiscoveryServiceEndPoint: + fqdn: fqdn + ipv4Addresses: + - 198.51.100.1 + - 198.51.100.1 + ipv6Addresses: + - 2001:db8:85a3::8a2e:370:7334 + - 2001:db8:85a3::8a2e:370:7334 + port: 0 + lcmServiceEndPoint: null + offeredAvailabilityZones: + - geographyDetails: geographyDetails + geolocation: geolocation + zoneId: zoneId + - geographyDetails: geographyDetails + geolocation: geolocation + zoneId: zoneId + properties: + allowedFixedNetworkIds: + $ref: '#/components/schemas/FixedNetworkIds' + allowedMobileNetworkIds: + $ref: '#/components/schemas/MobileNetworkIds' + edgeDiscoveryServiceEndPoint: + $ref: '#/components/schemas/ServiceEndpoint' + lcmServiceEndPoint: + $ref: '#/components/schemas/ServiceEndpoint' + offeredAvailabilityZones: + items: + $ref: '#/components/schemas/ZoneDetails' + minItems: 1 + type: array + required: + - edgeDiscoveryServiceEndPoint + - lcmServiceEndPoint + type: object + inline_response_200_2: + example: + FederationContextId: FederationContextId + properties: + FederationContextId: + $ref: '#/components/schemas/FederationContextId' + required: + - FederationContextId + type: object + inline_response_200_3: + example: + federationHealthStatus: + federationStatus: + alarmState: RAISED + numOfAcceptedZones: numOfAcceptedZones + numOfActiveAlarms: numOfActiveAlarms + numOfApplications: numOfApplications + properties: + federationHealthStatus: + $ref: '#/components/schemas/FederationHealthInfo' + required: + - federationHealthStatus + type: object + inline_response_200_4: + example: + apiRoutingInfo: + - apiRoutingInfo + - apiRoutingInfo + serviceCaps: + - QualityOnDemand + - QualityOnDemand + serviceType: api_federation + properties: + apiRoutingInfo: + $ref: '#/components/schemas/serviceRoutingInfo' + serviceCaps: + $ref: '#/components/schemas/serviceAPINames' + serviceType: + $ref: '#/components/schemas/serviceType' + required: + - ServiceType + - apiRoutingInfo + - serviceCaps + type: object + inline_response_200_5: + example: + appProviderId: appProviderId + artefactDescription: artefactDescription + artefactDescriptorType: HELM + artefactFileFormat: WINZIP + artefactFileName: artefactFileName + artefactId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + artefactName: artefactName + artefactRepoLocation: + password: password + repoURL: repoURL + token: token + userName: userName + artefactVersionInfo: artefactVersionInfo + artefactVirtType: VM_TYPE + repoType: PRIVATEREPO + properties: + appProviderId: + $ref: '#/components/schemas/AppProviderId' + artefactDescription: + description: Brief description of the artefact by the application provider + maxLength: 256 + type: string + artefactDescriptorType: + description: Type of descriptor present in the artefact. App provider can + either define either a Helm chart or a Terraform script or container spec. + enum: + - HELM + - TERRAFORM + - ANSIBLE + - SHELL + - COMPONENTSPEC + type: string + artefactFileFormat: + description: Artefacts like Helm charts or Terraform scripts may need compressed + format. + enum: + - WINZIP + - TAR + - TEXT + - TARGZ + type: string + artefactFileName: + description: Name of the file. + maxLength: 32 + minLength: 8 + type: string + artefactId: + $ref: '#/components/schemas/ArtefactId' + artefactName: + description: Name of the artefact. + type: string + artefactRepoLocation: + $ref: '#/components/schemas/ObjectRepoLocation' + artefactVersionInfo: + description: Artefact version information + type: string + artefactVirtType: + enum: + - VM_TYPE + - CONTAINER_TYPE + type: string + repoType: + description: "Artefact or file repository location. PUBLICREPO is used of\ + \ public URLs like GitHub, Helm repo, docker registry etc., PRIVATEREPO\ + \ is used for private repo managed by the application developer, UPLOAD\ + \ is for the case when artefact/file is uploaded from MEC web portal.\ + \ OP should pull the image from \u2018repoUrl' immediately after receiving\ + \ the request and then send back the response. In case the repoURL corresponds\ + \ to a docker registry, use docker v2 http api to do the pull." + enum: + - PRIVATEREPO + - PUBLICREPO + - UPLOAD + type: string + required: + - appProviderId + - artefactDescriptorType + - artefactId + - artefactName + - artefactVersionInfo + - artefactVirtType + type: object + inline_response_200_6: + example: + appProviderId: appProviderId + checksum: checksum + fileDescription: fileDescription + fileId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + fileName: fileName + fileRepoLocation: + password: password + repoURL: repoURL + token: token + userName: userName + fileType: QCOW2 + fileVersionInfo: fileVersionInfo + imgInsSetArch: ISA_X86 + imgOSType: + architecture: x86_64 + distribution: RHEL + license: OS_LICENSE_TYPE_FREE + version: OS_VERSION_UBUNTU_2204_LTS + repoType: PRIVATEREPO + properties: + appProviderId: + $ref: '#/components/schemas/AppProviderId' + checksum: + description: MD5 checksum for VM and file-based images, sha256 digest for + containers + type: string + fileDescription: + description: Brief description about the image file. + maxLength: 128 + minLength: 8 + type: string + fileId: + $ref: '#/components/schemas/FileId' + fileName: + description: Name of the image file. App provides specifies this name + when image is uploaded on originating OP over NBI. + pattern: ^[A-Za-z][A-Za-z0-9_]{7,31}$ + type: string + fileRepoLocation: + $ref: '#/components/schemas/ObjectRepoLocation' + fileType: + $ref: '#/components/schemas/VirtImageType' + fileVersionInfo: + description: File version information + type: string + imgInsSetArch: + $ref: '#/components/schemas/CPUArchType' + imgOSType: + $ref: '#/components/schemas/OSType' + repoType: + description: "Artefact or file repository location. PUBLICREPO is used of\ + \ public URLs like GitHub, Helm repo, docker registry etc., PRIVATEREPO\ + \ is used for private repo managed by the application developer, UPLOAD\ + \ is for the case when artefact/file is uploaded from MEC web portal.\ + \ OP should pull the image from \u2018repoUrl' immediately after receiving\ + \ the request and then send back the response. In case the repoURL corresponds\ + \ to a docker registry, use docker v2 http api to do the pull." + enum: + - PRIVATEREPO + - PUBLICREPO + - UPLOAD + type: string + required: + - appProviderId + - fileId + - fileName + - fileType + - fileVersionInfo + - imgInsSetArch + - imgOSType + type: object + inline_response_200_7: + example: + appComponentSpecs: + - artefactId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + componentName: componentName + serviceNameEW: serviceNameEW + serviceNameNB: serviceNameNB + - artefactId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + componentName: componentName + serviceNameEW: serviceNameEW + serviceNameNB: serviceNameNB + appDeploymentZones: + - countryCode: countryCode + zoneInfo: zoneInfo + - countryCode: countryCode + zoneInfo: zoneInfo + appId: appId + appMetaData: + accessToken: accessToken + appDescription: appDescription + appName: appName + category: IOT + mobilitySupport: false + version: version + appProviderId: appProviderId + appQoSProfile: + appProvisioning: true + bandwidthRequired: 1 + latencyConstraints: NONE + multiUserClients: APP_TYPE_SINGLE_USER + noOfUsersPerAppInst: 6 + properties: + appComponentSpecs: + $ref: '#/components/schemas/AppComponentSpecs' + appDeploymentZones: + description: Details about partner OP zones where the application should + be made available; This field when specified will instruct the OP to + restrict application instantiation only on the listed zones. + items: + $ref: '#/components/schemas/inline_response_200_7_appDeploymentZones' + minItems: 1 + type: array + appId: + $ref: '#/components/schemas/AppIdentifier' + appMetaData: + $ref: '#/components/schemas/AppMetaData' + appProviderId: + $ref: '#/components/schemas/AppProviderId' + appQoSProfile: + $ref: '#/components/schemas/AppQoSProfile' + required: + - appComponentSpecs + - appDeploymentZones + - appId + - appMetaData + - appProviderId + - appQoSProfile + type: object + inline_response_200_7_appDeploymentZones: + example: + countryCode: countryCode + zoneInfo: zoneInfo + properties: + countryCode: + $ref: '#/components/schemas/CountryCode' + zoneInfo: + $ref: '#/components/schemas/ZoneIdentifier' + required: + - countryCode + - zoneInfo + type: object + inline_response_200_8: + example: + accesspointInfo: + - accessPoints: + fqdn: fqdn + ipv4Addresses: + - 198.51.100.1 + - 198.51.100.1 + ipv6Addresses: + - 2001:db8:85a3::8a2e:370:7334 + - 2001:db8:85a3::8a2e:370:7334 + port: 0 + interfaceId: interfaceId + - accessPoints: + fqdn: fqdn + ipv4Addresses: + - 198.51.100.1 + - 198.51.100.1 + ipv6Addresses: + - 2001:db8:85a3::8a2e:370:7334 + - 2001:db8:85a3::8a2e:370:7334 + port: 0 + interfaceId: interfaceId + appInstanceState: PENDING + minProperties: 1 + properties: + accesspointInfo: + description: Information about the IP and Port exposed by the OP. Application + clients shall use these access points to reach this application instance + items: + $ref: '#/components/schemas/inline_response_200_8_accesspointInfo' + minItems: 1 + type: array + appInstanceState: + $ref: '#/components/schemas/InstanceState' + type: object + inline_response_200_8_accesspointInfo: + example: + accessPoints: + fqdn: fqdn + ipv4Addresses: + - 198.51.100.1 + - 198.51.100.1 + ipv6Addresses: + - 2001:db8:85a3::8a2e:370:7334 + - 2001:db8:85a3::8a2e:370:7334 + port: 0 + interfaceId: interfaceId + properties: + accessPoints: + $ref: '#/components/schemas/ServiceEndpoint' + interfaceId: + description: This is the interface identifier that app provider defines + when application is onboarded. + pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,30}[A-Za-z0-9]$ + type: string + required: + - accessPoints + - interfaceId + type: object + inline_response_200_9: + example: + appInstanceInfo: + - appInstIdentifier: appInstIdentifier + appInstanceState: PENDING + - appInstIdentifier: appInstIdentifier + appInstanceState: PENDING + zoneId: zoneId + properties: + appInstanceInfo: + items: + $ref: '#/components/schemas/federationContextIdapplicationlcmappappIdappProviderappProviderId_appInstanceInfo' + minItems: 1 + type: array + zoneId: + $ref: '#/components/schemas/ZoneIdentifier' + required: + - appInstanceInfo + - zoneId + type: object + inline_response_202: + example: + appInstIdentifier: appInstIdentifier + zoneId: zoneId + properties: + appInstIdentifier: + $ref: '#/components/schemas/InstanceIdentifier' + zoneId: + $ref: '#/components/schemas/ZoneIdentifier' + required: + - appInstIdentifier + - zoneId + type: object + serviceAPINameVal: + description: Name of the Service API + enum: + - QualityOnDemand + - DeviceLocation + - DeviceStatus + - SimSwap + - NumberVerification + - DeviceIdentifier + type: string + serviceAPINames: + description: List of Service API capability names an OP supports and offers + to other OPs "quality_on_demand", "device_location" etc. + items: + enum: + - QualityOnDemand + - DeviceLocation + - DeviceStatus + - SimSwap + - NumberVerification + - DeviceIdentifier + type: string + minItems: 1 + type: array + serviceRoutingInfo: + description: List of public IP addresses MNO manages for UEs to connect with + public data networks + items: + pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))?$ + type: string + minItems: 1 + type: array + serviceType: + description: An identifier to refer to partner OP capabilities for application + providers. + enum: + - api_federation + type: string + securitySchemes: + oAuth2ClientCredentials: + flows: + clientCredentials: + scopes: + fed-mgmt: Access to the federation APIs + tokenUrl: http://127.0.0.1:8081/realms/federation/protocol/openid-connect/token + type: oauth2 + x-scopeValidateFunc: api.authorization.validate_scope_oAuth2ClientCredentials + x-tokenInfoFunc: api.authorization.check_oAuth2ClientCredentials +externalDocs: + description: GSMA, E/WBI APIs v1.3.1 + url: http://www.xxxx.com +info: + description: "# Introduction\n---\nRESTful APIs that allow an OP to share the edge\ + \ cloud resources and capabilities securely to other partner OPs over E/WBI.\n\ + \n---\n# API Scope\n\n---\nAPIs defined in this version of the implementation\ + \ can be categorized into the following areas:\n* __FederationManagement__ - Create\ + \ and manage directed federation relationship with a partner OP\n* __AvailabilityZoneInfoSynchronization__\ + \ - Management of resources of partner OP zones and status updates\n* __ArtefactManagement__\ + \ - Upload, remove, retrieve and update application descriptors, charts and packages\ + \ over E/WBI towards a partner OP\n* __ApplicationOnboardingManagement__ - Register,\ + \ retrieve, update and remove applications over E/WBI towards a partner OP\n*\ + \ __ApplicationDeploymentManagement__ - Create, update, retrieve and terminate\ + \ application instances over E/WBI towards a partner OP\n\n---\n# Definitions\n\ + ---\nThis section provides definitions of terminologies commonly referred to throughout\ + \ the API descriptions.\n\n* __Accepted Zones__ - List of partner OP zones, which\ + \ the originating OP has confirmed to use for its edge applications.\n* __Application\ + \ Provider__ - An application developer, onboarding his/her edge application on\ + \ a partner operator platform (MEC).\n* __Artefact__ - Descriptor, charts or any\ + \ other package associated with the application.\n* __Availability Zone__ - Zones\ + \ that partner OP can offer to share with originating OP.\n* __Device__ - Refers\ + \ to user equipment like mobile phone, tablet, IOT kit, AR/VR device etc. In context\ + \ of MEC users use these devices to access edge applications.\n* __Directed Federation__\ + \ - A Federation between two OP instances A and B, in which edge compute resources\ + \ are shared by B to A, but not from A to B.\n* __Edge Application__ - Application\ + \ designed to run on MEC edge cloud.\n* __E/WBI__ - East west bound interface.\n\ + * __Federation__ - Relationship among member OPs who agrees to offer services\ + \ and capabilities to the application providers and end users of member OPs.\n\ + * __FederationContextId__ - Partner OP defined string identifier representing\ + \ a certain federation relationship.\n* __Federation Identifier__ - Identify an\ + \ operator platform in federation context.\n* __Flavour__ - A group of compute,\ + \ network and storage resources that can be requested or granted as a single unit.\n\ + * __FlavourIdentifier__ - An OP defined string identifier representing a set of\ + \ compute, storage and networking resources.\n* __Home OP__ - Used in federation\ + \ context to identify the OP with which the application developers or user clients\ + \ are registered.\n* __Instance__ - Application process running on an edge.\n\ + * __LCM Service__ - Partner OP service responsible for life cycle management of\ + \ edge applications. LCM service is defined as HTTP based API endpoint identified\ + \ by a well-defined FQDN or IP.\n* __Offered Zones__ - Zones that partner OP offer\ + \ to share to the Originating OP based on the prior agreement and local configuration.\n\ + * __Onboarding__ - Submitting an application to MEC platform.\n* __OP__ - Operator\ + \ platform.\n* __OperatorIdentifier__ - String identifier representing the owner\ + \ of MEC platform. Owner could be an enterprise, a TSP or some other organization.\n\ + * __Originating OP__ - The OP when initiating the federation creation request\ + \ towards the partner OP is defined as the Originating OP.\n* __Partner OP__ -\ + \ Operator Platform which offers its Edge Cloud capabilities to the other Operator\ \ Platforms via E/WBI.\n* __Resource__ - Compute, networking and storage resources.\n\ * __ZoneIdentifier__ - An OP defined string identifier representing a certain\ \ geographical or logical area where edge resources and services are provided.\n\ @@ -1274,62 +2589,90 @@ openapi: 3.0.3 paths: /fed-context-id: get: - operationId: GetFederationContextId + operationId: get_federation_context_id responses: '200': content: application/json: schema: - properties: - FederationContextId: - $ref: '#/components/schemas/FederationContextId' - required: - - FederationContextId - type: object + $ref: '#/components/schemas/inline_response_200_2' description: Federation context identifier retrieval request accepted headers: Accept-Encoding: description: Accept-Encoding, described in IETF RFC 7694 + explode: false schema: type: string + style: simple Content-Encoding: description: Content-Encoding, described in IETF RFC 7231 + explode: false schema: type: string + style: simple Location: description: 'Contains the URI of the existing resource, according to the structure: {apiRoot}/operatorplatform/federation/v1/partner/{federationContextId}' + explode: false required: true schema: type: string + style: simple '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Retrieves the existing federationContextId with partner operator platform. tags: - FederationManagement - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' + x-openapi-router-controller: api.federation_management /partner: - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' post: callbacks: onPartnerStatusEvent: @@ -1405,16 +2748,16 @@ paths: zoneId: $ref: '#/components/schemas/ZoneIdentifier' required: - - zoneId - status + - zoneId type: object minItems: 1 type: array required: - federationContextId + - modificationDate - objectType - operationType - - modificationDate type: object description: 'OP uses this callback api to notify partner OP about change in federation status, federation metadata or offered zone @@ -1455,24 +2798,56 @@ paths: '204': description: Expected response to a successful call back processing '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' - operationId: CreateFederation + description: Generic Error + operationId: create_federation requestBody: content: application/json: @@ -1489,43 +2864,79 @@ paths: headers: Accept-Encoding: description: Accept-Encoding, described in IETF RFC 7694 + explode: false schema: type: string + style: simple Content-Encoding: description: Content-Encoding, described in IETF RFC 7231 + explode: false schema: type: string + style: simple Location: description: 'Contains the URI of the newly created resource, according to the structure: {apiRoot}/operatorplatform/federation/v1/partner/{federationContextId}' + explode: false required: true schema: type: string + style: simple '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Creates one direction federation with partner operator platform. tags: - FederationManagement + x-openapi-router-controller: api.federation_management /{federationContextId}/application/lcm: - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' post: callbacks: onInstanceStatusEvent: @@ -1558,8 +2969,8 @@ paths: pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,30}[A-Za-z0-9]$ type: string required: - - interfaceId - accessPoints + - interfaceId type: object minItems: 1 type: array @@ -1585,94 +2996,80 @@ paths: zoneId: $ref: '#/components/schemas/ZoneIdentifier' required: - - federationContextId - appId - appInstanceId - - zoneId - appInstanceInfo + - federationContextId + - zoneId type: object description: Notification payload. responses: '204': description: Application instance state notification acknowledged '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' - operationId: InstallApp + description: Generic Error + operationId: install_app parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' + style: simple requestBody: content: application/json: schema: - properties: - appId: - $ref: '#/components/schemas/AppIdentifier' - appInstCallbackLink: - $ref: '#/components/schemas/Uri' - appProviderId: - $ref: '#/components/schemas/AppProviderId' - appVersion: - description: Version info of the application - type: string - zoneInfo: - properties: - flavourId: - $ref: '#/components/schemas/FlavourId' - resPool: - description: Resource pool to be used for application instantiation - on this zone. Valid only if IE 'resourceConsumption' is set - to 'RESERVED_RES_SHALL' or 'RESERVED_RES_PREFER' - pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,30}[A-Za-z0-9]$ - type: string - resourceConsumption: - default: RESERVED_RES_AVOID - description: Specifies if the application can be instantiated - using pre-reserved resource or not. App provider can pre-reserve - a pool of compute resource on each zone. 'RESERVED_RES_SHALL' - instruct OP to use only the pre-reserved resources. 'RESERVED_RES_PREFER' - instruct to first try using pre-reserved resource, if none - available go for non-reserved resources. 'RESERVED_RES_AVOID' - instruct OP not to use pre-reserved resource if possible, - it is a choice depending upon circumstances 'RESERVED_RES_FORBID' - instruct OP not to use pre-reserved resources. - enum: - - RESERVED_RES_SHALL - - RESERVED_RES_PREFER - - RESERVED_RES_AVOID - - RESERVED_RES_FORBID - type: string - zoneId: - type: string - required: - - flavourId - type: object - required: - - appId - - appProviderId - - appVersion - - zoneInfo - - appInstCallbackLink - type: object + $ref: '#/components/schemas/application_lcm_body' description: Details about application and zones where application instance should be created. It also definea call back URI which the partner OP shall use update home OP about a change in instance status. @@ -1681,238 +3078,334 @@ paths: content: application/json: schema: - properties: - appInstIdentifier: - $ref: '#/components/schemas/InstanceIdentifier' - zoneId: - $ref: '#/components/schemas/ZoneIdentifier' - required: - - zoneId - - appInstIdentifier - type: object + $ref: '#/components/schemas/inline_response_202' description: Application instance creation request accepted. '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Instantiates an application on a partner OP zone. tags: - ApplicationDeploymentManagement + x-openapi-router-controller: api.application_deployment_management /{federationContextId}/application/lcm/app/{appId}/appProvider/{appProviderId}: get: - operationId: GetAllAppInstances + operationId: get_all_app_instances parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: appId required: true schema: $ref: '#/components/schemas/AppIdentifier' - - in: path + style: simple + - explode: false + in: path name: appProviderId required: true schema: $ref: '#/components/schemas/AppProviderId' + style: simple responses: '200': content: application/json: schema: items: - properties: - appInstanceInfo: - items: - properties: - appInstIdentifier: - $ref: '#/components/schemas/InstanceIdentifier' - appInstanceState: - $ref: '#/components/schemas/InstanceState' - required: - - appInstIdentifier - - appInstanceState - type: object - minItems: 1 - type: array - zoneId: - $ref: '#/components/schemas/ZoneIdentifier' - required: - - zoneId - - appInstanceInfo - type: object + $ref: '#/components/schemas/inline_response_200_9' minItems: 1 type: array + x-content-type: application/json description: Application Instance details '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Retrieves all application instance of partner OP tags: - ApplicationDeploymentManagement - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' + x-openapi-router-controller: api.application_deployment_management /{federationContextId}/application/lcm/app/{appId}/instance/{appInstanceId}/zone/{zoneId}: delete: - operationId: RemoveApp + operationId: remove_app parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: appId required: true schema: $ref: '#/components/schemas/AppIdentifier' - - in: path + style: simple + - explode: false + in: path name: appInstanceId required: true schema: $ref: '#/components/schemas/InstanceIdentifier' - - in: path + style: simple + - explode: false + in: path name: zoneId required: true schema: $ref: '#/components/schemas/ZoneIdentifier' + style: simple responses: '200': description: Application instance termination request accepted '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Terminate an application instance on a partner OP zone. tags: - ApplicationDeploymentManagement + x-openapi-router-controller: api.application_deployment_management get: - operationId: GetAppInstanceDetails + operationId: get_app_instance_details parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: appId required: true schema: $ref: '#/components/schemas/AppIdentifier' - - in: path + style: simple + - explode: false + in: path name: appInstanceId required: true schema: $ref: '#/components/schemas/InstanceIdentifier' - - in: path + style: simple + - explode: false + in: path name: zoneId required: true schema: $ref: '#/components/schemas/ZoneIdentifier' + style: simple responses: '200': content: application/json: schema: - minProperties: 1 - properties: - accesspointInfo: - description: Information about the IP and Port exposed by the - OP. Application clients shall use these access points to reach - this application instance - items: - properties: - accessPoints: - $ref: '#/components/schemas/ServiceEndpoint' - interfaceId: - description: This is the interface identifier that app provider - defines when application is onboarded. - pattern: ^[A-Za-z0-9][A-Za-z0-9_]{6,30}[A-Za-z0-9]$ - type: string - required: - - interfaceId - - accessPoints - type: object - minItems: 1 - type: array - appInstanceState: - $ref: '#/components/schemas/InstanceState' - type: object + $ref: '#/components/schemas/inline_response_200_8' description: Application instance details '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Retrieves an application instance details from partner OP. tags: - ApplicationDeploymentManagement - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' + x-openapi-router-controller: api.application_deployment_management /{federationContextId}/application/onboarding: - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' post: callbacks: onApplicationOnboardStatusEvent: @@ -1944,14 +3437,14 @@ paths: zoneId: $ref: '#/components/schemas/ZoneIdentifier' required: - - zoneId - onboardStatusInfo + - zoneId type: object minItems: 1 type: array required: - - federationContextId - appId + - federationContextId - statusInfo type: object description: Notification payload. @@ -1959,64 +3452,69 @@ paths: '204': description: Application status updated '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' - operationId: OnboardApplication + description: Generic Error + operationId: onboard_application parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' + style: simple requestBody: content: application/json: schema: - properties: - appComponentSpecs: - $ref: '#/components/schemas/AppComponentSpecs' - appDeploymentZones: - description: Details about partner OP zones where the application - should be made available; This field when specified will instruct - the OP to restrict application instantiation only on the listed - zones. - items: - $ref: '#/components/schemas/ZoneIdentifier' - minItems: 1 - type: array - appId: - $ref: '#/components/schemas/AppIdentifier' - appMetaData: - $ref: '#/components/schemas/AppMetaData' - appProviderId: - $ref: '#/components/schemas/AppProviderId' - appQoSProfile: - $ref: '#/components/schemas/AppQoSProfile' - appStatusCallbackLink: - $ref: '#/components/schemas/Uri' - required: - - appId - - appProviderId - - appMetaData - - appQoSProfile - - appComponentSpecs - - appStatusCallbackLink - type: object + $ref: '#/components/schemas/application_onboarding_body' description: Details about application compute resource requirements, associated artefacts, QoS profile and regions where application shall be made available etc. @@ -2025,222 +3523,236 @@ paths: '202': description: Application onboarded request accepted '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Submits an application details to a partner OP. Based on the details provided, partner OP shall do bookkeeping, resource validation and other pre-deployment operations. tags: - ApplicationOnboardingManagement + x-openapi-router-controller: api.application_onboarding_management /{federationContextId}/application/onboarding/app/{appId}: delete: - operationId: DeleteApp + operationId: delete_app parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: appId required: true schema: $ref: '#/components/schemas/AppIdentifier' + style: simple responses: '200': description: App deletion successful '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Deboards the application from any zones, if any, and deletes the App. tags: - ApplicationOnboardingManagement + x-openapi-router-controller: api.application_onboarding_management get: - operationId: ViewApplication + operationId: view_application parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: appId required: true schema: $ref: '#/components/schemas/AppIdentifier' + style: simple responses: '200': content: application/json: schema: - properties: - appComponentSpecs: - $ref: '#/components/schemas/AppComponentSpecs' - appDeploymentZones: - description: Details about partner OP zones where the application - should be made available; This field when specified will instruct - the OP to restrict application instantiation only on the listed - zones. - items: - properties: - countryCode: - $ref: '#/components/schemas/CountryCode' - zoneInfo: - $ref: '#/components/schemas/ZoneIdentifier' - required: - - countryCode - - zoneInfo - type: object - minItems: 1 - type: array - appId: - $ref: '#/components/schemas/AppIdentifier' - appMetaData: - $ref: '#/components/schemas/AppMetaData' - appProviderId: - $ref: '#/components/schemas/AppProviderId' - appQoSProfile: - $ref: '#/components/schemas/AppQoSProfile' - required: - - appId - - appProviderId - - appDeploymentZones - - appMetaData - - appQoSProfile - - appComponentSpecs - type: object + $ref: '#/components/schemas/inline_response_200_7' description: Application details '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Retrieves application details from partner OP tags: - ApplicationOnboardingManagement - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' + x-openapi-router-controller: api.application_onboarding_management patch: - operationId: UpdateApplication + operationId: update_application parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: appId required: true schema: $ref: '#/components/schemas/AppIdentifier' + style: simple requestBody: content: application/json: schema: - minProperties: 1 - properties: - appComponentSpecs: - $ref: '#/components/schemas/AppComponentSpecs' - appUpdQoSProfile: - anyOf: - - required: - - latencyConstraint - - required: - - bandwidthRequired - - required: - - mobilitySupport - - required: - - multiUserClients - - required: - - appProvisioning - description: Parameters corresponding to the performance constraints, - tenancy details etc. - properties: - appProvisioning: - default: true - description: Define if application can be instantiated or not - type: boolean - bandwidthRequired: - description: Data transfer bandwidth requirement (minimum limit) - for the application. It should in Mbits/sec - format: int32 - minimum: 1 - type: integer - latencyConstraints: - description: Latency requirements for the application.Allowed - values (non-standardized) are none, low and ultra-low. Ultra-Low - may corresponds to range 15 - 30 msec, Low correspond to range - 30 - 50 msec. None means 51 and above - enum: - - NONE - - LOW - - ULTRALOW - type: string - mobilitySupport: - default: false - description: "Indicates if an application is sensitive to user\ - \ mobility and can be relocated. Default is \u201CFALSE\u201D" - type: boolean - multiUserClients: - description: Single user type application are designed to serve - just one client. Multi user type application is designed to - serve multiple clients - enum: - - APP_TYPE_SINGLE_USER - - APP_TYPE_MULTI_USER - type: string - noOfUsersPerAppInst: - default: 1 - description: Maximum no of clients that can connect to an instance - of this application. This parameter is relevant only for application - of type multi user - type: integer - type: object - type: object + $ref: '#/components/schemas/app_appId_body' description: Details about application compute resource requirements, associated artefact and QOS profile that needs to be updated. required: true @@ -2248,124 +3760,76 @@ paths: '202': description: Application update request accepted '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Updates partner OP about changes in application compute resource requirements, QOS Profile, associated descriptor or change in associated components tags: - ApplicationOnboardingManagement + x-openapi-router-controller: api.application_onboarding_management /{federationContextId}/artefact: - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' post: - operationId: UploadArtefact + operationId: upload_artefact parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' + style: simple requestBody: content: application/json: schema: - properties: - appProviderId: - $ref: '#/components/schemas/AppProviderId' - artefactDescription: - description: Brief description of the artefact by the application - provider - maxLength: 256 - type: string - artefactDescriptorType: - description: Type of descriptor present in the artefact. App provider - can either define either a Helm chart or a Terraform script or - container spec. - enum: - - HELM - - TERRAFORM - - ANSIBLE - - SHELL - - COMPONENTSPEC - type: string - artefactFile: - description: Helm archive/Terraform archive/container spec file - or Binary image associated with an application component. - format: binary - type: string - artefactFileFormat: - description: Artefacts like Helm charts or Terraform scripts may - need compressed format. - enum: - - WINZIP - - TAR - - TEXT - - TARGZ - type: string - artefactFileName: - description: Name of the file. - maxLength: 32 - minLength: 8 - type: string - artefactId: - $ref: '#/components/schemas/ArtefactId' - artefactName: - description: Name of the artefact. - pattern: ^[A-Za-z][A-Za-z0-9_]{7,31}$ - type: string - artefactRepoLocation: - $ref: '#/components/schemas/ObjectRepoLocation' - artefactVersionInfo: - description: Artefact version information - type: string - artefactVirtType: - enum: - - VM_TYPE - - CONTAINER_TYPE - type: string - componentSpec: - description: Details about compute, networking and storage requirements - for each component of the application. App provider should define - all information needed to instantiate the component. If artefact - is being defined at component level this section should have information - just about the component. In case the artefact is being defined - at application level the section should provide details about - all the components. - items: - $ref: '#/components/schemas/ComponentSpec' - minItems: 1 - type: array - repoType: - description: "Artefact or file repository location. PUBLICREPO is\ - \ used of public URLs like GitHub, Helm repo, docker registry\ - \ etc., PRIVATEREPO is used for private repo managed by the application\ - \ developer, UPLOAD is for the case when artefact/file is uploaded\ - \ from MEC web portal. OP should pull the image from \u2018repoUrl'\ - \ immediately after receiving the request and then send back the\ - \ response. In case the repoURL corresponds to a docker registry,\ - \ use docker v2 http api to do the pull." - enum: - - PRIVATEREPO - - PUBLICREPO - - UPLOAD - type: string - type: object + $ref: '#/components/schemas/federationContextId_artefact_body' description: An application can consist of multiple components. App providers are allowed to define separate artefacts for each component or they could define a consolidated artefact at application level. @@ -2374,313 +3838,370 @@ paths: '200': description: Artefact uploaded successfully '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Uploads application artefact on partner OP. Artefact is a zip file containing scripts and/or packaging files like Terraform or Helm which are required to create an instance of an application. tags: - ArtefactManagement + x-openapi-router-controller: api.artefact_management /{federationContextId}/artefact/{artefactId}: delete: - operationId: RemoveArtefact + operationId: remove_artefact parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: artefactId required: true schema: $ref: '#/components/schemas/ArtefactId' + style: simple responses: '200': description: Artefact deletion successful '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Removes an artefact from partner OP. tags: - ArtefactManagement + x-openapi-router-controller: api.artefact_management get: - operationId: GetArtefact + operationId: get_artefact parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: artefactId required: true schema: $ref: '#/components/schemas/ArtefactId' + style: simple responses: '200': content: application/json: schema: - properties: - appProviderId: - $ref: '#/components/schemas/AppProviderId' - artefactDescription: - description: Brief description of the artefact by the application - provider - maxLength: 256 - type: string - artefactDescriptorType: - description: Type of descriptor present in the artefact. App - provider can either define either a Helm chart or a Terraform - script or container spec. - enum: - - HELM - - TERRAFORM - - ANSIBLE - - SHELL - - COMPONENTSPEC - type: string - artefactFileFormat: - description: Artefacts like Helm charts or Terraform scripts may - need compressed format. - enum: - - WINZIP - - TAR - - TEXT - - TARGZ - type: string - artefactFileName: - description: Name of the file. - maxLength: 32 - minLength: 8 - type: string - artefactId: - $ref: '#/components/schemas/ArtefactId' - artefactName: - description: Name of the artefact. - pattern: ^[A-Za-z][A-Za-z0-9_]{7,31}$ - type: string - artefactRepoLocation: - $ref: '#/components/schemas/ObjectRepoLocation' - artefactVersionInfo: - description: Artefact version information - type: string - artefactVirtType: - enum: - - VM_TYPE - - CONTAINER_TYPE - type: string - repoType: - description: "Artefact or file repository location. PUBLICREPO\ - \ is used of public URLs like GitHub, Helm repo, docker registry\ - \ etc., PRIVATEREPO is used for private repo managed by the\ - \ application developer, UPLOAD is for the case when artefact/file\ - \ is uploaded from MEC web portal. OP should pull the image\ - \ from \u2018repoUrl' immediately after receiving the request\ - \ and then send back the response. In case the repoURL corresponds\ - \ to a docker registry, use docker v2 http api to do the pull." - enum: - - PRIVATEREPO - - PUBLICREPO - - UPLOAD - type: string - required: - - artefactId - - appProviderId - - artefactName - - artefactVersionInfo - - artefactVirtType - - artefactDescriptorType - type: object + $ref: '#/components/schemas/inline_response_200_5' description: Artefact details '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Retrieves details about an artefact. tags: - ArtefactManagement - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' + x-openapi-router-controller: api.artefact_management /{federationContextId}/partner: delete: - operationId: DeleteFederationDetails + operationId: delete_federation_details parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' + style: simple responses: '200': description: Federation removed successfully '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Remove existing federation with the partner OP tags: - FederationManagement + x-openapi-router-controller: api.federation_management get: - operationId: GetFederationDetails + operationId: get_federation_details parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' + style: simple responses: '200': content: application/json: schema: - properties: - allowedFixedNetworkIds: - $ref: '#/components/schemas/FixedNetworkIds' - allowedMobileNetworkIds: - $ref: '#/components/schemas/MobileNetworkIds' - edgeDiscoveryServiceEndPoint: - $ref: '#/components/schemas/ServiceEndpoint' - lcmServiceEndPoint: - $ref: '#/components/schemas/ServiceEndpoint' - offeredAvailabilityZones: - items: - $ref: '#/components/schemas/ZoneDetails' - minItems: 1 - type: array - required: - - edgeDiscoveryServiceEndPoint - - lcmServiceEndPoint - type: object + $ref: '#/components/schemas/inline_response_200_1' description: Federation meta-info request accepted '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Retrieves details about the federation context with the partner OP. The response shall provide info about the zones offered by the partner, partner OP network codes, information about edge discovery and LCM service etc. tags: - FederationManagement - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' + x-openapi-router-controller: api.federation_management patch: - operationId: UpdateFederation + operationId: update_federation parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' + style: simple requestBody: content: application/json: schema: - properties: - addFixedNetworkIds: - $ref: '#/components/schemas/FixedNetworkIds' - addMobileNetworkIds: - $ref: '#/components/schemas/MobileNetworkIds' - modificationDate: - description: Date and time of the federation modification by the - originating partner OP - format: date-time - type: string - objectType: - enum: - - MOBILE_NETWORK_CODES - - FIXED_NETWORK_CODES - type: string - operationType: - enum: - - ADD_CODES - - REMOVE_CODES - - UPDATE_CODES - type: string - removeFixedNetworkIds: - $ref: '#/components/schemas/FixedNetworkIds' - removeMobileNetworkIds: - $ref: '#/components/schemas/MobileNetworkIds' - required: - - objectType - - operationType - - modificationDate - type: object + $ref: '#/components/schemas/federationContextId_partner_body' description: Details about changes origination OP wished to apply required: true responses: @@ -2688,51 +4209,64 @@ paths: content: application/json: schema: - properties: - allowedFixedNetworkIds: - $ref: '#/components/schemas/FixedNetworkIds' - allowedMobileNetworkIds: - $ref: '#/components/schemas/MobileNetworkIds' - edgeDiscoveryServiceEndPoint: - $ref: '#/components/schemas/ServiceEndpoint' - lcmServiceEndPoint: - $ref: '#/components/schemas/ServiceEndpoint' - offeredAvailabilityZones: - items: - $ref: '#/components/schemas/ZoneDetails' - minItems: 1 - type: array - required: - - edgeDiscoveryServiceEndPoint - - lcmServiceEndPoint - type: object + $ref: '#/components/schemas/inline_response_200_1' description: Federation meta-info request accepted '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: API used by the Originating OP towards the partner OP, to update the parameters associated to the existing federation tags: - FederationManagement + x-openapi-router-controller: api.federation_management /{federationContextId}/zones: - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' post: callbacks: onZoneResourceUpdateEvent: @@ -2790,30 +4324,64 @@ paths: '200': description: Zone info notification acknowledged '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' - operationId: ZoneSubscribe + description: Generic Error + operationId: zone_subscribe parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' + style: simple requestBody: content: application/json: @@ -2828,80 +4396,154 @@ paths: $ref: '#/components/schemas/ZoneRegistrationResponseData' description: Zone registered successfully '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Originating OP informs partner OP that it is willing to access the specified zones and partner OP shall reserve compute and network resources for these zones. tags: - AvailabilityZoneInfoSynchronization + x-openapi-router-controller: api.availability_zone_info_synchronization /{federationContextId}/zones/{zoneId}: delete: - operationId: ZoneUnsubscribe + operationId: zone_unsubscribe parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: zoneId required: true schema: $ref: '#/components/schemas/ZoneIdentifier' + style: simple responses: '200': description: Zone deregistered successfully '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Assert usage of a partner OP zone. Originating OP informs partner OP that it will no longer access the specified zone. tags: - AvailabilityZoneInfoSynchronization + x-openapi-router-controller: api.availability_zone_info_synchronization get: - operationId: GetZoneData + operationId: get_zone_data parameters: - - in: path + - explode: false + in: path name: federationContextId required: true schema: $ref: '#/components/schemas/FederationContextId' - - in: path + style: simple + - explode: false + in: path name: zoneId required: true schema: $ref: '#/components/schemas/ZoneIdentifier' + style: simple responses: '200': content: @@ -2910,30 +4552,60 @@ paths: $ref: '#/components/schemas/ZoneRegisteredData' description: Zone metadata '400': - $ref: '#/components/responses/400' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request '401': - $ref: '#/components/responses/401' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized '404': - $ref: '#/components/responses/404' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found '409': - $ref: '#/components/responses/409' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Conflict '422': - $ref: '#/components/responses/422' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unprocessable Entity '500': - $ref: '#/components/responses/500' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error '503': - $ref: '#/components/responses/503' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable '520': - $ref: '#/components/responses/520' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Web Server Returned an Unknown Error default: - $ref: '#/components/responses/default' + description: Generic Error summary: Retrieves details about the computation and network resources that partner OP has reserved for this zone. tags: - AvailabilityZoneInfoSynchronization - parameters: - - $ref: '#/components/parameters/XInternalHeader' - - $ref: '#/components/parameters/XPartnerApiRootHeader' + x-openapi-router-controller: api.availability_zone_info_synchronization security: - oAuth2ClientCredentials: - fed-mgmt diff --git a/src/swagger/swagger.yaml b/src/swagger/swagger.yaml index 08f31d2..9991d08 100644 --- a/src/swagger/swagger.yaml +++ b/src/swagger/swagger.yaml @@ -2101,7 +2101,7 @@ paths: components: schemas: AppIdentifier: - pattern: "^[A-Za-z][A-Za-z0-9_]{7,63}$" + pattern: "^(?:[A-Za-z][A-Za-z0-9_]{7,63}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$" type: string description: Identifier used to refer to an application. AppProviderId: -- GitLab