From 20f013d962b9a4c083996386d732daae9b87b0c9 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 19 Aug 2025 10:36:19 +0200 Subject: [PATCH 001/101] Helm scripts and helm charts upgraded --- .../charts/mongo/templates/deployment.yaml | 2 +- helm/capif/charts/mongo/values.yaml | 6 +++ helm/scripts/install_capif.sh | 48 +++++++++++++------ helm/scripts/install_monitoring.sh | 12 ++++- helm/scripts/run_remote_capif_tests.sh | 4 +- helm/scripts/variables.sh | 18 ++++++- .../push_base_images_ocf.sh | 3 +- 7 files changed, 72 insertions(+), 21 deletions(-) diff --git a/helm/capif/charts/mongo/templates/deployment.yaml b/helm/capif/charts/mongo/templates/deployment.yaml index 80cedad5..244693cc 100644 --- a/helm/capif/charts/mongo/templates/deployment.yaml +++ b/helm/capif/charts/mongo/templates/deployment.yaml @@ -56,7 +56,7 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} - name: mongo-helper - image: busybox + image: "{{ .Values.busybox.repository }}:{{ .Values.busybox.tag | default .Chart.AppVersion }}" command: - sh - -c diff --git a/helm/capif/charts/mongo/values.yaml b/helm/capif/charts/mongo/values.yaml index 6e15c566..0ba34e90 100644 --- a/helm/capif/charts/mongo/values.yaml +++ b/helm/capif/charts/mongo/values.yaml @@ -10,6 +10,12 @@ image: # Overrides the image tag whose default is the chart appVersion. tag: "6.0.2" +busybox: + repository: busybox + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "1.37.0" + imagePullSecrets: [] nameOverride: "" fullnameOverride: "" diff --git a/helm/scripts/install_capif.sh b/helm/scripts/install_capif.sh index 74b1146a..6a166590 100755 --- a/helm/scripts/install_capif.sh +++ b/helm/scripts/install_capif.sh @@ -31,7 +31,7 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set ocf-access-control-policy.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-access-control-policy.image.env.capifHostname=$CAPIF_HOSTNAME \ --set ocf-access-control-policy.monitoring="true" \ ---set ocf-access-control-policy.env.logLevel="DEBUG" \ +--set ocf-access-control-policy.env.logLevel="$LOG_LEVEL" \ --set ocf-api-invocation-logs.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-logging-api-invocation-api \ --set ocf-api-invocation-logs.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-api-invocation-logs.env.monitoring="true" \ @@ -39,7 +39,7 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set ocf-api-invocation-logs.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ --set ocf-api-invocation-logs.env.vaultPort=$VAULT_PORT \ --set ocf-api-invocation-logs.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set ocf-api-invocation-logs.env.logLevel="DEBUG" \ +--set ocf-api-invocation-logs.env.logLevel="$LOG_LEVEL" \ --set ocf-api-invoker-management.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-api-invoker-management-api \ --set ocf-api-invoker-management.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-api-invoker-management.env.monitoring="true" \ @@ -47,24 +47,24 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set ocf-api-invoker-management.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ --set ocf-api-invoker-management.env.vaultPort=$VAULT_PORT \ --set ocf-api-invoker-management.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set ocf-api-invoker-management.env.logLevel="DEBUG" \ +--set ocf-api-invoker-management.env.logLevel="$LOG_LEVEL" \ --set ocf-api-provider-management.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-api-provider-management-api \ --set ocf-api-provider-management.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-api-provider-management.env.monitoring="true" \ --set ocf-api-provider-management.env.capifHostname=$CAPIF_HOSTNAME \ --set ocf-api-provider-management.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ ---set ocf-api-provider-management.env.logLevel="DEBUG" \ +--set ocf-api-provider-management.env.logLevel="$LOG_LEVEL" \ --set ocf-api-provider-management.env.vaultPort=$VAULT_PORT \ --set ocf-api-provider-management.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ --set ocf-events.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-events-api \ --set ocf-events.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-events.env.monitoring="true" \ --set ocf-events.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-events.env.logLevel="DEBUG" \ +--set ocf-events.env.logLevel="$LOG_LEVEL" \ --set ocf-routing-info.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-routing-info-api \ --set ocf-routing-info.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-routing-info.env.monitoring="true" \ ---set ocf-routing-info.env.logLevel="DEBUG" \ +--set ocf-routing-info.env.logLevel="$LOG_LEVEL" \ --set ocf-security.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-security-api \ --set ocf-security.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-security.env.monitoring="true" \ @@ -72,7 +72,7 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set ocf-security.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ --set ocf-security.env.vaultPort=$VAULT_PORT \ --set ocf-security.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set ocf-security.env.logLevel="DEBUG" \ +--set ocf-security.env.logLevel="$LOG_LEVEL" \ --set ocf-register.image.repository=$CAPIF_DOCKER_REGISTRY/register \ --set ocf-register.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-register.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ @@ -85,22 +85,22 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set ocf-register.ingress.hosts[0].host=$REGISTER_HOSTNAME \ --set ocf-register.ingress.hosts[0].paths[0].path="/" \ --set ocf-register.ingress.hosts[0].paths[0].pathType="Prefix" \ ---set ocf-register.env.logLevel="DEBUG" \ +--set ocf-register.env.logLevel="$LOG_LEVEL" \ --set ocf-register.extraConfigPod.hostAliases[0].hostnames[0]=$CAPIF_HOSTNAME \ --set ocf-register.extraConfigPod.hostAliases[0].ip=$K8S_IP \ --set ocf-auditing-api-logs.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-auditing-api \ --set ocf-auditing-api-logs.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-auditing-api-logs.env.monitoring="true" \ ---set ocf-auditing-api-logs.env.logLevel="DEBUG" \ +--set ocf-auditing-api-logs.env.logLevel="$LOG_LEVEL" \ --set ocf-publish-service-api.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-publish-service-api \ --set ocf-publish-service-api.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-publish-service-api.env.monitoring="true" \ --set ocf-publish-service-api.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-publish-service-api.env.logLevel="DEBUG" \ +--set ocf-publish-service-api.env.logLevel="$LOG_LEVEL" \ --set ocf-discover-service-api.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-discover-service-api \ --set ocf-discover-service-api.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-discover-service-api.env.monitoring="true" \ ---set ocf-discover-service-api.env.logLevel="DEBUG" \ +--set ocf-discover-service-api.env.logLevel="$LOG_LEVEL" \ --set nginx.image.repository=$CAPIF_DOCKER_REGISTRY/nginx \ --set nginx.image.tag=$CAPIF_IMAGE_TAG \ --set nginx.env.capifHostname=$CAPIF_HOSTNAME \ @@ -111,14 +111,14 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set nginx.ingress.hosts[0].host=$CAPIF_HOSTNAME \ --set nginx.ingress.hosts[0].paths[0].path="/" \ --set nginx.ingress.hosts[0].paths[0].pathType="Prefix" \ ---set nginx.env.logLevel="debug" \ +--set nginx.env.logLevel="$LOG_LEVEL" \ --set ocf-helper.image.repository=$CAPIF_DOCKER_REGISTRY/helper \ --set ocf-helper.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-helper.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ --set ocf-helper.env.vaultPort=$VAULT_PORT \ --set ocf-helper.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ --set ocf-helper.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-helper.env.logLevel="DEBUG" \ +--set ocf-helper.env.logLevel="$LOG_LEVEL" \ --set mock-server.enabled=true \ --set mock-server.image.repository=$CAPIF_DOCKER_REGISTRY/mock-server \ --set mock-server.image.tag=$CAPIF_IMAGE_TAG \ @@ -126,9 +126,11 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set mock-server.ingress.hosts[0].host=mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN \ --set mock-server.ingress.hosts[0].paths[0].path="/" \ --set mock-server.ingress.hosts[0].paths[0].pathType="Prefix" \ ---set mock-server.env.logLevel="DEBUG" \ +--set mock-server.env.logLevel="$LOG_LEVEL" \ --set mock-server.service.port=$MOCK_SERVER_PORT \ --set mock-server.livenessProbe.tcpSocket.port=$MOCK_SERVER_PORT \ +--set mongo-register.image.repository=$BASE_DOCKER_REGISTRY/mongo \ +--set mongo-register.image.tag=6.0.2 \ --set mongo-register.persistence.storageClass=$CAPIF_STORAGE_CLASS \ --set mongo-register.persistence.storage=$CAPIF_MONGO_REGISTER_STORAGE_SIZE \ --set mongo-register.extraFlags[0]="--repair" \ @@ -140,9 +142,27 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set mongo.persistence.storageClass=$CAPIF_STORAGE_CLASS \ --set mongo.persistence.storage=$CAPIF_MONGO_STORAGE_SIZE \ --set mongo.extraFlags[0]="--repair" \ +--set mongo.image.repository=$BASE_DOCKER_REGISTRY/mongo \ +--set mongo.image.tag=6.0.2 \ +--set mongo.busybox.repository=$BASE_DOCKER_REGISTRY/busybox \ +--set mongo.busybox.tag=1.37.0 \ --set mongo-express.enabled=true \ --set mongo-express.ingress.enabled=true \ --set mongo-express.ingress.hosts[0].host="mongo-express-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN" \ --set mongo-express.ingress.hosts[0].paths[0].path="/" \ --set mongo-express.ingress.hosts[0].paths[0].pathType="Prefix" \ +--set redis.image.repository=$BASE_DOCKER_REGISTRY/redis \ +--set redis.image.tag=7.4.2-alpine \ +--set celery-beat.image.repository=$CAPIF_DOCKER_REGISTRY/celery \ +--set celery-beat.image.tag=$CAPIF_IMAGE_TAG \ +--set celery-beat.env.celeryModel=beat \ +--set celery-beat.env.redisHost=redis \ +--set celery-beat.env.redisPort=6379 \ +--set celery-beat.env.logLevel="$LOG_LEVEL" \ +--set celery-worker.image.repository=$CAPIF_DOCKER_REGISTRY/celery \ +--set celery-worker.image.tag=$CAPIF_IMAGE_TAG \ +--set celery-worker.env.celeryModel=worker \ +--set celery-worker.env.redisHost=redis \ +--set celery-worker.env.redisPort=6379 \ +--set celery-worker.env.logLevel="$LOG_LEVEL" \ --wait --timeout=10m --create-namespace --atomic $CAPIF_RESOURCES_RESERVE $CAPIF_STORAGE_ACCESS_MODE $CAPIF_RUN_AS_USER_CONFIG diff --git a/helm/scripts/install_monitoring.sh b/helm/scripts/install_monitoring.sh index 9d6a00f3..fa7882ec 100755 --- a/helm/scripts/install_monitoring.sh +++ b/helm/scripts/install_monitoring.sh @@ -7,13 +7,21 @@ helm repo add grafana https://grafana.github.io/helm-charts helm $KUBECONFIG dependency build $HELM_DIR/monitoring-stack/ helm $KUBECONFIG upgrade --install -n $MONITORING_NAMESPACE $MONITORING_SERVICE_NAME $HELM_DIR/monitoring-stack/ \ ---set grafana.enabled=false \ +--set grafana.enabled=$MONITORING_GRAFANA_ENABLED \ --set grafana.env.prometheusUrl=$PROMETHEUS_URL \ ---set prometheus.enabled=true \ +--set grafana.ingress.enabled=true \ +--set grafana.ingress.hosts[0].host=$GRAFANA_HOSTNAME \ +--set grafana.ingress.hosts[0].paths[0].path="/" \ +--set grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ +--set prometheus.enabled=$MONITORING_PROMETHEUS_ENABLED \ --set prometheus.ingress.enabled=true \ --set prometheus.ingress.hosts[0].host=$PROMETHEUS_HOSTNAME \ --set prometheus.ingress.hosts[0].paths[0].path="/" \ --set prometheus.ingress.hosts[0].paths[0].pathType="Prefix" \ --set skooner.enabled=$MONITORING_SNOOKER_ENABLED \ +--set skooner.ingress.enabled=true \ +--set skooner.ingress.hosts[0].host=$SKOONER_HOSTNAME \ +--set skooner.ingress.hosts[0].paths[0].path="/" \ +--set skooner.ingress.hosts[0].paths[0].pathType="Prefix" \ --wait --timeout=10m --create-namespace --atomic diff --git a/helm/scripts/run_remote_capif_tests.sh b/helm/scripts/run_remote_capif_tests.sh index 38b7e807..4de115a4 100755 --- a/helm/scripts/run_remote_capif_tests.sh +++ b/helm/scripts/run_remote_capif_tests.sh @@ -37,6 +37,7 @@ echo "CAPIF_VAULT_PORT = $VAULT_PORT" echo "CAPIF_VAULT_TOKEN = $VAULT_ACCESS_TOKEN" echo "MOCK_SERVER_URL = $MOCK_SERVER_URL" echo "DOCKER_ROBOT_IMAGE = $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION" +echo "REGISTER_ADMIN_PASSWORD = $REGISTER_ADMIN_PASSWORD" INPUT_OPTIONS=$@ # Check if input is provided @@ -83,4 +84,5 @@ docker run -ti --rm --network="host" \ --variable CAPIF_VAULT_PORT:$CAPIF_VAULT_PORT \ --variable CAPIF_VAULT_TOKEN:$CAPIF_VAULT_TOKEN \ --variable NOTIFICATION_DESTINATION_URL:$NOTIFICATION_DESTINATION_URL \ - --variable MOCK_SERVER_URL:$MOCK_SERVER_URL $INPUT_OPTIONS + --variable MOCK_SERVER_URL:$MOCK_SERVER_URL \ + --variable REGISTER_ADMIN_PASSWORD:$REGISTER_ADMIN_PASSWORD $INPUT_OPTIONS diff --git a/helm/scripts/variables.sh b/helm/scripts/variables.sh index 2abf7de3..04a659a1 100755 --- a/helm/scripts/variables.sh +++ b/helm/scripts/variables.sh @@ -25,6 +25,14 @@ export SCRIPTS_DIR=$(dirname "$(readlink -f "$0")") export HELM_DIR=$(dirname "$SCRIPTS_DIR") export CAPIF_BASE_DIR=$(dirname "$HELM_DIR") +# Docker registry to be used in deployment +export BASE_DOCKER_REGISTRY="labs.etsi.org:5050/ocf/capif" +# Common Configurations +## Log level to be used in deployment [CRITICAL, FATAL, ERROR, WARNING, WARN, INFO, DEBUG, NOTSET] +export LOG_LEVEL=DEBUG +## Register admin password to be used on testing +export REGISTER_ADMIN_PASSWORD='password123' + # Print scripts directory echo "The /helm/scripts directory is: $SCRIPTS_DIR" echo "The /helm directory is: $HELM_DIR" @@ -53,9 +61,15 @@ VAULT_JOB_NAME=vault-pki # Monitoring installation variables ## Prometheus Hostname to be used at ingress configuration export PROMETHEUS_HOSTNAME=prometheus.testbed.develop +export SKOONER_HOSTNAME=skooner.testbed.develop +export GRAFANA_HOSTNAME=grafana.testbed.develop +## Monitoring namespace and service name export MONITORING_NAMESPACE=monitoring export MONITORING_SERVICE_NAME=monitoring +## Monitoring Services enabled export MONITORING_SNOOKER_ENABLED=false +export MONITORING_GRAFANA_ENABLED=false +export MONITORING_PROMETHEUS_ENABLED=true # OpenCAPIF deployment variables export CAPIF_RESOURCES_RESERVE="YES" @@ -85,7 +99,7 @@ export CAPIF_CI_ENV_ENDPOINT=capif export CAPIF_DOMAIN=testbed.develop ## Configuration of images to be used on deplyment ### Docker Registry to download images (must be accesible by k8s cluster) -export CAPIF_DOCKER_REGISTRY="labs.etsi.org:5050/ocf/capif/prod" +export CAPIF_DOCKER_REGISTRY="$BASE_DOCKER_REGISTRY/prod" ### Tag to be used export CAPIF_IMAGE_TAG="v1.0.0-release" ## Prometheus url, usually internal k8s hostname (if capif will be deployed on same k8s cluster) with port 9090 @@ -186,4 +200,4 @@ else --set $service.resources.requests.cpu=$CAPIF_RESOURCES_REQUESTS_CPU --set $service.resources.requests.memory=$CAPIF_RESOURCES_REQUESTS_MEMORY " done -fi \ No newline at end of file +fi diff --git a/tools/base_images_scripts/push_base_images_ocf.sh b/tools/base_images_scripts/push_base_images_ocf.sh index 2a9d472e..4bbc12c1 100755 --- a/tools/base_images_scripts/push_base_images_ocf.sh +++ b/tools/base_images_scripts/push_base_images_ocf.sh @@ -10,7 +10,8 @@ BASIC_IMAGES=("python:3-slim-bullseye" "ubuntu:20.04" "redis:7.4.2-alpine" "mongo-express:1.0.0-alpha.4" -"mongo:6.0.2") +"mongo:6.0.2" +"busybox:1.37.0") docker login labs.etsi.org:5050 for basic_image in "${BASIC_IMAGES[@]}"; do -- GitLab From fe92540954519cc875021d35f37a265d3b1a54f0 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 19 Aug 2025 10:59:53 +0200 Subject: [PATCH 002/101] variables.sh now support environment files --- helm/scripts/variables.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/helm/scripts/variables.sh b/helm/scripts/variables.sh index 04a659a1..f29e3395 100755 --- a/helm/scripts/variables.sh +++ b/helm/scripts/variables.sh @@ -201,3 +201,19 @@ else --set $service.resources.requests.memory=$CAPIF_RESOURCES_REQUESTS_MEMORY " done fi + +# Directory for environment variables +ENV_DIR="$SCRIPTS_DIR/envs" + +# Environment selection (default: dev) +ENVIRONMENT="${1:-dev}" +ENV_FILE="$ENV_DIR/$ENVIRONMENT.env" + +if [ -f "$ENV_FILE" ]; then + echo "Loading environment configuration: $ENVIRONMENT" + set -a + source "$ENV_FILE" + set +a +else + echo "Environment file not found: $ENV_FILE. Using default values." +fi -- GitLab From e0aeae5bfbf96a27a90486a702b28d9f3621ce1c Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 19 Aug 2025 11:43:46 +0200 Subject: [PATCH 003/101] upgraded helm scripts with new environment optional file and improved help description on all of them --- helm/scripts/create_remote_users.sh | 32 +++++++++++++++---- helm/scripts/get_ingress.sh | 32 +++++++++++++++---- helm/scripts/install_capif.sh | 12 ++++++- helm/scripts/install_monitoring.sh | 11 ++++++- helm/scripts/install_vault.sh | 11 ++++++- .../populate_create_remote_dummy_users.sh | 30 ++++++++++++++--- .../populate_remove_remote_dummy_users.sh | 29 ++++++++++++++--- helm/scripts/remove_remote_users.sh | 28 +++++++++++++--- helm/scripts/remove_remote_users_by_prefix.sh | 28 +++++++++++++--- helm/scripts/run_remote_capif_tests.sh | 12 ++++++- helm/scripts/set_ingress.sh | 30 +++++++++++++---- helm/scripts/uninstall_capif.sh | 26 ++++++++++++--- helm/scripts/uninstall_monitoring.sh | 26 ++++++++++++--- helm/scripts/uninstall_vault.sh | 26 ++++++++++++--- helm/scripts/variables.sh | 3 +- 15 files changed, 283 insertions(+), 53 deletions(-) diff --git a/helm/scripts/create_remote_users.sh b/helm/scripts/create_remote_users.sh index a0209b31..d7b4ce58 100755 --- a/helm/scripts/create_remote_users.sh +++ b/helm/scripts/create_remote_users.sh @@ -1,5 +1,14 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" # User to create TOTAL_USERS=1 @@ -7,11 +16,20 @@ USERNAME_PREFIX= USER_PASSWORD= help() { - echo "Usage: $1 " - echo " -u : User prefix to use" - echo " -p : Password to set for user" - echo " -t : Total user to create (default 1)" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -u User prefix to use (required)" + echo " -p Password to set for user (required)" + echo " -t Total users to create (default: 1)" + echo " -h Show this help message" + echo "" + echo "Examples:" + echo " $0 prod -u testuser -p pass123 -t 5" + echo " $0 -u testuser -p pass123" exit 1 } @@ -142,4 +160,6 @@ docker run -ti --rm --network="host" \ --variable TOTAL_USERS:$TOTAL_USERS \ --variable USERNAME_PREFIX:$USERNAME_PREFIX \ --variable USER_PASSWORD:$USER_PASSWORD \ + --variable REGISTER_ADMIN_USER:$REGISTER_ADMIN_USER \ + --variable REGISTER_ADMIN_PASSWORD:$REGISTER_ADMIN_PASSWORD \ --include create-users diff --git a/helm/scripts/get_ingress.sh b/helm/scripts/get_ingress.sh index 53b79c31..b8010715 100755 --- a/helm/scripts/get_ingress.sh +++ b/helm/scripts/get_ingress.sh @@ -1,17 +1,35 @@ #!/bin/bash IP="" NAMESPACE="" -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" help() { - echo "Usage: $1 " - echo " -i : IP to use" - echo " -n : Namespace to get ingress information" - echo " -k : Kubeconfig to be used" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -i IP to use" + echo " -n Namespace to get ingress information" + echo " -k Kubeconfig to be used" + echo " -h Show this help message" + echo "" + echo "Examples:" + echo " $0 prod -i 10.0.0.1 -n mynamespace" + echo " $0 -n mynamespace" exit 1 } -# Read params +# Process flags with getopts while getopts ":i:n:k:h" opt; do case $opt in i) diff --git a/helm/scripts/install_capif.sh b/helm/scripts/install_capif.sh index 6a166590..43522556 100755 --- a/helm/scripts/install_capif.sh +++ b/helm/scripts/install_capif.sh @@ -1,5 +1,15 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" helm repo add grafana https://grafana.github.io/helm-charts diff --git a/helm/scripts/install_monitoring.sh b/helm/scripts/install_monitoring.sh index fa7882ec..9f201ccf 100755 --- a/helm/scripts/install_monitoring.sh +++ b/helm/scripts/install_monitoring.sh @@ -1,5 +1,14 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add grafana https://grafana.github.io/helm-charts diff --git a/helm/scripts/install_vault.sh b/helm/scripts/install_vault.sh index 971d5200..52dfbdf3 100755 --- a/helm/scripts/install_vault.sh +++ b/helm/scripts/install_vault.sh @@ -1,5 +1,14 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" # Function to get the service status get_service_status() { diff --git a/helm/scripts/populate_create_remote_dummy_users.sh b/helm/scripts/populate_create_remote_dummy_users.sh index 3243db82..2c7dbfbe 100755 --- a/helm/scripts/populate_create_remote_dummy_users.sh +++ b/helm/scripts/populate_create_remote_dummy_users.sh @@ -1,15 +1,33 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" # Populate variables TOTAL_INVOKERS=10 TOTAL_PROVIDERS=10 help() { - echo "Usage: $1 " - echo " -p : Total providers to create (default 10)" - echo " -i : Total providers to create (default 10)" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -p Total providers to create (default: 10)" + echo " -i Total invokers to create (default: 10)" + echo " -h Show this help message" + echo "" + echo "Examples:" + echo " $0 prod -p 20 -i 15" + echo " $0 -p 5" exit 1 } @@ -122,4 +140,6 @@ docker run -ti --rm --network="host" \ --variable MOCK_SERVER_URL:$MOCK_SERVER_URL \ --variable TOTAL_PROVIDERS:$TOTAL_PROVIDERS \ --variable TOTAL_INVOKERS:$TOTAL_INVOKERS \ + --variable REGISTER_ADMIN_USER:$REGISTER_ADMIN_USER \ + --variable REGISTER_ADMIN_PASSWORD:$REGISTER_ADMIN_PASSWORD \ --include populate-create diff --git a/helm/scripts/populate_remove_remote_dummy_users.sh b/helm/scripts/populate_remove_remote_dummy_users.sh index 7847525e..8c55005f 100755 --- a/helm/scripts/populate_remove_remote_dummy_users.sh +++ b/helm/scripts/populate_remove_remote_dummy_users.sh @@ -1,10 +1,29 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" help() { - echo "Usage: $1 " - echo "Removes all dummy users populated, stored on latest zip file on results" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -h Show this help message" + echo "" + echo "Removes all dummy users populated, stored on latest zip file in results." + echo "" + echo "Examples:" + echo " $0 prod" + echo " $0" exit 1 } @@ -109,4 +128,6 @@ docker run -ti --rm --network="host" \ --variable CAPIF_VAULT_TOKEN:$CAPIF_VAULT_TOKEN \ --variable NOTIFICATION_DESTINATION_URL:$NOTIFICATION_DESTINATION_URL \ --variable MOCK_SERVER_URL:$MOCK_SERVER_URL \ + --variable REGISTER_ADMIN_USER:$REGISTER_ADMIN_USER \ + --variable REGISTER_ADMIN_PASSWORD:$REGISTER_ADMIN_PASSWORD \ --include populate-remove diff --git a/helm/scripts/remove_remote_users.sh b/helm/scripts/remove_remote_users.sh index dc6fa762..ad9b89f6 100755 --- a/helm/scripts/remove_remote_users.sh +++ b/helm/scripts/remove_remote_users.sh @@ -1,13 +1,31 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" # User to remove USERNAME_PREFIX= help() { - echo "Usage: $1 " - echo " -u : User prefix to use" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -u User prefix to use (required)" + echo " -h Show this help message" + echo "" + echo "Examples:" + echo " $0 prod -u testuser" + echo " $0 -u testuser" exit 1 } @@ -123,4 +141,6 @@ docker run -ti --rm --network="host" \ --variable NOTIFICATION_DESTINATION_URL:$NOTIFICATION_DESTINATION_URL \ --variable MOCK_SERVER_URL:$MOCK_SERVER_URL \ --variable USERNAME_PREFIX:$USERNAME_PREFIX \ + --variable REGISTER_ADMIN_USER:$REGISTER_ADMIN_USER \ + --variable REGISTER_ADMIN_PASSWORD:$REGISTER_ADMIN_PASSWORD \ --include remove-users diff --git a/helm/scripts/remove_remote_users_by_prefix.sh b/helm/scripts/remove_remote_users_by_prefix.sh index 003d694f..ccc2ded6 100755 --- a/helm/scripts/remove_remote_users_by_prefix.sh +++ b/helm/scripts/remove_remote_users_by_prefix.sh @@ -1,13 +1,31 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" # User to remove USERNAME_PREFIX= help() { - echo "Usage: $1 " - echo " -u : User prefix to use" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -u User prefix to use (required)" + echo " -h Show this help message" + echo "" + echo "Examples:" + echo " $0 prod -u testuser" + echo " $0 -u testuser" exit 1 } @@ -123,4 +141,6 @@ docker run -ti --rm --network="host" \ --variable NOTIFICATION_DESTINATION_URL:$NOTIFICATION_DESTINATION_URL \ --variable MOCK_SERVER_URL:$MOCK_SERVER_URL \ --variable USERNAME_PREFIX:$USERNAME_PREFIX \ + --variable REGISTER_ADMIN_USER:$REGISTER_ADMIN_USER \ + --variable REGISTER_ADMIN_PASSWORD:$REGISTER_ADMIN_PASSWORD \ --include remove-users-by-prefix diff --git a/helm/scripts/run_remote_capif_tests.sh b/helm/scripts/run_remote_capif_tests.sh index 4de115a4..086f2a8b 100755 --- a/helm/scripts/run_remote_capif_tests.sh +++ b/helm/scripts/run_remote_capif_tests.sh @@ -1,5 +1,14 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image DOCKER_ROBOT_IMAGE_VERSION=1.0 @@ -85,4 +94,5 @@ docker run -ti --rm --network="host" \ --variable CAPIF_VAULT_TOKEN:$CAPIF_VAULT_TOKEN \ --variable NOTIFICATION_DESTINATION_URL:$NOTIFICATION_DESTINATION_URL \ --variable MOCK_SERVER_URL:$MOCK_SERVER_URL \ + --variable REGISTER_ADMIN_USER:$REGISTER_ADMIN_USER \ --variable REGISTER_ADMIN_PASSWORD:$REGISTER_ADMIN_PASSWORD $INPUT_OPTIONS diff --git a/helm/scripts/set_ingress.sh b/helm/scripts/set_ingress.sh index 7f403477..4aa8dbb4 100755 --- a/helm/scripts/set_ingress.sh +++ b/helm/scripts/set_ingress.sh @@ -1,14 +1,32 @@ #!/bin/bash IP="" NAMESPACE="" -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" help() { - echo "Usage: $1 " - echo " -i : IP to use" - echo " -n : Namespace to get ingress information" - echo " -k : Kubeconfig to be used" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -i IP to use" + echo " -n Namespace to get ingress information" + echo " -k Kubeconfig to be used" + echo " -h Show this help message" + echo "" + echo "Examples:" + echo " $0 prod -i 10.0.0.1 -n mynamespace" + echo " $0 -n mynamespace" exit 1 } # Read params diff --git a/helm/scripts/uninstall_capif.sh b/helm/scripts/uninstall_capif.sh index bacd0e0f..afb7aabd 100755 --- a/helm/scripts/uninstall_capif.sh +++ b/helm/scripts/uninstall_capif.sh @@ -1,10 +1,28 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" help() { - echo "Usage: $1 " - echo " -y : Force uninstall component" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -y Force uninstall component" + echo " -h Show this help message" + echo "" + echo "Examples:" + echo " $0 prod -y" + echo " $0" exit 1 } diff --git a/helm/scripts/uninstall_monitoring.sh b/helm/scripts/uninstall_monitoring.sh index aff1706b..8599dc0e 100755 --- a/helm/scripts/uninstall_monitoring.sh +++ b/helm/scripts/uninstall_monitoring.sh @@ -1,10 +1,28 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" help() { - echo "Usage: $1 " - echo " -y : Force uninstall component" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -y Force uninstall component" + echo " -h Show this help message" + echo "" + echo "Examples:" + echo " $0 prod -y" + echo " $0" exit 1 } diff --git a/helm/scripts/uninstall_vault.sh b/helm/scripts/uninstall_vault.sh index cb9535f6..3834c1ed 100755 --- a/helm/scripts/uninstall_vault.sh +++ b/helm/scripts/uninstall_vault.sh @@ -1,10 +1,28 @@ #!/bin/bash -source $(dirname "$(readlink -f "$0")")/variables.sh + +# Capture the first parameter as a possible environment +ENVIRONMENT="dev" +if [[ "$1" != -* && -n "$1" ]]; then + ENVIRONMENT="$1" + shift +fi + +# Load variables for the selected environment +source "$(dirname "$0")/variables.sh" "$ENVIRONMENT" help() { - echo "Usage: $1 " - echo " -y : Force uninstall component" - echo " -h : show this help" + echo "Usage: $0 [environment] [options]" + echo "" + echo " environment Optional. Environment name to use (e.g. dev, prod)." + echo " If not specified, 'dev' will be used by default." + echo "" + echo "Options:" + echo " -y Force uninstall component" + echo " -h Show this help message" + echo "" + echo "Examples:" + echo " $0 prod -y" + echo " $0" exit 1 } diff --git a/helm/scripts/variables.sh b/helm/scripts/variables.sh index f29e3395..70929e24 100755 --- a/helm/scripts/variables.sh +++ b/helm/scripts/variables.sh @@ -30,7 +30,8 @@ export BASE_DOCKER_REGISTRY="labs.etsi.org:5050/ocf/capif" # Common Configurations ## Log level to be used in deployment [CRITICAL, FATAL, ERROR, WARNING, WARN, INFO, DEBUG, NOTSET] export LOG_LEVEL=DEBUG -## Register admin password to be used on testing +## Register admin user and password to be used on testing +export REGISTER_ADMIN_USER='admin' export REGISTER_ADMIN_PASSWORD='password123' # Print scripts directory -- GitLab From e0c33da4364d3a66d301c93837b07f5f88fb1028 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Wed, 20 Aug 2025 11:25:19 +0200 Subject: [PATCH 004/101] remove empty line --- helm/scripts/install_capif.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/helm/scripts/install_capif.sh b/helm/scripts/install_capif.sh index 43522556..803b59cf 100755 --- a/helm/scripts/install_capif.sh +++ b/helm/scripts/install_capif.sh @@ -1,6 +1,5 @@ #!/bin/bash - # Capture the first parameter as a possible environment ENVIRONMENT="dev" if [[ "$1" != -* && -n "$1" ]]; then -- GitLab From 09a09b5ba2a762829930ac0e3e1e9bd33b85e2f1 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Wed, 20 Aug 2025 12:29:19 +0200 Subject: [PATCH 005/101] Add env folder with .gitkeep --- helm/scripts/envs/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 helm/scripts/envs/.gitkeep diff --git a/helm/scripts/envs/.gitkeep b/helm/scripts/envs/.gitkeep new file mode 100644 index 00000000..e69de29b -- GitLab From f01555a8e0ff67854c89bfd4edf64f4842ed997d Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Wed, 20 Aug 2025 12:35:31 +0200 Subject: [PATCH 006/101] Added example environment --- helm/scripts/envs/example.env | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 helm/scripts/envs/example.env diff --git a/helm/scripts/envs/example.env b/helm/scripts/envs/example.env new file mode 100644 index 00000000..bd19f70d --- /dev/null +++ b/helm/scripts/envs/example.env @@ -0,0 +1,12 @@ + export CUSTOM_KUBECONFIG="cluster-example.kubeconfig" + export VAULT_HOSTNAME=vault.example.org + export DOMAIN1=*.example.production + export DOMAIN2=*.example.staging + export DOMAIN3=*.example.dev + export PROMETHEUS_HOSTNAME=prometheus.example.production + export CAPIF_HOSTNAME="capif.example.staging" + export REGISTER_HOSTNAME="register.example.staging" + export CAPIF_NAMESPACE=ocf-capif + export CAPIF_CI_ENV_ENDPOINT=staging + export CAPIF_DOMAIN=example.staging + export CAPIF_IMAGE_TAG="v3.0.0-release" -- GitLab From 951bf244df6e9af605f0cfdecd371784fc5d58c2 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Wed, 20 Aug 2025 12:42:53 +0200 Subject: [PATCH 007/101] Added example environment --- helm/scripts/envs/example.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/scripts/envs/example.env b/helm/scripts/envs/example.env index bd19f70d..b86dfd4f 100644 --- a/helm/scripts/envs/example.env +++ b/helm/scripts/envs/example.env @@ -1,5 +1,5 @@ export CUSTOM_KUBECONFIG="cluster-example.kubeconfig" - export VAULT_HOSTNAME=vault.example.org + export VAULT_HOSTNAME=vault.example.production export DOMAIN1=*.example.production export DOMAIN2=*.example.staging export DOMAIN3=*.example.dev -- GitLab From c1c834871904a30e89c56ed4d0c356b70e08393e Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Wed, 20 Aug 2025 12:56:59 +0200 Subject: [PATCH 008/101] Added example environment --- helm/scripts/envs/example.env | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/helm/scripts/envs/example.env b/helm/scripts/envs/example.env index b86dfd4f..0d976b1b 100644 --- a/helm/scripts/envs/example.env +++ b/helm/scripts/envs/example.env @@ -1,12 +1,19 @@ - export CUSTOM_KUBECONFIG="cluster-example.kubeconfig" - export VAULT_HOSTNAME=vault.example.production - export DOMAIN1=*.example.production - export DOMAIN2=*.example.staging - export DOMAIN3=*.example.dev - export PROMETHEUS_HOSTNAME=prometheus.example.production - export CAPIF_HOSTNAME="capif.example.staging" - export REGISTER_HOSTNAME="register.example.staging" - export CAPIF_NAMESPACE=ocf-capif - export CAPIF_CI_ENV_ENDPOINT=staging - export CAPIF_DOMAIN=example.staging - export CAPIF_IMAGE_TAG="v3.0.0-release" +# Setup kubeconfig to be used +export CUSTOM_KUBECONFIG="cluster-example.kubeconfig" + +# Setup Vault parameters to deploy on this environment +export VAULT_HOSTNAME=vault.example.production +export DOMAIN1=*.example.production +export DOMAIN2=*.example.staging +export DOMAIN3=*.example.dev + +# Setup Monitoring parameters +export PROMETHEUS_HOSTNAME=prometheus.example.production + +# Setup OpenCAPIF parameters +export CAPIF_HOSTNAME="capif.example.staging" +export REGISTER_HOSTNAME="register.example.staging" +export CAPIF_NAMESPACE=ocf-capif +export CAPIF_CI_ENV_ENDPOINT=staging +export CAPIF_DOMAIN=example.staging +export CAPIF_IMAGE_TAG="v3.0.0-release" -- GitLab From 6ec565af0414e20ce5d91aa70db81f601ae4f324 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Wed, 20 Aug 2025 14:14:13 +0200 Subject: [PATCH 009/101] Upgrade setuptools to 80.9.0 version to solve security issue --- .../TS29222_CAPIF_API_Invoker_Management_API/requirements.txt | 2 +- .../TS29222_CAPIF_API_Provider_Management_API/requirements.txt | 2 +- .../TS29222_CAPIF_Access_Control_Policy_API/requirements.txt | 2 +- services/TS29222_CAPIF_Auditing_API/requirements.txt | 2 +- services/TS29222_CAPIF_Discover_Service_API/requirements.txt | 2 +- services/TS29222_CAPIF_Events_API/requirements.txt | 2 +- .../TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt | 2 +- services/TS29222_CAPIF_Publish_Service_API/requirements.txt | 2 +- services/TS29222_CAPIF_Routing_Info_API/requirements.txt | 2 +- services/TS29222_CAPIF_Security_API/requirements.txt | 2 +- services/helper/requirements.txt | 2 +- services/register/requirements.txt | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt index 9e154c60..0919bade 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt index 9d79f084..03d98900 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt b/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt index 9524b428..be25f2ec 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 diff --git a/services/TS29222_CAPIF_Auditing_API/requirements.txt b/services/TS29222_CAPIF_Auditing_API/requirements.txt index 40ed48bc..efb6b14c 100644 --- a/services/TS29222_CAPIF_Auditing_API/requirements.txt +++ b/services/TS29222_CAPIF_Auditing_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 elasticsearch == 8.4.3 diff --git a/services/TS29222_CAPIF_Discover_Service_API/requirements.txt b/services/TS29222_CAPIF_Discover_Service_API/requirements.txt index 04ff0c77..c43d33fd 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/requirements.txt +++ b/services/TS29222_CAPIF_Discover_Service_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 diff --git a/services/TS29222_CAPIF_Events_API/requirements.txt b/services/TS29222_CAPIF_Events_API/requirements.txt index 1edc40a9..ec944d48 100644 --- a/services/TS29222_CAPIF_Events_API/requirements.txt +++ b/services/TS29222_CAPIF_Events_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt b/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt index 7abd4609..f3b73d46 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 elasticsearch == 8.4.3 diff --git a/services/TS29222_CAPIF_Publish_Service_API/requirements.txt b/services/TS29222_CAPIF_Publish_Service_API/requirements.txt index 73be6c5f..aa5d7772 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/requirements.txt +++ b/services/TS29222_CAPIF_Publish_Service_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 diff --git a/services/TS29222_CAPIF_Routing_Info_API/requirements.txt b/services/TS29222_CAPIF_Routing_Info_API/requirements.txt index 9c190938..f93b06d4 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/requirements.txt +++ b/services/TS29222_CAPIF_Routing_Info_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 werkzeug == 3.0.4 gunicorn == 23.0.0 diff --git a/services/TS29222_CAPIF_Security_API/requirements.txt b/services/TS29222_CAPIF_Security_API/requirements.txt index cfd57783..ad9d6283 100644 --- a/services/TS29222_CAPIF_Security_API/requirements.txt +++ b/services/TS29222_CAPIF_Security_API/requirements.txt @@ -1,7 +1,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 diff --git a/services/helper/requirements.txt b/services/helper/requirements.txt index 14644ee7..bf16d663 100644 --- a/services/helper/requirements.txt +++ b/services/helper/requirements.txt @@ -1,5 +1,5 @@ python_dateutil == 2.9.0.post0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 flask_jwt_extended == 4.6.0 diff --git a/services/register/requirements.txt b/services/register/requirements.txt index dc9b58d9..6e947d4f 100644 --- a/services/register/requirements.txt +++ b/services/register/requirements.txt @@ -1,5 +1,5 @@ python_dateutil >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 flask_jwt_extended == 4.6.0 -- GitLab From 7419767135e539a461a84488f11b37cdd10eadba Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 26 Aug 2025 10:55:58 +0200 Subject: [PATCH 010/101] New version of generate_all_capif_apis.sh script --- .../generate_all_capif_apis.sh | 96 +++++++++++++++++-- 1 file changed, 87 insertions(+), 9 deletions(-) diff --git a/tools/open_api_script/generate_all_capif_apis.sh b/tools/open_api_script/generate_all_capif_apis.sh index 0b5393c9..79c62810 100755 --- a/tools/open_api_script/generate_all_capif_apis.sh +++ b/tools/open_api_script/generate_all_capif_apis.sh @@ -1,14 +1,91 @@ #!/bin/bash +# This script generates all CAPIF APIs defined in the 3GPP TS 29222 series. +# This script must setup APIS_FOLDER variable to point to the folder where +# all the OpenAPI files are stored. (them must be placed under openapi-generator). Copy them to that folder +# before running this script. +# OPEN_API_GENERATOR_FOLDER variable must point to the openapi-generator folder + +# Steps to run this script: +# 1. Install Docker +# 2. Clone openapi-generator from https://github.com/OpenAPITools/openapi-generator +# 3. Copy all OpenAPI files to a folder inside the openapi-generator folder. +# 4. Run this script with the desired options. + +# Mostrar ayuda +show_help() { + echo "Usage: $0 [options]" + echo "" + echo "Options:" + echo " -a Folder containing OpenAPI files (default: APIs)" + echo " -c Name of the output project folder (default: CAPIF-generated-new)" + echo " -g Path to openapi-generator folder (default: /path/to/openapi-generator)" + echo " -h Show this help message" + echo "" + echo "Steps to run this script:" + echo " 1. Install Docker" + echo " 2. Clone openapi-generator from https://github.com/OpenAPITools/openapi-generator" + echo " 3. Copy all CAPIF API files to a folder inside the openapi-generator folder." + echo " 4. Run this script with the desired options." + echo "" + echo "Example:" + echo " $0 -a APIs -c MyProject -g /path/to/openapi-generator" + exit 0 +} + +# Parámetros por defecto +APIS_FOLDER=APIs +COMPOSITE_PROJECT=CAPIF-latest +OPEN_API_GENERATOR_FOLDER=/path/to/openapi-generator + +# Leer parámetros +while getopts ":a:c:g:h" opt; do + case $opt in + a) + APIS_FOLDER="$OPTARG" + ;; + c) + COMPOSITE_PROJECT="$OPTARG" + ;; + g) + OPEN_API_GENERATOR_FOLDER="$OPTARG" + ;; + h) + show_help + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + show_help + ;; + :) + echo "Option -$OPTARG requires an argument." >&2 + show_help + ;; + esac +done + +# Local variables ENDPOINTS=() SERVICE_NAMES=() -COMPOSITE_PROJECT=CAPIF-composite-test2 -OUTPUT_HOST_BASE_DIRECTORY=out/CAPIF-composite-test2 -OUTPUT_DOCKER_BASE_DIRECTORY=/gen/$OUTPUT_HOST_BASE_DIRECTORY +OUTPUT_HOST_BASE_DIRECTORY=out/$COMPOSITE_PROJECT DOCKER_COMPOSE_FILENAME=$OUTPUT_HOST_BASE_DIRECTORY/docker-compose-test.yml NGINX_CONF_FILE=$OUTPUT_HOST_BASE_DIRECTORY/nginx.conf +# Change to openapi-generator directory (limitation at run-in-docker.sh script) +cd $OPEN_API_GENERATOR_FOLDER + +# Validar directorios +if [ ! -d "$APIS_FOLDER" ]; then + echo "APIs folder '$APIS_FOLDER' does not exist." + exit 1 +fi +if [ ! -d "$OPEN_API_GENERATOR_FOLDER" ]; then + echo "OpenAPI generator folder '$OPEN_API_GENERATOR_FOLDER' does not exist." + exit 1 +fi + echo "docker compose file: $DOCKER_COMPOSE_FILENAME" +# Create output folder mkdir -p $OUTPUT_HOST_BASE_DIRECTORY # rm $DOCKER_COMPOSE_FILENAME || true @@ -20,17 +97,16 @@ function createPythonServer { SWAGGER_FILE=$1 API_NAME=$(basename -s .yaml $SWAGGER_FILE) ENDPOINT=$(awk '/- url: /{ print $3 }' $SWAGGER_FILE|awk -F / '{ print $2}') - OUTPUT=$OUTPUT_DOCKER_BASE_DIRECTORY/$API_NAME/ + OUTPUT=$OUTPUT_HOST_BASE_DIRECTORY/$API_NAME/ echo "SWAGGER_FILE: $SWAGGER_FILE" echo "API_NAME: $API_NAME" echo "ENDPOINT: $ENDPOINT" echo "OUTPUT DIRECTORY: $OUTPUT" ENDPOINTS+=($ENDPOINT) SERVICE_NAME=$(echo $ENDPOINT | sed 's/-/_/g') - # SERVICE_NAMES+=($SERVICE_NAME) - ./run-in-docker.sh generate -i $SWAGGER_FILE \ + $OPEN_API_GENERATOR_FOLDER/run-in-docker.sh generate -i $SWAGGER_FILE \ -g python-flask \ - -o $OUTPUT \ + -o /gen/$OUTPUT \ --package-name=$SERVICE_NAME cat >> $DOCKER_COMPOSE_FILENAME << EOF $ENDPOINT: @@ -40,8 +116,9 @@ function createPythonServer { EOF } - -CAPIF_FILES=$(ls capif|awk '/TS29222/{ print "capif/"$0 }') +echo "Generating services for APIs in $APIS_FOLDER" +CAPIF_FILES=$(ls $APIS_FOLDER|awk -v dir="$APIS_FOLDER" '/TS29222/{ print dir "/"$0 }') +echo "CAPIF_FILES: $CAPIF_FILES" for CAPIF_FILE in ${CAPIF_FILES[*]} do createPythonServer $CAPIF_FILE @@ -90,3 +167,4 @@ cat >> $NGINX_CONF_FILE << EOF } EOF +echo "Check all generated services under $OPEN_API_GENERATOR_FOLDER/$OUTPUT_HOST_BASE_DIRECTORY folder" \ No newline at end of file -- GitLab From 9481262aa4804a142a7a61352fdddce21820b861 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 18 Sep 2025 16:36:49 +0200 Subject: [PATCH 011/101] Script to build and compare versions --- tools/compare_versions/README.md | 118 +++++++++++++++++ tools/compare_versions/download_services.sh | 100 +++++++++++++++ tools/compare_versions/make_diffs.sh | 133 ++++++++++++++++++++ 3 files changed, 351 insertions(+) create mode 100644 tools/compare_versions/README.md create mode 100755 tools/compare_versions/download_services.sh create mode 100755 tools/compare_versions/make_diffs.sh diff --git a/tools/compare_versions/README.md b/tools/compare_versions/README.md new file mode 100644 index 00000000..9512b1fb --- /dev/null +++ b/tools/compare_versions/README.md @@ -0,0 +1,118 @@ +# CAPIF Services Scripts + +This repository contains two Bash scripts to **generate CAPIF services code** from OpenAPI definitions and to **compare two versions** of the generated services. + +--- + +## 1. `capif_build.sh` + +This script wraps `openapi-generator` to build Python Flask code from the CAPIF service YAML definitions. +It allows generating all services or just one specific service. + +### Requirements +- `bash` (>= 4.0 recommended) +- [`openapi-generator`](https://openapi-generator.tech/) installed and available in `PATH` + +### Usage +```bash +./capif_build.sh --route <5g_repo_path> --output [--service ] +``` + +### Options +- `--route` : Path to the 5G repo containing the CAPIF YAML files. +- `--output`: Path to the folder where the generated code will be stored. +- `--service` *(optional)*: Name of a single YAML file to build (must match one from the CAPIF services list). + If omitted, **all services** will be built. +- `-h, --help`: Show help message. + +### Examples +Generate all CAPIF services: +```bash +./capif_build.sh --route /path/to/5g_repo --output ./old-version +``` + +Generate only one service: +```bash +./capif_build.sh --route /path/to/5g_repo --output ./new-version \ + --service TS29222_CAPIF_Events_API.yaml +``` + +--- + +## 2. `make_diffs.sh` + +This script compares two folders of generated CAPIF services (e.g., `old-version` vs `new-version`). +It produces: +- A `.diff` file per service (unified diff with `diff -ruN`) +- A `.diffstat` file per service (summary of changes per file, using `diffstat` or `git --no-index --stat`) +- A `summary.txt` file listing the results for all services + +### Requirements +- `sh` or `bash` +- `diff` (standard in Unix-like systems) +- Optional: + - `diffstat` → recommended for per-file summaries + - `git` → used as a fallback for summaries if `diffstat` is not available + +### Usage +```bash +./make_diffs.sh --old --new [--out ] [--service ] +``` + +### Options +- `--old` : Path to the folder with the old version. +- `--new` : Path to the folder with the new version. +- `--out` : (Optional) Output folder for diffs. Default: `./diffs`. +- `--service` : (Optional) Compare only one specific service (folder or file at top level). +- `-h, --help`: Show help message. + +### Examples +Compare all services: +```bash +./make_diffs.sh --old ./old-version --new ./new-version +``` + +Compare only one service: +```bash +./make_diffs.sh --old ./old-version --new ./new-version --service TS29222_CAPIF_Events_API +``` + +Save diffs into a custom folder: +```bash +./make_diffs.sh --old ./old-version --new ./new-version --out ./diffs_run2 +``` + +### Output +After running, the output folder will contain: +``` +diffs/ +├── TS29222_CAPIF_Events_API.diff +├── TS29222_CAPIF_Events_API.diffstat +├── TS29222_CAPIF_Auditing_API.diff +├── TS29222_CAPIF_Auditing_API.diffstat +... +└── summary.txt +``` + +--- + +## Typical Workflow +1. Generate services for the **old version**: + ```bash + ./capif_build.sh --route /path/to/5g_repo --output ./old-version + ``` +2. Generate services for the **new version**: + ```bash + ./capif_build.sh --route /path/to/5g_repo --output ./new-version + ``` +3. Compare them: + ```bash + ./make_diffs.sh --old ./old-version --new ./new-version --out ./diffs + ``` +4. Inspect the `.diff` and `.diffstat` files or open them in a diff viewer like `meld`, `kdiff3`, or `colordiff`. + +--- + +## Tips +- For easier inspection, install GUI diff tools like [Meld](https://meldmerge.org/). +- For API-level changes (OpenAPI/Swagger), you may also use tools like [`oasdiff`](https://github.com/Tufin/oasdiff). diff --git a/tools/compare_versions/download_services.sh b/tools/compare_versions/download_services.sh new file mode 100755 index 00000000..440d29e4 --- /dev/null +++ b/tools/compare_versions/download_services.sh @@ -0,0 +1,100 @@ +#!/usr/bin/env bash +set -euo pipefail + +# List of CAPIF services +SERVICES=( + "TS29222_CAPIF_API_Invoker_Management_API.yaml" + "TS29222_CAPIF_API_Provider_Management_API.yaml" + "TS29222_CAPIF_Access_Control_Policy_API.yaml" + "TS29222_CAPIF_Auditing_API.yaml" + "TS29222_CAPIF_Discover_Service_API.yaml" + "TS29222_CAPIF_Events_API.yaml" + "TS29222_CAPIF_Logging_API_Invocation_API.yaml" + "TS29222_CAPIF_Publish_Service_API.yaml" + "TS29222_CAPIF_Routing_Info_API.yaml" + "TS29222_CAPIF_Security_API.yaml" +) + +usage() { + cat < --output [--service ] + +Options: + --route Path to the 5G repo containing the YAML files. + --output Folder where the generated code will be stored. + --service (Optional) One of the following YAML files: + ${SERVICES[*]} + -h, --help Show this help message. + +Examples: + $(basename "$0") --route /path/5g --output /tmp/capif + $(basename "$0") --route /path/5g --output /tmp/capif --service TS29222_CAPIF_Events_API.yaml +EOF +} + +# Argument parsing (style: --key value) +ROUTE="" +OUTPUT="" +SERVICE="" + +while [[ $# -gt 0 ]]; do + case "$1" in + --route) ROUTE="${2:-}"; shift 2 ;; + --output) OUTPUT="${2:-}"; shift 2 ;; + --service) SERVICE="${2:-}"; shift 2 ;; + -h|--help) usage; exit 0 ;; + *) echo "Unknown argument: $1" >&2; usage; exit 1 ;; + esac +done + +# Basic validations +[[ -z "$ROUTE" ]] && echo "Error: --route is required." >&2 && usage && exit 1 +[[ -z "$OUTPUT" ]] && echo "Error: --output is required." >&2 && usage && exit 1 + +if ! command -v openapi-generator >/dev/null 2>&1; then + echo "Error: 'openapi-generator' is not installed or not in PATH." >&2 + exit 1 +fi + +if [[ ! -d "$ROUTE" ]]; then + echo "Error: the provided route '$ROUTE' does not exist." >&2 + exit 1 +fi + +mkdir -p "$OUTPUT" + +# If a service is specified, validate it +if [[ -n "$SERVICE" ]]; then + valid=false + for s in "${SERVICES[@]}"; do + if [[ "$s" == "$SERVICE" ]]; then + valid=true + break + fi + done + if [[ "$valid" != true ]]; then + echo "Error: the service '$SERVICE' is not valid." >&2 + echo "It must be one of: ${SERVICES[*]}" >&2 + exit 1 + fi + + path="$ROUTE/$SERVICE" + if [[ ! -f "$path" ]]; then + echo "Error: the service '$SERVICE' does not exist in the route '$ROUTE'." >&2 + exit 1 + fi + + base="${SERVICE%.*}" + echo "Downloading and building service: $SERVICE" + openapi-generator generate -i "$path" -g python-flask -o "$OUTPUT/$base" +else + # Process all services + for svc in "${SERVICES[@]}"; do + path="$ROUTE/$svc" + echo "Downloading and building service: $svc" + openapi-generator generate -i "$path" -g python-flask -o "$OUTPUT/${svc%.*}" + done +fi + +echo "All services have been downloaded and built." diff --git a/tools/compare_versions/make_diffs.sh b/tools/compare_versions/make_diffs.sh new file mode 100755 index 00000000..5d34f0b2 --- /dev/null +++ b/tools/compare_versions/make_diffs.sh @@ -0,0 +1,133 @@ +#!/bin/sh +set -eu + +usage() { + cat < --new [--out ] [--service ] + +Options: + --old Path to the folder with the old version (e.g., old-version) + --new Path to the folder with the new version (e.g., new-version) + --out (Optional) Output folder for diffs. Default: ./diffs + --service (Optional) Single top-level service (file or directory name) to compare + -h, --help Show this help + +Output: + - .diff unified diff (-ruN) for the service + - .diffstat summary (diffstat or git --no-index --stat fallback) + - summary.txt run summary +EOF +} + +OLD="" +NEW="" +OUT="diffs" +ONLY_SERVICE="" + +# Parse args +while [ $# -gt 0 ]; do + case "$1" in + --old) OLD=${2:-}; shift 2 ;; + --new) NEW=${2:-}; shift 2 ;; + --out) OUT=${2:-}; shift 2 ;; + --service) ONLY_SERVICE=${2:-}; shift 2 ;; + -h|--help) usage; exit 0 ;; + *) echo "Unknown argument: $1" >&2; usage; exit 1 ;; + esac +done + +[ -n "$OLD" ] || { echo "Error: --old is required." >&2; usage; exit 1; } +[ -n "$NEW" ] || { echo "Error: --new is required." >&2; usage; exit 1; } + +[ -d "$OLD" ] || { echo "Error: '$OLD' is not a directory." >&2; exit 1; } +[ -d "$NEW" ] || { echo "Error: '$NEW' is not a directory." >&2; exit 1; } + +mkdir -p "$OUT" + +SUMMARY_FILE="$OUT/summary.txt" +: > "$SUMMARY_FILE" # overwrite each run + +have_diffstat=0 +command -v diffstat >/dev/null 2>&1 && have_diffstat=1 + +have_git=0 +command -v git >/dev/null 2>&1 && have_git=1 + +# Build service list +if [ -n "$ONLY_SERVICE" ]; then + # Validate existence in at least one side + if [ ! -e "$OLD/$ONLY_SERVICE" ] && [ ! -e "$NEW/$ONLY_SERVICE" ]; then + echo "Error: service '$ONLY_SERVICE' not found in either '$OLD' or '$NEW'." >&2 + exit 1 + fi + SERVICES_LIST=$ONLY_SERVICE +else + tmp="$(mktemp)" + for p in "$OLD"/* "$NEW"/*; do + [ -e "$p" ] || continue + base=$(basename "$p") + printf '%s\n' "$base" >> "$tmp" + done + SERVICES_LIST=$(sort -u "$tmp") + rm -f "$tmp" + + # If nothing found, exit gracefully + if [ -z "$SERVICES_LIST" ]; then + echo "No services found in '$OLD' or '$NEW'. Nothing to diff." + exit 0 + fi +fi + +echo "Generating diffs into '$OUT'..." +echo "$SERVICES_LIST" | while IFS= read -r svc; do + [ -n "$svc" ] || continue + + left="$OLD/$svc" + right="$NEW/$svc" + out_diff="$OUT/${svc}.diff" + out_stat="$OUT/${svc}.diffstat" + + # Clean previous files to ensure overwrite + rm -f "$out_diff" "$out_stat" + + if [ ! -e "$left" ] && [ ! -e "$right" ]; then + echo "WARN: '$svc' missing in both sides; skipping." | tee -a "$SUMMARY_FILE" + continue + fi + + # 0=no changes, 1=diffs, >1=error + if diff -ruN "$left" "$right" >"$out_diff" 2>&1; then + echo "Service '$svc': no differences." | tee -a "$SUMMARY_FILE" + echo "No differences" >"$out_stat" + else + code=$? + if [ $code -eq 1 ]; then + echo "Service '$svc': differences found -> $(basename "$out_diff")" | tee -a "$SUMMARY_FILE" + if [ $have_diffstat -eq 1 ]; then + if ! diffstat "$out_diff" >"$out_stat" 2>/dev/null; then + echo "Failed to generate diffstat from diff file." >"$out_stat" + fi + elif [ $have_git -eq 1 ] && [ -e "$left" ] && [ -e "$right" ]; then + if ! git -c color.ui=never diff --no-index --stat -- "$left" "$right" >"$out_stat" 2>/dev/null; then + echo "Failed to generate stat with git --no-index." >"$out_stat" + fi + else + { + echo "diffstat and git not available." + echo "Install 'diffstat' for per-file summaries, e.g.:" + echo " - Debian/Ubuntu: sudo apt-get install diffstat" + echo " - macOS (brew): brew install diffstat" + echo " - Fedora/RHEL: sudo dnf install diffstat" + } >"$out_stat" + fi + else + echo "Service '$svc': diff error (exit $code) -> $(basename "$out_diff")" | tee -a "$SUMMARY_FILE" + echo "Diff error (exit $code). See $(basename "$out_diff") for details." >"$out_stat" + fi + fi +done + +echo +echo "Done. Diff files are in: $OUT" +echo "Summary: $SUMMARY_FILE" -- GitLab From e7d80bb8bf7cae420bcd4e2f3eb4df0629d37252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Adorna=20Ruiz?= Date: Tue, 30 Sep 2025 15:48:24 +0200 Subject: [PATCH 012/101] Update cryptography dependency --- .../TS29222_CAPIF_API_Invoker_Management_API/requirements.txt | 2 +- .../requirements.txt | 2 +- .../TS29222_CAPIF_Access_Control_Policy_API/requirements.txt | 2 +- services/TS29222_CAPIF_Auditing_API/requirements.txt | 4 ++-- services/TS29222_CAPIF_Discover_Service_API/requirements.txt | 2 +- services/TS29222_CAPIF_Events_API/requirements.txt | 4 ++-- .../TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt | 4 ++-- services/TS29222_CAPIF_Publish_Service_API/requirements.txt | 2 +- services/TS29222_CAPIF_Security_API/requirements.txt | 2 +- services/helper/requirements.txt | 2 +- services/register/requirements.txt | 2 +- tools/robot/basicRequirements.txt | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt index 0919bade..0db19322 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt @@ -6,7 +6,7 @@ Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 -cryptography == 43.0.1 +cryptography == 46.0.1 rfc3987 == 1.3.8 opentelemetry-instrumentation == 0.41b0 opentelemetry-instrumentation-flask == 0.41b0 diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt index 03d98900..5c362aee 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt @@ -6,7 +6,7 @@ Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 -cryptography == 42.0.8 +cryptography == 46.0.1 rfc3987 == 1.3.8 opentelemetry-instrumentation == 0.40b0 opentelemetry-instrumentation-flask == 0.40b0 diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt b/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt index be25f2ec..02f71f6c 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt @@ -6,7 +6,7 @@ Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 -cryptography == 42.0.8 +cryptography == 46.0.1 opentelemetry-instrumentation == 0.40b0 opentelemetry-instrumentation-flask == 0.40b0 opentelemetry-instrumentation-redis == 0.40b0 diff --git a/services/TS29222_CAPIF_Auditing_API/requirements.txt b/services/TS29222_CAPIF_Auditing_API/requirements.txt index efb6b14c..900c4776 100644 --- a/services/TS29222_CAPIF_Auditing_API/requirements.txt +++ b/services/TS29222_CAPIF_Auditing_API/requirements.txt @@ -6,7 +6,7 @@ Flask == 3.0.3 pymongo == 4.7.3 elasticsearch == 8.4.3 flask_jwt_extended == 4.6.0 -cryptography == 42.0.8 +cryptography == 46.0.1 opentelemetry-instrumentation == 0.40b0 opentelemetry-instrumentation-flask == 0.40b0 opentelemetry-instrumentation-redis == 0.40b0 @@ -19,6 +19,6 @@ opentelemetry-api == 1.19.0 opentelemetry-sdk == 1.19.0 flask_executor == 1.0.0 werkzeug == 3.0.4 -pyopenssl == 24.1.0 +pyopenssl == 25.3.0 gunicorn == 23.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Discover_Service_API/requirements.txt b/services/TS29222_CAPIF_Discover_Service_API/requirements.txt index c43d33fd..881ad9b9 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/requirements.txt +++ b/services/TS29222_CAPIF_Discover_Service_API/requirements.txt @@ -6,7 +6,7 @@ Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 -cryptography == 42.0.8 +cryptography == 46.0.1 rfc3987 == 1.3.8 opentelemetry-instrumentation == 0.40b0 opentelemetry-instrumentation-flask == 0.40b0 diff --git a/services/TS29222_CAPIF_Events_API/requirements.txt b/services/TS29222_CAPIF_Events_API/requirements.txt index ec944d48..618f0c33 100644 --- a/services/TS29222_CAPIF_Events_API/requirements.txt +++ b/services/TS29222_CAPIF_Events_API/requirements.txt @@ -6,7 +6,7 @@ Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 -cryptography == 42.0.8 +cryptography == 46.0.1 rfc3987 == 1.3.8 opentelemetry-instrumentation == 0.40b0 opentelemetry-instrumentation-flask == 0.40b0 @@ -23,6 +23,6 @@ Flask-APScheduler == 1.13.1 aiohttp == 3.10.5 async-timeout == 4.0.3 werkzeug == 3.0.4 -pyopenssl == 24.2.1 +pyopenssl == 25.3.0 gunicorn == 23.0.0 packaging == 24.0 \ No newline at end of file diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt b/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt index f3b73d46..9b28c5cd 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt @@ -6,7 +6,7 @@ Flask == 3.0.3 pymongo == 4.7.3 elasticsearch == 8.4.3 flask_jwt_extended == 4.6.0 -cryptography == 42.0.8 +cryptography == 46.0.1 redis == 4.5.4 opentelemetry-instrumentation == 0.40b0 opentelemetry-instrumentation-flask == 0.40b0 @@ -20,6 +20,6 @@ opentelemetry-api == 1.19.0 opentelemetry-sdk == 1.19.0 flask_executor == 1.0.0 werkzeug == 3.0.4 -pyopenssl == 24.1.0 +pyopenssl == 25.3.0 gunicorn == 23.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Publish_Service_API/requirements.txt b/services/TS29222_CAPIF_Publish_Service_API/requirements.txt index aa5d7772..bec672cf 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/requirements.txt +++ b/services/TS29222_CAPIF_Publish_Service_API/requirements.txt @@ -6,7 +6,7 @@ Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 -cryptography == 42.0.8 +cryptography == 46.0.1 opentelemetry-instrumentation == 0.38b0 opentelemetry-instrumentation-flask == 0.38b0 opentelemetry-instrumentation-redis == 0.38b0 diff --git a/services/TS29222_CAPIF_Security_API/requirements.txt b/services/TS29222_CAPIF_Security_API/requirements.txt index ad9d6283..44771b29 100644 --- a/services/TS29222_CAPIF_Security_API/requirements.txt +++ b/services/TS29222_CAPIF_Security_API/requirements.txt @@ -6,7 +6,7 @@ Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 -cryptography == 42.0.8 +cryptography == 46.0.1 rfc3987 == 1.3.8 opentelemetry-instrumentation == 0.40b0 opentelemetry-instrumentation-flask == 0.40b0 diff --git a/services/helper/requirements.txt b/services/helper/requirements.txt index bf16d663..33e44310 100644 --- a/services/helper/requirements.txt +++ b/services/helper/requirements.txt @@ -3,7 +3,7 @@ setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 flask_jwt_extended == 4.6.0 -pyopenssl == 24.1.0 +pyopenssl == 25.3.0 pyyaml == 6.0.1 requests == 2.32.2 gunicorn == 23.0.0 diff --git a/services/register/requirements.txt b/services/register/requirements.txt index 6e947d4f..2d5ea17f 100644 --- a/services/register/requirements.txt +++ b/services/register/requirements.txt @@ -3,7 +3,7 @@ setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 flask_jwt_extended == 4.6.0 -pyopenssl == 24.1.0 +pyopenssl == 25.3.0 pyyaml == 6.0.1 requests == 2.32.2 bcrypt == 4.3.0 diff --git a/tools/robot/basicRequirements.txt b/tools/robot/basicRequirements.txt index 2f6ea98a..d6b316fa 100644 --- a/tools/robot/basicRequirements.txt +++ b/tools/robot/basicRequirements.txt @@ -55,7 +55,7 @@ PyGithub == 1.56 PyJWT == 2.6.0 pymongo == 4.7.3 PyNaCl == 1.5.0 -pyOpenSSL == 24.1.0 +pyOpenSSL == 25.3.0 pyparsing == 3.0.9 PySocks == 1.7.1 pytest == 6.2.4 -- GitLab From abdc2e88cb85b7f2acbf60f559879858f8b5cb89 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Thu, 2 Oct 2025 16:49:38 +0200 Subject: [PATCH 013/101] Fix variables to allow override of all variables with environment files --- helm/scripts/variables.sh | 49 +++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/helm/scripts/variables.sh b/helm/scripts/variables.sh index 70929e24..26e4c711 100755 --- a/helm/scripts/variables.sh +++ b/helm/scripts/variables.sh @@ -112,6 +112,34 @@ export VAULT_ACCESS_TOKEN="dev-only-token" ## Only for testing purpouses, configuration of mock-server port export MOCK_SERVER_PORT="9100" +# special configuration for capif deployment + +## Setup KUBECONFIG +export KUBECONFIG=$CUSTOM_KUBECONFIG + +## If CAPIF_STORAGE_CLASS is longhorn, then we need to set runAsUser to 0 in some deployments to allow write on PVC +export CAPIF_RUN_AS_USER_CONFIG="" + +## SED command, in MacOS sed is different and need gnu-sed (gsed) +export SED_CMD=sed + +# Load environment variables from file +## Directory for environment variables +ENV_DIR="$SCRIPTS_DIR/envs" + +## Environment selection (default: dev) +ENVIRONMENT="${1:-dev}" +ENV_FILE="$ENV_DIR/$ENVIRONMENT.env" + +if [ -f "$ENV_FILE" ]; then + echo "Loading environment configuration: $ENVIRONMENT" + set -a + source "$ENV_FILE" + set +a +else + echo "Environment file not found: $ENV_FILE. Using default values." +fi + ######### POST PROCESSING VARIABLES SET ######## ### To deploy in other environment we need to setup urls according to it and also using specific kubeconfig: if [ -f "$VAULT_FILE" ] && [ -s "$VAULT_FILE" ]; then @@ -122,8 +150,7 @@ else fi echo "Using value on VAULT_ACCESS_TOKEN=$VAULT_ACCESS_TOKEN" -## Setup KUBECONFIG -export KUBECONFIG=$CUSTOM_KUBECONFIG + ### If K8S_IP is empty, then script will try to get ingress-nginx-controller NodePort to grant DNS resolution for register to connect locally to CAPIF nginx if [ "$K8S_IP" == "NONE" ]; then @@ -166,7 +193,7 @@ if [ -n "$CAPIF_STORAGE_ACCESS_MODE" ]; then " fi -export CAPIF_RUN_AS_USER_CONFIG="" + if [ "$CAPIF_STORAGE_CLASS" == "longhorn" ]; then echo "$CAPIF_STORAGE_CLASS needs to configure runAsUser at mongo, mongo-register and grafana to 0, in order to allow write con PVC created." CAPIF_RUN_AS_USER_CONFIG="--set mongo.securityContext.runAsUser=0 @@ -174,7 +201,7 @@ if [ "$CAPIF_STORAGE_CLASS" == "longhorn" ]; then --set grafana.securityContext.runAsUser=0" fi -export SED_CMD=sed + if [[ "$OSTYPE" == "darwin"* ]]; then # Require gnu-sed. if ! [ -x "$(command -v gsed)" ]; then @@ -203,18 +230,4 @@ else done fi -# Directory for environment variables -ENV_DIR="$SCRIPTS_DIR/envs" - -# Environment selection (default: dev) -ENVIRONMENT="${1:-dev}" -ENV_FILE="$ENV_DIR/$ENVIRONMENT.env" -if [ -f "$ENV_FILE" ]; then - echo "Loading environment configuration: $ENVIRONMENT" - set -a - source "$ENV_FILE" - set +a -else - echo "Environment file not found: $ENV_FILE. Using default values." -fi -- GitLab From 843e113ac821a245e93e510777a84ea18c362123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Adorna=20Ruiz?= Date: Mon, 6 Oct 2025 14:03:06 +0200 Subject: [PATCH 014/101] Update protobuf dependencies --- .../requirements.txt | 4 ++-- .../requirements.txt | 16 ++++++++-------- .../requirements.txt | 16 ++++++++-------- .../requirements.txt | 18 +++++++++--------- .../requirements.txt | 18 +++++++++--------- .../TS29222_CAPIF_Events_API/requirements.txt | 18 +++++++++--------- .../requirements.txt | 18 +++++++++--------- .../requirements.txt | 18 +++++++++--------- .../requirements.txt | 2 +- .../requirements.txt | 18 +++++++++--------- 10 files changed, 73 insertions(+), 73 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt index 0db19322..e11792bf 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt @@ -13,13 +13,13 @@ opentelemetry-instrumentation-flask == 0.41b0 opentelemetry-instrumentation-redis == 0.41b0 opentelemetry-instrumentation-pymongo == 0.41b0 opentelemetry-exporter-otlp == 1.20.0 -opentelemetry-exporter-jaeger == 1.20.0 +opentelemetry-exporter-jaeger == 1.21.0 fluent == 0.10.0 fluent-logger == 0.10.0 opentelemetry-api == 1.20.0 opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 Flask-APScheduler == 1.13.1 -werkzeug == 3.0.6 +werkzeug == 3.1.3 gunicorn == 23.0.0 packaging == 24.0 \ No newline at end of file diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt index 5c362aee..6359e828 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt @@ -8,16 +8,16 @@ redis == 4.5.4 flask_jwt_extended == 4.6.0 cryptography == 46.0.1 rfc3987 == 1.3.8 -opentelemetry-instrumentation == 0.40b0 -opentelemetry-instrumentation-flask == 0.40b0 -opentelemetry-instrumentation-redis == 0.40b0 -opentelemetry-instrumentation-pymongo == 0.40b0 -opentelemetry-exporter-otlp == 1.19.0 +opentelemetry-instrumentation == 0.41b0 +opentelemetry-instrumentation-flask == 0.41b0 +opentelemetry-instrumentation-redis == 0.41b0 +opentelemetry-instrumentation-pymongo == 0.41b0 +opentelemetry-exporter-otlp == 1.20.0 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.19.0 -opentelemetry-sdk == 1.19.0 +opentelemetry-api == 1.20.0 +opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 -werkzeug == 3.0.4 +werkzeug == 3.1.3 gunicorn == 23.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt b/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt index 02f71f6c..b8e474be 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt @@ -7,16 +7,16 @@ pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 cryptography == 46.0.1 -opentelemetry-instrumentation == 0.40b0 -opentelemetry-instrumentation-flask == 0.40b0 -opentelemetry-instrumentation-redis == 0.40b0 -opentelemetry-instrumentation-pymongo == 0.40b0 -opentelemetry-exporter-otlp == 1.19.0 -opentelemetry-exporter-jaeger == 1.19.0 +opentelemetry-instrumentation == 0.41b0 +opentelemetry-instrumentation-flask == 0.41b0 +opentelemetry-instrumentation-redis == 0.41b0 +opentelemetry-instrumentation-pymongo == 0.41b0 +opentelemetry-exporter-otlp == 1.20.0 +opentelemetry-exporter-jaeger == 1.21.0 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.19.0 -opentelemetry-sdk == 1.19.0 +opentelemetry-api == 1.20.0 +opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 Flask-APScheduler == 1.13.1 Flask-Script == 2.0.6 diff --git a/services/TS29222_CAPIF_Auditing_API/requirements.txt b/services/TS29222_CAPIF_Auditing_API/requirements.txt index 900c4776..181b2507 100644 --- a/services/TS29222_CAPIF_Auditing_API/requirements.txt +++ b/services/TS29222_CAPIF_Auditing_API/requirements.txt @@ -7,18 +7,18 @@ pymongo == 4.7.3 elasticsearch == 8.4.3 flask_jwt_extended == 4.6.0 cryptography == 46.0.1 -opentelemetry-instrumentation == 0.40b0 -opentelemetry-instrumentation-flask == 0.40b0 -opentelemetry-instrumentation-redis == 0.40b0 -opentelemetry-instrumentation-pymongo == 0.40b0 -opentelemetry-exporter-otlp == 1.19.0 -opentelemetry-exporter-jaeger == 1.19.0 +opentelemetry-instrumentation == 0.41b0 +opentelemetry-instrumentation-flask == 0.41b0 +opentelemetry-instrumentation-redis == 0.41b0 +opentelemetry-instrumentation-pymongo == 0.41b0 +opentelemetry-exporter-otlp == 1.20.0 +opentelemetry-exporter-jaeger == 1.21.0 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.19.0 -opentelemetry-sdk == 1.19.0 +opentelemetry-api == 1.20.0 +opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 -werkzeug == 3.0.4 +werkzeug == 3.1.3 pyopenssl == 25.3.0 gunicorn == 23.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Discover_Service_API/requirements.txt b/services/TS29222_CAPIF_Discover_Service_API/requirements.txt index 881ad9b9..c7aa3456 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/requirements.txt +++ b/services/TS29222_CAPIF_Discover_Service_API/requirements.txt @@ -8,17 +8,17 @@ redis == 4.5.4 flask_jwt_extended == 4.6.0 cryptography == 46.0.1 rfc3987 == 1.3.8 -opentelemetry-instrumentation == 0.40b0 -opentelemetry-instrumentation-flask == 0.40b0 -opentelemetry-instrumentation-redis == 0.40b0 -opentelemetry-instrumentation-pymongo == 0.40b0 -opentelemetry-exporter-otlp == 1.19.0 -opentelemetry-exporter-jaeger == 1.19.0 +opentelemetry-instrumentation == 0.41b0 +opentelemetry-instrumentation-flask == 0.41b0 +opentelemetry-instrumentation-redis == 0.41b0 +opentelemetry-instrumentation-pymongo == 0.41b0 +opentelemetry-exporter-otlp == 1.20.0 +opentelemetry-exporter-jaeger == 1.21.0 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.19.0 -opentelemetry-sdk == 1.19.0 +opentelemetry-api == 1.20.0 +opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 -werkzeug == 3.0.4 +werkzeug == 3.1.3 gunicorn == 23.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Events_API/requirements.txt b/services/TS29222_CAPIF_Events_API/requirements.txt index 618f0c33..63bfea96 100644 --- a/services/TS29222_CAPIF_Events_API/requirements.txt +++ b/services/TS29222_CAPIF_Events_API/requirements.txt @@ -8,21 +8,21 @@ redis == 4.5.4 flask_jwt_extended == 4.6.0 cryptography == 46.0.1 rfc3987 == 1.3.8 -opentelemetry-instrumentation == 0.40b0 -opentelemetry-instrumentation-flask == 0.40b0 -opentelemetry-instrumentation-redis == 0.40b0 -opentelemetry-instrumentation-pymongo == 0.40b0 -opentelemetry-exporter-otlp == 1.19.0 -opentelemetry-exporter-jaeger == 1.19.0 +opentelemetry-instrumentation == 0.41b0 +opentelemetry-instrumentation-flask == 0.41b0 +opentelemetry-instrumentation-redis == 0.41b0 +opentelemetry-instrumentation-pymongo == 0.41b0 +opentelemetry-exporter-otlp == 1.20.0 +opentelemetry-exporter-jaeger == 1.21.0 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.19.0 -opentelemetry-sdk == 1.19.0 +opentelemetry-api == 1.20.0 +opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 Flask-APScheduler == 1.13.1 aiohttp == 3.10.5 async-timeout == 4.0.3 -werkzeug == 3.0.4 +werkzeug == 3.1.3 pyopenssl == 25.3.0 gunicorn == 23.0.0 packaging == 24.0 \ No newline at end of file diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt b/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt index 9b28c5cd..53f0f5dc 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt @@ -8,18 +8,18 @@ elasticsearch == 8.4.3 flask_jwt_extended == 4.6.0 cryptography == 46.0.1 redis == 4.5.4 -opentelemetry-instrumentation == 0.40b0 -opentelemetry-instrumentation-flask == 0.40b0 -opentelemetry-instrumentation-redis == 0.40b0 -opentelemetry-instrumentation-pymongo == 0.40b0 -opentelemetry-exporter-otlp == 1.19.0 -opentelemetry-exporter-jaeger == 1.19.0 +opentelemetry-instrumentation == 0.41b0 +opentelemetry-instrumentation-flask == 0.41b0 +opentelemetry-instrumentation-redis == 0.41b0 +opentelemetry-instrumentation-pymongo == 0.41b0 +opentelemetry-exporter-otlp == 1.20.0 +opentelemetry-exporter-jaeger == 1.21.0 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.19.0 -opentelemetry-sdk == 1.19.0 +opentelemetry-api == 1.20.0 +opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 -werkzeug == 3.0.4 +werkzeug == 3.1.3 pyopenssl == 25.3.0 gunicorn == 23.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Publish_Service_API/requirements.txt b/services/TS29222_CAPIF_Publish_Service_API/requirements.txt index bec672cf..3d20aa33 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/requirements.txt +++ b/services/TS29222_CAPIF_Publish_Service_API/requirements.txt @@ -7,19 +7,19 @@ pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 cryptography == 46.0.1 -opentelemetry-instrumentation == 0.38b0 -opentelemetry-instrumentation-flask == 0.38b0 -opentelemetry-instrumentation-redis == 0.38b0 -opentelemetry-instrumentation-pymongo == 0.38b0 -opentelemetry-exporter-otlp == 1.17.0 -opentelemetry-exporter-jaeger == 1.19.0 +opentelemetry-instrumentation == 0.41b0 +opentelemetry-instrumentation-flask == 0.41b0 +opentelemetry-instrumentation-redis == 0.41b0 +opentelemetry-instrumentation-pymongo == 0.41b0 +opentelemetry-exporter-otlp == 1.20.0 +opentelemetry-exporter-jaeger == 1.21.0 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.17.0 -opentelemetry-sdk == 1.17.0 +opentelemetry-api == 1.20.0 +opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 Flask-APScheduler == 1.13.1 -werkzeug == 3.0.4 +werkzeug == 3.1.3 gunicorn == 23.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Routing_Info_API/requirements.txt b/services/TS29222_CAPIF_Routing_Info_API/requirements.txt index f93b06d4..a1ce6ce4 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/requirements.txt +++ b/services/TS29222_CAPIF_Routing_Info_API/requirements.txt @@ -3,6 +3,6 @@ swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 setuptools == 80.9.0 Flask == 3.0.3 -werkzeug == 3.0.4 +werkzeug == 3.1.3 gunicorn == 23.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Security_API/requirements.txt b/services/TS29222_CAPIF_Security_API/requirements.txt index 44771b29..2b774f35 100644 --- a/services/TS29222_CAPIF_Security_API/requirements.txt +++ b/services/TS29222_CAPIF_Security_API/requirements.txt @@ -8,18 +8,18 @@ redis == 4.5.4 flask_jwt_extended == 4.6.0 cryptography == 46.0.1 rfc3987 == 1.3.8 -opentelemetry-instrumentation == 0.40b0 -opentelemetry-instrumentation-flask == 0.40b0 -opentelemetry-instrumentation-redis == 0.40b0 -opentelemetry-instrumentation-pymongo == 0.40b0 -opentelemetry-exporter-otlp == 1.19.0 -opentelemetry-exporter-jaeger == 1.19.0 +opentelemetry-instrumentation == 0.41b0 +opentelemetry-instrumentation-flask == 0.41b0 +opentelemetry-instrumentation-redis == 0.41b0 +opentelemetry-instrumentation-pymongo == 0.41b0 +opentelemetry-exporter-otlp == 1.20.0 +opentelemetry-exporter-jaeger == 1.21.0 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.19.0 -opentelemetry-sdk == 1.19.0 +opentelemetry-api == 1.20.0 +opentelemetry-sdk == 1.20.0 Flask-APScheduler == 1.13.1 flask_executor == 1.0.0 -werkzeug == 3.0.4 +werkzeug == 3.1.3 gunicorn == 23.0.0 packaging == 24.0 \ No newline at end of file -- GitLab From 3192d778d59ed6338bc78a8371da2666c6e88587 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 9 Oct 2025 13:49:39 +0200 Subject: [PATCH 015/101] Multiple security context for one invoker --- .../capif_security/core/servicesecurity.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py index e6d367ab..59704247 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py @@ -256,7 +256,7 @@ class SecurityOperations(Resource): return bad_request_error(detail="Bad Param", cause="Detected Bad format of param", invalid_params=[{"param": "notificationDestination", "reason": "Not valid URL format"}]) services_security_object = mycol.find_one( - {"api_invoker_id": api_invoker_id}) + {"api_invoker_id": api_invoker_id, "security_info.api_id": {"$in": [info.api_id for info in service_security.security_info]}}, {"_id": 0}) if services_security_object is not None: @@ -388,12 +388,19 @@ class SecurityOperations(Resource): current_app.logger.debug( "Inserted security context in database") - rec = dict() - rec['api_invoker_id'] = api_invoker_id - rec.update(service_security.to_dict()) - mycol.insert_one(rec) + # We use update with $setOnInsert and $push with $each to add the security info array if the document is created + on_insert = service_security.to_dict().copy() + on_insert.pop('security_info', None) - res = make_response(object=serialize_clean_camel_case(service_security), status=201) + security_context = mycol.find_one_and_update({'api_invoker_id': api_invoker_id}, + {"$setOnInsert": on_insert, + "$push": {"security_info": {"$each": [sec.to_dict() for sec in service_security.security_info]}}}, + upsert=True , + return_document=ReturnDocument.AFTER, + projection={'_id': 0, 'api_invoker_id': 0} + ) + + res = make_response(object=dict_to_camel_case(security_context), status=201) res.headers['Location'] = f"https://{os.getenv("CAPIF_HOSTNAME")}/capif-security/v1/trustedInvokers/{str(api_invoker_id)}" return res -- GitLab From 12c522d404df9bcbe2bf2212976892a96a498345 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 16 Oct 2025 11:03:24 +0200 Subject: [PATCH 016/101] Fixed cre4ate security context with aefId or InterfaceDescription --- .../capif_security/core/servicesecurity.py | 76 ++++++++++++++++--- 1 file changed, 66 insertions(+), 10 deletions(-) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py index 59704247..c8922bcc 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py @@ -274,17 +274,17 @@ class SecurityOperations(Resource): capif_service_col = self.db.get_col_by_name( self.db.capif_service_col) - aef_profile = capif_service_col.find_one( + aef_profiles = capif_service_col.find_one( {"api_id": service_instance.api_id, "aef_profiles.interface_descriptions":{ "$elemMatch": service_instance.interface_details.to_dict() } }, - {"aef_profiles.interface_descriptions.$": 1, "_id": 0}) + {"_id": 0}) - current_app.logger.debug("Aef profile: " + str(aef_profile)) + current_app.logger.debug("Aef profile: " + str(aef_profiles)) - if aef_profile is None: + if aef_profiles is None: current_app.logger.error( "Not found service with this interface description: " + json.dumps(clean_empty(service_instance.interface_details.to_dict()))) return not_found_error(detail=f"Service with interfaceDescription {json.dumps(clean_empty(service_instance.interface_details.to_dict()))} not found", cause="Not found Service") @@ -306,28 +306,84 @@ class SecurityOperations(Resource): # # To achieve this, we need to setup at config which domains or IPs are CAPIF-2e or CAPIF-2, and then we need to check if the domain or IP of the service is in the list. - security_methods = aef_profile["aef_profiles"][0]["interface_descriptions"][0]["security_methods"] + valid_security_methods = set() + for aefProfile in aef_profiles.get("aef_profiles", []): + current_app.logger.debug("AEF profile security methods: " + str(aefProfile.get("security_methods", []))) - current_app.logger.debug("Interface security methods: " + str(security_methods)) + profile_methods = set(aefProfile.get("security_methods") or []) + interfaces = aefProfile.get("interface_descriptions", []) + + interface_methods = set() + + if interfaces and len(interfaces) > 0: + for interface in interfaces: + # If the interface has its own security methods, use them + if interface == service_instance.interface_details.to_dict(): + if interface.get("security_methods"): + interface_methods.update(interface["security_methods"]) + # If not, inherit the methods from the profile (if any) + elif profile_methods: + interface_methods.update(profile_methods) + + # After processing all interfaces, use the combined set + valid_security_methods.update(interface_methods) + else: + current_app.logger.debug("No interfaces found in AEF profile.") + return not_found_error(detail=f"Service with interfaceDescription {json.dumps(clean_empty(service_instance.interface_details.to_dict()))} not found", cause="Not found Service") + + current_app.logger.debug("Valid security methods: " + str(valid_security_methods)) pref_security_methods = service_instance.pref_security_methods valid_security_method = set( - security_methods) & set(pref_security_methods) + valid_security_methods) & set(pref_security_methods) else: capif_service_col = self.db.get_col_by_name( self.db.capif_service_col) services_security_object = capif_service_col.find_one( - {"api_id": service_instance.api_id, self.filter_aef_id: service_instance.aef_id}, {"aef_profiles.security_methods.$": 1}) + {"api_id": service_instance.api_id, self.filter_aef_id: service_instance.aef_id}) + current_app.logger.debug("Aef profile: " + str(services_security_object)) if services_security_object is None: current_app.logger.error( "Not found service with this aef id: " + service_instance.aef_id) return not_found_error(detail="Service with this aefId not found", cause="Not found Service") + + # We obtain all the security methods available for the given aef_id + valid_security_methods = set() + for aefProfile in services_security_object.get("aef_profiles", []): + current_app.logger.debug("AEF profile security methods: " + str(aefProfile.get("security_methods", []))) + + profile_methods = set(aefProfile.get("security_methods") or []) + interfaces = aefProfile.get("interface_descriptions", []) + + interface_methods = set() + + current_app.logger.debug(f"Interfaces: {interfaces}, Profile Methods: {profile_methods}") + if interfaces and len(interfaces) > 0: + for interface in interfaces: + # If the interface has its own security methods, use them + if interface.get("security_methods"): + interface_methods.update(interface["security_methods"]) + # If not, inherit the methods from the profile (if any) + elif profile_methods: + interface_methods.update(profile_methods) + else: + current_app.logger.debug("Interface has no security methods and profile has none to inherit.") + + # After processing all interfaces, use the combined set + valid_security_methods.update(interface_methods) + else: + # No interfaces: use the profile's security methods directly + if profile_methods: + valid_security_methods.update(profile_methods) + else: + current_app.logger.debug("AEF profile has no security methods defined (no interfaces either).") + + current_app.logger.debug("Valid security methods: " + str(valid_security_methods)) + # We intersect with preferred security methods pref_security_methods = service_instance.pref_security_methods - valid_security_methods = [security_method for array_methods in services_security_object["aef_profiles"] - for security_method in array_methods["security_methods"]] valid_security_method = set( valid_security_methods) & set(pref_security_methods) -- GitLab From 1441d7822abddfd9e5cc6b98262ce1520e01ad5d Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Fri, 17 Oct 2025 12:49:34 +0200 Subject: [PATCH 017/101] Fixed cre4ate security context for PSK --- .../capif_security/core/servicesecurity.py | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py index c8922bcc..6eb96fda 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py @@ -268,6 +268,9 @@ class SecurityOperations(Resource): service_security.supported_features = negotiated["Final"] for service_instance in service_security.security_info: + + psk_interface = None + if service_instance.interface_details is not None: # We look for if the passed interface exists for the given apiId @@ -331,6 +334,8 @@ class SecurityOperations(Resource): current_app.logger.debug("No interfaces found in AEF profile.") return not_found_error(detail=f"Service with interfaceDescription {json.dumps(clean_empty(service_instance.interface_details.to_dict()))} not found", cause="Not found Service") + psk_interface = service_instance.interface_details.to_dict() + current_app.logger.debug("Valid security methods: " + str(valid_security_methods)) pref_security_methods = service_instance.pref_security_methods @@ -370,13 +375,22 @@ class SecurityOperations(Resource): interface_methods.update(profile_methods) else: current_app.logger.debug("Interface has no security methods and profile has none to inherit.") - + + # Keep track if any interface supports PSK + if psk_interface is None and "PSK" in interface_methods: + psk_interface = interface + # After processing all interfaces, use the combined set valid_security_methods.update(interface_methods) else: # No interfaces: use the profile's security methods directly if profile_methods: valid_security_methods.update(profile_methods) + + # Keep track if profile supports PSK + if psk_interface is None and "PSK" in profile_methods: + psk_interface = aefProfile.domain_name + else: current_app.logger.debug("AEF profile has no security methods defined (no interfaces either).") @@ -412,31 +426,16 @@ class SecurityOperations(Resource): sesionId = request.headers.get('X-TLS-Session-ID', 'N/A') Mkey = request.headers.get('X-TLS-MKey', 'N/A') current_app.logger.info(f"TLS Protocol: {request.headers.get('X-TLS-Protocol', 'N/A')}, Session id: {sesionId}, Master Key: {Mkey}") - - interface = None - if service_instance.interface_details: - current_app.logger.debug("Interface details found") - interface = service_instance.interface_details.to_dict() - - else: - current_app.logger.error("Interface details not found") - services_security_object = capif_service_col.find_one( - {"api_id": service_instance.api_id}, {"aef_profiles": {"$elemMatch": {"aef_id": service_instance.aef_id}}, "_id": 0}) - current_app.logger.debug("Aef profile: " + str(services_security_object["aef_profiles"][0])) - if "interface_descriptions" in services_security_object["aef_profiles"][0]: - current_app.logger.debug("Aef profile: " + str(services_security_object["aef_profiles"][0]["interface_descriptions"])) - interface = services_security_object["aef_profiles"][0]["interface_descriptions"][0] - elif "domain_name" in services_security_object["aef_profiles"][0]: - current_app.logger.debug("Aef profile: " + str(services_security_object["aef_profiles"][0]["domain_name"])) - interface = services_security_object["aef_profiles"][0]["domain_name"] - if interface: + if psk_interface: current_app.logger.debug("Deriving PSK") - psk = self.__derive_psk(Mkey, sesionId, interface) + psk = self.__derive_psk(Mkey, sesionId, psk_interface) current_app.logger.debug("PSK derived : " + str(psk)) service_instance.authorization_info = str(psk) - + else: + current_app.logger.error("No interface information available to derive PSK") + # Send service instance to ACL current_app.logger.debug("Sending message to create ACL") publish_ops.publish_message("acls-messages", "create-acl:"+str( -- GitLab From bc8d4553bc6091f879d2f10d2bef59dd652d2567 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Mon, 20 Oct 2025 07:27:58 +0200 Subject: [PATCH 018/101] Fixed update security --- .../capif_security/core/servicesecurity.py | 145 ++++++++++++------ 1 file changed, 101 insertions(+), 44 deletions(-) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py index 6eb96fda..10701d44 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py @@ -422,14 +422,14 @@ class SecurityOperations(Resource): service_instance.sel_security_method = sorted_methods[0] if service_instance.sel_security_method == "PSK": - request.headers.get('X-TLS-Protocol', 'N/A') - sesionId = request.headers.get('X-TLS-Session-ID', 'N/A') - Mkey = request.headers.get('X-TLS-MKey', 'N/A') - current_app.logger.info(f"TLS Protocol: {request.headers.get('X-TLS-Protocol', 'N/A')}, Session id: {sesionId}, Master Key: {Mkey}") - + tls_protocol = request.headers.get('X-TLS-Protocol', 'N/A') + session_id = request.headers.get('X-TLS-Session-ID', 'N/A') + mkey = request.headers.get('X-TLS-MKey', 'N/A') + current_app.logger.info(f"TLS Protocol: {tls_protocol}, Session id: {session_id}, Master Key: {mkey}") + if psk_interface: current_app.logger.debug("Deriving PSK") - psk = self.__derive_psk(Mkey, sesionId, psk_interface) + psk = self.__derive_psk(mkey, session_id, psk_interface) current_app.logger.debug("PSK derived : " + str(psk)) service_instance.authorization_info = str(psk) @@ -455,7 +455,7 @@ class SecurityOperations(Resource): projection={'_id': 0, 'api_invoker_id': 0} ) - res = make_response(object=dict_to_camel_case(security_context), status=201) + res = make_response(object=serialize_clean_camel_case(service_security), status=201) res.headers['Location'] = f"https://{os.getenv("CAPIF_HOSTNAME")}/capif-security/v1/trustedInvokers/{str(api_invoker_id)}" return res @@ -581,54 +581,125 @@ class SecurityOperations(Resource): update_acls=list() for service_instance in service_security.security_info: + + psk_interface = None + if service_instance.interface_details is not None: # We look for if the passed interface exists for the given apiId capif_service_col = self.db.get_col_by_name( self.db.capif_service_col) - aef_profile = capif_service_col.find_one( + aef_profiles = capif_service_col.find_one( {"api_id": service_instance.api_id, "aef_profiles.interface_descriptions":{ "$elemMatch": service_instance.interface_details.to_dict() } }, - {"aef_profiles.interface_descriptions.$": 1, "_id": 0}) + {"_id": 0}) current_app.logger.debug("Aef profile: " + str(aef_profile)) - if aef_profile is None: + if aef_profiles is None: current_app.logger.error( "Not found service with this interface description: " + json.dumps(clean_empty(service_instance.interface_details.to_dict()))) return not_found_error(detail=f"Service with interfaceDescription {json.dumps(clean_empty(service_instance.interface_details.to_dict()))} not found", cause="Not found Service") - # We obtain the interface security methods - security_methods = aef_profile["aef_profiles"][0]["interface_descriptions"][0]["security_methods"] - current_app.logger.debug("Interface security methods: " + str(security_methods)) + valid_security_methods = set() + for aefProfile in aef_profiles.get("aef_profiles", []): + current_app.logger.debug("AEF profile security methods: " + str(aefProfile.get("security_methods", []))) + + profile_methods = set(aefProfile.get("security_methods") or []) + interfaces = aefProfile.get("interface_descriptions", []) + + interface_methods = set() + + if interfaces and len(interfaces) > 0: + for interface in interfaces: + # If the interface has its own security methods, use them + if interface == service_instance.interface_details.to_dict(): + if interface.get("security_methods"): + interface_methods.update(interface["security_methods"]) + # If not, inherit the methods from the profile (if any) + elif profile_methods: + interface_methods.update(profile_methods) + + # After processing all interfaces, use the combined set + valid_security_methods.update(interface_methods) + else: + current_app.logger.debug("No interfaces found in AEF profile.") + return not_found_error(detail=f"Service with interfaceDescription {json.dumps(clean_empty(service_instance.interface_details.to_dict()))} not found", cause="Not found Service") + + psk_interface = service_instance.interface_details.to_dict() + + current_app.logger.debug("Valid security methods: " + str(valid_security_methods)) pref_security_methods = service_instance.pref_security_methods valid_security_method = set( - security_methods) & set(pref_security_methods) + valid_security_methods) & set(pref_security_methods) else: + + capif_service_col = self.db.get_col_by_name( self.db.capif_service_col) services_security_object = capif_service_col.find_one( - {self.filter_aef_id: service_instance.aef_id}, {"aef_profiles.security_methods.$": 1}) - + {"api_id": service_instance.api_id, self.filter_aef_id: service_instance.aef_id}) + + current_app.logger.debug("Aef profile: " + str(services_security_object)) if services_security_object is None: current_app.logger.error( - "Service api with this aefId not found: " + service_instance.aef_id) + "Not found service with this aef id: " + service_instance.aef_id) return not_found_error(detail="Service with this aefId not found", cause="Not found Service") + + # We obtain all the security methods available for the given aef_id + valid_security_methods = set() + for aefProfile in services_security_object.get("aef_profiles", []): + current_app.logger.debug("AEF profile security methods: " + str(aefProfile.get("security_methods", []))) + + profile_methods = set(aefProfile.get("security_methods") or []) + interfaces = aefProfile.get("interface_descriptions", []) + + interface_methods = set() + + current_app.logger.debug(f"Interfaces: {interfaces}, Profile Methods: {profile_methods}") + if interfaces and len(interfaces) > 0: + for interface in interfaces: + # If the interface has its own security methods, use them + if interface.get("security_methods"): + interface_methods.update(interface["security_methods"]) + # If not, inherit the methods from the profile (if any) + elif profile_methods: + interface_methods.update(profile_methods) + else: + current_app.logger.debug("Interface has no security methods and profile has none to inherit.") + + # Keep track if any interface supports PSK + if psk_interface is None and "PSK" in interface_methods: + psk_interface = interface + + # After processing all interfaces, use the combined set + valid_security_methods.update(interface_methods) + else: + # No interfaces: use the profile's security methods directly + if profile_methods: + valid_security_methods.update(profile_methods) + + # Keep track if profile supports PSK + if psk_interface is None and "PSK" in profile_methods: + psk_interface = aefProfile.domain_name + + else: + current_app.logger.debug("AEF profile has no security methods defined (no interfaces either).") + current_app.logger.debug("Valid security methods: " + str(valid_security_methods)) + + # We intersect with preferred security methods pref_security_methods = service_instance.pref_security_methods - valid_security_methods = [security_method for array_methods in services_security_object["aef_profiles"] - for security_method in array_methods["security_methods"]] valid_security_method = set( valid_security_methods) & set(pref_security_methods) - if len(list(valid_security_method)) == 0: current_app.logger.error( "Not found comptaible security method with pref security method") @@ -639,34 +710,20 @@ class SecurityOperations(Resource): update_acls.append({"api_id": service_instance.api_id, "aef_id": service_instance.aef_id}) if service_instance.sel_security_method == "PSK": - request.headers.get('X-TLS-Protocol', 'N/A') - sesionId = request.headers.get('X-TLS-Session-ID', 'N/A') - Mkey = request.headers.get('X-TLS-MKey', 'N/A') - current_app.logger.info(f"TLS Protocol: {request.headers.get('X-TLS-Protocol', 'N/A')}, Session id: {sesionId}, Master Key: {Mkey}") - - interface = None - if service_instance.interface_details: - current_app.logger.debug("Interface details found") - interface = service_instance.interface_details.to_dict() - - else: - current_app.logger.error("Interface details not found") - services_security_object = capif_service_col.find_one( - {"api_id": service_instance.api_id}, {"aef_profiles": {"$elemMatch": {"aef_id": service_instance.aef_id}}, "_id": 0}) - current_app.logger.debug("Aef profile: " + str(services_security_object["aef_profiles"][0])) - if "interface_descriptions" in services_security_object["aef_profiles"][0]: - current_app.logger.debug("Aef profile: " + str(services_security_object["aef_profiles"][0]["interface_descriptions"])) - interface = services_security_object["aef_profiles"][0]["interface_descriptions"][0] - elif "domain_name" in services_security_object["aef_profiles"][0]: - current_app.logger.debug("Aef profile: " + str(services_security_object["aef_profiles"][0]["domain_name"])) - interface = services_security_object["aef_profiles"][0]["domain_name"] - - if interface: + tls_protocol = request.headers.get('X-TLS-Protocol', 'N/A') + session_id = request.headers.get('X-TLS-Session-ID', 'N/A') + mkey = request.headers.get('X-TLS-MKey', 'N/A') + current_app.logger.info(f"TLS Protocol: {tls_protocol}, Session id: {session_id}, Master Key: {mkey}") + + if psk_interface: current_app.logger.debug("Deriving PSK") - psk = self.__derive_psk(Mkey, sesionId, interface) + psk = self.__derive_psk(mkey, session_id, psk_interface) current_app.logger.debug("PSK derived : " + str(psk)) service_instance.authorization_info = str(psk) + else: + current_app.logger.error("No interface information available to derive PSK") + service_security = service_security.to_dict() service_security = clean_empty(service_security) -- GitLab From e49086f1cb7a752369aa2236b18219bd0484cf25 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Mon, 20 Oct 2025 09:22:56 +0200 Subject: [PATCH 019/101] Fixed PSK security method --- .../capif_security/core/servicesecurity.py | 42 ++++++++++--------- services/nginx/nginx.conf | 1 + 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py index 10701d44..7dee91b3 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py @@ -103,22 +103,26 @@ class SecurityOperations(Resource): ## Derive the PSK using the provided master key, session ID, and interface information # Interface information - host = None - if 'fqdn' in interface: - host = interface['fqdn'] - elif 'ipv4Addr' in interface: - host = interface['ipv4Addr'] - elif 'ipv6Addr' in interface: - host = interface['ipv6Addr'] - port = interface.get('port', None) - - api_prefix = interface.get('apiPrefix', '') - scheme = "https" if port in (None, 443) else "http" - - interface_info = f"{scheme}://{host}" - if port and port != 443: - interface_info += f":{port}" - interface_info += api_prefix + if isinstance(interface, dict): + host = None + if 'fqdn' in interface: + host = interface['fqdn'] + elif 'ipv4Addr' in interface: + host = interface['ipv4Addr'] + elif 'ipv6Addr' in interface: + host = interface['ipv6Addr'] + port = interface.get('port', None) + + api_prefix = interface.get('apiPrefix', '') + scheme = "https" if port in (None, 443) else "http" + + interface_info = f"{scheme}://{host}" + if port and port != 443: + interface_info += f":{port}" + interface_info += api_prefix + else: + interface_info = interface + # Normalize the strings to NFKC form p0_string = unicodedata.normalize("NFKC", interface_info).encode("utf-8") @@ -389,7 +393,7 @@ class SecurityOperations(Resource): # Keep track if profile supports PSK if psk_interface is None and "PSK" in profile_methods: - psk_interface = aefProfile.domain_name + psk_interface = aefProfile.get("domain_name") else: current_app.logger.debug("AEF profile has no security methods defined (no interfaces either).") @@ -688,7 +692,7 @@ class SecurityOperations(Resource): # Keep track if profile supports PSK if psk_interface is None and "PSK" in profile_methods: - psk_interface = aefProfile.domain_name + psk_interface = aefProfile.get("domain_name") else: current_app.logger.debug("AEF profile has no security methods defined (no interfaces either).") @@ -723,7 +727,7 @@ class SecurityOperations(Resource): service_instance.authorization_info = str(psk) else: current_app.logger.error("No interface information available to derive PSK") - + service_security = service_security.to_dict() service_security = clean_empty(service_security) diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index ecde2dc1..49591bdd 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -70,6 +70,7 @@ http { ssl_client_certificate /etc/nginx/certs/ca.crt; ssl_verify_client optional; ssl_verify_depth 2; + ssl_session_tickets off; location / { proxy_pass $scheme://$http_host/api-invoker-management/v1/ui/; -- GitLab From f036c47baaabbcdf7702ba75a32aa90226f594c3 Mon Sep 17 00:00:00 2001 From: guillecxb Date: Thu, 23 Oct 2025 12:23:57 +0200 Subject: [PATCH 020/101] add regisgter hostname for certificate and deployment --- services/docker-compose-register.yml | 3 +++ services/register/register_prepare.sh | 2 +- services/run.sh | 8 ++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/services/docker-compose-register.yml b/services/docker-compose-register.yml index 4abed673..66607e55 100644 --- a/services/docker-compose-register.yml +++ b/services/docker-compose-register.yml @@ -1,5 +1,7 @@ services: register: + hostname: ${CAPIF_REGISTER} + container_name: ${CAPIF_REGISTER} build: context: ${SERVICES_DIR}/register ports: @@ -14,6 +16,7 @@ services: - LOG_LEVEL=${LOG_LEVEL} - TIMEOUT=10 - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} + - REGISTER_HOSTNAME=${CAPIF_REGISTER} extra_hosts: - host.docker.internal:host-gateway - vault:host-gateway diff --git a/services/register/register_prepare.sh b/services/register/register_prepare.sh index 2ae8deff..7cc7b376 100644 --- a/services/register/register_prepare.sh +++ b/services/register/register_prepare.sh @@ -17,7 +17,7 @@ STATE="Madrid" # state or province name LOCALITY="Madrid" # Locality Name (e.g. city) ORGNAME="Telefonica I+D" # Organization Name (eg, company) ORGUNIT="Innovation" # Organizational Unit Name (eg. section) -COMMONNAME="register" +COMMONNAME=${REGISTER_HOSTNAME:-register} EMAIL="inno@tid.es" # certificate's email address # optional extra details CHALLENGE="" # challenge password diff --git a/services/run.sh b/services/run.sh index 9f2983bb..5acc9afe 100755 --- a/services/run.sh +++ b/services/run.sh @@ -4,6 +4,7 @@ source $(dirname "$(readlink -f "$0")")/variables.sh help() { echo "Usage: $1 " echo " -c : Setup different hostname for capif" + echo " -R : Setup different hostname for register service" echo " -s : Run Mock server. Default true" echo " -m : Run monitoring service" echo " -l : Set Log Level (default DEBUG). Select one of: [CRITICAL, FATAL, ERROR, WARNING, WARN, INFO, DEBUG, NOTSET]" @@ -40,6 +41,9 @@ while getopts ":c:l:ms:hrv:f:g:b:" opt; do c) CAPIF_HOSTNAME="$OPTARG" ;; + R) + CAPIF_REGISTER="$OPTARG" + ;; m) MONITORING_STATE=true ;; @@ -78,7 +82,7 @@ while getopts ":c:l:ms:hrv:f:g:b:" opt; do esac done -echo Nginx hostname will be $CAPIF_HOSTNAME, deploy $DEPLOY, monitoring $MONITORING_STATE +echo Nginx hostname will be $CAPIF_HOSTNAME, Register Hostname $CAPIF_REGISTER, deploy $DEPLOY, monitoring $MONITORING_STATE if [ "$BUILD_DOCKER_IMAGES" == "true" ] ; then echo '***Building Docker images set as true***' @@ -139,7 +143,7 @@ yq eval ".ccf.url = \"$CAPIF_HOSTNAME\"" -i "$REGISTER_CONFIG_FILE" -P # Deploy Register service CAPIF_PRIV_KEY_BASE_64=$(echo "$(cat ${SERVICES_DIR}/nginx/certs/server.key)") -REGISTRY_BASE_URL=$REGISTRY_BASE_URL SERVICES_DIR=$SERVICES_DIR OCF_VERSION=$OCF_VERSION CAPIF_PRIV_KEY=$CAPIF_PRIV_KEY_BASE_64 LOG_LEVEL=$LOG_LEVEL docker compose -f "$SERVICES_DIR/docker-compose-register.yml" up --detach $BUILD $CACHED_INFO +REGISTRY_BASE_URL=$REGISTRY_BASE_URL SERVICES_DIR=$SERVICES_DIR OCF_VERSION=$OCF_VERSION CAPIF_PRIV_KEY=$CAPIF_PRIV_KEY_BASE_64 LOG_LEVEL=$LOG_LEVEL CAPIF_REGISTER=$CAPIF_REGISTER docker compose -f "$SERVICES_DIR/docker-compose-register.yml" up --detach $BUILD $CACHED_INFO status=$? if [ $status -eq 0 ]; then -- GitLab From 57b89d8143cec494b1aba966b7118f44552cb0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Adorna=20Ruiz?= Date: Thu, 23 Oct 2025 17:43:17 +0200 Subject: [PATCH 021/101] Resolve "Supported Features mandatory on POST and PUT Requests" --- .../core/apiinvokerenrolmentdetails.py | 14 ++++ .../api_invoker_management/core/responses.py | 2 +- .../core/provider_enrolment_details_api.py | 16 ++++- .../api_provider_management/core/responses.py | 2 +- .../capif_api_invoker_managenet.robot | 55 +++++++++++++++ .../capif_api_provider_management.robot | 67 +++++++++++++++++++ .../api_invoker_management/bodyRequests.py | 6 +- .../api_provider_management/bodyRequests.py | 6 +- 8 files changed, 161 insertions(+), 7 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/apiinvokerenrolmentdetails.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/apiinvokerenrolmentdetails.py index 381df7b7..7c5f74e0 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/apiinvokerenrolmentdetails.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/apiinvokerenrolmentdetails.py @@ -100,6 +100,13 @@ class InvokerManagementOperations(Resource): current_app.logger.error("Bad url format") return bad_request_error(detail="Bad Param", cause="Detected Bad formar of param", invalid_params=[{"param": "notificationDestination", "reason": "Not valid URL format"}]) + if not apiinvokerenrolmentdetail.supported_features: + return bad_request_error( + detail="supportedFeatures not present in request", + cause="supportedFeatures not present", + invalid_params=[{"param": "supportedFeatures", "reason": "not defined"}] + ) + current_app.logger.debug("Signing Certificate") api_invoker_id = 'INV'+str(secrets.token_hex(15)) @@ -148,6 +155,13 @@ class InvokerManagementOperations(Resource): if isinstance(result, Response): return result + if not apiinvokerenrolmentdetail.supported_features: + return bad_request_error( + detail="supportedFeatures not present in request", + cause="supportedFeatures not present", + invalid_params=[{"param": "supportedFeatures", "reason": "not defined"}] + ) + if apiinvokerenrolmentdetail.onboarding_information.api_invoker_public_key != result["onboarding_information"]["api_invoker_public_key"]: cert = self.__sign_cert( apiinvokerenrolmentdetail.onboarding_information.api_invoker_public_key, result["api_invoker_id"]) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py index 8f975cbf..ad4e191d 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py @@ -40,4 +40,4 @@ def not_found_error(detail, cause): prob = ProblemDetails(title="Not Found", status=404, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/provider_enrolment_details_api.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/provider_enrolment_details_api.py index 60b89b14..ac19a496 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/provider_enrolment_details_api.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/provider_enrolment_details_api.py @@ -57,6 +57,13 @@ class ProviderManagementOperations(Resource): "Found provider registered with same id") return forbidden_error(detail="Provider already registered", cause="Identical provider reg sec") + if not api_provider_enrolment_details.supp_feat: + return bad_request_error( + detail="suppFeat not present in request", + cause="suppFeat not present", + invalid_params=[{"param": "suppFeat", "reason": "not defined"}] + ) + api_provider_enrolment_details.api_prov_dom_id = secrets.token_hex( 15) @@ -148,7 +155,14 @@ class ProviderManagementOperations(Resource): if isinstance(result, Response): return result - + + if not api_provider_enrolment_details.supp_feat: + return bad_request_error( + detail="suppFeat not present in request", + cause="suppFeat not present", + invalid_params=[{"param": "suppFeat", "reason": "not defined"}] + ) + negotiated_supported_features = return_negotiated_supp_feat_dict(api_provider_enrolment_details.supp_feat) api_provider_enrolment_details.supp_feat = negotiated_supported_features["Final"] diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py index 8f975cbf..ad4e191d 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py @@ -40,4 +40,4 @@ def not_found_error(detail, cause): prob = ProblemDetails(title="Not Found", status=404, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) diff --git a/tests/features/CAPIF Api Invoker Management/capif_api_invoker_managenet.robot b/tests/features/CAPIF Api Invoker Management/capif_api_invoker_managenet.robot index 57005b56..be86dbb7 100644 --- a/tests/features/CAPIF Api Invoker Management/capif_api_invoker_managenet.robot +++ b/tests/features/CAPIF Api Invoker Management/capif_api_invoker_managenet.robot @@ -182,3 +182,58 @@ Update Onboarded Network App Certificate # Check Results Check Response Variable Type And Values ${resp} 200 APIInvokerEnrolmentDetails ... notificationDestination=${new_notification_destination} + +Onboard invoker without supported_features + [Tags] capif_api_invoker_management-8 + # Default Invoker Registration and Onboarding + ${register_user_info}= Register User At Jwt Auth + ... username=${invoker_username} role=${INVOKER_ROLE} + + ${request_body}= Create Onboarding Notification Body + ... http://${CAPIF_CALLBACK_IP}:${CAPIF_CALLBACK_PORT}/netapp_callback + ... ${register_user_info['csr_request']} + ... ${invoker_username} + ... supported_features=${None} + + ${resp}= Post Request Capif + ... ${register_user_info['ccf_onboarding_url']} + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... access_token=${register_user_info['access_token']} + + # Check Results + Check Response Variable Type And Values ${resp} 400 ProblemDetails + ... status=400 + ... title=Bad Request + ... detail=supportedFeatures not present in request + ... cause=supportedFeatures not present + +Update Onboarded Network App without supported_features + [Tags] capif_api_invoker_management-10 + ${new_notification_destination}= Set Variable + ... http://${CAPIF_CALLBACK_IP}:${CAPIF_CALLBACK_PORT}/netapp_new_callback + # Default Invoker Registration and Onboarding + ${register_user_info} ${url} ${request_body}= Invoker Default Onboarding + + Set To Dictionary + ... ${request_body} + ... notificationDestination=${new_notification_destination} + + Remove From Dictionary + ... ${request_body} + ... supportedFeatures + + ${resp}= Put Request Capif + ... ${url.path} + ... ${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 400 ProblemDetails + ... status=400 + ... title=Bad Request + ... detail=supportedFeatures not present in request + ... cause=supportedFeatures not present diff --git a/tests/features/CAPIF Api Provider Management/capif_api_provider_management.robot b/tests/features/CAPIF Api Provider Management/capif_api_provider_management.robot index bda73735..44ba9ffe 100644 --- a/tests/features/CAPIF Api Provider Management/capif_api_provider_management.robot +++ b/tests/features/CAPIF Api Provider Management/capif_api_provider_management.robot @@ -203,3 +203,70 @@ Delete Not Registered Api Provider ... title=Not Found ... detail=Not Exist Provider Enrolment Details ... cause=Not found registrations to send this api provider details + +Onboard provider without supported_features + [Tags] capif_api_provider_management-9 + # Default Provider Registration and Onboarding + ${register_user_info}= Register User At Jwt Auth Provider + ... username=${PROVIDER_USERNAME} + + # Create provider Registration Body + ${apf_func_details}= Create Api Provider Function Details + ... ${register_user_info['apf_username']} + ... ${register_user_info['apf_csr_request']} + ... APF + ${aef_func_details}= Create Api Provider Function Details + ... ${register_user_info['aef_username']} + ... ${register_user_info['aef_csr_request']} + ... AEF + ${amf_func_details}= Create Api Provider Function Details + ... ${register_user_info['amf_username']} + ... ${register_user_info['amf_csr_request']} + ... AMF + ${api_prov_funcs}= Create List ${apf_func_details} ${aef_func_details} ${amf_func_details} + + ${request_body}= Create Api Provider Enrolment Details Body + ... ${register_user_info['access_token']} + ... ${api_prov_funcs} + ... suppFeat=${None} + + # Register Provider + ${resp}= Post Request Capif + ... /api-provider-management/v1/registrations + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... access_token=${register_user_info['access_token']} + + # Check Results + Check Response Variable Type And Values ${resp} 400 ProblemDetails + ... status=400 + ... title=Bad Request + ... detail=suppFeat not present in request + ... cause=suppFeat not present + +Update Registered Api Provider + [Tags] capif_api_provider_management-10 + ${register_user_info}= Provider Default Registration + + ${request_body}= Set Variable ${register_user_info['provider_enrollment_details']} + + Set To Dictionary ${request_body} apiProvDomInfo=ROBOT_TESTING_MOD + + Remove From Dictionary + ... ${request_body} + ... suppFeat + + ${resp}= Put Request Capif + ... ${register_user_info['resource_url'].path} + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 400 ProblemDetails + ... status=400 + ... title=Bad Request + ... detail=suppFeat not present in request + ... cause=suppFeat not present diff --git a/tests/libraries/api_invoker_management/bodyRequests.py b/tests/libraries/api_invoker_management/bodyRequests.py index 37b9456d..aebcff7c 100644 --- a/tests/libraries/api_invoker_management/bodyRequests.py +++ b/tests/libraries/api_invoker_management/bodyRequests.py @@ -1,7 +1,6 @@ -def create_onboarding_notification_body(notification_destination="https://host.docker.internal/netapp_callback", api_invoker_public_key="ApiInvokerPublicKey",api_invoker_information='ROBOT_TESTING', api_invoker_id=None): +def create_onboarding_notification_body(notification_destination="https://host.docker.internal/netapp_callback", api_invoker_public_key="ApiInvokerPublicKey",api_invoker_information='ROBOT_TESTING', api_invoker_id=None, supported_features="0"): data = { "notificationDestination": notification_destination, - "supportedFeatures": "fffffff", "apiInvokerInformation": api_invoker_information, "websockNotifConfig": { "requestWebsocketUri": True, @@ -17,4 +16,7 @@ def create_onboarding_notification_body(notification_destination="https://host.d if api_invoker_id != None: data['apiInvokerId'] = api_invoker_id + if supported_features != None: + data['supportedFeatures'] = supported_features + return (data) diff --git a/tests/libraries/api_provider_management/bodyRequests.py b/tests/libraries/api_provider_management/bodyRequests.py index e024a5b9..b80330b4 100644 --- a/tests/libraries/api_provider_management/bodyRequests.py +++ b/tests/libraries/api_provider_management/bodyRequests.py @@ -1,12 +1,14 @@ -def create_api_provider_enrolment_details_body(regSec, api_prov_funcs, apiProvDomInfo="ROBOT_TESTING"): +def create_api_provider_enrolment_details_body(regSec, api_prov_funcs, apiProvDomInfo="ROBOT_TESTING", suppFeat="0"): data = { "regSec": regSec, "apiProvFuncs": api_prov_funcs, "apiProvDomInfo": apiProvDomInfo, - "suppFeat": "fffffff", "failReason": "string" } + if suppFeat != None: + data['suppFeat'] = suppFeat + return (data) -- GitLab From 4616f80b99971474bd74567f10ff017e8f6b19b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Adorna=20Ruiz?= Date: Tue, 28 Oct 2025 11:40:54 +0100 Subject: [PATCH 022/101] fix test ID --- .../capif_api_invoker_managenet.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/features/CAPIF Api Invoker Management/capif_api_invoker_managenet.robot b/tests/features/CAPIF Api Invoker Management/capif_api_invoker_managenet.robot index be86dbb7..3052e194 100644 --- a/tests/features/CAPIF Api Invoker Management/capif_api_invoker_managenet.robot +++ b/tests/features/CAPIF Api Invoker Management/capif_api_invoker_managenet.robot @@ -210,7 +210,7 @@ Onboard invoker without supported_features ... cause=supportedFeatures not present Update Onboarded Network App without supported_features - [Tags] capif_api_invoker_management-10 + [Tags] capif_api_invoker_management-9 ${new_notification_destination}= Set Variable ... http://${CAPIF_CALLBACK_IP}:${CAPIF_CALLBACK_PORT}/netapp_new_callback # Default Invoker Registration and Onboarding -- GitLab From 112da115ad83e721e245c736c138e2385de251c0 Mon Sep 17 00:00:00 2001 From: guillecxb Date: Fri, 31 Oct 2025 10:27:06 +0100 Subject: [PATCH 023/101] include new field ccfid --- .../controllers/helper_controller.py | 6 ++ .../helper_service/core/helper_operations.py | 56 +++++++++++++++---- services/helper/helper_service/db/db.py | 18 +++++- 3 files changed, 68 insertions(+), 12 deletions(-) diff --git a/services/helper/helper_service/controllers/helper_controller.py b/services/helper/helper_service/controllers/helper_controller.py index 19b11160..8d50f7c0 100644 --- a/services/helper/helper_service/controllers/helper_controller.py +++ b/services/helper/helper_service/controllers/helper_controller.py @@ -191,3 +191,9 @@ def remove_config_category(): return jsonify(message="Missing 'category_name' in request body"), 400 return helper_operation.remove_config_category(category_name) + + +@helper_routes.route("/helper/getCcfId", methods=["GET"]) +def get_ccf_id(): + """Returns the current CAPIF ccfId""" + return helper_operation.get_ccf_id() diff --git a/services/helper/helper_service/core/helper_operations.py b/services/helper/helper_service/core/helper_operations.py index f0c1f6d3..6f1fe63e 100644 --- a/services/helper/helper_service/core/helper_operations.py +++ b/services/helper/helper_service/core/helper_operations.py @@ -17,6 +17,8 @@ from utils.utils import ( class HelperOperations: + PROTECTED_FIELDS = ["ccf_id"] + def __init__(self): self.db = MongoDatabse() self.mimetype = 'application/json' @@ -228,6 +230,10 @@ class HelperOperations: """ current_app.logger.debug(f"Updating configuration parameter: {param_path} with value: {new_value}") + # Protect immutable fields + if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): + return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be modified"), 403 + config_col = self.db.get_col_by_name(self.db.capif_configuration) existing_config = config_col.find_one({}, {"_id": 0}) @@ -251,9 +257,6 @@ class HelperOperations: def replace_configuration(self, new_config): - """ - Replace all current settings with a new one. - """ current_app.logger.debug("Replacing entire CAPIF configuration") error_response = validate_snake_case_keys(new_config) @@ -263,16 +266,18 @@ class HelperOperations: config_col = self.db.get_col_by_name(self.db.capif_configuration) existing_config = config_col.find_one({}, {"_id": 0}) - if existing_config: - new_config = convert_nested_values(new_config, existing_config) - - result = config_col.replace_one({}, new_config, upsert=True) + if not existing_config: + return jsonify(message="No existing configuration found"), 404 - if result.matched_count == 0: - return jsonify(message="No existing configuration found; a new one was created"), 201 + # Preserve protected fields + for field in self.PROTECTED_FIELDS: + if field in existing_config: + new_config[field] = existing_config[field] - return jsonify(message="Configuration replaced successfully"), 200 + new_config = convert_nested_values(new_config, existing_config) + result = config_col.replace_one({}, new_config, upsert=True) + return jsonify(message="Configuration replaced successfully (protected fields preserved)"), 200 def add_new_configuration(self, category_name, category_values): @@ -281,6 +286,10 @@ class HelperOperations: """ current_app.logger.debug(f"Adding new category: {category_name} with values: {category_values}") + # Block protected field creation + if category_name in self.PROTECTED_FIELDS: + return jsonify(message=f"The category '{category_name}' is immutable and cannot be modified"), 403 + config_col = self.db.get_col_by_name(self.db.capif_configuration) category_name_snake = to_snake_case(category_name) @@ -299,6 +308,11 @@ class HelperOperations: def add_new_config_setting(self, param_path, new_value): """Add a new parameter in 'settings'.""" current_app.logger.debug(f"Adding new configuration setting: {param_path} with value: {new_value}") + + # Block protected field creation + if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): + return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be added or modified"), 403 + config_col = self.db.get_col_by_name(self.db.capif_configuration) param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) @@ -316,6 +330,10 @@ class HelperOperations: """Removes a specific parameter inside 'settings'.""" current_app.logger.debug(f"Removing configuration parameter: {param_path}") + # Prevent deletion of protected fields + if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): + return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be removed"), 403 + config_col = self.db.get_col_by_name(self.db.capif_configuration) param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) @@ -334,6 +352,10 @@ class HelperOperations: """Removes an entire category inside 'settings'.""" current_app.logger.debug(f"Removing configuration category: {category_name}") + # Prevent deletion of protected fields + if category_name in self.PROTECTED_FIELDS: + return jsonify(message=f"The category '{category_name}' is immutable and cannot be removed"), 403 + config_col = self.db.get_col_by_name(self.db.capif_configuration) category_name_snake = to_snake_case(category_name) @@ -346,3 +368,17 @@ class HelperOperations: return jsonify(message=f"No configuration found or category '{category_name_snake}' not removed"), 404 return jsonify(message=f"Category '{category_name_snake}' removed successfully"), 200 + + def get_ccf_id(self): + """ + Returns the current CAPIF unique identifier (ccf_id). + """ + current_app.logger.debug("Retrieving ccf_id from capif_configuration") + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + config = config_col.find_one({}, {"_id": 0, "ccf_id": 1}) + + if not config or "ccf_id" not in config: + return jsonify(message="ccf_id not found"), 404 + + return jsonify(ccf_id=config["ccf_id"]), 200 diff --git a/services/helper/helper_service/db/db.py b/services/helper/helper_service/db/db.py index 8a7ea94d..b4414123 100644 --- a/services/helper/helper_service/db/db.py +++ b/services/helper/helper_service/db/db.py @@ -1,4 +1,5 @@ import time +import uuid from bson.codec_options import CodecOptions from config import Config @@ -59,8 +60,21 @@ class MongoDatabse(): # Read configuration from config.yaml default_config = self.config["capif_configuration"] + # Generate unique ccf_id + ccf_id = str(uuid.uuid4()) + default_config["ccf_id"] = ccf_id + capif_col.insert_one(default_config) - print("Default data inserted into the capif_configuration collection from config.yaml") + print(f"Default data inserted into capif_configuration from config.yaml with ccf_id={ccf_id}") + else: - print("The capif_configuration collection already contains data. No default values were inserted.") + # Ensure ccf_id exists even if config already there + existing_config = capif_col.find_one({}, {"_id": 0}) + if "ccf_id" not in existing_config: + ccf_id = str(uuid.uuid4()) + capif_col.update_one({}, {"$set": {"ccf_id": ccf_id}}) + print(f"Added missing ccf_id={ccf_id} to existing CAPIF configuration") + else: + print("Capif_configuration already contains data with a unique ccf_id. No default values inserted.") + -- GitLab From 5858afcd58cc40a842c391786459e521d45dfaae Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 3 Nov 2025 12:45:42 +0100 Subject: [PATCH 024/101] Added one test to check CcfId new endpoint at helper --- tests/features/Helper/__init__.robot | 2 ++ tests/features/Helper/helper.robot | 27 ++++++++++++++++++++++ tests/resources/common/basicRequests.robot | 13 +++++++++++ 3 files changed, 42 insertions(+) create mode 100644 tests/features/Helper/__init__.robot create mode 100644 tests/features/Helper/helper.robot diff --git a/tests/features/Helper/__init__.robot b/tests/features/Helper/__init__.robot new file mode 100644 index 00000000..9be83f5a --- /dev/null +++ b/tests/features/Helper/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Force Tags helper \ No newline at end of file diff --git a/tests/features/Helper/helper.robot b/tests/features/Helper/helper.robot new file mode 100644 index 00000000..12e12e13 --- /dev/null +++ b/tests/features/Helper/helper.robot @@ -0,0 +1,27 @@ +*** Settings *** +Resource /opt/robot-tests/tests/resources/common.resource +Library /opt/robot-tests/tests/libraries/bodyRequests.py +Library XML +Library String +Resource /opt/robot-tests/tests/resources/common/basicRequests.robot +Resource ../../resources/common.resource +Resource ../../resources/common/basicRequests.robot + +Suite Teardown Reset Testing Environment +Test Setup Reset Testing Environment +Test Teardown Reset Testing Environment + + +*** Variables *** +${API_INVOKER_NOT_REGISTERED} not-valid +${SUBSCRIBER_ID_NOT_VALID} not-valid +${SUBSCRIPTION_ID_NOT_VALID} not-valid + + +*** Test Cases *** +Obtain ccfId + [Tags] helper_1 smoke + + ${ccfId}= Get Capif Ccf Id + + Log CCF ID obtained: ${ccfId} \ No newline at end of file diff --git a/tests/resources/common/basicRequests.robot b/tests/resources/common/basicRequests.robot index 2fcd1894..558fcf3d 100644 --- a/tests/resources/common/basicRequests.robot +++ b/tests/resources/common/basicRequests.robot @@ -967,3 +967,16 @@ Get Number Of Services ${size}= Get Length ${resp.json()['services']} RETURN ${size} + +Get Capif Ccf Id + ${resp}= Get Request Capif + ... /helper/getCcfId + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + Should Be Equal As Integers ${resp.status_code} 200 + ${ccfId}= Get From Dictionary ${resp.json()} ccf_id + Set Suite Variable ${CCF_ID} ${ccfId} + + RETURN ${ccfId} -- GitLab From 535cb602abcca5e28d045231e6703c84c5f2bd5c Mon Sep 17 00:00:00 2001 From: guillecxb Date: Mon, 3 Nov 2025 14:08:32 +0100 Subject: [PATCH 025/101] unify ccf_id generation with other CAPIF services --- services/helper/helper_service/db/db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/helper/helper_service/db/db.py b/services/helper/helper_service/db/db.py index b4414123..30c25e8b 100644 --- a/services/helper/helper_service/db/db.py +++ b/services/helper/helper_service/db/db.py @@ -1,5 +1,5 @@ import time -import uuid +import secrets from bson.codec_options import CodecOptions from config import Config @@ -61,7 +61,7 @@ class MongoDatabse(): default_config = self.config["capif_configuration"] # Generate unique ccf_id - ccf_id = str(uuid.uuid4()) + ccf_id = "CCF" + secrets.token_hex(15) default_config["ccf_id"] = ccf_id capif_col.insert_one(default_config) @@ -71,7 +71,7 @@ class MongoDatabse(): # Ensure ccf_id exists even if config already there existing_config = capif_col.find_one({}, {"_id": 0}) if "ccf_id" not in existing_config: - ccf_id = str(uuid.uuid4()) + ccf_id = "CCF" + secrets.token_hex(15) capif_col.update_one({}, {"$set": {"ccf_id": ccf_id}}) print(f"Added missing ccf_id={ccf_id} to existing CAPIF configuration") else: -- GitLab From 5cddfba7bd1ec0420cd6c025bfc3dd37d23dfe08 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 3 Nov 2025 14:21:04 +0100 Subject: [PATCH 026/101] Add Regex to first test inside helper --- tests/features/Helper/helper.robot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/features/Helper/helper.robot b/tests/features/Helper/helper.robot index 12e12e13..b9f8300d 100644 --- a/tests/features/Helper/helper.robot +++ b/tests/features/Helper/helper.robot @@ -24,4 +24,6 @@ Obtain ccfId ${ccfId}= Get Capif Ccf Id - Log CCF ID obtained: ${ccfId} \ No newline at end of file + Log CCF ID obtained: ${ccfId} + Should Match Regexp ${ccfId} ^CCF[a-zA-Z0-9]+ + \ No newline at end of file -- GitLab From c3f2fd7c50b56cf3d96f1338abb80642ee9986d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Thu, 6 Nov 2025 17:57:47 +0100 Subject: [PATCH 027/101] switch certificate generation to Vault-managed CA --- services/register/Dockerfile | 2 +- services/register/register_prepare.sh | 93 ++++++++++++++++----------- 2 files changed, 56 insertions(+), 39 deletions(-) diff --git a/services/register/Dockerfile b/services/register/Dockerfile index 24676e54..5bdb0347 100644 --- a/services/register/Dockerfile +++ b/services/register/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libxslt1-dev && \ rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir -r requirements.txt -RUN apt-get update && apt-get install -y --no-install-recommends openssl curl redis +RUN apt-get update && apt-get install -y --no-install-recommends openssl curl redis jq COPY . /usr/src/app diff --git a/services/register/register_prepare.sh b/services/register/register_prepare.sh index 7cc7b376..05234114 100644 --- a/services/register/register_prepare.sh +++ b/services/register/register_prepare.sh @@ -2,45 +2,62 @@ CERTS_FOLDER="/usr/src/app/register_service/certs" cd $CERTS_FOLDER -openssl req -x509 \ - -sha256 -days 356 \ - -nodes \ - -newkey rsa:2048 \ - -subj "/CN=register/C=ES/L=Madrid" \ - -keyout /usr/src/app/register_service/certs/registerCA.key -out /usr/src/app/register_service/certs/registerCA.crt - - -openssl genrsa -out /usr/src/app/register_service/certs/register_key.key 2048 - -COUNTRY="ES" # 2 letter country-code -STATE="Madrid" # state or province name -LOCALITY="Madrid" # Locality Name (e.g. city) -ORGNAME="Telefonica I+D" # Organization Name (eg, company) -ORGUNIT="Innovation" # Organizational Unit Name (eg. section) -COMMONNAME=${REGISTER_HOSTNAME:-register} -EMAIL="inno@tid.es" # certificate's email address -# optional extra details -CHALLENGE="" # challenge password -COMPANY="" # company name - -# DAYS="-days 365" - -# create the certificate request -cat <<__EOF__ | openssl req -new $DAYS -key /usr/src/app/register_service/certs/register_key.key -out /usr/src/app/register_service/certs/register.csr -$COUNTRY -$STATE -$LOCALITY -$ORGNAME -$ORGUNIT -$COMMONNAME -$EMAIL -$CHALLENGE -$COMPANY -__EOF__ - -openssl x509 -req -in /usr/src/app/register_service/certs/register.csr -CA /usr/src/app/register_service/certs/registerCA.crt -CAkey /usr/src/app/register_service/certs/registerCA.key -CAcreateserial -out /usr/src/app/register_service/certs/register_cert.crt -days 365 -sha256 - +# === CONFIGURATION === +VAULT_ADDR="http://$VAULT_HOSTNAME:$VAULT_PORT" +VAULT_TOKEN=$VAULT_ACCESS_TOKEN + +COUNTRY="ES" # 2 letter country-code +STATE="Madrid" # state or province name +LOCALITY="Madrid" # Locality Name (e.g. city) +ORGNAME="Telefonica I+D" # Organization Name (eg, company) +ORGUNIT="Innovation" # Organizational Unit Name (eg. section) +COMMONNAME=${REGISTER_HOSTNAME:-register} +EMAIL="inno@tid.es" # certificate's email address +TTL="4300h" + +echo "Generating private key for Register." +openssl genrsa -out register_key.key 2048 + +echo "Creating CSR for CN=${COMMONNAME}." +openssl req -new -key register_key.key \ + -subj "/C=${COUNTRY}/ST=${STATE}/L=${LOCALITY}/O=${ORGNAME}/OU=${ORGUNIT}/CN=${COMMONNAME}/emailAddress=${EMAIL}" \ + -out register.csr + +echo "Downloading CA chain from Vault." +curl -s -H "X-Vault-Token: ${VAULT_TOKEN}" \ + "${VAULT_ADDR}/v1/secret/data/ca" | jq -r '.data.data.ca' > ca_root.crt + +if [ ! -s ca_root.crt ]; then + echo "ERROR: could not retrieve CA from Vault." + exit 1 +fi + +echo "CA chain retrieved successfully." + +echo "Requesting certificate signature from Vault..." +CSR_CONTENT=$(awk '{printf "%s\\n", $0}' register.csr) + +curl -s -X POST \ + -H "X-Vault-Token: ${VAULT_TOKEN}" \ + -d "{\"csr\": \"${CSR_CONTENT}\", \"common_name\": \"${COMMONNAME}\", \"format\": \"pem_bundle\", \"ttl\": \"${TTL}\"}" \ + "${VAULT_ADDR}/v1/pki_int/sign/my-ca" \ + | jq -r '.data.certificate' | awk '{gsub("\\\\n","\n")}1' > register_cert.crt + +if [ ! -s register_cert.crt ]; then + echo "ERROR: could not retrieve signed certificate from Vault." + exit 1 +fi + +echo "Certificate signed successfully by Vault intermediate CA." + +echo "Verifying certificate chain." +openssl verify -CAfile ca_root.crt register_cert.crt || { + echo "WARNING: certificate verification failed" +} + +echo "Starting Register service with signed certificate." gunicorn --certfile=/usr/src/app/register_service/certs/register_cert.crt \ --keyfile=/usr/src/app/register_service/certs/register_key.key \ + --ca-certs=/usr/src/app/register_service/certs/ca_root.crt \ --bind 0.0.0.0:8080 \ --chdir /usr/src/app/register_service wsgi:app \ No newline at end of file -- GitLab From deb53cbb9393ea040ff88b68f07ef2c6aabc1fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Tue, 11 Nov 2025 09:09:33 +0100 Subject: [PATCH 028/101] add register hostname to helm register --- helm/capif/charts/ocf-register/templates/deployment.yaml | 2 ++ helm/capif/charts/ocf-register/values.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/helm/capif/charts/ocf-register/templates/deployment.yaml b/helm/capif/charts/ocf-register/templates/deployment.yaml index 23ef72ca..31afe692 100644 --- a/helm/capif/charts/ocf-register/templates/deployment.yaml +++ b/helm/capif/charts/ocf-register/templates/deployment.yaml @@ -53,6 +53,8 @@ spec: value: {{ quote .Values.env.logLevel }} - name: TIMEOUT value: {{ quote .Values.env.timeout }} + - name: REGISTER_HOSTNAME + value: {{ quote .Values.env.registerHostname }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-register/values.yaml b/helm/capif/charts/ocf-register/values.yaml index bf12e498..dbe8c071 100644 --- a/helm/capif/charts/ocf-register/values.yaml +++ b/helm/capif/charts/ocf-register/values.yaml @@ -21,6 +21,7 @@ env: vaultPort: 8200 vaultAccessToken: dev-only-token capifHostname: capif-test.example.int + registerHostname: register.example.int logLevel: "INFO" timeout: "30" -- GitLab From dec6fd9f40f0bb5b4903f11df2dde5c0ec6ed72c Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Tue, 11 Nov 2025 11:05:24 +0100 Subject: [PATCH 029/101] Added generate script --- services/docker-compose-capif.yml | 1 + services/helper/config.yaml | 47 +- services/helper/helper_service/app.py | 43 +- services/helper/helper_service/generate.sh | 64 + .../helper_service/openapi_helper_api.yaml | 1390 +++++ .../openapi_helper_configuration.yaml | 249 + .../helper_service/services/api/__init__.py | 0 .../helper_service/services/api/__main__.py | 19 + .../services/api/controllers/__init__.py | 0 .../api/controllers/default_controller.py | 126 + .../api/controllers/security_controller.py | 2 + .../helper_service/services/api/encoder.py | 19 + .../services/api/models/__init__.py | 53 + .../services/api/models/aef_location.py | 119 + .../services/api/models/aef_profile.py | 275 + .../models/api_invoker_enrolment_details.py | 351 ++ .../services/api/models/api_list.py | 67 + .../models/api_provider_enrolment_details.py | 297 + .../api/models/api_provider_func_role.py | 34 + .../models/api_provider_function_details.py | 151 + .../services/api/models/base_model.py | 68 + .../services/api/models/capif_event.py | 34 + .../services/api/models/capif_event_filter.py | 125 + .../services/api/models/civic_address.py | 919 +++ .../services/api/models/communication_type.py | 34 + .../services/api/models/custom_operation.py | 155 + .../services/api/models/data_format.py | 34 + .../services/api/models/ellipsoid_arc.py | 265 + .../services/api/models/error_response.py | 87 + .../services/api/models/event_subscription.py | 247 + .../services/api/models/gad_shape.py | 65 + .../services/api/models/geographic_area.py | 439 ++ .../api/models/geographical_coordinates.py | 99 + .../api/models/interface_description.py | 155 + .../services/api/models/notification_flag.py | 34 + .../api/models/notification_method.py | 34 + .../api/models/onboarding_information.py | 121 + .../services/api/models/operation.py | 34 + .../api/models/paginated_response_base.py | 153 + .../api/models/paginated_response_event.py | 183 + .../api/models/paginated_response_invoker.py | 183 + .../api/models/paginated_response_provider.py | 183 + .../api/models/paginated_response_security.py | 183 + .../api/models/paginated_response_service.py | 183 + .../api/models/partitioning_criteria.py | 34 + .../services/api/models/point.py | 97 + .../services/api/models/point_altitude.py | 131 + .../api/models/point_altitude_uncertainty.py | 227 + .../api/models/point_uncertainty_circle.py | 129 + .../api/models/point_uncertainty_ellipse.py | 161 + .../services/api/models/polygon.py | 103 + .../services/api/models/protocol.py | 34 + .../services/api/models/published_api_path.py | 65 + .../api/models/registration_information.py | 93 + .../api/models/reporting_information.py | 295 + .../services/api/models/resource.py | 213 + .../api/models/security_information.py | 235 + .../services/api/models/security_method.py | 34 + .../api/models/service_api_description.py | 325 + .../services/api/models/service_security.py | 211 + .../api/models/shareable_information.py | 95 + .../api/models/supported_gad_shapes.py | 34 + .../api/models/uncertainty_ellipse.py | 133 + .../services/api/models/version.py | 157 + .../api/models/websock_notif_config.py | 91 + .../services/api/openapi/openapi.yaml | 5494 +++++++++++++++++ .../services/api/typing_utils.py | 30 + .../helper_service/services/api/util.py | 147 + .../services/configuration/__init__.py | 0 .../services/configuration/__main__.py | 19 + .../configuration/controllers/__init__.py | 0 .../controllers/default_controller.py | 116 + .../controllers/security_controller.py | 2 + .../services/configuration/encoder.py | 19 + .../services/configuration/models/__init__.py | 7 + .../configuration/models/base_model.py | 68 + .../models/config_category_create_request.py | 95 + .../models/config_category_remove_request.py | 65 + .../models/config_param_remove_request.py | 65 + .../models/config_param_update_request.py | 95 + .../configuration/models/generic_error.py | 91 + .../configuration/openapi/openapi.yaml | 364 ++ .../services/configuration/typing_utils.py | 30 + .../services/configuration/util.py | 147 + services/helper/requirements.txt | 24 +- services/nginx/nginx.conf | 6 +- 86 files changed, 17072 insertions(+), 33 deletions(-) create mode 100755 services/helper/helper_service/generate.sh create mode 100644 services/helper/helper_service/openapi_helper_api.yaml create mode 100644 services/helper/helper_service/openapi_helper_configuration.yaml create mode 100644 services/helper/helper_service/services/api/__init__.py create mode 100644 services/helper/helper_service/services/api/__main__.py create mode 100644 services/helper/helper_service/services/api/controllers/__init__.py create mode 100644 services/helper/helper_service/services/api/controllers/default_controller.py create mode 100644 services/helper/helper_service/services/api/controllers/security_controller.py create mode 100644 services/helper/helper_service/services/api/encoder.py create mode 100644 services/helper/helper_service/services/api/models/__init__.py create mode 100644 services/helper/helper_service/services/api/models/aef_location.py create mode 100644 services/helper/helper_service/services/api/models/aef_profile.py create mode 100644 services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py create mode 100644 services/helper/helper_service/services/api/models/api_list.py create mode 100644 services/helper/helper_service/services/api/models/api_provider_enrolment_details.py create mode 100644 services/helper/helper_service/services/api/models/api_provider_func_role.py create mode 100644 services/helper/helper_service/services/api/models/api_provider_function_details.py create mode 100644 services/helper/helper_service/services/api/models/base_model.py create mode 100644 services/helper/helper_service/services/api/models/capif_event.py create mode 100644 services/helper/helper_service/services/api/models/capif_event_filter.py create mode 100644 services/helper/helper_service/services/api/models/civic_address.py create mode 100644 services/helper/helper_service/services/api/models/communication_type.py create mode 100644 services/helper/helper_service/services/api/models/custom_operation.py create mode 100644 services/helper/helper_service/services/api/models/data_format.py create mode 100644 services/helper/helper_service/services/api/models/ellipsoid_arc.py create mode 100644 services/helper/helper_service/services/api/models/error_response.py create mode 100644 services/helper/helper_service/services/api/models/event_subscription.py create mode 100644 services/helper/helper_service/services/api/models/gad_shape.py create mode 100644 services/helper/helper_service/services/api/models/geographic_area.py create mode 100644 services/helper/helper_service/services/api/models/geographical_coordinates.py create mode 100644 services/helper/helper_service/services/api/models/interface_description.py create mode 100644 services/helper/helper_service/services/api/models/notification_flag.py create mode 100644 services/helper/helper_service/services/api/models/notification_method.py create mode 100644 services/helper/helper_service/services/api/models/onboarding_information.py create mode 100644 services/helper/helper_service/services/api/models/operation.py create mode 100644 services/helper/helper_service/services/api/models/paginated_response_base.py create mode 100644 services/helper/helper_service/services/api/models/paginated_response_event.py create mode 100644 services/helper/helper_service/services/api/models/paginated_response_invoker.py create mode 100644 services/helper/helper_service/services/api/models/paginated_response_provider.py create mode 100644 services/helper/helper_service/services/api/models/paginated_response_security.py create mode 100644 services/helper/helper_service/services/api/models/paginated_response_service.py create mode 100644 services/helper/helper_service/services/api/models/partitioning_criteria.py create mode 100644 services/helper/helper_service/services/api/models/point.py create mode 100644 services/helper/helper_service/services/api/models/point_altitude.py create mode 100644 services/helper/helper_service/services/api/models/point_altitude_uncertainty.py create mode 100644 services/helper/helper_service/services/api/models/point_uncertainty_circle.py create mode 100644 services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py create mode 100644 services/helper/helper_service/services/api/models/polygon.py create mode 100644 services/helper/helper_service/services/api/models/protocol.py create mode 100644 services/helper/helper_service/services/api/models/published_api_path.py create mode 100644 services/helper/helper_service/services/api/models/registration_information.py create mode 100644 services/helper/helper_service/services/api/models/reporting_information.py create mode 100644 services/helper/helper_service/services/api/models/resource.py create mode 100644 services/helper/helper_service/services/api/models/security_information.py create mode 100644 services/helper/helper_service/services/api/models/security_method.py create mode 100644 services/helper/helper_service/services/api/models/service_api_description.py create mode 100644 services/helper/helper_service/services/api/models/service_security.py create mode 100644 services/helper/helper_service/services/api/models/shareable_information.py create mode 100644 services/helper/helper_service/services/api/models/supported_gad_shapes.py create mode 100644 services/helper/helper_service/services/api/models/uncertainty_ellipse.py create mode 100644 services/helper/helper_service/services/api/models/version.py create mode 100644 services/helper/helper_service/services/api/models/websock_notif_config.py create mode 100644 services/helper/helper_service/services/api/openapi/openapi.yaml create mode 100644 services/helper/helper_service/services/api/typing_utils.py create mode 100644 services/helper/helper_service/services/api/util.py create mode 100644 services/helper/helper_service/services/configuration/__init__.py create mode 100644 services/helper/helper_service/services/configuration/__main__.py create mode 100644 services/helper/helper_service/services/configuration/controllers/__init__.py create mode 100644 services/helper/helper_service/services/configuration/controllers/default_controller.py create mode 100644 services/helper/helper_service/services/configuration/controllers/security_controller.py create mode 100644 services/helper/helper_service/services/configuration/encoder.py create mode 100644 services/helper/helper_service/services/configuration/models/__init__.py create mode 100644 services/helper/helper_service/services/configuration/models/base_model.py create mode 100644 services/helper/helper_service/services/configuration/models/config_category_create_request.py create mode 100644 services/helper/helper_service/services/configuration/models/config_category_remove_request.py create mode 100644 services/helper/helper_service/services/configuration/models/config_param_remove_request.py create mode 100644 services/helper/helper_service/services/configuration/models/config_param_update_request.py create mode 100644 services/helper/helper_service/services/configuration/models/generic_error.py create mode 100644 services/helper/helper_service/services/configuration/openapi/openapi.yaml create mode 100644 services/helper/helper_service/services/configuration/typing_utils.py create mode 100644 services/helper/helper_service/services/configuration/util.py diff --git a/services/docker-compose-capif.yml b/services/docker-compose-capif.yml index e021aa52..01a34a6c 100644 --- a/services/docker-compose-capif.yml +++ b/services/docker-compose-capif.yml @@ -20,6 +20,7 @@ services: restart: unless-stopped volumes: - ${SERVICES_DIR}/helper/config.yaml:/usr/src/app/config.yaml + - ${SERVICES_DIR}/helper/helper_service/certs:/usr/src/app/helper_service/certs extra_hosts: - host.docker.internal:host-gateway - fluent-bit:host-gateway diff --git a/services/helper/config.yaml b/services/helper/config.yaml index 1efa369e..2cf3193d 100644 --- a/services/helper/config.yaml +++ b/services/helper/config.yaml @@ -1,23 +1,23 @@ -mongo: { - 'user': 'root', - 'password': 'example', - 'db': 'capif', - 'invoker_col': 'invokerdetails', - 'provider_col': 'providerenrolmentdetails', - 'col_services': "serviceapidescriptions", - 'col_security': "security", - 'col_event': "eventsdetails", - 'col_capif_configuration': "capif_configuration", - 'host': 'mongo', - 'port': "27017" -} +mongo: + user: root + password: example + db: capif + invoker_col: invokerdetails + provider_col: providerenrolmentdetails + col_services: serviceapidescriptions + col_security: security + col_event: eventsdetails + col_capif_configuration: capif_configuration + host: mongo + port: 27017 + + +ca_factory: + url: vault + port: 8200 + token: dev-only-token + verify: False -ca_factory: { - "url": "vault", - "port": "8200", - "token": "dev-only-token", - "verify": False -} capif_configuration: config_description: Default CAPIF Configuration @@ -36,3 +36,12 @@ capif_configuration: oauth: 1 pki: 2 psk: 3 + +package_paths: + helper_api: + path: /api + openapi_file: api/openapi/openapi.yaml + configuration_api: + path: /configuration + openapi_file: configuration/openapi/openapi.yaml + diff --git a/services/helper/helper_service/app.py b/services/helper/helper_service/app.py index 8525aa1a..cfb842ba 100644 --- a/services/helper/helper_service/app.py +++ b/services/helper/helper_service/app.py @@ -4,12 +4,27 @@ import os import requests from config import Config from controllers.helper_controller import helper_routes +from pathlib import Path from db.db import MongoDatabse +import connexion +import sys from flask import Flask from OpenSSL.crypto import FILETYPE_PEM, TYPE_RSA, PKey, X509Req, dump_certificate_request, dump_privatekey from asgiref.wsgi import WsgiToAsgi -app = Flask(__name__) +# --- Paths setup: make 'services' discoverable so "import api..." works --- +BASE_DIR = Path(__file__).resolve().parent +SERVICES_DIR = BASE_DIR / "services" + +# Insert services directory at front of sys.path +if SERVICES_DIR.is_dir(): + services_path_str = str(SERVICES_DIR) + if services_path_str not in sys.path: + sys.path.insert(0, services_path_str) +else: + raise RuntimeError(f"Services directory not found at {SERVICES_DIR!s}") + +app = connexion.App(__name__, specification_dir=str(SERVICES_DIR)) config = Config().get_config() # Connect MongoDB and get TTL for superadmin certificate @@ -77,7 +92,29 @@ cert_file = open("certs/ca_root.crt", 'wb') cert_file.write(bytes(ca_root, 'utf-8')) cert_file.close() -app.register_blueprint(helper_routes) -app.logger.setLevel(numeric_level) + +package_paths = config.get("package_paths", {}) + +if not package_paths: + logger.error("No package paths defined in configuration.") + raise Exception("No package paths defined in configuration.") + +# Add API endpoints +app.add_api( + package_paths["configuration_api"]["openapi_file"], + arguments={"title": "Helper Configuration API"}, + pythonic_params=True, + base_path=package_paths["configuration_api"]["path"] + ) + +app.add_api( + package_paths["helper_api"]["openapi_file"], + arguments={"title": "Helper API"}, + pythonic_params=True, + base_path=package_paths["helper_api"]["path"] + ) + + +app.app.logger.setLevel(numeric_level) asgi_app = WsgiToAsgi(app) \ No newline at end of file diff --git a/services/helper/helper_service/generate.sh b/services/helper/helper_service/generate.sh new file mode 100755 index 00000000..ba55b0a8 --- /dev/null +++ b/services/helper/helper_service/generate.sh @@ -0,0 +1,64 @@ +#!/bin/bash +set -e + +rm -rf services/configuration services/api + +# Generate API 1 +openapi-generator generate \ + -i openapi_helper_configuration.yaml \ + -g python-flask \ + -o services/configuration \ + --additional-properties=packageName=configuration + +# Generate API 2 +openapi-generator generate \ + -i openapi_helper_api.yaml \ + -g python-flask \ + -o services/api \ + --additional-properties=packageName=api + +# ✅ Move generated inner folder to root service folder +mv services/configuration/configuration/* services/configuration/ +rm -rf services/configuration/configuration + +mv services/api/api/* services/api/ +rm -rf services/api/api + +# 🧹 Files to remove +FILES_TO_DELETE=( + ".dockerignore" + ".gitignore" + ".openapi-generator-ignore" + ".travis.yml" + "Dockerfile" + "git_push.sh" + "README.md" + "requirements.txt" + "setup.py" + "test-requirements.txt" + "tox.ini" +) + +# 🗑 Directories to remove +DIRS_TO_DELETE=( + ".openapi-generator" + ".github" + "test" + "docs" +) + +for service in services/configuration services/api; do + + # Remove files + for file in "${FILES_TO_DELETE[@]}"; do + rm -f "$service/$file" + done + + # Remove directories + for dir in "${DIRS_TO_DELETE[@]}"; do + rm -rf "$service/$dir" + done + +done + +echo "✅ Services generated, reorganized and cleaned successfully." diff --git a/services/helper/helper_service/openapi_helper_api.yaml b/services/helper/helper_service/openapi_helper_api.yaml new file mode 100644 index 00000000..97dddd89 --- /dev/null +++ b/services/helper/helper_service/openapi_helper_api.yaml @@ -0,0 +1,1390 @@ +openapi: 3.0.1 +info: + title: Helper API + version: "1.0.0" + description: | + CAPIF Helper API for browsing CAPIF runtime data: invokers, providers, services, + security bindings, and subscriptions/events. This is an internal helper interface. +servers: + - url: "{apiRoot}/api" + variables: + apiRoot: + default: http://localhost:8080 + description: Base URL of the Helper service. +paths: + /deleteEntities/{uuid}: + delete: + summary: Delete entities by UUID + description: Deletes all CAPIF entities (invokers, providers, services, security contexts, events) associated with the given UUID. + operationId: helper_controller.delete_entities + parameters: + - name: uuid + in: path + required: true + schema: + type: string + description: UUID of the user whose entities are to be deleted. + responses: + '200': + description: Entities deleted successfully. + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getInvokers: + get: + summary: Retrieve API invokers + description: Returns invoker entries with pagination and optional filters. + operationId: helper_controller.get_invokers + parameters: + - name: uuid + in: query + schema: + type: string + description: Filter by invoker UUID. + - name: api_invoker_id + in: query + schema: + type: string + description: Filter by CAPIF `apiInvokerId`. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + - name: sort_order + in: query + schema: + type: string + enum: + - asc + - desc + description: Sort direction. + responses: + '200': + description: Paged list of invokers. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseInvoker' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getProviders: + get: + summary: Retrieve providers + description: Returns provider domains (CAPIF provider domains / AEF providers) with pagination. + operationId: helper_controller.get_providers + parameters: + - name: uuid + in: query + schema: + type: string + description: Filter by provider UUID. + - name: api_prov_dom_id + in: query + schema: + type: string + description: Filter by provider domain ID. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + - name: sort_order + in: query + schema: + type: string + enum: + - asc + - desc + description: Sort direction. + responses: + '200': + description: Paged list of providers. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseProvider' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getServices: + get: + summary: Retrieve services + description: Returns published APIs/services exposed by providers. + operationId: helper_controller.get_services + parameters: + - name: service_id + in: query + schema: + type: string + description: Filter by service identifier. + - name: apf_id + in: query + schema: + type: string + description: Filter by APF identifier. + - name: api_name + in: query + schema: + type: string + description: Filter by API name. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + - name: sort_order + in: query + schema: + type: string + enum: + - asc + - desc + description: Sort direction. + responses: + '200': + description: Paged list of services. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseService' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getSecurity: + get: + summary: Retrieve security associations + description: Returns security credentials/bindings for a given invoker. + operationId: helper_controller.get_security + parameters: + - name: invoker_id + in: query + schema: + type: string + description: Filter by invoker identifier. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + responses: + '200': + description: Paged list of security entries. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseSecurity' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getEvents: + get: + summary: Retrieve CAPIF events + description: Returns CAPIF event subscriptions or delivered events. + operationId: helper_controller.get_events + parameters: + - name: subscriber_id + in: query + schema: + type: string + description: Filter by subscriber identifier. + - name: subscription_id + in: query + schema: + type: string + description: Filter by subscription identifier. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + responses: + '200': + description: Paged list of events. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseEvent' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' +components: + responses: + BadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + InternalError: + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + GenericError: + description: Generic error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + schemas: + ErrorResponse: + type: object + description: Generic error payload. + properties: + message: + type: string + details: + type: string + PaginatedResponseBase: + type: object + description: Common pagination envelope. + properties: + total: + type: integer + example: 42 + description: Total number of resources in CAPIF. + long: + type: integer + example: 0 + description: Total number of resources that match the given parameters + totalPages: + type: integer + example: 20 + description: Total number of pages given page size. + sort_order: + type: string + enum: + - asc + - desc + example: asc + description: Sorting by creation date of the resources (ascending or descending). + PaginatedResponseInvoker: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + invokers: + description: CAPIF invokers list + type: array + items: + $ref: '#/components/schemas/APIInvokerEnrolmentDetails' + PaginatedResponseProvider: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + providers: + description: CAPIF providers list + type: array + items: + $ref: '#/components/schemas/APIProviderEnrolmentDetails' + PaginatedResponseService: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + services: + description: CAPIF services list. + type: array + items: + $ref: '#/components/schemas/ServiceAPIDescription' + PaginatedResponseSecurity: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + security: + description: CAPIF security context list. + type: array + items: + $ref: '#/components/schemas/ServiceSecurity' + PaginatedResponseEvent: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + events: + description: CAPIF events list. + type: array + items: + $ref: '#/components/schemas/EventSubscription' + APIInvokerEnrolmentDetails: + required: + - notificationDestination + - onboardingInformation + type: object + properties: + onboarding_date: + type: string + description: Invoker onboarding date + format: date-time + username: + type: string + description: User who registered the invoker + uuid: + type: string + description: uuid of the user who registered the invoker + format: uuid + apiInvokerId: + type: string + description: | + API invoker ID assigned by the CAPIF core function to the API invoker while on-boarding the API invoker. Shall not be present in the HTTP POST request from the API invoker to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. + readOnly: true + onboardingInformation: + $ref: '#/components/schemas/OnboardingInformation' + notificationDestination: + $ref: '#/components/schemas/Uri' + requestTestNotification: + type: boolean + description: | + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + apiList: + $ref: '#/components/schemas/APIList' + apiInvokerInformation: + type: string + description: | + Generic information related to the API invoker such as details of the device or the application. + supportedFeatures: + $ref: '#/components/schemas/SupportedFeatures' + description: Information about the API Invoker that requested to onboard + APIProviderEnrolmentDetails: + required: + - regSec + type: object + properties: + onboarding_date: + type: string + description: Provider onboarding date + format: date-time + username: + type: string + description: User who registered the provider + uuid: + type: string + description: uuid of the user who registered the provider + format: uuid + apiProvDomId: + type: string + description: | + API provider domain ID assigned by the CAPIF core function to the API management function while registering the API provider domain. Shall not be present in the HTTP POST request from the API Management function to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. + readOnly: true + regSec: + type: string + description: | + Security information necessary for the CAPIF core function to validate the registration of the API provider domain. Shall be present in HTTP POST request from API management function to CAPIF core function for API provider domain registration. + apiProvFuncs: + minItems: 1 + type: array + description: | + A list of individual API provider domain functions details. When included by the API management function in the HTTP request message, it lists the API provider domain functions that the API management function intends to register/update in registration or update registration procedure. When included by the CAPIF core function in the HTTP response message, it lists the API domain functions details that are registered or updated successfully. + items: + $ref: '#/components/schemas/APIProviderFunctionDetails' + apiProvDomInfo: + type: string + description: | + Generic information related to the API provider domain such as details of the API provider applications. + suppFeat: + $ref: '#/components/schemas/SupportedFeatures' + failReason: + type: string + description: | + Registration or update specific failure information of failed API provider domain function registrations.Shall be present in the HTTP response body if atleast one of the API provider domain function registration or update registration fails. + description: Represents an API provider domain's enrolment details. + ServiceSecurity: + required: + - notificationDestination + - securityInfo + type: object + properties: + api_invoker_id: + type: string + description: Id of the invoker of this security context. + securityInfo: + minimum: 1 + type: array + items: + $ref: '#/components/schemas/SecurityInformation' + notificationDestination: + $ref: '#/components/schemas/Uri' + requestTestNotification: + type: boolean + description: | + Set to true by API invoker to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + supportedFeatures: + $ref: '#/components/schemas/SupportedFeatures' + description: | + Represents the details of the security method for each service API interface. When included by the API invoker, it indicates the preferred method of security. When included by the CAPIF core function, it indicates the security method to be used for the service API interface. + SecurityInformation: + required: + - prefSecurityMethods + type: object + properties: + interfaceDetails: + $ref: '#/components/schemas/InterfaceDescription' + aefId: + type: string + description: Identifier of the API exposing function + apiId: + type: string + description: API identifier + prefSecurityMethods: + minItems: 1 + type: array + description: Security methods preferred by the API invoker for the API interface. + items: + $ref: '#/components/schemas/SecurityMethod' + selSecurityMethod: + $ref: '#/components/schemas/SecurityMethod' + authenticationInfo: + type: string + description: Authentication related information + authorizationInfo: + type: string + description: Authorization related information + description: Represents the interface details and the security method. + oneOf: + - required: + - interfaceDetails + - required: + - aefId + EventSubscription: + required: + - events + - notificationDestination + type: object + properties: + events: + minItems: 1 + type: array + description: Subscribed events + items: + $ref: '#/components/schemas/CAPIFEvent' + eventFilters: + minItems: 1 + type: array + description: Subscribed event filters + items: + $ref: '#/components/schemas/CAPIFEventFilter' + eventReq: + $ref: '#/components/schemas/ReportingInformation' + notificationDestination: + $ref: '#/components/schemas/Uri' + requestTestNotification: + type: boolean + description: | + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + supportedFeatures: + $ref: '#/components/schemas/SupportedFeatures' + description: Represents an individual CAPIF Event Subscription resource. + OnboardingInformation: + required: + - apiInvokerPublicKey + type: object + properties: + apiInvokerPublicKey: + type: string + description: The API Invoker's public key + apiInvokerCertificate: + type: string + description: | + The API Invoker's generic client certificate, provided by the CAPIF core function. + onboardingSecret: + type: string + description: | + The API Invoker's onboarding secret, provided by the CAPIF core function. + description: Represents on-boarding information of the API invoker. + APIProviderFunctionDetails: + required: + - apiProvFuncRole + - regInfo + type: object + properties: + apiProvFuncId: + type: string + description: | + API provider domain functionID assigned by the CAPIF core function to the API provider domain function while registering/updating the API provider domain. Shall not be present in the HTTP POST request from the API management function to the CAPIF core function, to register itself. Shall be present in all other HTTP requests and responses. + regInfo: + $ref: '#/components/schemas/RegistrationInformation' + apiProvFuncRole: + $ref: '#/components/schemas/ApiProviderFuncRole' + apiProvFuncInfo: + type: string + description: | + Generic information related to the API provider domain function such as details of the API provider applications. + description: Represents API provider domain function's details. + ApiProviderFuncRole: + description: | + Possible values are: + - AEF: API provider function is API Exposing Function. + - APF: API provider function is API Publishing Function. + - AMF: API Provider function is API Management Function. + anyOf: + - type: string + enum: + - AEF + - APF + - AMF + - type: string + description: | + This string provides forward-compatiblity with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + RegistrationInformation: + required: + - apiProvPubKey + type: object + properties: + apiProvPubKey: + type: string + description: Public Key of API Provider domain function. + apiProvCert: + type: string + description: API provider domain function's client certificate + description: | + Represents registration information of an individual API provider domain function. + APIList: + type: object + properties: + serviceAPIDescriptions: + minItems: 1 + type: array + description: The list of service APIs that the API Invoker is allowed to invoke. + items: + $ref: '#/components/schemas/ServiceAPIDescription' + description: Represents a list of APIs. + Uri: + type: string + description: string providing an URI formatted according to IETF RFC 3986. + WebsockNotifConfig: + type: object + properties: + websocketUri: + $ref: '#/components/schemas/Link' + requestWebsocketUri: + type: boolean + description: Set by the SCS/AS to indicate that the Websocket delivery is requested. + description: Represents the configuration information for the delivery of notifications over Websockets. + Link: + type: string + description: string formatted according to IETF RFC 3986 identifying a referenced resource. + SupportedFeatures: + pattern: "^[A-Fa-f0-9]*$" + type: string + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + ServiceAPIDescription: + required: + - apiName + type: object + properties: + apiName: + type: string + description: "API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122." + apiId: + type: string + description: | + API identifier assigned by the CAPIF core function to the published service API. Shall not be present in the HTTP POST request from the API publishing function to the CAPIF core function. Shall be present in the HTTP POST response from the CAPIF core function to the API publishing function and in the HTTP GET response from the CAPIF core function to the API invoker (discovery API). + aefProfiles: + minItems: 1 + type: array + description: | + AEF profile information, which includes the exposed API details (e.g. protocol). + items: + $ref: '#/components/schemas/AefProfile' + description: + type: string + description: Text description of the API + supportedFeatures: + $ref: '#/components/schemas/SupportedFeatures' + shareableInfo: + $ref: '#/components/schemas/ShareableInformation' + serviceAPICategory: + type: string + apiSuppFeats: + $ref: '#/components/schemas/SupportedFeatures' + pubApiPath: + $ref: '#/components/schemas/PublishedApiPath' + ccfId: + type: string + description: CAPIF core function identifier. + description: Represents the description of a service API as published by the APF. + AefProfile: + required: + - aefId + - versions + type: object + properties: + aefId: + type: string + description: Identifier of the API exposing function + versions: + minItems: 1 + type: array + description: API version + items: + $ref: '#/components/schemas/Version' + protocol: + $ref: '#/components/schemas/Protocol' + dataFormat: + $ref: '#/components/schemas/DataFormat' + securityMethods: + minItems: 1 + type: array + description: Security methods supported by the AEF + items: + $ref: '#/components/schemas/SecurityMethod' + domainName: + type: string + description: Domain to which API belongs to + interfaceDescriptions: + minItems: 1 + type: array + description: Interface details + items: + $ref: '#/components/schemas/InterfaceDescription' + aefLocation: + $ref: '#/components/schemas/AefLocation' + description: Represents the AEF profile data. + oneOf: + - required: + - domainName + - required: + - interfaceDescriptions + ShareableInformation: + required: + - isShareable + type: object + properties: + isShareable: + type: boolean + description: | + Set to "true" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to "false". + capifProvDoms: + minItems: 1 + type: array + description: | + List of CAPIF provider domains to which the service API information to be shared. + items: + type: string + description: | + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domains. + PublishedApiPath: + type: object + properties: + ccfIds: + minItems: 1 + type: array + description: A list of CCF identifiers where the service API is already published. + items: + type: string + description: Represents the published API path within the same CAPIF provider domain. + Version: + required: + - apiVersion + type: object + properties: + apiVersion: + type: string + description: API major version in URI (e.g. v1) + expiry: + $ref: '#/components/schemas/DateTime' + resources: + minItems: 1 + type: array + description: Resources supported by the API. + items: + $ref: '#/components/schemas/Resource' + custOperations: + minItems: 1 + type: array + description: Custom operations without resource association. + items: + $ref: '#/components/schemas/CustomOperation' + description: Represents the API version information. + Protocol: + description: | + Possible values are: + - HTTP_1_1: HTTP version 1.1 + - HTTP_2: HTTP version 2 + anyOf: + - type: string + enum: + - HTTP_1_1 + - HTTP_2 + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + DataFormat: + description: | + Possible values are: + - JSON: JavaScript Object Notation + anyOf: + - type: string + enum: + - JSON + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + SecurityMethod: + description: | + Possible values are: + - PSK: Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122 + - PKI: Security method 2 (Using PKI) as described in 3GPP TS 33.122 + - OAUTH: Security method 3 (TLS with OAuth token) as described in 3GPP TS 33.122 + anyOf: + - type: string + enum: + - PSK + - PKI + - OAUTH + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + Resource: + required: + - commType + - resourceName + - uri + type: object + properties: + resourceName: + type: string + description: Resource name + commType: + $ref: '#/components/schemas/CommunicationType' + uri: + type: string + description: | + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + custOpName: + type: string + description: | + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. + operations: + minItems: 1 + type: array + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + description: + type: string + description: Text description of the API resource + description: Represents the API resource data. + CustomOperation: + required: + - commType + - custOpName + type: object + properties: + commType: + $ref: '#/components/schemas/CommunicationType' + custOpName: + type: string + description: | + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. + operations: + minItems: 1 + type: array + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + description: + type: string + description: Text description of the custom operation + description: Represents the description of a custom operation. + CommunicationType: + description: | + Possible values are: + - REQUEST_RESPONSE: The communication is of the type request-response + - SUBSCRIBE_NOTIFY: The communication is of the type subscribe-notify + anyOf: + - type: string + enum: + - REQUEST_RESPONSE + - SUBSCRIBE_NOTIFY + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + Operation: + description: | + Possible values are: + - GET: HTTP GET method + - POST: HTTP POST method + - PUT: HTTP PUT method + - PATCH: HTTP PATCH method + - DELETE: HTTP DELETE method + anyOf: + - type: string + enum: + - GET + - POST + - PUT + - PATCH + - DELETE + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + InterfaceDescription: + type: object + properties: + ipv4Addr: + $ref: '#/components/schemas/Ipv4Addr' + ipv6Addr: + $ref: '#/components/schemas/Ipv6Addr' + port: + $ref: '#/components/schemas/Port' + securityMethods: + minItems: 1 + type: array + description: | + Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. + items: + $ref: '#/components/schemas/SecurityMethod' + description: Represents the description of an API's interface. + oneOf: + - required: + - ipv4Addr + - required: + - ipv6Addr + Ipv4Addr: + type: string + description: string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166. + Ipv6Addr: + type: string + description: string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used. + Port: + maximum: 65535 + minimum: 0 + type: integer + description: Unsigned integer with valid values between 0 and 65535. + AefLocation: + type: object + properties: + civicAddr: + $ref: '#/components/schemas/CivicAddress' + geoArea: + $ref: '#/components/schemas/GeographicArea' + dcId: + type: string + description: | + Identifies the data center where the AEF providing the service API is located. + description: | + The location information (e.g. civic address, GPS coordinates, data center ID) where the AEF providing the service API is located. + DateTime: + type: string + description: string with format "date-time" as defined in OpenAPI. + format: date-time + CivicAddress: + type: object + properties: + country: + type: string + A1: + type: string + A2: + type: string + A3: + type: string + A4: + type: string + A5: + type: string + A6: + type: string + PRD: + type: string + POD: + type: string + STS: + type: string + HNO: + type: string + HNS: + type: string + LMK: + type: string + LOC: + type: string + NAM: + type: string + PC: + type: string + BLD: + type: string + UNIT: + type: string + FLR: + type: string + ROOM: + type: string + PLC: + type: string + PCN: + type: string + POBOX: + type: string + ADDCODE: + type: string + SEAT: + type: string + RD: + type: string + RDSEC: + type: string + RDBR: + type: string + RDSUBBR: + type: string + PRM: + type: string + POM: + type: string + usageRules: + type: string + method: + type: string + providedBy: + type: string + description: Indicates a Civic address. + GeographicArea: + description: Geographic area specified by different shape. + anyOf: + - $ref: '#/components/schemas/Point' + - $ref: '#/components/schemas/PointUncertaintyCircle' + - $ref: '#/components/schemas/PointUncertaintyEllipse' + - $ref: '#/components/schemas/Polygon' + - $ref: '#/components/schemas/PointAltitude' + - $ref: '#/components/schemas/PointAltitudeUncertainty' + - $ref: '#/components/schemas/EllipsoidArc' + Point: + description: Ellipsoid Point. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - point + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + GADShape: + required: + - shape + type: object + properties: + shape: + $ref: '#/components/schemas/SupportedGADShapes' + description: Common base type for GAD shapes. + discriminator: + propertyName: shape + mapping: + POINT: '#/components/schemas/Point' + POINT_UNCERTAINTY_CIRCLE: '#/components/schemas/PointUncertaintyCircle' + POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/PointUncertaintyEllipse' + POLYGON: '#/components/schemas/Polygon' + POINT_ALTITUDE: '#/components/schemas/PointAltitude' + POINT_ALTITUDE_UNCERTAINTY: '#/components/schemas/PointAltitudeUncertainty' + ELLIPSOID_ARC: '#/components/schemas/EllipsoidArc' + LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/Local2dPointUncertaintyEllipse' + LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID: '#/components/schemas/Local3dPointUncertaintyEllipsoid' + GeographicalCoordinates: + required: + - lat + - lon + type: object + properties: + lon: + maximum: 180 + minimum: -180 + type: number + format: double + lat: + maximum: 90 + minimum: -90 + type: number + format: double + description: Geographical coordinates. + SupportedGADShapes: + description: Indicates supported GAD shapes. + anyOf: + - type: string + enum: + - POINT + - POINT_UNCERTAINTY_CIRCLE + - POINT_UNCERTAINTY_ELLIPSE + - POLYGON + - POINT_ALTITUDE + - POINT_ALTITUDE_UNCERTAINTY + - ELLIPSOID_ARC + - LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE + - LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID + - type: string + PointUncertaintyCircle: + description: Ellipsoid point with uncertainty circle. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - point + - uncertainty + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertainty: + $ref: '#/components/schemas/Uncertainty' + Uncertainty: + minimum: 0 + type: number + description: Indicates value of uncertainty. + format: float + PointUncertaintyEllipse: + description: Ellipsoid point with uncertainty ellipse. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - confidence + - point + - uncertaintyEllipse + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + confidence: + $ref: '#/components/schemas/Confidence' + UncertaintyEllipse: + required: + - orientationMajor + - semiMajor + - semiMinor + type: object + properties: + semiMajor: + $ref: '#/components/schemas/Uncertainty' + semiMinor: + $ref: '#/components/schemas/Uncertainty' + orientationMajor: + $ref: '#/components/schemas/Orientation' + description: Ellipse with uncertainty. + Confidence: + maximum: 100 + minimum: 0 + type: integer + description: Indicates value of confidence. + Orientation: + maximum: 180 + minimum: 0 + type: integer + description: Indicates value of orientation angle. + Polygon: + description: Polygon. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - pointList + type: object + properties: + pointList: + $ref: '#/components/schemas/PointList' + PointList: + maxItems: 15 + minItems: 3 + type: array + description: List of points. + items: + $ref: '#/components/schemas/GeographicalCoordinates' + PointAltitude: + description: Ellipsoid point with altitude. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - altitude + - point + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + Altitude: + maximum: 32767 + minimum: -32767 + type: number + description: Indicates value of altitude. + format: double + PointAltitudeUncertainty: + description: Ellipsoid point with altitude and uncertainty ellipsoid. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - altitude + - confidence + - point + - uncertaintyAltitude + - uncertaintyEllipse + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + uncertaintyAltitude: + $ref: '#/components/schemas/Uncertainty' + confidence: + $ref: '#/components/schemas/Confidence' + EllipsoidArc: + description: Ellipsoid Arc. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - confidence + - includedAngle + - innerRadius + - offsetAngle + - point + - uncertaintyRadius + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + innerRadius: + $ref: '#/components/schemas/InnerRadius' + uncertaintyRadius: + $ref: '#/components/schemas/Uncertainty' + offsetAngle: + $ref: '#/components/schemas/Angle' + includedAngle: + $ref: '#/components/schemas/Angle' + confidence: + $ref: '#/components/schemas/Confidence' + InnerRadius: + maximum: 327675 + minimum: 0 + type: integer + description: Indicates value of the inner radius. + format: int32 + Angle: + maximum: 360 + minimum: 0 + type: integer + description: Indicates value of angle. + CAPIFEvent: + description: | + Possible values are: + - SERVICE_API_AVAILABLE: Events related to the availability of service APIs after the service APIs are published. + - SERVICE_API_UNAVAILABLE: Events related to the unavailability of service APIs after the service APIs are unpublished. + - SERVICE_API_UPDATE: Events related to change in service API information. + - API_INVOKER_ONBOARDED: Events related to API invoker onboarded to CAPIF. + - API_INVOKER_OFFBOARDED: Events related to API invoker offboarded from CAPIF. + - SERVICE_API_INVOCATION_SUCCESS: Events related to the successful invocation of service APIs. + - SERVICE_API_INVOCATION_FAILURE: Events related to the failed invocation of service APIs. + - ACCESS_CONTROL_POLICY_UPDATE: Events related to the update for the access control policy related to the service APIs. + - ACCESS_CONTROL_POLICY_UNAVAILABLE: Events related to the unavailability of the access control policy related to the service APIs. + - API_INVOKER_AUTHORIZATION_REVOKED: Events related to the revocation of the authorization of API invokers to access the service APIs. + - API_INVOKER_UPDATED: Events related to API invoker profile updated to CAPIF. + - API_TOPOLOGY_HIDING_CREATED: Events related to the creation or update of the API topology hiding information of the service APIs after the service APIs are published. + - API_TOPOLOGY_HIDING_REVOKED: Events related to the revocation of the API topology hiding information of the service APIs after the service APIs are unpublished. + anyOf: + - type: string + enum: + - SERVICE_API_AVAILABLE + - SERVICE_API_UNAVAILABLE + - SERVICE_API_UPDATE + - API_INVOKER_ONBOARDED + - API_INVOKER_OFFBOARDED + - SERVICE_API_INVOCATION_SUCCESS + - SERVICE_API_INVOCATION_FAILURE + - ACCESS_CONTROL_POLICY_UPDATE + - ACCESS_CONTROL_POLICY_UNAVAILABLE + - API_INVOKER_AUTHORIZATION_REVOKED + - API_INVOKER_UPDATED + - API_TOPOLOGY_HIDING_CREATED + - API_TOPOLOGY_HIDING_REVOKED + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + CAPIFEventFilter: + type: object + properties: + apiIds: + minItems: 1 + type: array + description: Identifier of the service API + items: + type: string + apiInvokerIds: + minItems: 1 + type: array + description: Identity of the API invoker + items: + type: string + aefIds: + minItems: 1 + type: array + description: Identifier of the API exposing function + items: + type: string + description: Represents a CAPIF event filter. + ReportingInformation: + type: object + properties: + immRep: + type: boolean + notifMethod: + $ref: '#/components/schemas/NotificationMethod' + maxReportNbr: + $ref: '#/components/schemas/Uinteger' + monDur: + $ref: '#/components/schemas/DateTime' + repPeriod: + $ref: '#/components/schemas/DurationSec' + sampRatio: + $ref: '#/components/schemas/SamplingRatio' + partitionCriteria: + minItems: 1 + type: array + description: Criteria for partitioning the UEs before applying the sampling ratio. + items: + $ref: '#/components/schemas/PartitioningCriteria' + grpRepTime: + $ref: '#/components/schemas/DurationSec' + notifFlag: + $ref: '#/components/schemas/NotificationFlag' + description: Represents the type of reporting that the subscription requires. + NotificationMethod: + description: | + Possible values are: + - PERIODIC + - ONE_TIME + - ON_EVENT_DETECTION + anyOf: + - type: string + enum: + - PERIODIC + - ONE_TIME + - ON_EVENT_DETECTION + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + Uinteger: + minimum: 0 + type: integer + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are permissible." + DurationSec: + type: integer + description: indicating a time in seconds. + SamplingRatio: + maximum: 100 + minimum: 1 + type: integer + description: "Unsigned integer indicating Sampling Ratio (see clauses 4.15.1 of 3GPP TS 23.502), expressed in percent. \n" + PartitioningCriteria: + description: | + Possible values are: + - "TAC": Type Allocation Code + - "SUBPLMN": Subscriber PLMN ID + - "GEOAREA": Geographical area, i.e. list(s) of TAI(s) + - "SNSSAI": S-NSSAI + - "DNN": DNN + anyOf: + - type: string + enum: + - TAC + - SUBPLMN + - GEOAREA + - SNSSAI + - DNN + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + NotificationFlag: + description: |- + Possible values are: + - ACTIVATE: The event notification is activated. + - DEACTIVATE: The event notification is deactivated and shall be muted. The available + event(s) shall be stored. + - RETRIEVAL: The event notification shall be sent to the NF service consumer(s), + after that, is muted again. + anyOf: + - type: string + enum: + - ACTIVATE + - DEACTIVATE + - RETRIEVAL + - type: string + description: "This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. \n" + diff --git a/services/helper/helper_service/openapi_helper_configuration.yaml b/services/helper/helper_service/openapi_helper_configuration.yaml new file mode 100644 index 00000000..58312ba5 --- /dev/null +++ b/services/helper/helper_service/openapi_helper_configuration.yaml @@ -0,0 +1,249 @@ +openapi: 3.0.1 +info: + title: Helper Configuration API + version: "1.0.0" + description: | + CAPIF Helper Configuration API. Allows reading and modifying the runtime configuration + stored in MongoDB (ACL policy, certificate expiration, security priorities, etc). +servers: + - url: "{apiRoot}/configuration" + variables: + apiRoot: + default: http://localhost:8080 + description: Base URL of the Helper service. +paths: + /getConfiguration: + get: + summary: Read full configuration + description: Returns the entire CAPIF configuration document. + operationId: dynamic_config_controller.get_configuration + responses: + '200': + description: Current configuration + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /updateConfigParam: + patch: + summary: Update single config parameter + description: Updates a single setting inside the configuration using a dotted path selector. + operationId: dynamic_config_controller.update_config_param + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamUpdateRequest' + responses: + '200': + description: Parameter updated + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /replaceConfiguration: + put: + summary: Replace entire configuration + description: Replaces the configuration document with a new one. + operationId: dynamic_config_controller.replace_configuration + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + responses: + '200': + description: Updated configuration + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /addNewConfiguration: + post: + summary: Add new config setting at path + description: Adds a new key/value inside an existing category using "param_path" and "new_value". + operationId: dynamic_config_controller.add_new_config_setting + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamUpdateRequest' + responses: + '200': + description: Setting added + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /removeConfigParam: + delete: + summary: Remove config parameter + description: Deletes a leaf parameter by dotted path. + operationId: dynamic_config_controller.remove_config_param + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamRemoveRequest' + responses: + '200': + description: Parameter removed + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /configuration/category: + post: + summary: Add new configuration category + description: Adds a brand new top-level category. + operationId: dynamic_config_controller.add_new_configuration + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigCategoryCreateRequest' + responses: + '200': + description: Category added + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + delete: + summary: Remove configuration category + description: Deletes an entire top-level category by name. + operationId: dynamic_config_controller.remove_config_category + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigCategoryRemoveRequest' + responses: + '200': + description: Category removed + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' +components: + responses: + BadRequest: + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + InternalError: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + GenericError: + description: Generic error response + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + schemas: + CapifConfiguration: + type: object + additionalProperties: true + description: CAPIF runtime configuration document. + + ConfigParamUpdateRequest: + type: object + required: + - param_path + - new_value + properties: + param_path: + type: string + description: Dotted path to the configuration value to update. + new_value: + description: New value for the configuration parameter. + ConfigParamRemoveRequest: + type: object + required: + - param_path + properties: + param_path: + type: string + description: Dotted path to the configuration value to delete. + ConfigCategoryCreateRequest: + type: object + required: + - category_name + - category_values + properties: + category_name: + type: string + description: Name of the new configuration category. + category_values: + type: object + additionalProperties: true + description: Key/value pairs that compose the new category. + ConfigCategoryRemoveRequest: + type: object + required: + - category_name + properties: + category_name: + type: string + description: Name of the category to remove. + GenericError: + type: object + properties: + code: + type: string + message: + type: string + required: + - code + - message diff --git a/services/helper/helper_service/services/api/__init__.py b/services/helper/helper_service/services/api/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/services/helper/helper_service/services/api/__main__.py b/services/helper/helper_service/services/api/__main__.py new file mode 100644 index 00000000..2af7e092 --- /dev/null +++ b/services/helper/helper_service/services/api/__main__.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import connexion + +from api import encoder + + +def main(): + app = connexion.App(__name__, specification_dir='./openapi/') + app.app.json_encoder = encoder.JSONEncoder + app.add_api('openapi.yaml', + arguments={'title': 'Helper API'}, + pythonic_params=True) + + app.run(port=8080) + + +if __name__ == '__main__': + main() diff --git a/services/helper/helper_service/services/api/controllers/__init__.py b/services/helper/helper_service/services/api/controllers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/services/helper/helper_service/services/api/controllers/default_controller.py b/services/helper/helper_service/services/api/controllers/default_controller.py new file mode 100644 index 00000000..171b2414 --- /dev/null +++ b/services/helper/helper_service/services/api/controllers/default_controller.py @@ -0,0 +1,126 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from api.models.error_response import ErrorResponse # noqa: E501 +from api.models.paginated_response_event import PaginatedResponseEvent # noqa: E501 +from api.models.paginated_response_invoker import PaginatedResponseInvoker # noqa: E501 +from api.models.paginated_response_provider import PaginatedResponseProvider # noqa: E501 +from api.models.paginated_response_security import PaginatedResponseSecurity # noqa: E501 +from api.models.paginated_response_service import PaginatedResponseService # noqa: E501 +from api import util + + +def helper_controller_delete_entities(uuid): # noqa: E501 + """Delete entities by UUID + + Deletes all CAPIF entities (invokers, providers, services, security contexts, events) associated with the given UUID. # noqa: E501 + + :param uuid: UUID of the user whose entities are to be deleted. + :type uuid: str + + :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] + """ + return 'do some magic!' + + +def helper_controller_get_events(subscriber_id=None, subscription_id=None, page_size=None, page=None): # noqa: E501 + """Retrieve CAPIF events + + Returns CAPIF event subscriptions or delivered events. # noqa: E501 + + :param subscriber_id: Filter by subscriber identifier. + :type subscriber_id: str + :param subscription_id: Filter by subscription identifier. + :type subscription_id: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + + :rtype: Union[PaginatedResponseEvent, Tuple[PaginatedResponseEvent, int], Tuple[PaginatedResponseEvent, int, Dict[str, str]] + """ + return 'do some magic!' + + +def helper_controller_get_invokers(uuid=None, api_invoker_id=None, page_size=None, page=None, sort_order=None): # noqa: E501 + """Retrieve API invokers + + Returns invoker entries with pagination and optional filters. # noqa: E501 + + :param uuid: Filter by invoker UUID. + :type uuid: str + :param api_invoker_id: Filter by CAPIF `apiInvokerId`. + :type api_invoker_id: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + :param sort_order: Sort direction. + :type sort_order: str + + :rtype: Union[PaginatedResponseInvoker, Tuple[PaginatedResponseInvoker, int], Tuple[PaginatedResponseInvoker, int, Dict[str, str]] + """ + return 'do some magic!' + + +def helper_controller_get_providers(uuid=None, api_prov_dom_id=None, page_size=None, page=None, sort_order=None): # noqa: E501 + """Retrieve providers + + Returns provider domains (CAPIF provider domains / AEF providers) with pagination. # noqa: E501 + + :param uuid: Filter by provider UUID. + :type uuid: str + :param api_prov_dom_id: Filter by provider domain ID. + :type api_prov_dom_id: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + :param sort_order: Sort direction. + :type sort_order: str + + :rtype: Union[PaginatedResponseProvider, Tuple[PaginatedResponseProvider, int], Tuple[PaginatedResponseProvider, int, Dict[str, str]] + """ + return 'do some magic!' + + +def helper_controller_get_security(invoker_id=None, page_size=None, page=None): # noqa: E501 + """Retrieve security associations + + Returns security credentials/bindings for a given invoker. # noqa: E501 + + :param invoker_id: Filter by invoker identifier. + :type invoker_id: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + + :rtype: Union[PaginatedResponseSecurity, Tuple[PaginatedResponseSecurity, int], Tuple[PaginatedResponseSecurity, int, Dict[str, str]] + """ + return 'do some magic!' + + +def helper_controller_get_services(service_id=None, apf_id=None, api_name=None, page_size=None, page=None, sort_order=None): # noqa: E501 + """Retrieve services + + Returns published APIs/services exposed by providers. # noqa: E501 + + :param service_id: Filter by service identifier. + :type service_id: str + :param apf_id: Filter by APF identifier. + :type apf_id: str + :param api_name: Filter by API name. + :type api_name: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + :param sort_order: Sort direction. + :type sort_order: str + + :rtype: Union[PaginatedResponseService, Tuple[PaginatedResponseService, int], Tuple[PaginatedResponseService, int, Dict[str, str]] + """ + return 'do some magic!' diff --git a/services/helper/helper_service/services/api/controllers/security_controller.py b/services/helper/helper_service/services/api/controllers/security_controller.py new file mode 100644 index 00000000..6d294ffd --- /dev/null +++ b/services/helper/helper_service/services/api/controllers/security_controller.py @@ -0,0 +1,2 @@ +from typing import List + diff --git a/services/helper/helper_service/services/api/encoder.py b/services/helper/helper_service/services/api/encoder.py new file mode 100644 index 00000000..1a660a3e --- /dev/null +++ b/services/helper/helper_service/services/api/encoder.py @@ -0,0 +1,19 @@ +from connexion.apps.flask_app import FlaskJSONEncoder + +from api.models.base_model import Model + + +class JSONEncoder(FlaskJSONEncoder): + include_nulls = False + + def default(self, o): + if isinstance(o, Model): + dikt = {} + for attr in o.openapi_types: + value = getattr(o, attr) + if value is None and not self.include_nulls: + continue + attr = o.attribute_map[attr] + dikt[attr] = value + return dikt + return FlaskJSONEncoder.default(self, o) diff --git a/services/helper/helper_service/services/api/models/__init__.py b/services/helper/helper_service/services/api/models/__init__.py new file mode 100644 index 00000000..68260afd --- /dev/null +++ b/services/helper/helper_service/services/api/models/__init__.py @@ -0,0 +1,53 @@ +# flake8: noqa +# import models into model package +from api.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails +from api.models.api_list import APIList +from api.models.api_provider_enrolment_details import APIProviderEnrolmentDetails +from api.models.api_provider_function_details import APIProviderFunctionDetails +from api.models.aef_location import AefLocation +from api.models.aef_profile import AefProfile +from api.models.api_provider_func_role import ApiProviderFuncRole +from api.models.capif_event import CAPIFEvent +from api.models.capif_event_filter import CAPIFEventFilter +from api.models.civic_address import CivicAddress +from api.models.communication_type import CommunicationType +from api.models.custom_operation import CustomOperation +from api.models.data_format import DataFormat +from api.models.ellipsoid_arc import EllipsoidArc +from api.models.error_response import ErrorResponse +from api.models.event_subscription import EventSubscription +from api.models.gad_shape import GADShape +from api.models.geographic_area import GeographicArea +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.interface_description import InterfaceDescription +from api.models.notification_flag import NotificationFlag +from api.models.notification_method import NotificationMethod +from api.models.onboarding_information import OnboardingInformation +from api.models.operation import Operation +from api.models.paginated_response_base import PaginatedResponseBase +from api.models.paginated_response_event import PaginatedResponseEvent +from api.models.paginated_response_invoker import PaginatedResponseInvoker +from api.models.paginated_response_provider import PaginatedResponseProvider +from api.models.paginated_response_security import PaginatedResponseSecurity +from api.models.paginated_response_service import PaginatedResponseService +from api.models.partitioning_criteria import PartitioningCriteria +from api.models.point import Point +from api.models.point_altitude import PointAltitude +from api.models.point_altitude_uncertainty import PointAltitudeUncertainty +from api.models.point_uncertainty_circle import PointUncertaintyCircle +from api.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from api.models.polygon import Polygon +from api.models.protocol import Protocol +from api.models.published_api_path import PublishedApiPath +from api.models.registration_information import RegistrationInformation +from api.models.reporting_information import ReportingInformation +from api.models.resource import Resource +from api.models.security_information import SecurityInformation +from api.models.security_method import SecurityMethod +from api.models.service_api_description import ServiceAPIDescription +from api.models.service_security import ServiceSecurity +from api.models.shareable_information import ShareableInformation +from api.models.supported_gad_shapes import SupportedGADShapes +from api.models.uncertainty_ellipse import UncertaintyEllipse +from api.models.version import Version +from api.models.websock_notif_config import WebsockNotifConfig diff --git a/services/helper/helper_service/services/api/models/aef_location.py b/services/helper/helper_service/services/api/models/aef_location.py new file mode 100644 index 00000000..5ab80902 --- /dev/null +++ b/services/helper/helper_service/services/api/models/aef_location.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.civic_address import CivicAddress +from api.models.geographic_area import GeographicArea +from api import util + +from api.models.civic_address import CivicAddress # noqa: E501 +from api.models.geographic_area import GeographicArea # noqa: E501 + +class AefLocation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, civic_addr=None, geo_area=None, dc_id=None): # noqa: E501 + """AefLocation - a model defined in OpenAPI + + :param civic_addr: The civic_addr of this AefLocation. # noqa: E501 + :type civic_addr: CivicAddress + :param geo_area: The geo_area of this AefLocation. # noqa: E501 + :type geo_area: GeographicArea + :param dc_id: The dc_id of this AefLocation. # noqa: E501 + :type dc_id: str + """ + self.openapi_types = { + 'civic_addr': CivicAddress, + 'geo_area': GeographicArea, + 'dc_id': str + } + + self.attribute_map = { + 'civic_addr': 'civicAddr', + 'geo_area': 'geoArea', + 'dc_id': 'dcId' + } + + self._civic_addr = civic_addr + self._geo_area = geo_area + self._dc_id = dc_id + + @classmethod + def from_dict(cls, dikt) -> 'AefLocation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The AefLocation of this AefLocation. # noqa: E501 + :rtype: AefLocation + """ + return util.deserialize_model(dikt, cls) + + @property + def civic_addr(self) -> CivicAddress: + """Gets the civic_addr of this AefLocation. + + + :return: The civic_addr of this AefLocation. + :rtype: CivicAddress + """ + return self._civic_addr + + @civic_addr.setter + def civic_addr(self, civic_addr: CivicAddress): + """Sets the civic_addr of this AefLocation. + + + :param civic_addr: The civic_addr of this AefLocation. + :type civic_addr: CivicAddress + """ + + self._civic_addr = civic_addr + + @property + def geo_area(self) -> GeographicArea: + """Gets the geo_area of this AefLocation. + + + :return: The geo_area of this AefLocation. + :rtype: GeographicArea + """ + return self._geo_area + + @geo_area.setter + def geo_area(self, geo_area: GeographicArea): + """Sets the geo_area of this AefLocation. + + + :param geo_area: The geo_area of this AefLocation. + :type geo_area: GeographicArea + """ + + self._geo_area = geo_area + + @property + def dc_id(self) -> str: + """Gets the dc_id of this AefLocation. + + Identifies the data center where the AEF providing the service API is located. # noqa: E501 + + :return: The dc_id of this AefLocation. + :rtype: str + """ + return self._dc_id + + @dc_id.setter + def dc_id(self, dc_id: str): + """Sets the dc_id of this AefLocation. + + Identifies the data center where the AEF providing the service API is located. # noqa: E501 + + :param dc_id: The dc_id of this AefLocation. + :type dc_id: str + """ + + self._dc_id = dc_id diff --git a/services/helper/helper_service/services/api/models/aef_profile.py b/services/helper/helper_service/services/api/models/aef_profile.py new file mode 100644 index 00000000..4b397816 --- /dev/null +++ b/services/helper/helper_service/services/api/models/aef_profile.py @@ -0,0 +1,275 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.aef_location import AefLocation +from api.models.data_format import DataFormat +from api.models.interface_description import InterfaceDescription +from api.models.protocol import Protocol +from api.models.security_method import SecurityMethod +from api.models.version import Version +from api import util + +from api.models.aef_location import AefLocation # noqa: E501 +from api.models.data_format import DataFormat # noqa: E501 +from api.models.interface_description import InterfaceDescription # noqa: E501 +from api.models.protocol import Protocol # noqa: E501 +from api.models.security_method import SecurityMethod # noqa: E501 +from api.models.version import Version # noqa: E501 + +class AefProfile(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, aef_id=None, versions=None, protocol=None, data_format=None, security_methods=None, domain_name=None, interface_descriptions=None, aef_location=None): # noqa: E501 + """AefProfile - a model defined in OpenAPI + + :param aef_id: The aef_id of this AefProfile. # noqa: E501 + :type aef_id: str + :param versions: The versions of this AefProfile. # noqa: E501 + :type versions: List[Version] + :param protocol: The protocol of this AefProfile. # noqa: E501 + :type protocol: Protocol + :param data_format: The data_format of this AefProfile. # noqa: E501 + :type data_format: DataFormat + :param security_methods: The security_methods of this AefProfile. # noqa: E501 + :type security_methods: List[SecurityMethod] + :param domain_name: The domain_name of this AefProfile. # noqa: E501 + :type domain_name: str + :param interface_descriptions: The interface_descriptions of this AefProfile. # noqa: E501 + :type interface_descriptions: List[InterfaceDescription] + :param aef_location: The aef_location of this AefProfile. # noqa: E501 + :type aef_location: AefLocation + """ + self.openapi_types = { + 'aef_id': str, + 'versions': List[Version], + 'protocol': Protocol, + 'data_format': DataFormat, + 'security_methods': List[SecurityMethod], + 'domain_name': str, + 'interface_descriptions': List[InterfaceDescription], + 'aef_location': AefLocation + } + + self.attribute_map = { + 'aef_id': 'aefId', + 'versions': 'versions', + 'protocol': 'protocol', + 'data_format': 'dataFormat', + 'security_methods': 'securityMethods', + 'domain_name': 'domainName', + 'interface_descriptions': 'interfaceDescriptions', + 'aef_location': 'aefLocation' + } + + self._aef_id = aef_id + self._versions = versions + self._protocol = protocol + self._data_format = data_format + self._security_methods = security_methods + self._domain_name = domain_name + self._interface_descriptions = interface_descriptions + self._aef_location = aef_location + + @classmethod + def from_dict(cls, dikt) -> 'AefProfile': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The AefProfile of this AefProfile. # noqa: E501 + :rtype: AefProfile + """ + return util.deserialize_model(dikt, cls) + + @property + def aef_id(self) -> str: + """Gets the aef_id of this AefProfile. + + Identifier of the API exposing function # noqa: E501 + + :return: The aef_id of this AefProfile. + :rtype: str + """ + return self._aef_id + + @aef_id.setter + def aef_id(self, aef_id: str): + """Sets the aef_id of this AefProfile. + + Identifier of the API exposing function # noqa: E501 + + :param aef_id: The aef_id of this AefProfile. + :type aef_id: str + """ + if aef_id is None: + raise ValueError("Invalid value for `aef_id`, must not be `None`") # noqa: E501 + + self._aef_id = aef_id + + @property + def versions(self) -> List[Version]: + """Gets the versions of this AefProfile. + + API version # noqa: E501 + + :return: The versions of this AefProfile. + :rtype: List[Version] + """ + return self._versions + + @versions.setter + def versions(self, versions: List[Version]): + """Sets the versions of this AefProfile. + + API version # noqa: E501 + + :param versions: The versions of this AefProfile. + :type versions: List[Version] + """ + if versions is None: + raise ValueError("Invalid value for `versions`, must not be `None`") # noqa: E501 + if versions is not None and len(versions) < 1: + raise ValueError("Invalid value for `versions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._versions = versions + + @property + def protocol(self) -> Protocol: + """Gets the protocol of this AefProfile. + + + :return: The protocol of this AefProfile. + :rtype: Protocol + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol: Protocol): + """Sets the protocol of this AefProfile. + + + :param protocol: The protocol of this AefProfile. + :type protocol: Protocol + """ + + self._protocol = protocol + + @property + def data_format(self) -> DataFormat: + """Gets the data_format of this AefProfile. + + + :return: The data_format of this AefProfile. + :rtype: DataFormat + """ + return self._data_format + + @data_format.setter + def data_format(self, data_format: DataFormat): + """Sets the data_format of this AefProfile. + + + :param data_format: The data_format of this AefProfile. + :type data_format: DataFormat + """ + + self._data_format = data_format + + @property + def security_methods(self) -> List[SecurityMethod]: + """Gets the security_methods of this AefProfile. + + Security methods supported by the AEF # noqa: E501 + + :return: The security_methods of this AefProfile. + :rtype: List[SecurityMethod] + """ + return self._security_methods + + @security_methods.setter + def security_methods(self, security_methods: List[SecurityMethod]): + """Sets the security_methods of this AefProfile. + + Security methods supported by the AEF # noqa: E501 + + :param security_methods: The security_methods of this AefProfile. + :type security_methods: List[SecurityMethod] + """ + if security_methods is not None and len(security_methods) < 1: + raise ValueError("Invalid value for `security_methods`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._security_methods = security_methods + + @property + def domain_name(self) -> str: + """Gets the domain_name of this AefProfile. + + Domain to which API belongs to # noqa: E501 + + :return: The domain_name of this AefProfile. + :rtype: str + """ + return self._domain_name + + @domain_name.setter + def domain_name(self, domain_name: str): + """Sets the domain_name of this AefProfile. + + Domain to which API belongs to # noqa: E501 + + :param domain_name: The domain_name of this AefProfile. + :type domain_name: str + """ + + self._domain_name = domain_name + + @property + def interface_descriptions(self) -> List[InterfaceDescription]: + """Gets the interface_descriptions of this AefProfile. + + Interface details # noqa: E501 + + :return: The interface_descriptions of this AefProfile. + :rtype: List[InterfaceDescription] + """ + return self._interface_descriptions + + @interface_descriptions.setter + def interface_descriptions(self, interface_descriptions: List[InterfaceDescription]): + """Sets the interface_descriptions of this AefProfile. + + Interface details # noqa: E501 + + :param interface_descriptions: The interface_descriptions of this AefProfile. + :type interface_descriptions: List[InterfaceDescription] + """ + if interface_descriptions is not None and len(interface_descriptions) < 1: + raise ValueError("Invalid value for `interface_descriptions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._interface_descriptions = interface_descriptions + + @property + def aef_location(self) -> AefLocation: + """Gets the aef_location of this AefProfile. + + + :return: The aef_location of this AefProfile. + :rtype: AefLocation + """ + return self._aef_location + + @aef_location.setter + def aef_location(self, aef_location: AefLocation): + """Sets the aef_location of this AefProfile. + + + :param aef_location: The aef_location of this AefProfile. + :type aef_location: AefLocation + """ + + self._aef_location = aef_location diff --git a/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py b/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py new file mode 100644 index 00000000..fa1b4d4a --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py @@ -0,0 +1,351 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_list import APIList +from api.models.onboarding_information import OnboardingInformation +from api.models.websock_notif_config import WebsockNotifConfig +import re +from api import util + +from api.models.api_list import APIList # noqa: E501 +from api.models.onboarding_information import OnboardingInformation # noqa: E501 +from api.models.websock_notif_config import WebsockNotifConfig # noqa: E501 +import re # noqa: E501 + +class APIInvokerEnrolmentDetails(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, onboarding_date=None, username=None, uuid=None, api_invoker_id=None, onboarding_information=None, notification_destination=None, request_test_notification=None, websock_notif_config=None, api_list=None, api_invoker_information=None, supported_features=None): # noqa: E501 + """APIInvokerEnrolmentDetails - a model defined in OpenAPI + + :param onboarding_date: The onboarding_date of this APIInvokerEnrolmentDetails. # noqa: E501 + :type onboarding_date: datetime + :param username: The username of this APIInvokerEnrolmentDetails. # noqa: E501 + :type username: str + :param uuid: The uuid of this APIInvokerEnrolmentDetails. # noqa: E501 + :type uuid: str + :param api_invoker_id: The api_invoker_id of this APIInvokerEnrolmentDetails. # noqa: E501 + :type api_invoker_id: str + :param onboarding_information: The onboarding_information of this APIInvokerEnrolmentDetails. # noqa: E501 + :type onboarding_information: OnboardingInformation + :param notification_destination: The notification_destination of this APIInvokerEnrolmentDetails. # noqa: E501 + :type notification_destination: str + :param request_test_notification: The request_test_notification of this APIInvokerEnrolmentDetails. # noqa: E501 + :type request_test_notification: bool + :param websock_notif_config: The websock_notif_config of this APIInvokerEnrolmentDetails. # noqa: E501 + :type websock_notif_config: WebsockNotifConfig + :param api_list: The api_list of this APIInvokerEnrolmentDetails. # noqa: E501 + :type api_list: APIList + :param api_invoker_information: The api_invoker_information of this APIInvokerEnrolmentDetails. # noqa: E501 + :type api_invoker_information: str + :param supported_features: The supported_features of this APIInvokerEnrolmentDetails. # noqa: E501 + :type supported_features: str + """ + self.openapi_types = { + 'onboarding_date': datetime, + 'username': str, + 'uuid': str, + 'api_invoker_id': str, + 'onboarding_information': OnboardingInformation, + 'notification_destination': str, + 'request_test_notification': bool, + 'websock_notif_config': WebsockNotifConfig, + 'api_list': APIList, + 'api_invoker_information': str, + 'supported_features': str + } + + self.attribute_map = { + 'onboarding_date': 'onboarding_date', + 'username': 'username', + 'uuid': 'uuid', + 'api_invoker_id': 'apiInvokerId', + 'onboarding_information': 'onboardingInformation', + 'notification_destination': 'notificationDestination', + 'request_test_notification': 'requestTestNotification', + 'websock_notif_config': 'websockNotifConfig', + 'api_list': 'apiList', + 'api_invoker_information': 'apiInvokerInformation', + 'supported_features': 'supportedFeatures' + } + + self._onboarding_date = onboarding_date + self._username = username + self._uuid = uuid + self._api_invoker_id = api_invoker_id + self._onboarding_information = onboarding_information + self._notification_destination = notification_destination + self._request_test_notification = request_test_notification + self._websock_notif_config = websock_notif_config + self._api_list = api_list + self._api_invoker_information = api_invoker_information + self._supported_features = supported_features + + @classmethod + def from_dict(cls, dikt) -> 'APIInvokerEnrolmentDetails': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The APIInvokerEnrolmentDetails of this APIInvokerEnrolmentDetails. # noqa: E501 + :rtype: APIInvokerEnrolmentDetails + """ + return util.deserialize_model(dikt, cls) + + @property + def onboarding_date(self) -> datetime: + """Gets the onboarding_date of this APIInvokerEnrolmentDetails. + + Invoker onboarding date # noqa: E501 + + :return: The onboarding_date of this APIInvokerEnrolmentDetails. + :rtype: datetime + """ + return self._onboarding_date + + @onboarding_date.setter + def onboarding_date(self, onboarding_date: datetime): + """Sets the onboarding_date of this APIInvokerEnrolmentDetails. + + Invoker onboarding date # noqa: E501 + + :param onboarding_date: The onboarding_date of this APIInvokerEnrolmentDetails. + :type onboarding_date: datetime + """ + + self._onboarding_date = onboarding_date + + @property + def username(self) -> str: + """Gets the username of this APIInvokerEnrolmentDetails. + + User who registered the invoker # noqa: E501 + + :return: The username of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._username + + @username.setter + def username(self, username: str): + """Sets the username of this APIInvokerEnrolmentDetails. + + User who registered the invoker # noqa: E501 + + :param username: The username of this APIInvokerEnrolmentDetails. + :type username: str + """ + + self._username = username + + @property + def uuid(self) -> str: + """Gets the uuid of this APIInvokerEnrolmentDetails. + + uuid of the user who registered the invoker # noqa: E501 + + :return: The uuid of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid: str): + """Sets the uuid of this APIInvokerEnrolmentDetails. + + uuid of the user who registered the invoker # noqa: E501 + + :param uuid: The uuid of this APIInvokerEnrolmentDetails. + :type uuid: str + """ + + self._uuid = uuid + + @property + def api_invoker_id(self) -> str: + """Gets the api_invoker_id of this APIInvokerEnrolmentDetails. + + API invoker ID assigned by the CAPIF core function to the API invoker while on-boarding the API invoker. Shall not be present in the HTTP POST request from the API invoker to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :return: The api_invoker_id of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._api_invoker_id + + @api_invoker_id.setter + def api_invoker_id(self, api_invoker_id: str): + """Sets the api_invoker_id of this APIInvokerEnrolmentDetails. + + API invoker ID assigned by the CAPIF core function to the API invoker while on-boarding the API invoker. Shall not be present in the HTTP POST request from the API invoker to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :param api_invoker_id: The api_invoker_id of this APIInvokerEnrolmentDetails. + :type api_invoker_id: str + """ + + self._api_invoker_id = api_invoker_id + + @property + def onboarding_information(self) -> OnboardingInformation: + """Gets the onboarding_information of this APIInvokerEnrolmentDetails. + + + :return: The onboarding_information of this APIInvokerEnrolmentDetails. + :rtype: OnboardingInformation + """ + return self._onboarding_information + + @onboarding_information.setter + def onboarding_information(self, onboarding_information: OnboardingInformation): + """Sets the onboarding_information of this APIInvokerEnrolmentDetails. + + + :param onboarding_information: The onboarding_information of this APIInvokerEnrolmentDetails. + :type onboarding_information: OnboardingInformation + """ + if onboarding_information is None: + raise ValueError("Invalid value for `onboarding_information`, must not be `None`") # noqa: E501 + + self._onboarding_information = onboarding_information + + @property + def notification_destination(self) -> str: + """Gets the notification_destination of this APIInvokerEnrolmentDetails. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The notification_destination of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._notification_destination + + @notification_destination.setter + def notification_destination(self, notification_destination: str): + """Sets the notification_destination of this APIInvokerEnrolmentDetails. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param notification_destination: The notification_destination of this APIInvokerEnrolmentDetails. + :type notification_destination: str + """ + if notification_destination is None: + raise ValueError("Invalid value for `notification_destination`, must not be `None`") # noqa: E501 + + self._notification_destination = notification_destination + + @property + def request_test_notification(self) -> bool: + """Gets the request_test_notification of this APIInvokerEnrolmentDetails. + + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :return: The request_test_notification of this APIInvokerEnrolmentDetails. + :rtype: bool + """ + return self._request_test_notification + + @request_test_notification.setter + def request_test_notification(self, request_test_notification: bool): + """Sets the request_test_notification of this APIInvokerEnrolmentDetails. + + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :param request_test_notification: The request_test_notification of this APIInvokerEnrolmentDetails. + :type request_test_notification: bool + """ + + self._request_test_notification = request_test_notification + + @property + def websock_notif_config(self) -> WebsockNotifConfig: + """Gets the websock_notif_config of this APIInvokerEnrolmentDetails. + + + :return: The websock_notif_config of this APIInvokerEnrolmentDetails. + :rtype: WebsockNotifConfig + """ + return self._websock_notif_config + + @websock_notif_config.setter + def websock_notif_config(self, websock_notif_config: WebsockNotifConfig): + """Sets the websock_notif_config of this APIInvokerEnrolmentDetails. + + + :param websock_notif_config: The websock_notif_config of this APIInvokerEnrolmentDetails. + :type websock_notif_config: WebsockNotifConfig + """ + + self._websock_notif_config = websock_notif_config + + @property + def api_list(self) -> APIList: + """Gets the api_list of this APIInvokerEnrolmentDetails. + + + :return: The api_list of this APIInvokerEnrolmentDetails. + :rtype: APIList + """ + return self._api_list + + @api_list.setter + def api_list(self, api_list: APIList): + """Sets the api_list of this APIInvokerEnrolmentDetails. + + + :param api_list: The api_list of this APIInvokerEnrolmentDetails. + :type api_list: APIList + """ + + self._api_list = api_list + + @property + def api_invoker_information(self) -> str: + """Gets the api_invoker_information of this APIInvokerEnrolmentDetails. + + Generic information related to the API invoker such as details of the device or the application. # noqa: E501 + + :return: The api_invoker_information of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._api_invoker_information + + @api_invoker_information.setter + def api_invoker_information(self, api_invoker_information: str): + """Sets the api_invoker_information of this APIInvokerEnrolmentDetails. + + Generic information related to the API invoker such as details of the device or the application. # noqa: E501 + + :param api_invoker_information: The api_invoker_information of this APIInvokerEnrolmentDetails. + :type api_invoker_information: str + """ + + self._api_invoker_information = api_invoker_information + + @property + def supported_features(self) -> str: + """Gets the supported_features of this APIInvokerEnrolmentDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supported_features of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this APIInvokerEnrolmentDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supported_features: The supported_features of this APIInvokerEnrolmentDetails. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features diff --git a/services/helper/helper_service/services/api/models/api_list.py b/services/helper/helper_service/services/api/models/api_list.py new file mode 100644 index 00000000..09e0dd1a --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_list.py @@ -0,0 +1,67 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.service_api_description import ServiceAPIDescription +from api import util + +from api.models.service_api_description import ServiceAPIDescription # noqa: E501 + +class APIList(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, service_api_descriptions=None): # noqa: E501 + """APIList - a model defined in OpenAPI + + :param service_api_descriptions: The service_api_descriptions of this APIList. # noqa: E501 + :type service_api_descriptions: List[ServiceAPIDescription] + """ + self.openapi_types = { + 'service_api_descriptions': List[ServiceAPIDescription] + } + + self.attribute_map = { + 'service_api_descriptions': 'serviceAPIDescriptions' + } + + self._service_api_descriptions = service_api_descriptions + + @classmethod + def from_dict(cls, dikt) -> 'APIList': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The APIList of this APIList. # noqa: E501 + :rtype: APIList + """ + return util.deserialize_model(dikt, cls) + + @property + def service_api_descriptions(self) -> List[ServiceAPIDescription]: + """Gets the service_api_descriptions of this APIList. + + The list of service APIs that the API Invoker is allowed to invoke. # noqa: E501 + + :return: The service_api_descriptions of this APIList. + :rtype: List[ServiceAPIDescription] + """ + return self._service_api_descriptions + + @service_api_descriptions.setter + def service_api_descriptions(self, service_api_descriptions: List[ServiceAPIDescription]): + """Sets the service_api_descriptions of this APIList. + + The list of service APIs that the API Invoker is allowed to invoke. # noqa: E501 + + :param service_api_descriptions: The service_api_descriptions of this APIList. + :type service_api_descriptions: List[ServiceAPIDescription] + """ + if service_api_descriptions is not None and len(service_api_descriptions) < 1: + raise ValueError("Invalid value for `service_api_descriptions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._service_api_descriptions = service_api_descriptions diff --git a/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py b/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py new file mode 100644 index 00000000..8cba9810 --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py @@ -0,0 +1,297 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_provider_function_details import APIProviderFunctionDetails +import re +from api import util + +from api.models.api_provider_function_details import APIProviderFunctionDetails # noqa: E501 +import re # noqa: E501 + +class APIProviderEnrolmentDetails(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, onboarding_date=None, username=None, uuid=None, api_prov_dom_id=None, reg_sec=None, api_prov_funcs=None, api_prov_dom_info=None, supp_feat=None, fail_reason=None): # noqa: E501 + """APIProviderEnrolmentDetails - a model defined in OpenAPI + + :param onboarding_date: The onboarding_date of this APIProviderEnrolmentDetails. # noqa: E501 + :type onboarding_date: datetime + :param username: The username of this APIProviderEnrolmentDetails. # noqa: E501 + :type username: str + :param uuid: The uuid of this APIProviderEnrolmentDetails. # noqa: E501 + :type uuid: str + :param api_prov_dom_id: The api_prov_dom_id of this APIProviderEnrolmentDetails. # noqa: E501 + :type api_prov_dom_id: str + :param reg_sec: The reg_sec of this APIProviderEnrolmentDetails. # noqa: E501 + :type reg_sec: str + :param api_prov_funcs: The api_prov_funcs of this APIProviderEnrolmentDetails. # noqa: E501 + :type api_prov_funcs: List[APIProviderFunctionDetails] + :param api_prov_dom_info: The api_prov_dom_info of this APIProviderEnrolmentDetails. # noqa: E501 + :type api_prov_dom_info: str + :param supp_feat: The supp_feat of this APIProviderEnrolmentDetails. # noqa: E501 + :type supp_feat: str + :param fail_reason: The fail_reason of this APIProviderEnrolmentDetails. # noqa: E501 + :type fail_reason: str + """ + self.openapi_types = { + 'onboarding_date': datetime, + 'username': str, + 'uuid': str, + 'api_prov_dom_id': str, + 'reg_sec': str, + 'api_prov_funcs': List[APIProviderFunctionDetails], + 'api_prov_dom_info': str, + 'supp_feat': str, + 'fail_reason': str + } + + self.attribute_map = { + 'onboarding_date': 'onboarding_date', + 'username': 'username', + 'uuid': 'uuid', + 'api_prov_dom_id': 'apiProvDomId', + 'reg_sec': 'regSec', + 'api_prov_funcs': 'apiProvFuncs', + 'api_prov_dom_info': 'apiProvDomInfo', + 'supp_feat': 'suppFeat', + 'fail_reason': 'failReason' + } + + self._onboarding_date = onboarding_date + self._username = username + self._uuid = uuid + self._api_prov_dom_id = api_prov_dom_id + self._reg_sec = reg_sec + self._api_prov_funcs = api_prov_funcs + self._api_prov_dom_info = api_prov_dom_info + self._supp_feat = supp_feat + self._fail_reason = fail_reason + + @classmethod + def from_dict(cls, dikt) -> 'APIProviderEnrolmentDetails': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The APIProviderEnrolmentDetails of this APIProviderEnrolmentDetails. # noqa: E501 + :rtype: APIProviderEnrolmentDetails + """ + return util.deserialize_model(dikt, cls) + + @property + def onboarding_date(self) -> datetime: + """Gets the onboarding_date of this APIProviderEnrolmentDetails. + + Provider onboarding date # noqa: E501 + + :return: The onboarding_date of this APIProviderEnrolmentDetails. + :rtype: datetime + """ + return self._onboarding_date + + @onboarding_date.setter + def onboarding_date(self, onboarding_date: datetime): + """Sets the onboarding_date of this APIProviderEnrolmentDetails. + + Provider onboarding date # noqa: E501 + + :param onboarding_date: The onboarding_date of this APIProviderEnrolmentDetails. + :type onboarding_date: datetime + """ + + self._onboarding_date = onboarding_date + + @property + def username(self) -> str: + """Gets the username of this APIProviderEnrolmentDetails. + + User who registered the provider # noqa: E501 + + :return: The username of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._username + + @username.setter + def username(self, username: str): + """Sets the username of this APIProviderEnrolmentDetails. + + User who registered the provider # noqa: E501 + + :param username: The username of this APIProviderEnrolmentDetails. + :type username: str + """ + + self._username = username + + @property + def uuid(self) -> str: + """Gets the uuid of this APIProviderEnrolmentDetails. + + uuid of the user who registered the provider # noqa: E501 + + :return: The uuid of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid: str): + """Sets the uuid of this APIProviderEnrolmentDetails. + + uuid of the user who registered the provider # noqa: E501 + + :param uuid: The uuid of this APIProviderEnrolmentDetails. + :type uuid: str + """ + + self._uuid = uuid + + @property + def api_prov_dom_id(self) -> str: + """Gets the api_prov_dom_id of this APIProviderEnrolmentDetails. + + API provider domain ID assigned by the CAPIF core function to the API management function while registering the API provider domain. Shall not be present in the HTTP POST request from the API Management function to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :return: The api_prov_dom_id of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._api_prov_dom_id + + @api_prov_dom_id.setter + def api_prov_dom_id(self, api_prov_dom_id: str): + """Sets the api_prov_dom_id of this APIProviderEnrolmentDetails. + + API provider domain ID assigned by the CAPIF core function to the API management function while registering the API provider domain. Shall not be present in the HTTP POST request from the API Management function to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :param api_prov_dom_id: The api_prov_dom_id of this APIProviderEnrolmentDetails. + :type api_prov_dom_id: str + """ + + self._api_prov_dom_id = api_prov_dom_id + + @property + def reg_sec(self) -> str: + """Gets the reg_sec of this APIProviderEnrolmentDetails. + + Security information necessary for the CAPIF core function to validate the registration of the API provider domain. Shall be present in HTTP POST request from API management function to CAPIF core function for API provider domain registration. # noqa: E501 + + :return: The reg_sec of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._reg_sec + + @reg_sec.setter + def reg_sec(self, reg_sec: str): + """Sets the reg_sec of this APIProviderEnrolmentDetails. + + Security information necessary for the CAPIF core function to validate the registration of the API provider domain. Shall be present in HTTP POST request from API management function to CAPIF core function for API provider domain registration. # noqa: E501 + + :param reg_sec: The reg_sec of this APIProviderEnrolmentDetails. + :type reg_sec: str + """ + if reg_sec is None: + raise ValueError("Invalid value for `reg_sec`, must not be `None`") # noqa: E501 + + self._reg_sec = reg_sec + + @property + def api_prov_funcs(self) -> List[APIProviderFunctionDetails]: + """Gets the api_prov_funcs of this APIProviderEnrolmentDetails. + + A list of individual API provider domain functions details. When included by the API management function in the HTTP request message, it lists the API provider domain functions that the API management function intends to register/update in registration or update registration procedure. When included by the CAPIF core function in the HTTP response message, it lists the API domain functions details that are registered or updated successfully. # noqa: E501 + + :return: The api_prov_funcs of this APIProviderEnrolmentDetails. + :rtype: List[APIProviderFunctionDetails] + """ + return self._api_prov_funcs + + @api_prov_funcs.setter + def api_prov_funcs(self, api_prov_funcs: List[APIProviderFunctionDetails]): + """Sets the api_prov_funcs of this APIProviderEnrolmentDetails. + + A list of individual API provider domain functions details. When included by the API management function in the HTTP request message, it lists the API provider domain functions that the API management function intends to register/update in registration or update registration procedure. When included by the CAPIF core function in the HTTP response message, it lists the API domain functions details that are registered or updated successfully. # noqa: E501 + + :param api_prov_funcs: The api_prov_funcs of this APIProviderEnrolmentDetails. + :type api_prov_funcs: List[APIProviderFunctionDetails] + """ + if api_prov_funcs is not None and len(api_prov_funcs) < 1: + raise ValueError("Invalid value for `api_prov_funcs`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._api_prov_funcs = api_prov_funcs + + @property + def api_prov_dom_info(self) -> str: + """Gets the api_prov_dom_info of this APIProviderEnrolmentDetails. + + Generic information related to the API provider domain such as details of the API provider applications. # noqa: E501 + + :return: The api_prov_dom_info of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._api_prov_dom_info + + @api_prov_dom_info.setter + def api_prov_dom_info(self, api_prov_dom_info: str): + """Sets the api_prov_dom_info of this APIProviderEnrolmentDetails. + + Generic information related to the API provider domain such as details of the API provider applications. # noqa: E501 + + :param api_prov_dom_info: The api_prov_dom_info of this APIProviderEnrolmentDetails. + :type api_prov_dom_info: str + """ + + self._api_prov_dom_info = api_prov_dom_info + + @property + def supp_feat(self) -> str: + """Gets the supp_feat of this APIProviderEnrolmentDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supp_feat of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._supp_feat + + @supp_feat.setter + def supp_feat(self, supp_feat: str): + """Sets the supp_feat of this APIProviderEnrolmentDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supp_feat: The supp_feat of this APIProviderEnrolmentDetails. + :type supp_feat: str + """ + if supp_feat is not None and not re.search(r'^[A-Fa-f0-9]*$', supp_feat): # noqa: E501 + raise ValueError(r"Invalid value for `supp_feat`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supp_feat = supp_feat + + @property + def fail_reason(self) -> str: + """Gets the fail_reason of this APIProviderEnrolmentDetails. + + Registration or update specific failure information of failed API provider domain function registrations.Shall be present in the HTTP response body if atleast one of the API provider domain function registration or update registration fails. # noqa: E501 + + :return: The fail_reason of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._fail_reason + + @fail_reason.setter + def fail_reason(self, fail_reason: str): + """Sets the fail_reason of this APIProviderEnrolmentDetails. + + Registration or update specific failure information of failed API provider domain function registrations.Shall be present in the HTTP response body if atleast one of the API provider domain function registration or update registration fails. # noqa: E501 + + :param fail_reason: The fail_reason of this APIProviderEnrolmentDetails. + :type fail_reason: str + """ + + self._fail_reason = fail_reason diff --git a/services/helper/helper_service/services/api/models/api_provider_func_role.py b/services/helper/helper_service/services/api/models/api_provider_func_role.py new file mode 100644 index 00000000..d3bda3c8 --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_provider_func_role.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class ApiProviderFuncRole(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """ApiProviderFuncRole - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'ApiProviderFuncRole': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ApiProviderFuncRole of this ApiProviderFuncRole. # noqa: E501 + :rtype: ApiProviderFuncRole + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/api_provider_function_details.py b/services/helper/helper_service/services/api/models/api_provider_function_details.py new file mode 100644 index 00000000..6998632a --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_provider_function_details.py @@ -0,0 +1,151 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_provider_func_role import ApiProviderFuncRole +from api.models.registration_information import RegistrationInformation +from api import util + +from api.models.api_provider_func_role import ApiProviderFuncRole # noqa: E501 +from api.models.registration_information import RegistrationInformation # noqa: E501 + +class APIProviderFunctionDetails(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_prov_func_id=None, reg_info=None, api_prov_func_role=None, api_prov_func_info=None): # noqa: E501 + """APIProviderFunctionDetails - a model defined in OpenAPI + + :param api_prov_func_id: The api_prov_func_id of this APIProviderFunctionDetails. # noqa: E501 + :type api_prov_func_id: str + :param reg_info: The reg_info of this APIProviderFunctionDetails. # noqa: E501 + :type reg_info: RegistrationInformation + :param api_prov_func_role: The api_prov_func_role of this APIProviderFunctionDetails. # noqa: E501 + :type api_prov_func_role: ApiProviderFuncRole + :param api_prov_func_info: The api_prov_func_info of this APIProviderFunctionDetails. # noqa: E501 + :type api_prov_func_info: str + """ + self.openapi_types = { + 'api_prov_func_id': str, + 'reg_info': RegistrationInformation, + 'api_prov_func_role': ApiProviderFuncRole, + 'api_prov_func_info': str + } + + self.attribute_map = { + 'api_prov_func_id': 'apiProvFuncId', + 'reg_info': 'regInfo', + 'api_prov_func_role': 'apiProvFuncRole', + 'api_prov_func_info': 'apiProvFuncInfo' + } + + self._api_prov_func_id = api_prov_func_id + self._reg_info = reg_info + self._api_prov_func_role = api_prov_func_role + self._api_prov_func_info = api_prov_func_info + + @classmethod + def from_dict(cls, dikt) -> 'APIProviderFunctionDetails': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The APIProviderFunctionDetails of this APIProviderFunctionDetails. # noqa: E501 + :rtype: APIProviderFunctionDetails + """ + return util.deserialize_model(dikt, cls) + + @property + def api_prov_func_id(self) -> str: + """Gets the api_prov_func_id of this APIProviderFunctionDetails. + + API provider domain functionID assigned by the CAPIF core function to the API provider domain function while registering/updating the API provider domain. Shall not be present in the HTTP POST request from the API management function to the CAPIF core function, to register itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :return: The api_prov_func_id of this APIProviderFunctionDetails. + :rtype: str + """ + return self._api_prov_func_id + + @api_prov_func_id.setter + def api_prov_func_id(self, api_prov_func_id: str): + """Sets the api_prov_func_id of this APIProviderFunctionDetails. + + API provider domain functionID assigned by the CAPIF core function to the API provider domain function while registering/updating the API provider domain. Shall not be present in the HTTP POST request from the API management function to the CAPIF core function, to register itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :param api_prov_func_id: The api_prov_func_id of this APIProviderFunctionDetails. + :type api_prov_func_id: str + """ + + self._api_prov_func_id = api_prov_func_id + + @property + def reg_info(self) -> RegistrationInformation: + """Gets the reg_info of this APIProviderFunctionDetails. + + + :return: The reg_info of this APIProviderFunctionDetails. + :rtype: RegistrationInformation + """ + return self._reg_info + + @reg_info.setter + def reg_info(self, reg_info: RegistrationInformation): + """Sets the reg_info of this APIProviderFunctionDetails. + + + :param reg_info: The reg_info of this APIProviderFunctionDetails. + :type reg_info: RegistrationInformation + """ + if reg_info is None: + raise ValueError("Invalid value for `reg_info`, must not be `None`") # noqa: E501 + + self._reg_info = reg_info + + @property + def api_prov_func_role(self) -> ApiProviderFuncRole: + """Gets the api_prov_func_role of this APIProviderFunctionDetails. + + + :return: The api_prov_func_role of this APIProviderFunctionDetails. + :rtype: ApiProviderFuncRole + """ + return self._api_prov_func_role + + @api_prov_func_role.setter + def api_prov_func_role(self, api_prov_func_role: ApiProviderFuncRole): + """Sets the api_prov_func_role of this APIProviderFunctionDetails. + + + :param api_prov_func_role: The api_prov_func_role of this APIProviderFunctionDetails. + :type api_prov_func_role: ApiProviderFuncRole + """ + if api_prov_func_role is None: + raise ValueError("Invalid value for `api_prov_func_role`, must not be `None`") # noqa: E501 + + self._api_prov_func_role = api_prov_func_role + + @property + def api_prov_func_info(self) -> str: + """Gets the api_prov_func_info of this APIProviderFunctionDetails. + + Generic information related to the API provider domain function such as details of the API provider applications. # noqa: E501 + + :return: The api_prov_func_info of this APIProviderFunctionDetails. + :rtype: str + """ + return self._api_prov_func_info + + @api_prov_func_info.setter + def api_prov_func_info(self, api_prov_func_info: str): + """Sets the api_prov_func_info of this APIProviderFunctionDetails. + + Generic information related to the API provider domain function such as details of the API provider applications. # noqa: E501 + + :param api_prov_func_info: The api_prov_func_info of this APIProviderFunctionDetails. + :type api_prov_func_info: str + """ + + self._api_prov_func_info = api_prov_func_info diff --git a/services/helper/helper_service/services/api/models/base_model.py b/services/helper/helper_service/services/api/models/base_model.py new file mode 100644 index 00000000..7b48dda2 --- /dev/null +++ b/services/helper/helper_service/services/api/models/base_model.py @@ -0,0 +1,68 @@ +import pprint + +import typing + +from api import util + +T = typing.TypeVar('T') + + +class Model: + # openapiTypes: The key is attribute name and the + # value is attribute type. + openapi_types: typing.Dict[str, type] = {} + + # attributeMap: The key is attribute name and the + # value is json key in definition. + attribute_map: typing.Dict[str, str] = {} + + @classmethod + def from_dict(cls: typing.Type[T], dikt) -> T: + """Returns the dict as a model""" + return util.deserialize_model(dikt, cls) + + def to_dict(self): + """Returns the model properties as a dict + + :rtype: dict + """ + result = {} + + for attr in self.openapi_types: + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model + + :rtype: str + """ + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/services/helper/helper_service/services/api/models/capif_event.py b/services/helper/helper_service/services/api/models/capif_event.py new file mode 100644 index 00000000..edf95766 --- /dev/null +++ b/services/helper/helper_service/services/api/models/capif_event.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class CAPIFEvent(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """CAPIFEvent - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'CAPIFEvent': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CAPIFEvent of this CAPIFEvent. # noqa: E501 + :rtype: CAPIFEvent + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/capif_event_filter.py b/services/helper/helper_service/services/api/models/capif_event_filter.py new file mode 100644 index 00000000..f0f6a138 --- /dev/null +++ b/services/helper/helper_service/services/api/models/capif_event_filter.py @@ -0,0 +1,125 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class CAPIFEventFilter(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_ids=None, api_invoker_ids=None, aef_ids=None): # noqa: E501 + """CAPIFEventFilter - a model defined in OpenAPI + + :param api_ids: The api_ids of this CAPIFEventFilter. # noqa: E501 + :type api_ids: List[str] + :param api_invoker_ids: The api_invoker_ids of this CAPIFEventFilter. # noqa: E501 + :type api_invoker_ids: List[str] + :param aef_ids: The aef_ids of this CAPIFEventFilter. # noqa: E501 + :type aef_ids: List[str] + """ + self.openapi_types = { + 'api_ids': List[str], + 'api_invoker_ids': List[str], + 'aef_ids': List[str] + } + + self.attribute_map = { + 'api_ids': 'apiIds', + 'api_invoker_ids': 'apiInvokerIds', + 'aef_ids': 'aefIds' + } + + self._api_ids = api_ids + self._api_invoker_ids = api_invoker_ids + self._aef_ids = aef_ids + + @classmethod + def from_dict(cls, dikt) -> 'CAPIFEventFilter': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CAPIFEventFilter of this CAPIFEventFilter. # noqa: E501 + :rtype: CAPIFEventFilter + """ + return util.deserialize_model(dikt, cls) + + @property + def api_ids(self) -> List[str]: + """Gets the api_ids of this CAPIFEventFilter. + + Identifier of the service API # noqa: E501 + + :return: The api_ids of this CAPIFEventFilter. + :rtype: List[str] + """ + return self._api_ids + + @api_ids.setter + def api_ids(self, api_ids: List[str]): + """Sets the api_ids of this CAPIFEventFilter. + + Identifier of the service API # noqa: E501 + + :param api_ids: The api_ids of this CAPIFEventFilter. + :type api_ids: List[str] + """ + if api_ids is not None and len(api_ids) < 1: + raise ValueError("Invalid value for `api_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._api_ids = api_ids + + @property + def api_invoker_ids(self) -> List[str]: + """Gets the api_invoker_ids of this CAPIFEventFilter. + + Identity of the API invoker # noqa: E501 + + :return: The api_invoker_ids of this CAPIFEventFilter. + :rtype: List[str] + """ + return self._api_invoker_ids + + @api_invoker_ids.setter + def api_invoker_ids(self, api_invoker_ids: List[str]): + """Sets the api_invoker_ids of this CAPIFEventFilter. + + Identity of the API invoker # noqa: E501 + + :param api_invoker_ids: The api_invoker_ids of this CAPIFEventFilter. + :type api_invoker_ids: List[str] + """ + if api_invoker_ids is not None and len(api_invoker_ids) < 1: + raise ValueError("Invalid value for `api_invoker_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._api_invoker_ids = api_invoker_ids + + @property + def aef_ids(self) -> List[str]: + """Gets the aef_ids of this CAPIFEventFilter. + + Identifier of the API exposing function # noqa: E501 + + :return: The aef_ids of this CAPIFEventFilter. + :rtype: List[str] + """ + return self._aef_ids + + @aef_ids.setter + def aef_ids(self, aef_ids: List[str]): + """Sets the aef_ids of this CAPIFEventFilter. + + Identifier of the API exposing function # noqa: E501 + + :param aef_ids: The aef_ids of this CAPIFEventFilter. + :type aef_ids: List[str] + """ + if aef_ids is not None and len(aef_ids) < 1: + raise ValueError("Invalid value for `aef_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._aef_ids = aef_ids diff --git a/services/helper/helper_service/services/api/models/civic_address.py b/services/helper/helper_service/services/api/models/civic_address.py new file mode 100644 index 00000000..736673b2 --- /dev/null +++ b/services/helper/helper_service/services/api/models/civic_address.py @@ -0,0 +1,919 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class CivicAddress(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, country=None, a1=None, a2=None, a3=None, a4=None, a5=None, a6=None, prd=None, pod=None, sts=None, hno=None, hns=None, lmk=None, loc=None, nam=None, pc=None, bld=None, unit=None, flr=None, room=None, plc=None, pcn=None, pobox=None, addcode=None, seat=None, rd=None, rdsec=None, rdbr=None, rdsubbr=None, prm=None, pom=None, usage_rules=None, method=None, provided_by=None): # noqa: E501 + """CivicAddress - a model defined in OpenAPI + + :param country: The country of this CivicAddress. # noqa: E501 + :type country: str + :param a1: The a1 of this CivicAddress. # noqa: E501 + :type a1: str + :param a2: The a2 of this CivicAddress. # noqa: E501 + :type a2: str + :param a3: The a3 of this CivicAddress. # noqa: E501 + :type a3: str + :param a4: The a4 of this CivicAddress. # noqa: E501 + :type a4: str + :param a5: The a5 of this CivicAddress. # noqa: E501 + :type a5: str + :param a6: The a6 of this CivicAddress. # noqa: E501 + :type a6: str + :param prd: The prd of this CivicAddress. # noqa: E501 + :type prd: str + :param pod: The pod of this CivicAddress. # noqa: E501 + :type pod: str + :param sts: The sts of this CivicAddress. # noqa: E501 + :type sts: str + :param hno: The hno of this CivicAddress. # noqa: E501 + :type hno: str + :param hns: The hns of this CivicAddress. # noqa: E501 + :type hns: str + :param lmk: The lmk of this CivicAddress. # noqa: E501 + :type lmk: str + :param loc: The loc of this CivicAddress. # noqa: E501 + :type loc: str + :param nam: The nam of this CivicAddress. # noqa: E501 + :type nam: str + :param pc: The pc of this CivicAddress. # noqa: E501 + :type pc: str + :param bld: The bld of this CivicAddress. # noqa: E501 + :type bld: str + :param unit: The unit of this CivicAddress. # noqa: E501 + :type unit: str + :param flr: The flr of this CivicAddress. # noqa: E501 + :type flr: str + :param room: The room of this CivicAddress. # noqa: E501 + :type room: str + :param plc: The plc of this CivicAddress. # noqa: E501 + :type plc: str + :param pcn: The pcn of this CivicAddress. # noqa: E501 + :type pcn: str + :param pobox: The pobox of this CivicAddress. # noqa: E501 + :type pobox: str + :param addcode: The addcode of this CivicAddress. # noqa: E501 + :type addcode: str + :param seat: The seat of this CivicAddress. # noqa: E501 + :type seat: str + :param rd: The rd of this CivicAddress. # noqa: E501 + :type rd: str + :param rdsec: The rdsec of this CivicAddress. # noqa: E501 + :type rdsec: str + :param rdbr: The rdbr of this CivicAddress. # noqa: E501 + :type rdbr: str + :param rdsubbr: The rdsubbr of this CivicAddress. # noqa: E501 + :type rdsubbr: str + :param prm: The prm of this CivicAddress. # noqa: E501 + :type prm: str + :param pom: The pom of this CivicAddress. # noqa: E501 + :type pom: str + :param usage_rules: The usage_rules of this CivicAddress. # noqa: E501 + :type usage_rules: str + :param method: The method of this CivicAddress. # noqa: E501 + :type method: str + :param provided_by: The provided_by of this CivicAddress. # noqa: E501 + :type provided_by: str + """ + self.openapi_types = { + 'country': str, + 'a1': str, + 'a2': str, + 'a3': str, + 'a4': str, + 'a5': str, + 'a6': str, + 'prd': str, + 'pod': str, + 'sts': str, + 'hno': str, + 'hns': str, + 'lmk': str, + 'loc': str, + 'nam': str, + 'pc': str, + 'bld': str, + 'unit': str, + 'flr': str, + 'room': str, + 'plc': str, + 'pcn': str, + 'pobox': str, + 'addcode': str, + 'seat': str, + 'rd': str, + 'rdsec': str, + 'rdbr': str, + 'rdsubbr': str, + 'prm': str, + 'pom': str, + 'usage_rules': str, + 'method': str, + 'provided_by': str + } + + self.attribute_map = { + 'country': 'country', + 'a1': 'A1', + 'a2': 'A2', + 'a3': 'A3', + 'a4': 'A4', + 'a5': 'A5', + 'a6': 'A6', + 'prd': 'PRD', + 'pod': 'POD', + 'sts': 'STS', + 'hno': 'HNO', + 'hns': 'HNS', + 'lmk': 'LMK', + 'loc': 'LOC', + 'nam': 'NAM', + 'pc': 'PC', + 'bld': 'BLD', + 'unit': 'UNIT', + 'flr': 'FLR', + 'room': 'ROOM', + 'plc': 'PLC', + 'pcn': 'PCN', + 'pobox': 'POBOX', + 'addcode': 'ADDCODE', + 'seat': 'SEAT', + 'rd': 'RD', + 'rdsec': 'RDSEC', + 'rdbr': 'RDBR', + 'rdsubbr': 'RDSUBBR', + 'prm': 'PRM', + 'pom': 'POM', + 'usage_rules': 'usageRules', + 'method': 'method', + 'provided_by': 'providedBy' + } + + self._country = country + self._a1 = a1 + self._a2 = a2 + self._a3 = a3 + self._a4 = a4 + self._a5 = a5 + self._a6 = a6 + self._prd = prd + self._pod = pod + self._sts = sts + self._hno = hno + self._hns = hns + self._lmk = lmk + self._loc = loc + self._nam = nam + self._pc = pc + self._bld = bld + self._unit = unit + self._flr = flr + self._room = room + self._plc = plc + self._pcn = pcn + self._pobox = pobox + self._addcode = addcode + self._seat = seat + self._rd = rd + self._rdsec = rdsec + self._rdbr = rdbr + self._rdsubbr = rdsubbr + self._prm = prm + self._pom = pom + self._usage_rules = usage_rules + self._method = method + self._provided_by = provided_by + + @classmethod + def from_dict(cls, dikt) -> 'CivicAddress': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CivicAddress of this CivicAddress. # noqa: E501 + :rtype: CivicAddress + """ + return util.deserialize_model(dikt, cls) + + @property + def country(self) -> str: + """Gets the country of this CivicAddress. + + + :return: The country of this CivicAddress. + :rtype: str + """ + return self._country + + @country.setter + def country(self, country: str): + """Sets the country of this CivicAddress. + + + :param country: The country of this CivicAddress. + :type country: str + """ + + self._country = country + + @property + def a1(self) -> str: + """Gets the a1 of this CivicAddress. + + + :return: The a1 of this CivicAddress. + :rtype: str + """ + return self._a1 + + @a1.setter + def a1(self, a1: str): + """Sets the a1 of this CivicAddress. + + + :param a1: The a1 of this CivicAddress. + :type a1: str + """ + + self._a1 = a1 + + @property + def a2(self) -> str: + """Gets the a2 of this CivicAddress. + + + :return: The a2 of this CivicAddress. + :rtype: str + """ + return self._a2 + + @a2.setter + def a2(self, a2: str): + """Sets the a2 of this CivicAddress. + + + :param a2: The a2 of this CivicAddress. + :type a2: str + """ + + self._a2 = a2 + + @property + def a3(self) -> str: + """Gets the a3 of this CivicAddress. + + + :return: The a3 of this CivicAddress. + :rtype: str + """ + return self._a3 + + @a3.setter + def a3(self, a3: str): + """Sets the a3 of this CivicAddress. + + + :param a3: The a3 of this CivicAddress. + :type a3: str + """ + + self._a3 = a3 + + @property + def a4(self) -> str: + """Gets the a4 of this CivicAddress. + + + :return: The a4 of this CivicAddress. + :rtype: str + """ + return self._a4 + + @a4.setter + def a4(self, a4: str): + """Sets the a4 of this CivicAddress. + + + :param a4: The a4 of this CivicAddress. + :type a4: str + """ + + self._a4 = a4 + + @property + def a5(self) -> str: + """Gets the a5 of this CivicAddress. + + + :return: The a5 of this CivicAddress. + :rtype: str + """ + return self._a5 + + @a5.setter + def a5(self, a5: str): + """Sets the a5 of this CivicAddress. + + + :param a5: The a5 of this CivicAddress. + :type a5: str + """ + + self._a5 = a5 + + @property + def a6(self) -> str: + """Gets the a6 of this CivicAddress. + + + :return: The a6 of this CivicAddress. + :rtype: str + """ + return self._a6 + + @a6.setter + def a6(self, a6: str): + """Sets the a6 of this CivicAddress. + + + :param a6: The a6 of this CivicAddress. + :type a6: str + """ + + self._a6 = a6 + + @property + def prd(self) -> str: + """Gets the prd of this CivicAddress. + + + :return: The prd of this CivicAddress. + :rtype: str + """ + return self._prd + + @prd.setter + def prd(self, prd: str): + """Sets the prd of this CivicAddress. + + + :param prd: The prd of this CivicAddress. + :type prd: str + """ + + self._prd = prd + + @property + def pod(self) -> str: + """Gets the pod of this CivicAddress. + + + :return: The pod of this CivicAddress. + :rtype: str + """ + return self._pod + + @pod.setter + def pod(self, pod: str): + """Sets the pod of this CivicAddress. + + + :param pod: The pod of this CivicAddress. + :type pod: str + """ + + self._pod = pod + + @property + def sts(self) -> str: + """Gets the sts of this CivicAddress. + + + :return: The sts of this CivicAddress. + :rtype: str + """ + return self._sts + + @sts.setter + def sts(self, sts: str): + """Sets the sts of this CivicAddress. + + + :param sts: The sts of this CivicAddress. + :type sts: str + """ + + self._sts = sts + + @property + def hno(self) -> str: + """Gets the hno of this CivicAddress. + + + :return: The hno of this CivicAddress. + :rtype: str + """ + return self._hno + + @hno.setter + def hno(self, hno: str): + """Sets the hno of this CivicAddress. + + + :param hno: The hno of this CivicAddress. + :type hno: str + """ + + self._hno = hno + + @property + def hns(self) -> str: + """Gets the hns of this CivicAddress. + + + :return: The hns of this CivicAddress. + :rtype: str + """ + return self._hns + + @hns.setter + def hns(self, hns: str): + """Sets the hns of this CivicAddress. + + + :param hns: The hns of this CivicAddress. + :type hns: str + """ + + self._hns = hns + + @property + def lmk(self) -> str: + """Gets the lmk of this CivicAddress. + + + :return: The lmk of this CivicAddress. + :rtype: str + """ + return self._lmk + + @lmk.setter + def lmk(self, lmk: str): + """Sets the lmk of this CivicAddress. + + + :param lmk: The lmk of this CivicAddress. + :type lmk: str + """ + + self._lmk = lmk + + @property + def loc(self) -> str: + """Gets the loc of this CivicAddress. + + + :return: The loc of this CivicAddress. + :rtype: str + """ + return self._loc + + @loc.setter + def loc(self, loc: str): + """Sets the loc of this CivicAddress. + + + :param loc: The loc of this CivicAddress. + :type loc: str + """ + + self._loc = loc + + @property + def nam(self) -> str: + """Gets the nam of this CivicAddress. + + + :return: The nam of this CivicAddress. + :rtype: str + """ + return self._nam + + @nam.setter + def nam(self, nam: str): + """Sets the nam of this CivicAddress. + + + :param nam: The nam of this CivicAddress. + :type nam: str + """ + + self._nam = nam + + @property + def pc(self) -> str: + """Gets the pc of this CivicAddress. + + + :return: The pc of this CivicAddress. + :rtype: str + """ + return self._pc + + @pc.setter + def pc(self, pc: str): + """Sets the pc of this CivicAddress. + + + :param pc: The pc of this CivicAddress. + :type pc: str + """ + + self._pc = pc + + @property + def bld(self) -> str: + """Gets the bld of this CivicAddress. + + + :return: The bld of this CivicAddress. + :rtype: str + """ + return self._bld + + @bld.setter + def bld(self, bld: str): + """Sets the bld of this CivicAddress. + + + :param bld: The bld of this CivicAddress. + :type bld: str + """ + + self._bld = bld + + @property + def unit(self) -> str: + """Gets the unit of this CivicAddress. + + + :return: The unit of this CivicAddress. + :rtype: str + """ + return self._unit + + @unit.setter + def unit(self, unit: str): + """Sets the unit of this CivicAddress. + + + :param unit: The unit of this CivicAddress. + :type unit: str + """ + + self._unit = unit + + @property + def flr(self) -> str: + """Gets the flr of this CivicAddress. + + + :return: The flr of this CivicAddress. + :rtype: str + """ + return self._flr + + @flr.setter + def flr(self, flr: str): + """Sets the flr of this CivicAddress. + + + :param flr: The flr of this CivicAddress. + :type flr: str + """ + + self._flr = flr + + @property + def room(self) -> str: + """Gets the room of this CivicAddress. + + + :return: The room of this CivicAddress. + :rtype: str + """ + return self._room + + @room.setter + def room(self, room: str): + """Sets the room of this CivicAddress. + + + :param room: The room of this CivicAddress. + :type room: str + """ + + self._room = room + + @property + def plc(self) -> str: + """Gets the plc of this CivicAddress. + + + :return: The plc of this CivicAddress. + :rtype: str + """ + return self._plc + + @plc.setter + def plc(self, plc: str): + """Sets the plc of this CivicAddress. + + + :param plc: The plc of this CivicAddress. + :type plc: str + """ + + self._plc = plc + + @property + def pcn(self) -> str: + """Gets the pcn of this CivicAddress. + + + :return: The pcn of this CivicAddress. + :rtype: str + """ + return self._pcn + + @pcn.setter + def pcn(self, pcn: str): + """Sets the pcn of this CivicAddress. + + + :param pcn: The pcn of this CivicAddress. + :type pcn: str + """ + + self._pcn = pcn + + @property + def pobox(self) -> str: + """Gets the pobox of this CivicAddress. + + + :return: The pobox of this CivicAddress. + :rtype: str + """ + return self._pobox + + @pobox.setter + def pobox(self, pobox: str): + """Sets the pobox of this CivicAddress. + + + :param pobox: The pobox of this CivicAddress. + :type pobox: str + """ + + self._pobox = pobox + + @property + def addcode(self) -> str: + """Gets the addcode of this CivicAddress. + + + :return: The addcode of this CivicAddress. + :rtype: str + """ + return self._addcode + + @addcode.setter + def addcode(self, addcode: str): + """Sets the addcode of this CivicAddress. + + + :param addcode: The addcode of this CivicAddress. + :type addcode: str + """ + + self._addcode = addcode + + @property + def seat(self) -> str: + """Gets the seat of this CivicAddress. + + + :return: The seat of this CivicAddress. + :rtype: str + """ + return self._seat + + @seat.setter + def seat(self, seat: str): + """Sets the seat of this CivicAddress. + + + :param seat: The seat of this CivicAddress. + :type seat: str + """ + + self._seat = seat + + @property + def rd(self) -> str: + """Gets the rd of this CivicAddress. + + + :return: The rd of this CivicAddress. + :rtype: str + """ + return self._rd + + @rd.setter + def rd(self, rd: str): + """Sets the rd of this CivicAddress. + + + :param rd: The rd of this CivicAddress. + :type rd: str + """ + + self._rd = rd + + @property + def rdsec(self) -> str: + """Gets the rdsec of this CivicAddress. + + + :return: The rdsec of this CivicAddress. + :rtype: str + """ + return self._rdsec + + @rdsec.setter + def rdsec(self, rdsec: str): + """Sets the rdsec of this CivicAddress. + + + :param rdsec: The rdsec of this CivicAddress. + :type rdsec: str + """ + + self._rdsec = rdsec + + @property + def rdbr(self) -> str: + """Gets the rdbr of this CivicAddress. + + + :return: The rdbr of this CivicAddress. + :rtype: str + """ + return self._rdbr + + @rdbr.setter + def rdbr(self, rdbr: str): + """Sets the rdbr of this CivicAddress. + + + :param rdbr: The rdbr of this CivicAddress. + :type rdbr: str + """ + + self._rdbr = rdbr + + @property + def rdsubbr(self) -> str: + """Gets the rdsubbr of this CivicAddress. + + + :return: The rdsubbr of this CivicAddress. + :rtype: str + """ + return self._rdsubbr + + @rdsubbr.setter + def rdsubbr(self, rdsubbr: str): + """Sets the rdsubbr of this CivicAddress. + + + :param rdsubbr: The rdsubbr of this CivicAddress. + :type rdsubbr: str + """ + + self._rdsubbr = rdsubbr + + @property + def prm(self) -> str: + """Gets the prm of this CivicAddress. + + + :return: The prm of this CivicAddress. + :rtype: str + """ + return self._prm + + @prm.setter + def prm(self, prm: str): + """Sets the prm of this CivicAddress. + + + :param prm: The prm of this CivicAddress. + :type prm: str + """ + + self._prm = prm + + @property + def pom(self) -> str: + """Gets the pom of this CivicAddress. + + + :return: The pom of this CivicAddress. + :rtype: str + """ + return self._pom + + @pom.setter + def pom(self, pom: str): + """Sets the pom of this CivicAddress. + + + :param pom: The pom of this CivicAddress. + :type pom: str + """ + + self._pom = pom + + @property + def usage_rules(self) -> str: + """Gets the usage_rules of this CivicAddress. + + + :return: The usage_rules of this CivicAddress. + :rtype: str + """ + return self._usage_rules + + @usage_rules.setter + def usage_rules(self, usage_rules: str): + """Sets the usage_rules of this CivicAddress. + + + :param usage_rules: The usage_rules of this CivicAddress. + :type usage_rules: str + """ + + self._usage_rules = usage_rules + + @property + def method(self) -> str: + """Gets the method of this CivicAddress. + + + :return: The method of this CivicAddress. + :rtype: str + """ + return self._method + + @method.setter + def method(self, method: str): + """Sets the method of this CivicAddress. + + + :param method: The method of this CivicAddress. + :type method: str + """ + + self._method = method + + @property + def provided_by(self) -> str: + """Gets the provided_by of this CivicAddress. + + + :return: The provided_by of this CivicAddress. + :rtype: str + """ + return self._provided_by + + @provided_by.setter + def provided_by(self, provided_by: str): + """Sets the provided_by of this CivicAddress. + + + :param provided_by: The provided_by of this CivicAddress. + :type provided_by: str + """ + + self._provided_by = provided_by diff --git a/services/helper/helper_service/services/api/models/communication_type.py b/services/helper/helper_service/services/api/models/communication_type.py new file mode 100644 index 00000000..03b51da9 --- /dev/null +++ b/services/helper/helper_service/services/api/models/communication_type.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class CommunicationType(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """CommunicationType - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'CommunicationType': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CommunicationType of this CommunicationType. # noqa: E501 + :rtype: CommunicationType + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/custom_operation.py b/services/helper/helper_service/services/api/models/custom_operation.py new file mode 100644 index 00000000..19fefc74 --- /dev/null +++ b/services/helper/helper_service/services/api/models/custom_operation.py @@ -0,0 +1,155 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.communication_type import CommunicationType +from api.models.operation import Operation +from api import util + +from api.models.communication_type import CommunicationType # noqa: E501 +from api.models.operation import Operation # noqa: E501 + +class CustomOperation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, comm_type=None, cust_op_name=None, operations=None, description=None): # noqa: E501 + """CustomOperation - a model defined in OpenAPI + + :param comm_type: The comm_type of this CustomOperation. # noqa: E501 + :type comm_type: CommunicationType + :param cust_op_name: The cust_op_name of this CustomOperation. # noqa: E501 + :type cust_op_name: str + :param operations: The operations of this CustomOperation. # noqa: E501 + :type operations: List[Operation] + :param description: The description of this CustomOperation. # noqa: E501 + :type description: str + """ + self.openapi_types = { + 'comm_type': CommunicationType, + 'cust_op_name': str, + 'operations': List[Operation], + 'description': str + } + + self.attribute_map = { + 'comm_type': 'commType', + 'cust_op_name': 'custOpName', + 'operations': 'operations', + 'description': 'description' + } + + self._comm_type = comm_type + self._cust_op_name = cust_op_name + self._operations = operations + self._description = description + + @classmethod + def from_dict(cls, dikt) -> 'CustomOperation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CustomOperation of this CustomOperation. # noqa: E501 + :rtype: CustomOperation + """ + return util.deserialize_model(dikt, cls) + + @property + def comm_type(self) -> CommunicationType: + """Gets the comm_type of this CustomOperation. + + + :return: The comm_type of this CustomOperation. + :rtype: CommunicationType + """ + return self._comm_type + + @comm_type.setter + def comm_type(self, comm_type: CommunicationType): + """Sets the comm_type of this CustomOperation. + + + :param comm_type: The comm_type of this CustomOperation. + :type comm_type: CommunicationType + """ + if comm_type is None: + raise ValueError("Invalid value for `comm_type`, must not be `None`") # noqa: E501 + + self._comm_type = comm_type + + @property + def cust_op_name(self) -> str: + """Gets the cust_op_name of this CustomOperation. + + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The cust_op_name of this CustomOperation. + :rtype: str + """ + return self._cust_op_name + + @cust_op_name.setter + def cust_op_name(self, cust_op_name: str): + """Sets the cust_op_name of this CustomOperation. + + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param cust_op_name: The cust_op_name of this CustomOperation. + :type cust_op_name: str + """ + if cust_op_name is None: + raise ValueError("Invalid value for `cust_op_name`, must not be `None`") # noqa: E501 + + self._cust_op_name = cust_op_name + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this CustomOperation. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :return: The operations of this CustomOperation. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this CustomOperation. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :param operations: The operations of this CustomOperation. + :type operations: List[Operation] + """ + if operations is not None and len(operations) < 1: + raise ValueError("Invalid value for `operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._operations = operations + + @property + def description(self) -> str: + """Gets the description of this CustomOperation. + + Text description of the custom operation # noqa: E501 + + :return: The description of this CustomOperation. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this CustomOperation. + + Text description of the custom operation # noqa: E501 + + :param description: The description of this CustomOperation. + :type description: str + """ + + self._description = description diff --git a/services/helper/helper_service/services/api/models/data_format.py b/services/helper/helper_service/services/api/models/data_format.py new file mode 100644 index 00000000..d58cc9ed --- /dev/null +++ b/services/helper/helper_service/services/api/models/data_format.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class DataFormat(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """DataFormat - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'DataFormat': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DataFormat of this DataFormat. # noqa: E501 + :rtype: DataFormat + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/ellipsoid_arc.py b/services/helper/helper_service/services/api/models/ellipsoid_arc.py new file mode 100644 index 00000000..21fbfcb0 --- /dev/null +++ b/services/helper/helper_service/services/api/models/ellipsoid_arc.py @@ -0,0 +1,265 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class EllipsoidArc(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, inner_radius=None, uncertainty_radius=None, offset_angle=None, included_angle=None, confidence=None): # noqa: E501 + """EllipsoidArc - a model defined in OpenAPI + + :param shape: The shape of this EllipsoidArc. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this EllipsoidArc. # noqa: E501 + :type point: GeographicalCoordinates + :param inner_radius: The inner_radius of this EllipsoidArc. # noqa: E501 + :type inner_radius: int + :param uncertainty_radius: The uncertainty_radius of this EllipsoidArc. # noqa: E501 + :type uncertainty_radius: float + :param offset_angle: The offset_angle of this EllipsoidArc. # noqa: E501 + :type offset_angle: int + :param included_angle: The included_angle of this EllipsoidArc. # noqa: E501 + :type included_angle: int + :param confidence: The confidence of this EllipsoidArc. # noqa: E501 + :type confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'inner_radius': int, + 'uncertainty_radius': float, + 'offset_angle': int, + 'included_angle': int, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'inner_radius': 'innerRadius', + 'uncertainty_radius': 'uncertaintyRadius', + 'offset_angle': 'offsetAngle', + 'included_angle': 'includedAngle', + 'confidence': 'confidence' + } + + self._shape = shape + self._point = point + self._inner_radius = inner_radius + self._uncertainty_radius = uncertainty_radius + self._offset_angle = offset_angle + self._included_angle = included_angle + self._confidence = confidence + + @classmethod + def from_dict(cls, dikt) -> 'EllipsoidArc': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The EllipsoidArc of this EllipsoidArc. # noqa: E501 + :rtype: EllipsoidArc + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this EllipsoidArc. + + + :return: The shape of this EllipsoidArc. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this EllipsoidArc. + + + :param shape: The shape of this EllipsoidArc. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this EllipsoidArc. + + + :return: The point of this EllipsoidArc. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this EllipsoidArc. + + + :param point: The point of this EllipsoidArc. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def inner_radius(self) -> int: + """Gets the inner_radius of this EllipsoidArc. + + Indicates value of the inner radius. # noqa: E501 + + :return: The inner_radius of this EllipsoidArc. + :rtype: int + """ + return self._inner_radius + + @inner_radius.setter + def inner_radius(self, inner_radius: int): + """Sets the inner_radius of this EllipsoidArc. + + Indicates value of the inner radius. # noqa: E501 + + :param inner_radius: The inner_radius of this EllipsoidArc. + :type inner_radius: int + """ + if inner_radius is None: + raise ValueError("Invalid value for `inner_radius`, must not be `None`") # noqa: E501 + if inner_radius is not None and inner_radius > 327675: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value less than or equal to `327675`") # noqa: E501 + if inner_radius is not None and inner_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._inner_radius = inner_radius + + @property + def uncertainty_radius(self) -> float: + """Gets the uncertainty_radius of this EllipsoidArc. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_radius of this EllipsoidArc. + :rtype: float + """ + return self._uncertainty_radius + + @uncertainty_radius.setter + def uncertainty_radius(self, uncertainty_radius: float): + """Sets the uncertainty_radius of this EllipsoidArc. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_radius: The uncertainty_radius of this EllipsoidArc. + :type uncertainty_radius: float + """ + if uncertainty_radius is None: + raise ValueError("Invalid value for `uncertainty_radius`, must not be `None`") # noqa: E501 + if uncertainty_radius is not None and uncertainty_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_radius = uncertainty_radius + + @property + def offset_angle(self) -> int: + """Gets the offset_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :return: The offset_angle of this EllipsoidArc. + :rtype: int + """ + return self._offset_angle + + @offset_angle.setter + def offset_angle(self, offset_angle: int): + """Sets the offset_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :param offset_angle: The offset_angle of this EllipsoidArc. + :type offset_angle: int + """ + if offset_angle is None: + raise ValueError("Invalid value for `offset_angle`, must not be `None`") # noqa: E501 + if offset_angle is not None and offset_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value less than or equal to `360`") # noqa: E501 + if offset_angle is not None and offset_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._offset_angle = offset_angle + + @property + def included_angle(self) -> int: + """Gets the included_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :return: The included_angle of this EllipsoidArc. + :rtype: int + """ + return self._included_angle + + @included_angle.setter + def included_angle(self, included_angle: int): + """Sets the included_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :param included_angle: The included_angle of this EllipsoidArc. + :type included_angle: int + """ + if included_angle is None: + raise ValueError("Invalid value for `included_angle`, must not be `None`") # noqa: E501 + if included_angle is not None and included_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value less than or equal to `360`") # noqa: E501 + if included_angle is not None and included_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._included_angle = included_angle + + @property + def confidence(self) -> int: + """Gets the confidence of this EllipsoidArc. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this EllipsoidArc. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this EllipsoidArc. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this EllipsoidArc. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence diff --git a/services/helper/helper_service/services/api/models/error_response.py b/services/helper/helper_service/services/api/models/error_response.py new file mode 100644 index 00000000..1748be6f --- /dev/null +++ b/services/helper/helper_service/services/api/models/error_response.py @@ -0,0 +1,87 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class ErrorResponse(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, message=None, details=None): # noqa: E501 + """ErrorResponse - a model defined in OpenAPI + + :param message: The message of this ErrorResponse. # noqa: E501 + :type message: str + :param details: The details of this ErrorResponse. # noqa: E501 + :type details: str + """ + self.openapi_types = { + 'message': str, + 'details': str + } + + self.attribute_map = { + 'message': 'message', + 'details': 'details' + } + + self._message = message + self._details = details + + @classmethod + def from_dict(cls, dikt) -> 'ErrorResponse': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ErrorResponse of this ErrorResponse. # noqa: E501 + :rtype: ErrorResponse + """ + return util.deserialize_model(dikt, cls) + + @property + def message(self) -> str: + """Gets the message of this ErrorResponse. + + + :return: The message of this ErrorResponse. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message: str): + """Sets the message of this ErrorResponse. + + + :param message: The message of this ErrorResponse. + :type message: str + """ + + self._message = message + + @property + def details(self) -> str: + """Gets the details of this ErrorResponse. + + + :return: The details of this ErrorResponse. + :rtype: str + """ + return self._details + + @details.setter + def details(self, details: str): + """Sets the details of this ErrorResponse. + + + :param details: The details of this ErrorResponse. + :type details: str + """ + + self._details = details diff --git a/services/helper/helper_service/services/api/models/event_subscription.py b/services/helper/helper_service/services/api/models/event_subscription.py new file mode 100644 index 00000000..ea6429c7 --- /dev/null +++ b/services/helper/helper_service/services/api/models/event_subscription.py @@ -0,0 +1,247 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.capif_event import CAPIFEvent +from api.models.capif_event_filter import CAPIFEventFilter +from api.models.reporting_information import ReportingInformation +from api.models.websock_notif_config import WebsockNotifConfig +import re +from api import util + +from api.models.capif_event import CAPIFEvent # noqa: E501 +from api.models.capif_event_filter import CAPIFEventFilter # noqa: E501 +from api.models.reporting_information import ReportingInformation # noqa: E501 +from api.models.websock_notif_config import WebsockNotifConfig # noqa: E501 +import re # noqa: E501 + +class EventSubscription(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, events=None, event_filters=None, event_req=None, notification_destination=None, request_test_notification=None, websock_notif_config=None, supported_features=None): # noqa: E501 + """EventSubscription - a model defined in OpenAPI + + :param events: The events of this EventSubscription. # noqa: E501 + :type events: List[CAPIFEvent] + :param event_filters: The event_filters of this EventSubscription. # noqa: E501 + :type event_filters: List[CAPIFEventFilter] + :param event_req: The event_req of this EventSubscription. # noqa: E501 + :type event_req: ReportingInformation + :param notification_destination: The notification_destination of this EventSubscription. # noqa: E501 + :type notification_destination: str + :param request_test_notification: The request_test_notification of this EventSubscription. # noqa: E501 + :type request_test_notification: bool + :param websock_notif_config: The websock_notif_config of this EventSubscription. # noqa: E501 + :type websock_notif_config: WebsockNotifConfig + :param supported_features: The supported_features of this EventSubscription. # noqa: E501 + :type supported_features: str + """ + self.openapi_types = { + 'events': List[CAPIFEvent], + 'event_filters': List[CAPIFEventFilter], + 'event_req': ReportingInformation, + 'notification_destination': str, + 'request_test_notification': bool, + 'websock_notif_config': WebsockNotifConfig, + 'supported_features': str + } + + self.attribute_map = { + 'events': 'events', + 'event_filters': 'eventFilters', + 'event_req': 'eventReq', + 'notification_destination': 'notificationDestination', + 'request_test_notification': 'requestTestNotification', + 'websock_notif_config': 'websockNotifConfig', + 'supported_features': 'supportedFeatures' + } + + self._events = events + self._event_filters = event_filters + self._event_req = event_req + self._notification_destination = notification_destination + self._request_test_notification = request_test_notification + self._websock_notif_config = websock_notif_config + self._supported_features = supported_features + + @classmethod + def from_dict(cls, dikt) -> 'EventSubscription': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The EventSubscription of this EventSubscription. # noqa: E501 + :rtype: EventSubscription + """ + return util.deserialize_model(dikt, cls) + + @property + def events(self) -> List[CAPIFEvent]: + """Gets the events of this EventSubscription. + + Subscribed events # noqa: E501 + + :return: The events of this EventSubscription. + :rtype: List[CAPIFEvent] + """ + return self._events + + @events.setter + def events(self, events: List[CAPIFEvent]): + """Sets the events of this EventSubscription. + + Subscribed events # noqa: E501 + + :param events: The events of this EventSubscription. + :type events: List[CAPIFEvent] + """ + if events is None: + raise ValueError("Invalid value for `events`, must not be `None`") # noqa: E501 + if events is not None and len(events) < 1: + raise ValueError("Invalid value for `events`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._events = events + + @property + def event_filters(self) -> List[CAPIFEventFilter]: + """Gets the event_filters of this EventSubscription. + + Subscribed event filters # noqa: E501 + + :return: The event_filters of this EventSubscription. + :rtype: List[CAPIFEventFilter] + """ + return self._event_filters + + @event_filters.setter + def event_filters(self, event_filters: List[CAPIFEventFilter]): + """Sets the event_filters of this EventSubscription. + + Subscribed event filters # noqa: E501 + + :param event_filters: The event_filters of this EventSubscription. + :type event_filters: List[CAPIFEventFilter] + """ + if event_filters is not None and len(event_filters) < 1: + raise ValueError("Invalid value for `event_filters`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._event_filters = event_filters + + @property + def event_req(self) -> ReportingInformation: + """Gets the event_req of this EventSubscription. + + + :return: The event_req of this EventSubscription. + :rtype: ReportingInformation + """ + return self._event_req + + @event_req.setter + def event_req(self, event_req: ReportingInformation): + """Sets the event_req of this EventSubscription. + + + :param event_req: The event_req of this EventSubscription. + :type event_req: ReportingInformation + """ + + self._event_req = event_req + + @property + def notification_destination(self) -> str: + """Gets the notification_destination of this EventSubscription. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The notification_destination of this EventSubscription. + :rtype: str + """ + return self._notification_destination + + @notification_destination.setter + def notification_destination(self, notification_destination: str): + """Sets the notification_destination of this EventSubscription. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param notification_destination: The notification_destination of this EventSubscription. + :type notification_destination: str + """ + if notification_destination is None: + raise ValueError("Invalid value for `notification_destination`, must not be `None`") # noqa: E501 + + self._notification_destination = notification_destination + + @property + def request_test_notification(self) -> bool: + """Gets the request_test_notification of this EventSubscription. + + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :return: The request_test_notification of this EventSubscription. + :rtype: bool + """ + return self._request_test_notification + + @request_test_notification.setter + def request_test_notification(self, request_test_notification: bool): + """Sets the request_test_notification of this EventSubscription. + + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :param request_test_notification: The request_test_notification of this EventSubscription. + :type request_test_notification: bool + """ + + self._request_test_notification = request_test_notification + + @property + def websock_notif_config(self) -> WebsockNotifConfig: + """Gets the websock_notif_config of this EventSubscription. + + + :return: The websock_notif_config of this EventSubscription. + :rtype: WebsockNotifConfig + """ + return self._websock_notif_config + + @websock_notif_config.setter + def websock_notif_config(self, websock_notif_config: WebsockNotifConfig): + """Sets the websock_notif_config of this EventSubscription. + + + :param websock_notif_config: The websock_notif_config of this EventSubscription. + :type websock_notif_config: WebsockNotifConfig + """ + + self._websock_notif_config = websock_notif_config + + @property + def supported_features(self) -> str: + """Gets the supported_features of this EventSubscription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supported_features of this EventSubscription. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this EventSubscription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supported_features: The supported_features of this EventSubscription. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features diff --git a/services/helper/helper_service/services/api/models/gad_shape.py b/services/helper/helper_service/services/api/models/gad_shape.py new file mode 100644 index 00000000..291b6528 --- /dev/null +++ b/services/helper/helper_service/services/api/models/gad_shape.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class GADShape(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None): # noqa: E501 + """GADShape - a model defined in OpenAPI + + :param shape: The shape of this GADShape. # noqa: E501 + :type shape: SupportedGADShapes + """ + self.openapi_types = { + 'shape': SupportedGADShapes + } + + self.attribute_map = { + 'shape': 'shape' + } + + self._shape = shape + + @classmethod + def from_dict(cls, dikt) -> 'GADShape': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GADShape of this GADShape. # noqa: E501 + :rtype: GADShape + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this GADShape. + + + :return: The shape of this GADShape. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this GADShape. + + + :param shape: The shape of this GADShape. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape diff --git a/services/helper/helper_service/services/api/models/geographic_area.py b/services/helper/helper_service/services/api/models/geographic_area.py new file mode 100644 index 00000000..0b402441 --- /dev/null +++ b/services/helper/helper_service/services/api/models/geographic_area.py @@ -0,0 +1,439 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.ellipsoid_arc import EllipsoidArc +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.point import Point +from api.models.point_altitude import PointAltitude +from api.models.point_altitude_uncertainty import PointAltitudeUncertainty +from api.models.point_uncertainty_circle import PointUncertaintyCircle +from api.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from api.models.polygon import Polygon +from api.models.supported_gad_shapes import SupportedGADShapes +from api.models.uncertainty_ellipse import UncertaintyEllipse +from api import util + +from api.models.ellipsoid_arc import EllipsoidArc # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.point import Point # noqa: E501 +from api.models.point_altitude import PointAltitude # noqa: E501 +from api.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 +from api.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 +from api.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from api.models.polygon import Polygon # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class GeographicArea(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, uncertainty=None, uncertainty_ellipse=None, confidence=None, point_list=None, altitude=None, uncertainty_altitude=None, inner_radius=None, uncertainty_radius=None, offset_angle=None, included_angle=None): # noqa: E501 + """GeographicArea - a model defined in OpenAPI + + :param shape: The shape of this GeographicArea. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this GeographicArea. # noqa: E501 + :type point: GeographicalCoordinates + :param uncertainty: The uncertainty of this GeographicArea. # noqa: E501 + :type uncertainty: float + :param uncertainty_ellipse: The uncertainty_ellipse of this GeographicArea. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param confidence: The confidence of this GeographicArea. # noqa: E501 + :type confidence: int + :param point_list: The point_list of this GeographicArea. # noqa: E501 + :type point_list: List[GeographicalCoordinates] + :param altitude: The altitude of this GeographicArea. # noqa: E501 + :type altitude: float + :param uncertainty_altitude: The uncertainty_altitude of this GeographicArea. # noqa: E501 + :type uncertainty_altitude: float + :param inner_radius: The inner_radius of this GeographicArea. # noqa: E501 + :type inner_radius: int + :param uncertainty_radius: The uncertainty_radius of this GeographicArea. # noqa: E501 + :type uncertainty_radius: float + :param offset_angle: The offset_angle of this GeographicArea. # noqa: E501 + :type offset_angle: int + :param included_angle: The included_angle of this GeographicArea. # noqa: E501 + :type included_angle: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'uncertainty': float, + 'uncertainty_ellipse': UncertaintyEllipse, + 'confidence': int, + 'point_list': List[GeographicalCoordinates], + 'altitude': float, + 'uncertainty_altitude': float, + 'inner_radius': int, + 'uncertainty_radius': float, + 'offset_angle': int, + 'included_angle': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'uncertainty': 'uncertainty', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'confidence': 'confidence', + 'point_list': 'pointList', + 'altitude': 'altitude', + 'uncertainty_altitude': 'uncertaintyAltitude', + 'inner_radius': 'innerRadius', + 'uncertainty_radius': 'uncertaintyRadius', + 'offset_angle': 'offsetAngle', + 'included_angle': 'includedAngle' + } + + self._shape = shape + self._point = point + self._uncertainty = uncertainty + self._uncertainty_ellipse = uncertainty_ellipse + self._confidence = confidence + self._point_list = point_list + self._altitude = altitude + self._uncertainty_altitude = uncertainty_altitude + self._inner_radius = inner_radius + self._uncertainty_radius = uncertainty_radius + self._offset_angle = offset_angle + self._included_angle = included_angle + + @classmethod + def from_dict(cls, dikt) -> 'GeographicArea': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GeographicArea of this GeographicArea. # noqa: E501 + :rtype: GeographicArea + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this GeographicArea. + + + :return: The shape of this GeographicArea. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this GeographicArea. + + + :param shape: The shape of this GeographicArea. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this GeographicArea. + + + :return: The point of this GeographicArea. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this GeographicArea. + + + :param point: The point of this GeographicArea. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty(self) -> float: + """Gets the uncertainty of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty of this GeographicArea. + :rtype: float + """ + return self._uncertainty + + @uncertainty.setter + def uncertainty(self, uncertainty: float): + """Sets the uncertainty of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty: The uncertainty of this GeographicArea. + :type uncertainty: float + """ + if uncertainty is None: + raise ValueError("Invalid value for `uncertainty`, must not be `None`") # noqa: E501 + if uncertainty is not None and uncertainty < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty = uncertainty + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this GeographicArea. + + + :return: The uncertainty_ellipse of this GeographicArea. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this GeographicArea. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this GeographicArea. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def confidence(self) -> int: + """Gets the confidence of this GeographicArea. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this GeographicArea. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this GeographicArea. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this GeographicArea. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence + + @property + def point_list(self) -> List[GeographicalCoordinates]: + """Gets the point_list of this GeographicArea. + + List of points. # noqa: E501 + + :return: The point_list of this GeographicArea. + :rtype: List[GeographicalCoordinates] + """ + return self._point_list + + @point_list.setter + def point_list(self, point_list: List[GeographicalCoordinates]): + """Sets the point_list of this GeographicArea. + + List of points. # noqa: E501 + + :param point_list: The point_list of this GeographicArea. + :type point_list: List[GeographicalCoordinates] + """ + if point_list is None: + raise ValueError("Invalid value for `point_list`, must not be `None`") # noqa: E501 + if point_list is not None and len(point_list) > 15: + raise ValueError("Invalid value for `point_list`, number of items must be less than or equal to `15`") # noqa: E501 + if point_list is not None and len(point_list) < 3: + raise ValueError("Invalid value for `point_list`, number of items must be greater than or equal to `3`") # noqa: E501 + + self._point_list = point_list + + @property + def altitude(self) -> float: + """Gets the altitude of this GeographicArea. + + Indicates value of altitude. # noqa: E501 + + :return: The altitude of this GeographicArea. + :rtype: float + """ + return self._altitude + + @altitude.setter + def altitude(self, altitude: float): + """Sets the altitude of this GeographicArea. + + Indicates value of altitude. # noqa: E501 + + :param altitude: The altitude of this GeographicArea. + :type altitude: float + """ + if altitude is None: + raise ValueError("Invalid value for `altitude`, must not be `None`") # noqa: E501 + if altitude is not None and altitude > 32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value less than or equal to `32767`") # noqa: E501 + if altitude is not None and altitude < -32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value greater than or equal to `-32767`") # noqa: E501 + + self._altitude = altitude + + @property + def uncertainty_altitude(self) -> float: + """Gets the uncertainty_altitude of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_altitude of this GeographicArea. + :rtype: float + """ + return self._uncertainty_altitude + + @uncertainty_altitude.setter + def uncertainty_altitude(self, uncertainty_altitude: float): + """Sets the uncertainty_altitude of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_altitude: The uncertainty_altitude of this GeographicArea. + :type uncertainty_altitude: float + """ + if uncertainty_altitude is None: + raise ValueError("Invalid value for `uncertainty_altitude`, must not be `None`") # noqa: E501 + if uncertainty_altitude is not None and uncertainty_altitude < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_altitude`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_altitude = uncertainty_altitude + + @property + def inner_radius(self) -> int: + """Gets the inner_radius of this GeographicArea. + + Indicates value of the inner radius. # noqa: E501 + + :return: The inner_radius of this GeographicArea. + :rtype: int + """ + return self._inner_radius + + @inner_radius.setter + def inner_radius(self, inner_radius: int): + """Sets the inner_radius of this GeographicArea. + + Indicates value of the inner radius. # noqa: E501 + + :param inner_radius: The inner_radius of this GeographicArea. + :type inner_radius: int + """ + if inner_radius is None: + raise ValueError("Invalid value for `inner_radius`, must not be `None`") # noqa: E501 + if inner_radius is not None and inner_radius > 327675: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value less than or equal to `327675`") # noqa: E501 + if inner_radius is not None and inner_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._inner_radius = inner_radius + + @property + def uncertainty_radius(self) -> float: + """Gets the uncertainty_radius of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_radius of this GeographicArea. + :rtype: float + """ + return self._uncertainty_radius + + @uncertainty_radius.setter + def uncertainty_radius(self, uncertainty_radius: float): + """Sets the uncertainty_radius of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_radius: The uncertainty_radius of this GeographicArea. + :type uncertainty_radius: float + """ + if uncertainty_radius is None: + raise ValueError("Invalid value for `uncertainty_radius`, must not be `None`") # noqa: E501 + if uncertainty_radius is not None and uncertainty_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_radius = uncertainty_radius + + @property + def offset_angle(self) -> int: + """Gets the offset_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :return: The offset_angle of this GeographicArea. + :rtype: int + """ + return self._offset_angle + + @offset_angle.setter + def offset_angle(self, offset_angle: int): + """Sets the offset_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :param offset_angle: The offset_angle of this GeographicArea. + :type offset_angle: int + """ + if offset_angle is None: + raise ValueError("Invalid value for `offset_angle`, must not be `None`") # noqa: E501 + if offset_angle is not None and offset_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value less than or equal to `360`") # noqa: E501 + if offset_angle is not None and offset_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._offset_angle = offset_angle + + @property + def included_angle(self) -> int: + """Gets the included_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :return: The included_angle of this GeographicArea. + :rtype: int + """ + return self._included_angle + + @included_angle.setter + def included_angle(self, included_angle: int): + """Sets the included_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :param included_angle: The included_angle of this GeographicArea. + :type included_angle: int + """ + if included_angle is None: + raise ValueError("Invalid value for `included_angle`, must not be `None`") # noqa: E501 + if included_angle is not None and included_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value less than or equal to `360`") # noqa: E501 + if included_angle is not None and included_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._included_angle = included_angle diff --git a/services/helper/helper_service/services/api/models/geographical_coordinates.py b/services/helper/helper_service/services/api/models/geographical_coordinates.py new file mode 100644 index 00000000..86ffac3a --- /dev/null +++ b/services/helper/helper_service/services/api/models/geographical_coordinates.py @@ -0,0 +1,99 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class GeographicalCoordinates(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, lon=None, lat=None): # noqa: E501 + """GeographicalCoordinates - a model defined in OpenAPI + + :param lon: The lon of this GeographicalCoordinates. # noqa: E501 + :type lon: float + :param lat: The lat of this GeographicalCoordinates. # noqa: E501 + :type lat: float + """ + self.openapi_types = { + 'lon': float, + 'lat': float + } + + self.attribute_map = { + 'lon': 'lon', + 'lat': 'lat' + } + + self._lon = lon + self._lat = lat + + @classmethod + def from_dict(cls, dikt) -> 'GeographicalCoordinates': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GeographicalCoordinates of this GeographicalCoordinates. # noqa: E501 + :rtype: GeographicalCoordinates + """ + return util.deserialize_model(dikt, cls) + + @property + def lon(self) -> float: + """Gets the lon of this GeographicalCoordinates. + + + :return: The lon of this GeographicalCoordinates. + :rtype: float + """ + return self._lon + + @lon.setter + def lon(self, lon: float): + """Sets the lon of this GeographicalCoordinates. + + + :param lon: The lon of this GeographicalCoordinates. + :type lon: float + """ + if lon is None: + raise ValueError("Invalid value for `lon`, must not be `None`") # noqa: E501 + if lon is not None and lon > 180: # noqa: E501 + raise ValueError("Invalid value for `lon`, must be a value less than or equal to `180`") # noqa: E501 + if lon is not None and lon < -180: # noqa: E501 + raise ValueError("Invalid value for `lon`, must be a value greater than or equal to `-180`") # noqa: E501 + + self._lon = lon + + @property + def lat(self) -> float: + """Gets the lat of this GeographicalCoordinates. + + + :return: The lat of this GeographicalCoordinates. + :rtype: float + """ + return self._lat + + @lat.setter + def lat(self, lat: float): + """Sets the lat of this GeographicalCoordinates. + + + :param lat: The lat of this GeographicalCoordinates. + :type lat: float + """ + if lat is None: + raise ValueError("Invalid value for `lat`, must not be `None`") # noqa: E501 + if lat is not None and lat > 90: # noqa: E501 + raise ValueError("Invalid value for `lat`, must be a value less than or equal to `90`") # noqa: E501 + if lat is not None and lat < -90: # noqa: E501 + raise ValueError("Invalid value for `lat`, must be a value greater than or equal to `-90`") # noqa: E501 + + self._lat = lat diff --git a/services/helper/helper_service/services/api/models/interface_description.py b/services/helper/helper_service/services/api/models/interface_description.py new file mode 100644 index 00000000..64a9e1bf --- /dev/null +++ b/services/helper/helper_service/services/api/models/interface_description.py @@ -0,0 +1,155 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.security_method import SecurityMethod +from api import util + +from api.models.security_method import SecurityMethod # noqa: E501 + +class InterfaceDescription(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, ipv4_addr=None, ipv6_addr=None, port=None, security_methods=None): # noqa: E501 + """InterfaceDescription - a model defined in OpenAPI + + :param ipv4_addr: The ipv4_addr of this InterfaceDescription. # noqa: E501 + :type ipv4_addr: str + :param ipv6_addr: The ipv6_addr of this InterfaceDescription. # noqa: E501 + :type ipv6_addr: str + :param port: The port of this InterfaceDescription. # noqa: E501 + :type port: int + :param security_methods: The security_methods of this InterfaceDescription. # noqa: E501 + :type security_methods: List[SecurityMethod] + """ + self.openapi_types = { + 'ipv4_addr': str, + 'ipv6_addr': str, + 'port': int, + 'security_methods': List[SecurityMethod] + } + + self.attribute_map = { + 'ipv4_addr': 'ipv4Addr', + 'ipv6_addr': 'ipv6Addr', + 'port': 'port', + 'security_methods': 'securityMethods' + } + + self._ipv4_addr = ipv4_addr + self._ipv6_addr = ipv6_addr + self._port = port + self._security_methods = security_methods + + @classmethod + def from_dict(cls, dikt) -> 'InterfaceDescription': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The InterfaceDescription of this InterfaceDescription. # noqa: E501 + :rtype: InterfaceDescription + """ + return util.deserialize_model(dikt, cls) + + @property + def ipv4_addr(self) -> str: + """Gets the ipv4_addr of this InterfaceDescription. + + string identifying a Ipv4 address formatted in the \"dotted decimal\" notation as defined in IETF RFC 1166. # noqa: E501 + + :return: The ipv4_addr of this InterfaceDescription. + :rtype: str + """ + return self._ipv4_addr + + @ipv4_addr.setter + def ipv4_addr(self, ipv4_addr: str): + """Sets the ipv4_addr of this InterfaceDescription. + + string identifying a Ipv4 address formatted in the \"dotted decimal\" notation as defined in IETF RFC 1166. # noqa: E501 + + :param ipv4_addr: The ipv4_addr of this InterfaceDescription. + :type ipv4_addr: str + """ + + self._ipv4_addr = ipv4_addr + + @property + def ipv6_addr(self) -> str: + """Gets the ipv6_addr of this InterfaceDescription. + + string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used. # noqa: E501 + + :return: The ipv6_addr of this InterfaceDescription. + :rtype: str + """ + return self._ipv6_addr + + @ipv6_addr.setter + def ipv6_addr(self, ipv6_addr: str): + """Sets the ipv6_addr of this InterfaceDescription. + + string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used. # noqa: E501 + + :param ipv6_addr: The ipv6_addr of this InterfaceDescription. + :type ipv6_addr: str + """ + + self._ipv6_addr = ipv6_addr + + @property + def port(self) -> int: + """Gets the port of this InterfaceDescription. + + Unsigned integer with valid values between 0 and 65535. # noqa: E501 + + :return: The port of this InterfaceDescription. + :rtype: int + """ + return self._port + + @port.setter + def port(self, port: int): + """Sets the port of this InterfaceDescription. + + Unsigned integer with valid values between 0 and 65535. # noqa: E501 + + :param port: The port of this InterfaceDescription. + :type port: int + """ + if port is not None and port > 65535: # noqa: E501 + raise ValueError("Invalid value for `port`, must be a value less than or equal to `65535`") # noqa: E501 + if port is not None and port < 0: # noqa: E501 + raise ValueError("Invalid value for `port`, must be a value greater than or equal to `0`") # noqa: E501 + + self._port = port + + @property + def security_methods(self) -> List[SecurityMethod]: + """Gets the security_methods of this InterfaceDescription. + + Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + + :return: The security_methods of this InterfaceDescription. + :rtype: List[SecurityMethod] + """ + return self._security_methods + + @security_methods.setter + def security_methods(self, security_methods: List[SecurityMethod]): + """Sets the security_methods of this InterfaceDescription. + + Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + + :param security_methods: The security_methods of this InterfaceDescription. + :type security_methods: List[SecurityMethod] + """ + if security_methods is not None and len(security_methods) < 1: + raise ValueError("Invalid value for `security_methods`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._security_methods = security_methods diff --git a/services/helper/helper_service/services/api/models/notification_flag.py b/services/helper/helper_service/services/api/models/notification_flag.py new file mode 100644 index 00000000..a41c1d8a --- /dev/null +++ b/services/helper/helper_service/services/api/models/notification_flag.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class NotificationFlag(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """NotificationFlag - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'NotificationFlag': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NotificationFlag of this NotificationFlag. # noqa: E501 + :rtype: NotificationFlag + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/notification_method.py b/services/helper/helper_service/services/api/models/notification_method.py new file mode 100644 index 00000000..b3a906ef --- /dev/null +++ b/services/helper/helper_service/services/api/models/notification_method.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class NotificationMethod(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """NotificationMethod - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'NotificationMethod': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NotificationMethod of this NotificationMethod. # noqa: E501 + :rtype: NotificationMethod + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/onboarding_information.py b/services/helper/helper_service/services/api/models/onboarding_information.py new file mode 100644 index 00000000..370d59ac --- /dev/null +++ b/services/helper/helper_service/services/api/models/onboarding_information.py @@ -0,0 +1,121 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class OnboardingInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_invoker_public_key=None, api_invoker_certificate=None, onboarding_secret=None): # noqa: E501 + """OnboardingInformation - a model defined in OpenAPI + + :param api_invoker_public_key: The api_invoker_public_key of this OnboardingInformation. # noqa: E501 + :type api_invoker_public_key: str + :param api_invoker_certificate: The api_invoker_certificate of this OnboardingInformation. # noqa: E501 + :type api_invoker_certificate: str + :param onboarding_secret: The onboarding_secret of this OnboardingInformation. # noqa: E501 + :type onboarding_secret: str + """ + self.openapi_types = { + 'api_invoker_public_key': str, + 'api_invoker_certificate': str, + 'onboarding_secret': str + } + + self.attribute_map = { + 'api_invoker_public_key': 'apiInvokerPublicKey', + 'api_invoker_certificate': 'apiInvokerCertificate', + 'onboarding_secret': 'onboardingSecret' + } + + self._api_invoker_public_key = api_invoker_public_key + self._api_invoker_certificate = api_invoker_certificate + self._onboarding_secret = onboarding_secret + + @classmethod + def from_dict(cls, dikt) -> 'OnboardingInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The OnboardingInformation of this OnboardingInformation. # noqa: E501 + :rtype: OnboardingInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def api_invoker_public_key(self) -> str: + """Gets the api_invoker_public_key of this OnboardingInformation. + + The API Invoker's public key # noqa: E501 + + :return: The api_invoker_public_key of this OnboardingInformation. + :rtype: str + """ + return self._api_invoker_public_key + + @api_invoker_public_key.setter + def api_invoker_public_key(self, api_invoker_public_key: str): + """Sets the api_invoker_public_key of this OnboardingInformation. + + The API Invoker's public key # noqa: E501 + + :param api_invoker_public_key: The api_invoker_public_key of this OnboardingInformation. + :type api_invoker_public_key: str + """ + if api_invoker_public_key is None: + raise ValueError("Invalid value for `api_invoker_public_key`, must not be `None`") # noqa: E501 + + self._api_invoker_public_key = api_invoker_public_key + + @property + def api_invoker_certificate(self) -> str: + """Gets the api_invoker_certificate of this OnboardingInformation. + + The API Invoker's generic client certificate, provided by the CAPIF core function. # noqa: E501 + + :return: The api_invoker_certificate of this OnboardingInformation. + :rtype: str + """ + return self._api_invoker_certificate + + @api_invoker_certificate.setter + def api_invoker_certificate(self, api_invoker_certificate: str): + """Sets the api_invoker_certificate of this OnboardingInformation. + + The API Invoker's generic client certificate, provided by the CAPIF core function. # noqa: E501 + + :param api_invoker_certificate: The api_invoker_certificate of this OnboardingInformation. + :type api_invoker_certificate: str + """ + + self._api_invoker_certificate = api_invoker_certificate + + @property + def onboarding_secret(self) -> str: + """Gets the onboarding_secret of this OnboardingInformation. + + The API Invoker's onboarding secret, provided by the CAPIF core function. # noqa: E501 + + :return: The onboarding_secret of this OnboardingInformation. + :rtype: str + """ + return self._onboarding_secret + + @onboarding_secret.setter + def onboarding_secret(self, onboarding_secret: str): + """Sets the onboarding_secret of this OnboardingInformation. + + The API Invoker's onboarding secret, provided by the CAPIF core function. # noqa: E501 + + :param onboarding_secret: The onboarding_secret of this OnboardingInformation. + :type onboarding_secret: str + """ + + self._onboarding_secret = onboarding_secret diff --git a/services/helper/helper_service/services/api/models/operation.py b/services/helper/helper_service/services/api/models/operation.py new file mode 100644 index 00000000..1ed73788 --- /dev/null +++ b/services/helper/helper_service/services/api/models/operation.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class Operation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """Operation - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'Operation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Operation of this Operation. # noqa: E501 + :rtype: Operation + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/paginated_response_base.py b/services/helper/helper_service/services/api/models/paginated_response_base.py new file mode 100644 index 00000000..339b5b56 --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_base.py @@ -0,0 +1,153 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class PaginatedResponseBase(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None): # noqa: E501 + """PaginatedResponseBase - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseBase. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseBase. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseBase. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseBase. # noqa: E501 + :type sort_order: str + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseBase': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseBase of this PaginatedResponseBase. # noqa: E501 + :rtype: PaginatedResponseBase + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseBase. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseBase. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseBase. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseBase. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseBase. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseBase. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseBase. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseBase. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseBase. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseBase. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseBase. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseBase. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseBase. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseBase. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseBase. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseBase. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order diff --git a/services/helper/helper_service/services/api/models/paginated_response_event.py b/services/helper/helper_service/services/api/models/paginated_response_event.py new file mode 100644 index 00000000..fd9445d3 --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_event.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.event_subscription import EventSubscription +from api import util + +from api.models.event_subscription import EventSubscription # noqa: E501 + +class PaginatedResponseEvent(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, events=None): # noqa: E501 + """PaginatedResponseEvent - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseEvent. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseEvent. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseEvent. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseEvent. # noqa: E501 + :type sort_order: str + :param events: The events of this PaginatedResponseEvent. # noqa: E501 + :type events: List[EventSubscription] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'events': List[EventSubscription] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'events': 'events' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._events = events + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseEvent': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseEvent of this PaginatedResponseEvent. # noqa: E501 + :rtype: PaginatedResponseEvent + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseEvent. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseEvent. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseEvent. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseEvent. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseEvent. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseEvent. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseEvent. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseEvent. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseEvent. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseEvent. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseEvent. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseEvent. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseEvent. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseEvent. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseEvent. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseEvent. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def events(self) -> List[EventSubscription]: + """Gets the events of this PaginatedResponseEvent. + + CAPIF events list. # noqa: E501 + + :return: The events of this PaginatedResponseEvent. + :rtype: List[EventSubscription] + """ + return self._events + + @events.setter + def events(self, events: List[EventSubscription]): + """Sets the events of this PaginatedResponseEvent. + + CAPIF events list. # noqa: E501 + + :param events: The events of this PaginatedResponseEvent. + :type events: List[EventSubscription] + """ + + self._events = events diff --git a/services/helper/helper_service/services/api/models/paginated_response_invoker.py b/services/helper/helper_service/services/api/models/paginated_response_invoker.py new file mode 100644 index 00000000..11e9334e --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_invoker.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails +from api import util + +from api.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 + +class PaginatedResponseInvoker(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, invokers=None): # noqa: E501 + """PaginatedResponseInvoker - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseInvoker. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseInvoker. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseInvoker. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseInvoker. # noqa: E501 + :type sort_order: str + :param invokers: The invokers of this PaginatedResponseInvoker. # noqa: E501 + :type invokers: List[APIInvokerEnrolmentDetails] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'invokers': List[APIInvokerEnrolmentDetails] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'invokers': 'invokers' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._invokers = invokers + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseInvoker': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseInvoker of this PaginatedResponseInvoker. # noqa: E501 + :rtype: PaginatedResponseInvoker + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseInvoker. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseInvoker. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseInvoker. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseInvoker. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseInvoker. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseInvoker. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseInvoker. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseInvoker. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseInvoker. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseInvoker. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseInvoker. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseInvoker. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseInvoker. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseInvoker. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseInvoker. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseInvoker. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def invokers(self) -> List[APIInvokerEnrolmentDetails]: + """Gets the invokers of this PaginatedResponseInvoker. + + CAPIF invokers list # noqa: E501 + + :return: The invokers of this PaginatedResponseInvoker. + :rtype: List[APIInvokerEnrolmentDetails] + """ + return self._invokers + + @invokers.setter + def invokers(self, invokers: List[APIInvokerEnrolmentDetails]): + """Sets the invokers of this PaginatedResponseInvoker. + + CAPIF invokers list # noqa: E501 + + :param invokers: The invokers of this PaginatedResponseInvoker. + :type invokers: List[APIInvokerEnrolmentDetails] + """ + + self._invokers = invokers diff --git a/services/helper/helper_service/services/api/models/paginated_response_provider.py b/services/helper/helper_service/services/api/models/paginated_response_provider.py new file mode 100644 index 00000000..a6ae7f69 --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_provider.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_provider_enrolment_details import APIProviderEnrolmentDetails +from api import util + +from api.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 + +class PaginatedResponseProvider(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, providers=None): # noqa: E501 + """PaginatedResponseProvider - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseProvider. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseProvider. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseProvider. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseProvider. # noqa: E501 + :type sort_order: str + :param providers: The providers of this PaginatedResponseProvider. # noqa: E501 + :type providers: List[APIProviderEnrolmentDetails] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'providers': List[APIProviderEnrolmentDetails] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'providers': 'providers' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._providers = providers + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseProvider': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseProvider of this PaginatedResponseProvider. # noqa: E501 + :rtype: PaginatedResponseProvider + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseProvider. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseProvider. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseProvider. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseProvider. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseProvider. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseProvider. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseProvider. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseProvider. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseProvider. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseProvider. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseProvider. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseProvider. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseProvider. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseProvider. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseProvider. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseProvider. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def providers(self) -> List[APIProviderEnrolmentDetails]: + """Gets the providers of this PaginatedResponseProvider. + + CAPIF providers list # noqa: E501 + + :return: The providers of this PaginatedResponseProvider. + :rtype: List[APIProviderEnrolmentDetails] + """ + return self._providers + + @providers.setter + def providers(self, providers: List[APIProviderEnrolmentDetails]): + """Sets the providers of this PaginatedResponseProvider. + + CAPIF providers list # noqa: E501 + + :param providers: The providers of this PaginatedResponseProvider. + :type providers: List[APIProviderEnrolmentDetails] + """ + + self._providers = providers diff --git a/services/helper/helper_service/services/api/models/paginated_response_security.py b/services/helper/helper_service/services/api/models/paginated_response_security.py new file mode 100644 index 00000000..d6c85717 --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_security.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.service_security import ServiceSecurity +from api import util + +from api.models.service_security import ServiceSecurity # noqa: E501 + +class PaginatedResponseSecurity(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, security=None): # noqa: E501 + """PaginatedResponseSecurity - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseSecurity. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseSecurity. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseSecurity. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseSecurity. # noqa: E501 + :type sort_order: str + :param security: The security of this PaginatedResponseSecurity. # noqa: E501 + :type security: List[ServiceSecurity] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'security': List[ServiceSecurity] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'security': 'security' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._security = security + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseSecurity': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseSecurity of this PaginatedResponseSecurity. # noqa: E501 + :rtype: PaginatedResponseSecurity + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseSecurity. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseSecurity. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseSecurity. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseSecurity. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseSecurity. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseSecurity. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseSecurity. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseSecurity. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseSecurity. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseSecurity. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseSecurity. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseSecurity. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseSecurity. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseSecurity. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseSecurity. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseSecurity. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def security(self) -> List[ServiceSecurity]: + """Gets the security of this PaginatedResponseSecurity. + + CAPIF security context list. # noqa: E501 + + :return: The security of this PaginatedResponseSecurity. + :rtype: List[ServiceSecurity] + """ + return self._security + + @security.setter + def security(self, security: List[ServiceSecurity]): + """Sets the security of this PaginatedResponseSecurity. + + CAPIF security context list. # noqa: E501 + + :param security: The security of this PaginatedResponseSecurity. + :type security: List[ServiceSecurity] + """ + + self._security = security diff --git a/services/helper/helper_service/services/api/models/paginated_response_service.py b/services/helper/helper_service/services/api/models/paginated_response_service.py new file mode 100644 index 00000000..96f65220 --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_service.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.service_api_description import ServiceAPIDescription +from api import util + +from api.models.service_api_description import ServiceAPIDescription # noqa: E501 + +class PaginatedResponseService(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, services=None): # noqa: E501 + """PaginatedResponseService - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseService. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseService. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseService. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseService. # noqa: E501 + :type sort_order: str + :param services: The services of this PaginatedResponseService. # noqa: E501 + :type services: List[ServiceAPIDescription] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'services': List[ServiceAPIDescription] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'services': 'services' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._services = services + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseService': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseService of this PaginatedResponseService. # noqa: E501 + :rtype: PaginatedResponseService + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseService. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseService. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseService. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseService. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseService. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseService. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseService. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseService. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseService. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseService. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseService. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseService. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseService. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseService. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseService. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseService. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def services(self) -> List[ServiceAPIDescription]: + """Gets the services of this PaginatedResponseService. + + CAPIF services list. # noqa: E501 + + :return: The services of this PaginatedResponseService. + :rtype: List[ServiceAPIDescription] + """ + return self._services + + @services.setter + def services(self, services: List[ServiceAPIDescription]): + """Sets the services of this PaginatedResponseService. + + CAPIF services list. # noqa: E501 + + :param services: The services of this PaginatedResponseService. + :type services: List[ServiceAPIDescription] + """ + + self._services = services diff --git a/services/helper/helper_service/services/api/models/partitioning_criteria.py b/services/helper/helper_service/services/api/models/partitioning_criteria.py new file mode 100644 index 00000000..d4ad3b81 --- /dev/null +++ b/services/helper/helper_service/services/api/models/partitioning_criteria.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class PartitioningCriteria(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """PartitioningCriteria - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'PartitioningCriteria': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PartitioningCriteria of this PartitioningCriteria. # noqa: E501 + :rtype: PartitioningCriteria + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/point.py b/services/helper/helper_service/services/api/models/point.py new file mode 100644 index 00000000..cb7f758b --- /dev/null +++ b/services/helper/helper_service/services/api/models/point.py @@ -0,0 +1,97 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class Point(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None): # noqa: E501 + """Point - a model defined in OpenAPI + + :param shape: The shape of this Point. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this Point. # noqa: E501 + :type point: GeographicalCoordinates + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point' + } + + self._shape = shape + self._point = point + + @classmethod + def from_dict(cls, dikt) -> 'Point': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Point of this Point. # noqa: E501 + :rtype: Point + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this Point. + + + :return: The shape of this Point. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this Point. + + + :param shape: The shape of this Point. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this Point. + + + :return: The point of this Point. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this Point. + + + :param point: The point of this Point. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point diff --git a/services/helper/helper_service/services/api/models/point_altitude.py b/services/helper/helper_service/services/api/models/point_altitude.py new file mode 100644 index 00000000..d2041c32 --- /dev/null +++ b/services/helper/helper_service/services/api/models/point_altitude.py @@ -0,0 +1,131 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class PointAltitude(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, altitude=None): # noqa: E501 + """PointAltitude - a model defined in OpenAPI + + :param shape: The shape of this PointAltitude. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointAltitude. # noqa: E501 + :type point: GeographicalCoordinates + :param altitude: The altitude of this PointAltitude. # noqa: E501 + :type altitude: float + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'altitude': float + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'altitude': 'altitude' + } + + self._shape = shape + self._point = point + self._altitude = altitude + + @classmethod + def from_dict(cls, dikt) -> 'PointAltitude': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointAltitude of this PointAltitude. # noqa: E501 + :rtype: PointAltitude + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointAltitude. + + + :return: The shape of this PointAltitude. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointAltitude. + + + :param shape: The shape of this PointAltitude. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointAltitude. + + + :return: The point of this PointAltitude. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointAltitude. + + + :param point: The point of this PointAltitude. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def altitude(self) -> float: + """Gets the altitude of this PointAltitude. + + Indicates value of altitude. # noqa: E501 + + :return: The altitude of this PointAltitude. + :rtype: float + """ + return self._altitude + + @altitude.setter + def altitude(self, altitude: float): + """Sets the altitude of this PointAltitude. + + Indicates value of altitude. # noqa: E501 + + :param altitude: The altitude of this PointAltitude. + :type altitude: float + """ + if altitude is None: + raise ValueError("Invalid value for `altitude`, must not be `None`") # noqa: E501 + if altitude is not None and altitude > 32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value less than or equal to `32767`") # noqa: E501 + if altitude is not None and altitude < -32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value greater than or equal to `-32767`") # noqa: E501 + + self._altitude = altitude diff --git a/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py b/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py new file mode 100644 index 00000000..e5ff1da8 --- /dev/null +++ b/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py @@ -0,0 +1,227 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api.models.uncertainty_ellipse import UncertaintyEllipse +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class PointAltitudeUncertainty(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, altitude=None, uncertainty_ellipse=None, uncertainty_altitude=None, confidence=None): # noqa: E501 + """PointAltitudeUncertainty - a model defined in OpenAPI + + :param shape: The shape of this PointAltitudeUncertainty. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointAltitudeUncertainty. # noqa: E501 + :type point: GeographicalCoordinates + :param altitude: The altitude of this PointAltitudeUncertainty. # noqa: E501 + :type altitude: float + :param uncertainty_ellipse: The uncertainty_ellipse of this PointAltitudeUncertainty. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param uncertainty_altitude: The uncertainty_altitude of this PointAltitudeUncertainty. # noqa: E501 + :type uncertainty_altitude: float + :param confidence: The confidence of this PointAltitudeUncertainty. # noqa: E501 + :type confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'altitude': float, + 'uncertainty_ellipse': UncertaintyEllipse, + 'uncertainty_altitude': float, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'altitude': 'altitude', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'uncertainty_altitude': 'uncertaintyAltitude', + 'confidence': 'confidence' + } + + self._shape = shape + self._point = point + self._altitude = altitude + self._uncertainty_ellipse = uncertainty_ellipse + self._uncertainty_altitude = uncertainty_altitude + self._confidence = confidence + + @classmethod + def from_dict(cls, dikt) -> 'PointAltitudeUncertainty': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointAltitudeUncertainty of this PointAltitudeUncertainty. # noqa: E501 + :rtype: PointAltitudeUncertainty + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointAltitudeUncertainty. + + + :return: The shape of this PointAltitudeUncertainty. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointAltitudeUncertainty. + + + :param shape: The shape of this PointAltitudeUncertainty. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointAltitudeUncertainty. + + + :return: The point of this PointAltitudeUncertainty. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointAltitudeUncertainty. + + + :param point: The point of this PointAltitudeUncertainty. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def altitude(self) -> float: + """Gets the altitude of this PointAltitudeUncertainty. + + Indicates value of altitude. # noqa: E501 + + :return: The altitude of this PointAltitudeUncertainty. + :rtype: float + """ + return self._altitude + + @altitude.setter + def altitude(self, altitude: float): + """Sets the altitude of this PointAltitudeUncertainty. + + Indicates value of altitude. # noqa: E501 + + :param altitude: The altitude of this PointAltitudeUncertainty. + :type altitude: float + """ + if altitude is None: + raise ValueError("Invalid value for `altitude`, must not be `None`") # noqa: E501 + if altitude is not None and altitude > 32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value less than or equal to `32767`") # noqa: E501 + if altitude is not None and altitude < -32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value greater than or equal to `-32767`") # noqa: E501 + + self._altitude = altitude + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this PointAltitudeUncertainty. + + + :return: The uncertainty_ellipse of this PointAltitudeUncertainty. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this PointAltitudeUncertainty. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this PointAltitudeUncertainty. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def uncertainty_altitude(self) -> float: + """Gets the uncertainty_altitude of this PointAltitudeUncertainty. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_altitude of this PointAltitudeUncertainty. + :rtype: float + """ + return self._uncertainty_altitude + + @uncertainty_altitude.setter + def uncertainty_altitude(self, uncertainty_altitude: float): + """Sets the uncertainty_altitude of this PointAltitudeUncertainty. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_altitude: The uncertainty_altitude of this PointAltitudeUncertainty. + :type uncertainty_altitude: float + """ + if uncertainty_altitude is None: + raise ValueError("Invalid value for `uncertainty_altitude`, must not be `None`") # noqa: E501 + if uncertainty_altitude is not None and uncertainty_altitude < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_altitude`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_altitude = uncertainty_altitude + + @property + def confidence(self) -> int: + """Gets the confidence of this PointAltitudeUncertainty. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this PointAltitudeUncertainty. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this PointAltitudeUncertainty. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this PointAltitudeUncertainty. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence diff --git a/services/helper/helper_service/services/api/models/point_uncertainty_circle.py b/services/helper/helper_service/services/api/models/point_uncertainty_circle.py new file mode 100644 index 00000000..54c312f2 --- /dev/null +++ b/services/helper/helper_service/services/api/models/point_uncertainty_circle.py @@ -0,0 +1,129 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class PointUncertaintyCircle(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, uncertainty=None): # noqa: E501 + """PointUncertaintyCircle - a model defined in OpenAPI + + :param shape: The shape of this PointUncertaintyCircle. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointUncertaintyCircle. # noqa: E501 + :type point: GeographicalCoordinates + :param uncertainty: The uncertainty of this PointUncertaintyCircle. # noqa: E501 + :type uncertainty: float + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'uncertainty': float + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'uncertainty': 'uncertainty' + } + + self._shape = shape + self._point = point + self._uncertainty = uncertainty + + @classmethod + def from_dict(cls, dikt) -> 'PointUncertaintyCircle': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointUncertaintyCircle of this PointUncertaintyCircle. # noqa: E501 + :rtype: PointUncertaintyCircle + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointUncertaintyCircle. + + + :return: The shape of this PointUncertaintyCircle. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointUncertaintyCircle. + + + :param shape: The shape of this PointUncertaintyCircle. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointUncertaintyCircle. + + + :return: The point of this PointUncertaintyCircle. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointUncertaintyCircle. + + + :param point: The point of this PointUncertaintyCircle. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty(self) -> float: + """Gets the uncertainty of this PointUncertaintyCircle. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty of this PointUncertaintyCircle. + :rtype: float + """ + return self._uncertainty + + @uncertainty.setter + def uncertainty(self, uncertainty: float): + """Sets the uncertainty of this PointUncertaintyCircle. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty: The uncertainty of this PointUncertaintyCircle. + :type uncertainty: float + """ + if uncertainty is None: + raise ValueError("Invalid value for `uncertainty`, must not be `None`") # noqa: E501 + if uncertainty is not None and uncertainty < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty = uncertainty diff --git a/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py b/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py new file mode 100644 index 00000000..293c7b08 --- /dev/null +++ b/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py @@ -0,0 +1,161 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api.models.uncertainty_ellipse import UncertaintyEllipse +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class PointUncertaintyEllipse(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, uncertainty_ellipse=None, confidence=None): # noqa: E501 + """PointUncertaintyEllipse - a model defined in OpenAPI + + :param shape: The shape of this PointUncertaintyEllipse. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointUncertaintyEllipse. # noqa: E501 + :type point: GeographicalCoordinates + :param uncertainty_ellipse: The uncertainty_ellipse of this PointUncertaintyEllipse. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param confidence: The confidence of this PointUncertaintyEllipse. # noqa: E501 + :type confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'uncertainty_ellipse': UncertaintyEllipse, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'confidence': 'confidence' + } + + self._shape = shape + self._point = point + self._uncertainty_ellipse = uncertainty_ellipse + self._confidence = confidence + + @classmethod + def from_dict(cls, dikt) -> 'PointUncertaintyEllipse': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointUncertaintyEllipse of this PointUncertaintyEllipse. # noqa: E501 + :rtype: PointUncertaintyEllipse + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointUncertaintyEllipse. + + + :return: The shape of this PointUncertaintyEllipse. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointUncertaintyEllipse. + + + :param shape: The shape of this PointUncertaintyEllipse. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointUncertaintyEllipse. + + + :return: The point of this PointUncertaintyEllipse. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointUncertaintyEllipse. + + + :param point: The point of this PointUncertaintyEllipse. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this PointUncertaintyEllipse. + + + :return: The uncertainty_ellipse of this PointUncertaintyEllipse. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this PointUncertaintyEllipse. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this PointUncertaintyEllipse. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def confidence(self) -> int: + """Gets the confidence of this PointUncertaintyEllipse. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this PointUncertaintyEllipse. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this PointUncertaintyEllipse. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this PointUncertaintyEllipse. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence diff --git a/services/helper/helper_service/services/api/models/polygon.py b/services/helper/helper_service/services/api/models/polygon.py new file mode 100644 index 00000000..069abe4a --- /dev/null +++ b/services/helper/helper_service/services/api/models/polygon.py @@ -0,0 +1,103 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class Polygon(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point_list=None): # noqa: E501 + """Polygon - a model defined in OpenAPI + + :param shape: The shape of this Polygon. # noqa: E501 + :type shape: SupportedGADShapes + :param point_list: The point_list of this Polygon. # noqa: E501 + :type point_list: List[GeographicalCoordinates] + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point_list': List[GeographicalCoordinates] + } + + self.attribute_map = { + 'shape': 'shape', + 'point_list': 'pointList' + } + + self._shape = shape + self._point_list = point_list + + @classmethod + def from_dict(cls, dikt) -> 'Polygon': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Polygon of this Polygon. # noqa: E501 + :rtype: Polygon + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this Polygon. + + + :return: The shape of this Polygon. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this Polygon. + + + :param shape: The shape of this Polygon. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point_list(self) -> List[GeographicalCoordinates]: + """Gets the point_list of this Polygon. + + List of points. # noqa: E501 + + :return: The point_list of this Polygon. + :rtype: List[GeographicalCoordinates] + """ + return self._point_list + + @point_list.setter + def point_list(self, point_list: List[GeographicalCoordinates]): + """Sets the point_list of this Polygon. + + List of points. # noqa: E501 + + :param point_list: The point_list of this Polygon. + :type point_list: List[GeographicalCoordinates] + """ + if point_list is None: + raise ValueError("Invalid value for `point_list`, must not be `None`") # noqa: E501 + if point_list is not None and len(point_list) > 15: + raise ValueError("Invalid value for `point_list`, number of items must be less than or equal to `15`") # noqa: E501 + if point_list is not None and len(point_list) < 3: + raise ValueError("Invalid value for `point_list`, number of items must be greater than or equal to `3`") # noqa: E501 + + self._point_list = point_list diff --git a/services/helper/helper_service/services/api/models/protocol.py b/services/helper/helper_service/services/api/models/protocol.py new file mode 100644 index 00000000..b311a1aa --- /dev/null +++ b/services/helper/helper_service/services/api/models/protocol.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class Protocol(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """Protocol - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'Protocol': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Protocol of this Protocol. # noqa: E501 + :rtype: Protocol + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/published_api_path.py b/services/helper/helper_service/services/api/models/published_api_path.py new file mode 100644 index 00000000..94acc894 --- /dev/null +++ b/services/helper/helper_service/services/api/models/published_api_path.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class PublishedApiPath(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, ccf_ids=None): # noqa: E501 + """PublishedApiPath - a model defined in OpenAPI + + :param ccf_ids: The ccf_ids of this PublishedApiPath. # noqa: E501 + :type ccf_ids: List[str] + """ + self.openapi_types = { + 'ccf_ids': List[str] + } + + self.attribute_map = { + 'ccf_ids': 'ccfIds' + } + + self._ccf_ids = ccf_ids + + @classmethod + def from_dict(cls, dikt) -> 'PublishedApiPath': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PublishedApiPath of this PublishedApiPath. # noqa: E501 + :rtype: PublishedApiPath + """ + return util.deserialize_model(dikt, cls) + + @property + def ccf_ids(self) -> List[str]: + """Gets the ccf_ids of this PublishedApiPath. + + A list of CCF identifiers where the service API is already published. # noqa: E501 + + :return: The ccf_ids of this PublishedApiPath. + :rtype: List[str] + """ + return self._ccf_ids + + @ccf_ids.setter + def ccf_ids(self, ccf_ids: List[str]): + """Sets the ccf_ids of this PublishedApiPath. + + A list of CCF identifiers where the service API is already published. # noqa: E501 + + :param ccf_ids: The ccf_ids of this PublishedApiPath. + :type ccf_ids: List[str] + """ + if ccf_ids is not None and len(ccf_ids) < 1: + raise ValueError("Invalid value for `ccf_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ccf_ids = ccf_ids diff --git a/services/helper/helper_service/services/api/models/registration_information.py b/services/helper/helper_service/services/api/models/registration_information.py new file mode 100644 index 00000000..e1db5aa4 --- /dev/null +++ b/services/helper/helper_service/services/api/models/registration_information.py @@ -0,0 +1,93 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class RegistrationInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_prov_pub_key=None, api_prov_cert=None): # noqa: E501 + """RegistrationInformation - a model defined in OpenAPI + + :param api_prov_pub_key: The api_prov_pub_key of this RegistrationInformation. # noqa: E501 + :type api_prov_pub_key: str + :param api_prov_cert: The api_prov_cert of this RegistrationInformation. # noqa: E501 + :type api_prov_cert: str + """ + self.openapi_types = { + 'api_prov_pub_key': str, + 'api_prov_cert': str + } + + self.attribute_map = { + 'api_prov_pub_key': 'apiProvPubKey', + 'api_prov_cert': 'apiProvCert' + } + + self._api_prov_pub_key = api_prov_pub_key + self._api_prov_cert = api_prov_cert + + @classmethod + def from_dict(cls, dikt) -> 'RegistrationInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The RegistrationInformation of this RegistrationInformation. # noqa: E501 + :rtype: RegistrationInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def api_prov_pub_key(self) -> str: + """Gets the api_prov_pub_key of this RegistrationInformation. + + Public Key of API Provider domain function. # noqa: E501 + + :return: The api_prov_pub_key of this RegistrationInformation. + :rtype: str + """ + return self._api_prov_pub_key + + @api_prov_pub_key.setter + def api_prov_pub_key(self, api_prov_pub_key: str): + """Sets the api_prov_pub_key of this RegistrationInformation. + + Public Key of API Provider domain function. # noqa: E501 + + :param api_prov_pub_key: The api_prov_pub_key of this RegistrationInformation. + :type api_prov_pub_key: str + """ + if api_prov_pub_key is None: + raise ValueError("Invalid value for `api_prov_pub_key`, must not be `None`") # noqa: E501 + + self._api_prov_pub_key = api_prov_pub_key + + @property + def api_prov_cert(self) -> str: + """Gets the api_prov_cert of this RegistrationInformation. + + API provider domain function's client certificate # noqa: E501 + + :return: The api_prov_cert of this RegistrationInformation. + :rtype: str + """ + return self._api_prov_cert + + @api_prov_cert.setter + def api_prov_cert(self, api_prov_cert: str): + """Sets the api_prov_cert of this RegistrationInformation. + + API provider domain function's client certificate # noqa: E501 + + :param api_prov_cert: The api_prov_cert of this RegistrationInformation. + :type api_prov_cert: str + """ + + self._api_prov_cert = api_prov_cert diff --git a/services/helper/helper_service/services/api/models/reporting_information.py b/services/helper/helper_service/services/api/models/reporting_information.py new file mode 100644 index 00000000..432bddbb --- /dev/null +++ b/services/helper/helper_service/services/api/models/reporting_information.py @@ -0,0 +1,295 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.notification_flag import NotificationFlag +from api.models.notification_method import NotificationMethod +from api.models.partitioning_criteria import PartitioningCriteria +from api import util + +from api.models.notification_flag import NotificationFlag # noqa: E501 +from api.models.notification_method import NotificationMethod # noqa: E501 +from api.models.partitioning_criteria import PartitioningCriteria # noqa: E501 + +class ReportingInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, imm_rep=None, notif_method=None, max_report_nbr=None, mon_dur=None, rep_period=None, samp_ratio=None, partition_criteria=None, grp_rep_time=None, notif_flag=None): # noqa: E501 + """ReportingInformation - a model defined in OpenAPI + + :param imm_rep: The imm_rep of this ReportingInformation. # noqa: E501 + :type imm_rep: bool + :param notif_method: The notif_method of this ReportingInformation. # noqa: E501 + :type notif_method: NotificationMethod + :param max_report_nbr: The max_report_nbr of this ReportingInformation. # noqa: E501 + :type max_report_nbr: int + :param mon_dur: The mon_dur of this ReportingInformation. # noqa: E501 + :type mon_dur: datetime + :param rep_period: The rep_period of this ReportingInformation. # noqa: E501 + :type rep_period: int + :param samp_ratio: The samp_ratio of this ReportingInformation. # noqa: E501 + :type samp_ratio: int + :param partition_criteria: The partition_criteria of this ReportingInformation. # noqa: E501 + :type partition_criteria: List[PartitioningCriteria] + :param grp_rep_time: The grp_rep_time of this ReportingInformation. # noqa: E501 + :type grp_rep_time: int + :param notif_flag: The notif_flag of this ReportingInformation. # noqa: E501 + :type notif_flag: NotificationFlag + """ + self.openapi_types = { + 'imm_rep': bool, + 'notif_method': NotificationMethod, + 'max_report_nbr': int, + 'mon_dur': datetime, + 'rep_period': int, + 'samp_ratio': int, + 'partition_criteria': List[PartitioningCriteria], + 'grp_rep_time': int, + 'notif_flag': NotificationFlag + } + + self.attribute_map = { + 'imm_rep': 'immRep', + 'notif_method': 'notifMethod', + 'max_report_nbr': 'maxReportNbr', + 'mon_dur': 'monDur', + 'rep_period': 'repPeriod', + 'samp_ratio': 'sampRatio', + 'partition_criteria': 'partitionCriteria', + 'grp_rep_time': 'grpRepTime', + 'notif_flag': 'notifFlag' + } + + self._imm_rep = imm_rep + self._notif_method = notif_method + self._max_report_nbr = max_report_nbr + self._mon_dur = mon_dur + self._rep_period = rep_period + self._samp_ratio = samp_ratio + self._partition_criteria = partition_criteria + self._grp_rep_time = grp_rep_time + self._notif_flag = notif_flag + + @classmethod + def from_dict(cls, dikt) -> 'ReportingInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ReportingInformation of this ReportingInformation. # noqa: E501 + :rtype: ReportingInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def imm_rep(self) -> bool: + """Gets the imm_rep of this ReportingInformation. + + + :return: The imm_rep of this ReportingInformation. + :rtype: bool + """ + return self._imm_rep + + @imm_rep.setter + def imm_rep(self, imm_rep: bool): + """Sets the imm_rep of this ReportingInformation. + + + :param imm_rep: The imm_rep of this ReportingInformation. + :type imm_rep: bool + """ + + self._imm_rep = imm_rep + + @property + def notif_method(self) -> NotificationMethod: + """Gets the notif_method of this ReportingInformation. + + + :return: The notif_method of this ReportingInformation. + :rtype: NotificationMethod + """ + return self._notif_method + + @notif_method.setter + def notif_method(self, notif_method: NotificationMethod): + """Sets the notif_method of this ReportingInformation. + + + :param notif_method: The notif_method of this ReportingInformation. + :type notif_method: NotificationMethod + """ + + self._notif_method = notif_method + + @property + def max_report_nbr(self) -> int: + """Gets the max_report_nbr of this ReportingInformation. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :return: The max_report_nbr of this ReportingInformation. + :rtype: int + """ + return self._max_report_nbr + + @max_report_nbr.setter + def max_report_nbr(self, max_report_nbr: int): + """Sets the max_report_nbr of this ReportingInformation. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :param max_report_nbr: The max_report_nbr of this ReportingInformation. + :type max_report_nbr: int + """ + if max_report_nbr is not None and max_report_nbr < 0: # noqa: E501 + raise ValueError("Invalid value for `max_report_nbr`, must be a value greater than or equal to `0`") # noqa: E501 + + self._max_report_nbr = max_report_nbr + + @property + def mon_dur(self) -> datetime: + """Gets the mon_dur of this ReportingInformation. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :return: The mon_dur of this ReportingInformation. + :rtype: datetime + """ + return self._mon_dur + + @mon_dur.setter + def mon_dur(self, mon_dur: datetime): + """Sets the mon_dur of this ReportingInformation. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :param mon_dur: The mon_dur of this ReportingInformation. + :type mon_dur: datetime + """ + + self._mon_dur = mon_dur + + @property + def rep_period(self) -> int: + """Gets the rep_period of this ReportingInformation. + + indicating a time in seconds. # noqa: E501 + + :return: The rep_period of this ReportingInformation. + :rtype: int + """ + return self._rep_period + + @rep_period.setter + def rep_period(self, rep_period: int): + """Sets the rep_period of this ReportingInformation. + + indicating a time in seconds. # noqa: E501 + + :param rep_period: The rep_period of this ReportingInformation. + :type rep_period: int + """ + + self._rep_period = rep_period + + @property + def samp_ratio(self) -> int: + """Gets the samp_ratio of this ReportingInformation. + + Unsigned integer indicating Sampling Ratio (see clauses 4.15.1 of 3GPP TS 23.502), expressed in percent. # noqa: E501 + + :return: The samp_ratio of this ReportingInformation. + :rtype: int + """ + return self._samp_ratio + + @samp_ratio.setter + def samp_ratio(self, samp_ratio: int): + """Sets the samp_ratio of this ReportingInformation. + + Unsigned integer indicating Sampling Ratio (see clauses 4.15.1 of 3GPP TS 23.502), expressed in percent. # noqa: E501 + + :param samp_ratio: The samp_ratio of this ReportingInformation. + :type samp_ratio: int + """ + if samp_ratio is not None and samp_ratio > 100: # noqa: E501 + raise ValueError("Invalid value for `samp_ratio`, must be a value less than or equal to `100`") # noqa: E501 + if samp_ratio is not None and samp_ratio < 1: # noqa: E501 + raise ValueError("Invalid value for `samp_ratio`, must be a value greater than or equal to `1`") # noqa: E501 + + self._samp_ratio = samp_ratio + + @property + def partition_criteria(self) -> List[PartitioningCriteria]: + """Gets the partition_criteria of this ReportingInformation. + + Criteria for partitioning the UEs before applying the sampling ratio. # noqa: E501 + + :return: The partition_criteria of this ReportingInformation. + :rtype: List[PartitioningCriteria] + """ + return self._partition_criteria + + @partition_criteria.setter + def partition_criteria(self, partition_criteria: List[PartitioningCriteria]): + """Sets the partition_criteria of this ReportingInformation. + + Criteria for partitioning the UEs before applying the sampling ratio. # noqa: E501 + + :param partition_criteria: The partition_criteria of this ReportingInformation. + :type partition_criteria: List[PartitioningCriteria] + """ + if partition_criteria is not None and len(partition_criteria) < 1: + raise ValueError("Invalid value for `partition_criteria`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._partition_criteria = partition_criteria + + @property + def grp_rep_time(self) -> int: + """Gets the grp_rep_time of this ReportingInformation. + + indicating a time in seconds. # noqa: E501 + + :return: The grp_rep_time of this ReportingInformation. + :rtype: int + """ + return self._grp_rep_time + + @grp_rep_time.setter + def grp_rep_time(self, grp_rep_time: int): + """Sets the grp_rep_time of this ReportingInformation. + + indicating a time in seconds. # noqa: E501 + + :param grp_rep_time: The grp_rep_time of this ReportingInformation. + :type grp_rep_time: int + """ + + self._grp_rep_time = grp_rep_time + + @property + def notif_flag(self) -> NotificationFlag: + """Gets the notif_flag of this ReportingInformation. + + + :return: The notif_flag of this ReportingInformation. + :rtype: NotificationFlag + """ + return self._notif_flag + + @notif_flag.setter + def notif_flag(self, notif_flag: NotificationFlag): + """Sets the notif_flag of this ReportingInformation. + + + :param notif_flag: The notif_flag of this ReportingInformation. + :type notif_flag: NotificationFlag + """ + + self._notif_flag = notif_flag diff --git a/services/helper/helper_service/services/api/models/resource.py b/services/helper/helper_service/services/api/models/resource.py new file mode 100644 index 00000000..c32f79c3 --- /dev/null +++ b/services/helper/helper_service/services/api/models/resource.py @@ -0,0 +1,213 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.communication_type import CommunicationType +from api.models.operation import Operation +from api import util + +from api.models.communication_type import CommunicationType # noqa: E501 +from api.models.operation import Operation # noqa: E501 + +class Resource(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, resource_name=None, comm_type=None, uri=None, cust_op_name=None, operations=None, description=None): # noqa: E501 + """Resource - a model defined in OpenAPI + + :param resource_name: The resource_name of this Resource. # noqa: E501 + :type resource_name: str + :param comm_type: The comm_type of this Resource. # noqa: E501 + :type comm_type: CommunicationType + :param uri: The uri of this Resource. # noqa: E501 + :type uri: str + :param cust_op_name: The cust_op_name of this Resource. # noqa: E501 + :type cust_op_name: str + :param operations: The operations of this Resource. # noqa: E501 + :type operations: List[Operation] + :param description: The description of this Resource. # noqa: E501 + :type description: str + """ + self.openapi_types = { + 'resource_name': str, + 'comm_type': CommunicationType, + 'uri': str, + 'cust_op_name': str, + 'operations': List[Operation], + 'description': str + } + + self.attribute_map = { + 'resource_name': 'resourceName', + 'comm_type': 'commType', + 'uri': 'uri', + 'cust_op_name': 'custOpName', + 'operations': 'operations', + 'description': 'description' + } + + self._resource_name = resource_name + self._comm_type = comm_type + self._uri = uri + self._cust_op_name = cust_op_name + self._operations = operations + self._description = description + + @classmethod + def from_dict(cls, dikt) -> 'Resource': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Resource of this Resource. # noqa: E501 + :rtype: Resource + """ + return util.deserialize_model(dikt, cls) + + @property + def resource_name(self) -> str: + """Gets the resource_name of this Resource. + + Resource name # noqa: E501 + + :return: The resource_name of this Resource. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name: str): + """Sets the resource_name of this Resource. + + Resource name # noqa: E501 + + :param resource_name: The resource_name of this Resource. + :type resource_name: str + """ + if resource_name is None: + raise ValueError("Invalid value for `resource_name`, must not be `None`") # noqa: E501 + + self._resource_name = resource_name + + @property + def comm_type(self) -> CommunicationType: + """Gets the comm_type of this Resource. + + + :return: The comm_type of this Resource. + :rtype: CommunicationType + """ + return self._comm_type + + @comm_type.setter + def comm_type(self, comm_type: CommunicationType): + """Sets the comm_type of this Resource. + + + :param comm_type: The comm_type of this Resource. + :type comm_type: CommunicationType + """ + if comm_type is None: + raise ValueError("Invalid value for `comm_type`, must not be `None`") # noqa: E501 + + self._comm_type = comm_type + + @property + def uri(self) -> str: + """Gets the uri of this Resource. + + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The uri of this Resource. + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri: str): + """Sets the uri of this Resource. + + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param uri: The uri of this Resource. + :type uri: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def cust_op_name(self) -> str: + """Gets the cust_op_name of this Resource. + + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The cust_op_name of this Resource. + :rtype: str + """ + return self._cust_op_name + + @cust_op_name.setter + def cust_op_name(self, cust_op_name: str): + """Sets the cust_op_name of this Resource. + + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param cust_op_name: The cust_op_name of this Resource. + :type cust_op_name: str + """ + + self._cust_op_name = cust_op_name + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this Resource. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :return: The operations of this Resource. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this Resource. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :param operations: The operations of this Resource. + :type operations: List[Operation] + """ + if operations is not None and len(operations) < 1: + raise ValueError("Invalid value for `operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._operations = operations + + @property + def description(self) -> str: + """Gets the description of this Resource. + + Text description of the API resource # noqa: E501 + + :return: The description of this Resource. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this Resource. + + Text description of the API resource # noqa: E501 + + :param description: The description of this Resource. + :type description: str + """ + + self._description = description diff --git a/services/helper/helper_service/services/api/models/security_information.py b/services/helper/helper_service/services/api/models/security_information.py new file mode 100644 index 00000000..49aabfcf --- /dev/null +++ b/services/helper/helper_service/services/api/models/security_information.py @@ -0,0 +1,235 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.interface_description import InterfaceDescription +from api.models.security_method import SecurityMethod +from api import util + +from api.models.interface_description import InterfaceDescription # noqa: E501 +from api.models.security_method import SecurityMethod # noqa: E501 + +class SecurityInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, interface_details=None, aef_id=None, api_id=None, pref_security_methods=None, sel_security_method=None, authentication_info=None, authorization_info=None): # noqa: E501 + """SecurityInformation - a model defined in OpenAPI + + :param interface_details: The interface_details of this SecurityInformation. # noqa: E501 + :type interface_details: InterfaceDescription + :param aef_id: The aef_id of this SecurityInformation. # noqa: E501 + :type aef_id: str + :param api_id: The api_id of this SecurityInformation. # noqa: E501 + :type api_id: str + :param pref_security_methods: The pref_security_methods of this SecurityInformation. # noqa: E501 + :type pref_security_methods: List[SecurityMethod] + :param sel_security_method: The sel_security_method of this SecurityInformation. # noqa: E501 + :type sel_security_method: SecurityMethod + :param authentication_info: The authentication_info of this SecurityInformation. # noqa: E501 + :type authentication_info: str + :param authorization_info: The authorization_info of this SecurityInformation. # noqa: E501 + :type authorization_info: str + """ + self.openapi_types = { + 'interface_details': InterfaceDescription, + 'aef_id': str, + 'api_id': str, + 'pref_security_methods': List[SecurityMethod], + 'sel_security_method': SecurityMethod, + 'authentication_info': str, + 'authorization_info': str + } + + self.attribute_map = { + 'interface_details': 'interfaceDetails', + 'aef_id': 'aefId', + 'api_id': 'apiId', + 'pref_security_methods': 'prefSecurityMethods', + 'sel_security_method': 'selSecurityMethod', + 'authentication_info': 'authenticationInfo', + 'authorization_info': 'authorizationInfo' + } + + self._interface_details = interface_details + self._aef_id = aef_id + self._api_id = api_id + self._pref_security_methods = pref_security_methods + self._sel_security_method = sel_security_method + self._authentication_info = authentication_info + self._authorization_info = authorization_info + + @classmethod + def from_dict(cls, dikt) -> 'SecurityInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The SecurityInformation of this SecurityInformation. # noqa: E501 + :rtype: SecurityInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def interface_details(self) -> InterfaceDescription: + """Gets the interface_details of this SecurityInformation. + + + :return: The interface_details of this SecurityInformation. + :rtype: InterfaceDescription + """ + return self._interface_details + + @interface_details.setter + def interface_details(self, interface_details: InterfaceDescription): + """Sets the interface_details of this SecurityInformation. + + + :param interface_details: The interface_details of this SecurityInformation. + :type interface_details: InterfaceDescription + """ + + self._interface_details = interface_details + + @property + def aef_id(self) -> str: + """Gets the aef_id of this SecurityInformation. + + Identifier of the API exposing function # noqa: E501 + + :return: The aef_id of this SecurityInformation. + :rtype: str + """ + return self._aef_id + + @aef_id.setter + def aef_id(self, aef_id: str): + """Sets the aef_id of this SecurityInformation. + + Identifier of the API exposing function # noqa: E501 + + :param aef_id: The aef_id of this SecurityInformation. + :type aef_id: str + """ + + self._aef_id = aef_id + + @property + def api_id(self) -> str: + """Gets the api_id of this SecurityInformation. + + API identifier # noqa: E501 + + :return: The api_id of this SecurityInformation. + :rtype: str + """ + return self._api_id + + @api_id.setter + def api_id(self, api_id: str): + """Sets the api_id of this SecurityInformation. + + API identifier # noqa: E501 + + :param api_id: The api_id of this SecurityInformation. + :type api_id: str + """ + + self._api_id = api_id + + @property + def pref_security_methods(self) -> List[SecurityMethod]: + """Gets the pref_security_methods of this SecurityInformation. + + Security methods preferred by the API invoker for the API interface. # noqa: E501 + + :return: The pref_security_methods of this SecurityInformation. + :rtype: List[SecurityMethod] + """ + return self._pref_security_methods + + @pref_security_methods.setter + def pref_security_methods(self, pref_security_methods: List[SecurityMethod]): + """Sets the pref_security_methods of this SecurityInformation. + + Security methods preferred by the API invoker for the API interface. # noqa: E501 + + :param pref_security_methods: The pref_security_methods of this SecurityInformation. + :type pref_security_methods: List[SecurityMethod] + """ + if pref_security_methods is None: + raise ValueError("Invalid value for `pref_security_methods`, must not be `None`") # noqa: E501 + if pref_security_methods is not None and len(pref_security_methods) < 1: + raise ValueError("Invalid value for `pref_security_methods`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._pref_security_methods = pref_security_methods + + @property + def sel_security_method(self) -> SecurityMethod: + """Gets the sel_security_method of this SecurityInformation. + + + :return: The sel_security_method of this SecurityInformation. + :rtype: SecurityMethod + """ + return self._sel_security_method + + @sel_security_method.setter + def sel_security_method(self, sel_security_method: SecurityMethod): + """Sets the sel_security_method of this SecurityInformation. + + + :param sel_security_method: The sel_security_method of this SecurityInformation. + :type sel_security_method: SecurityMethod + """ + + self._sel_security_method = sel_security_method + + @property + def authentication_info(self) -> str: + """Gets the authentication_info of this SecurityInformation. + + Authentication related information # noqa: E501 + + :return: The authentication_info of this SecurityInformation. + :rtype: str + """ + return self._authentication_info + + @authentication_info.setter + def authentication_info(self, authentication_info: str): + """Sets the authentication_info of this SecurityInformation. + + Authentication related information # noqa: E501 + + :param authentication_info: The authentication_info of this SecurityInformation. + :type authentication_info: str + """ + + self._authentication_info = authentication_info + + @property + def authorization_info(self) -> str: + """Gets the authorization_info of this SecurityInformation. + + Authorization related information # noqa: E501 + + :return: The authorization_info of this SecurityInformation. + :rtype: str + """ + return self._authorization_info + + @authorization_info.setter + def authorization_info(self, authorization_info: str): + """Sets the authorization_info of this SecurityInformation. + + Authorization related information # noqa: E501 + + :param authorization_info: The authorization_info of this SecurityInformation. + :type authorization_info: str + """ + + self._authorization_info = authorization_info diff --git a/services/helper/helper_service/services/api/models/security_method.py b/services/helper/helper_service/services/api/models/security_method.py new file mode 100644 index 00000000..df7d3ecc --- /dev/null +++ b/services/helper/helper_service/services/api/models/security_method.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class SecurityMethod(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """SecurityMethod - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'SecurityMethod': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The SecurityMethod of this SecurityMethod. # noqa: E501 + :rtype: SecurityMethod + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/service_api_description.py b/services/helper/helper_service/services/api/models/service_api_description.py new file mode 100644 index 00000000..a89c8016 --- /dev/null +++ b/services/helper/helper_service/services/api/models/service_api_description.py @@ -0,0 +1,325 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.aef_profile import AefProfile +from api.models.published_api_path import PublishedApiPath +from api.models.shareable_information import ShareableInformation +import re +from api import util + +from api.models.aef_profile import AefProfile # noqa: E501 +from api.models.published_api_path import PublishedApiPath # noqa: E501 +from api.models.shareable_information import ShareableInformation # noqa: E501 +import re # noqa: E501 + +class ServiceAPIDescription(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_name=None, api_id=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None): # noqa: E501 + """ServiceAPIDescription - a model defined in OpenAPI + + :param api_name: The api_name of this ServiceAPIDescription. # noqa: E501 + :type api_name: str + :param api_id: The api_id of this ServiceAPIDescription. # noqa: E501 + :type api_id: str + :param aef_profiles: The aef_profiles of this ServiceAPIDescription. # noqa: E501 + :type aef_profiles: List[AefProfile] + :param description: The description of this ServiceAPIDescription. # noqa: E501 + :type description: str + :param supported_features: The supported_features of this ServiceAPIDescription. # noqa: E501 + :type supported_features: str + :param shareable_info: The shareable_info of this ServiceAPIDescription. # noqa: E501 + :type shareable_info: ShareableInformation + :param service_api_category: The service_api_category of this ServiceAPIDescription. # noqa: E501 + :type service_api_category: str + :param api_supp_feats: The api_supp_feats of this ServiceAPIDescription. # noqa: E501 + :type api_supp_feats: str + :param pub_api_path: The pub_api_path of this ServiceAPIDescription. # noqa: E501 + :type pub_api_path: PublishedApiPath + :param ccf_id: The ccf_id of this ServiceAPIDescription. # noqa: E501 + :type ccf_id: str + """ + self.openapi_types = { + 'api_name': str, + 'api_id': str, + 'aef_profiles': List[AefProfile], + 'description': str, + 'supported_features': str, + 'shareable_info': ShareableInformation, + 'service_api_category': str, + 'api_supp_feats': str, + 'pub_api_path': PublishedApiPath, + 'ccf_id': str + } + + self.attribute_map = { + 'api_name': 'apiName', + 'api_id': 'apiId', + 'aef_profiles': 'aefProfiles', + 'description': 'description', + 'supported_features': 'supportedFeatures', + 'shareable_info': 'shareableInfo', + 'service_api_category': 'serviceAPICategory', + 'api_supp_feats': 'apiSuppFeats', + 'pub_api_path': 'pubApiPath', + 'ccf_id': 'ccfId' + } + + self._api_name = api_name + self._api_id = api_id + self._aef_profiles = aef_profiles + self._description = description + self._supported_features = supported_features + self._shareable_info = shareable_info + self._service_api_category = service_api_category + self._api_supp_feats = api_supp_feats + self._pub_api_path = pub_api_path + self._ccf_id = ccf_id + + @classmethod + def from_dict(cls, dikt) -> 'ServiceAPIDescription': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ServiceAPIDescription of this ServiceAPIDescription. # noqa: E501 + :rtype: ServiceAPIDescription + """ + return util.deserialize_model(dikt, cls) + + @property + def api_name(self) -> str: + """Gets the api_name of this ServiceAPIDescription. + + API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The api_name of this ServiceAPIDescription. + :rtype: str + """ + return self._api_name + + @api_name.setter + def api_name(self, api_name: str): + """Sets the api_name of this ServiceAPIDescription. + + API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param api_name: The api_name of this ServiceAPIDescription. + :type api_name: str + """ + if api_name is None: + raise ValueError("Invalid value for `api_name`, must not be `None`") # noqa: E501 + + self._api_name = api_name + + @property + def api_id(self) -> str: + """Gets the api_id of this ServiceAPIDescription. + + API identifier assigned by the CAPIF core function to the published service API. Shall not be present in the HTTP POST request from the API publishing function to the CAPIF core function. Shall be present in the HTTP POST response from the CAPIF core function to the API publishing function and in the HTTP GET response from the CAPIF core function to the API invoker (discovery API). # noqa: E501 + + :return: The api_id of this ServiceAPIDescription. + :rtype: str + """ + return self._api_id + + @api_id.setter + def api_id(self, api_id: str): + """Sets the api_id of this ServiceAPIDescription. + + API identifier assigned by the CAPIF core function to the published service API. Shall not be present in the HTTP POST request from the API publishing function to the CAPIF core function. Shall be present in the HTTP POST response from the CAPIF core function to the API publishing function and in the HTTP GET response from the CAPIF core function to the API invoker (discovery API). # noqa: E501 + + :param api_id: The api_id of this ServiceAPIDescription. + :type api_id: str + """ + + self._api_id = api_id + + @property + def aef_profiles(self) -> List[AefProfile]: + """Gets the aef_profiles of this ServiceAPIDescription. + + AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 + + :return: The aef_profiles of this ServiceAPIDescription. + :rtype: List[AefProfile] + """ + return self._aef_profiles + + @aef_profiles.setter + def aef_profiles(self, aef_profiles: List[AefProfile]): + """Sets the aef_profiles of this ServiceAPIDescription. + + AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 + + :param aef_profiles: The aef_profiles of this ServiceAPIDescription. + :type aef_profiles: List[AefProfile] + """ + if aef_profiles is not None and len(aef_profiles) < 1: + raise ValueError("Invalid value for `aef_profiles`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._aef_profiles = aef_profiles + + @property + def description(self) -> str: + """Gets the description of this ServiceAPIDescription. + + Text description of the API # noqa: E501 + + :return: The description of this ServiceAPIDescription. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this ServiceAPIDescription. + + Text description of the API # noqa: E501 + + :param description: The description of this ServiceAPIDescription. + :type description: str + """ + + self._description = description + + @property + def supported_features(self) -> str: + """Gets the supported_features of this ServiceAPIDescription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supported_features of this ServiceAPIDescription. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this ServiceAPIDescription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supported_features: The supported_features of this ServiceAPIDescription. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features + + @property + def shareable_info(self) -> ShareableInformation: + """Gets the shareable_info of this ServiceAPIDescription. + + + :return: The shareable_info of this ServiceAPIDescription. + :rtype: ShareableInformation + """ + return self._shareable_info + + @shareable_info.setter + def shareable_info(self, shareable_info: ShareableInformation): + """Sets the shareable_info of this ServiceAPIDescription. + + + :param shareable_info: The shareable_info of this ServiceAPIDescription. + :type shareable_info: ShareableInformation + """ + + self._shareable_info = shareable_info + + @property + def service_api_category(self) -> str: + """Gets the service_api_category of this ServiceAPIDescription. + + + :return: The service_api_category of this ServiceAPIDescription. + :rtype: str + """ + return self._service_api_category + + @service_api_category.setter + def service_api_category(self, service_api_category: str): + """Sets the service_api_category of this ServiceAPIDescription. + + + :param service_api_category: The service_api_category of this ServiceAPIDescription. + :type service_api_category: str + """ + + self._service_api_category = service_api_category + + @property + def api_supp_feats(self) -> str: + """Gets the api_supp_feats of this ServiceAPIDescription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The api_supp_feats of this ServiceAPIDescription. + :rtype: str + """ + return self._api_supp_feats + + @api_supp_feats.setter + def api_supp_feats(self, api_supp_feats: str): + """Sets the api_supp_feats of this ServiceAPIDescription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param api_supp_feats: The api_supp_feats of this ServiceAPIDescription. + :type api_supp_feats: str + """ + if api_supp_feats is not None and not re.search(r'^[A-Fa-f0-9]*$', api_supp_feats): # noqa: E501 + raise ValueError(r"Invalid value for `api_supp_feats`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._api_supp_feats = api_supp_feats + + @property + def pub_api_path(self) -> PublishedApiPath: + """Gets the pub_api_path of this ServiceAPIDescription. + + + :return: The pub_api_path of this ServiceAPIDescription. + :rtype: PublishedApiPath + """ + return self._pub_api_path + + @pub_api_path.setter + def pub_api_path(self, pub_api_path: PublishedApiPath): + """Sets the pub_api_path of this ServiceAPIDescription. + + + :param pub_api_path: The pub_api_path of this ServiceAPIDescription. + :type pub_api_path: PublishedApiPath + """ + + self._pub_api_path = pub_api_path + + @property + def ccf_id(self) -> str: + """Gets the ccf_id of this ServiceAPIDescription. + + CAPIF core function identifier. # noqa: E501 + + :return: The ccf_id of this ServiceAPIDescription. + :rtype: str + """ + return self._ccf_id + + @ccf_id.setter + def ccf_id(self, ccf_id: str): + """Sets the ccf_id of this ServiceAPIDescription. + + CAPIF core function identifier. # noqa: E501 + + :param ccf_id: The ccf_id of this ServiceAPIDescription. + :type ccf_id: str + """ + + self._ccf_id = ccf_id diff --git a/services/helper/helper_service/services/api/models/service_security.py b/services/helper/helper_service/services/api/models/service_security.py new file mode 100644 index 00000000..ad66ad20 --- /dev/null +++ b/services/helper/helper_service/services/api/models/service_security.py @@ -0,0 +1,211 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.security_information import SecurityInformation +from api.models.websock_notif_config import WebsockNotifConfig +import re +from api import util + +from api.models.security_information import SecurityInformation # noqa: E501 +from api.models.websock_notif_config import WebsockNotifConfig # noqa: E501 +import re # noqa: E501 + +class ServiceSecurity(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_invoker_id=None, security_info=None, notification_destination=None, request_test_notification=None, websock_notif_config=None, supported_features=None): # noqa: E501 + """ServiceSecurity - a model defined in OpenAPI + + :param api_invoker_id: The api_invoker_id of this ServiceSecurity. # noqa: E501 + :type api_invoker_id: str + :param security_info: The security_info of this ServiceSecurity. # noqa: E501 + :type security_info: List[SecurityInformation] + :param notification_destination: The notification_destination of this ServiceSecurity. # noqa: E501 + :type notification_destination: str + :param request_test_notification: The request_test_notification of this ServiceSecurity. # noqa: E501 + :type request_test_notification: bool + :param websock_notif_config: The websock_notif_config of this ServiceSecurity. # noqa: E501 + :type websock_notif_config: WebsockNotifConfig + :param supported_features: The supported_features of this ServiceSecurity. # noqa: E501 + :type supported_features: str + """ + self.openapi_types = { + 'api_invoker_id': str, + 'security_info': List[SecurityInformation], + 'notification_destination': str, + 'request_test_notification': bool, + 'websock_notif_config': WebsockNotifConfig, + 'supported_features': str + } + + self.attribute_map = { + 'api_invoker_id': 'api_invoker_id', + 'security_info': 'securityInfo', + 'notification_destination': 'notificationDestination', + 'request_test_notification': 'requestTestNotification', + 'websock_notif_config': 'websockNotifConfig', + 'supported_features': 'supportedFeatures' + } + + self._api_invoker_id = api_invoker_id + self._security_info = security_info + self._notification_destination = notification_destination + self._request_test_notification = request_test_notification + self._websock_notif_config = websock_notif_config + self._supported_features = supported_features + + @classmethod + def from_dict(cls, dikt) -> 'ServiceSecurity': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ServiceSecurity of this ServiceSecurity. # noqa: E501 + :rtype: ServiceSecurity + """ + return util.deserialize_model(dikt, cls) + + @property + def api_invoker_id(self) -> str: + """Gets the api_invoker_id of this ServiceSecurity. + + Id of the invoker of this security context. # noqa: E501 + + :return: The api_invoker_id of this ServiceSecurity. + :rtype: str + """ + return self._api_invoker_id + + @api_invoker_id.setter + def api_invoker_id(self, api_invoker_id: str): + """Sets the api_invoker_id of this ServiceSecurity. + + Id of the invoker of this security context. # noqa: E501 + + :param api_invoker_id: The api_invoker_id of this ServiceSecurity. + :type api_invoker_id: str + """ + + self._api_invoker_id = api_invoker_id + + @property + def security_info(self) -> List[SecurityInformation]: + """Gets the security_info of this ServiceSecurity. + + + :return: The security_info of this ServiceSecurity. + :rtype: List[SecurityInformation] + """ + return self._security_info + + @security_info.setter + def security_info(self, security_info: List[SecurityInformation]): + """Sets the security_info of this ServiceSecurity. + + + :param security_info: The security_info of this ServiceSecurity. + :type security_info: List[SecurityInformation] + """ + if security_info is None: + raise ValueError("Invalid value for `security_info`, must not be `None`") # noqa: E501 + + self._security_info = security_info + + @property + def notification_destination(self) -> str: + """Gets the notification_destination of this ServiceSecurity. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The notification_destination of this ServiceSecurity. + :rtype: str + """ + return self._notification_destination + + @notification_destination.setter + def notification_destination(self, notification_destination: str): + """Sets the notification_destination of this ServiceSecurity. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param notification_destination: The notification_destination of this ServiceSecurity. + :type notification_destination: str + """ + if notification_destination is None: + raise ValueError("Invalid value for `notification_destination`, must not be `None`") # noqa: E501 + + self._notification_destination = notification_destination + + @property + def request_test_notification(self) -> bool: + """Gets the request_test_notification of this ServiceSecurity. + + Set to true by API invoker to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :return: The request_test_notification of this ServiceSecurity. + :rtype: bool + """ + return self._request_test_notification + + @request_test_notification.setter + def request_test_notification(self, request_test_notification: bool): + """Sets the request_test_notification of this ServiceSecurity. + + Set to true by API invoker to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :param request_test_notification: The request_test_notification of this ServiceSecurity. + :type request_test_notification: bool + """ + + self._request_test_notification = request_test_notification + + @property + def websock_notif_config(self) -> WebsockNotifConfig: + """Gets the websock_notif_config of this ServiceSecurity. + + + :return: The websock_notif_config of this ServiceSecurity. + :rtype: WebsockNotifConfig + """ + return self._websock_notif_config + + @websock_notif_config.setter + def websock_notif_config(self, websock_notif_config: WebsockNotifConfig): + """Sets the websock_notif_config of this ServiceSecurity. + + + :param websock_notif_config: The websock_notif_config of this ServiceSecurity. + :type websock_notif_config: WebsockNotifConfig + """ + + self._websock_notif_config = websock_notif_config + + @property + def supported_features(self) -> str: + """Gets the supported_features of this ServiceSecurity. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supported_features of this ServiceSecurity. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this ServiceSecurity. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supported_features: The supported_features of this ServiceSecurity. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features diff --git a/services/helper/helper_service/services/api/models/shareable_information.py b/services/helper/helper_service/services/api/models/shareable_information.py new file mode 100644 index 00000000..4be3ded4 --- /dev/null +++ b/services/helper/helper_service/services/api/models/shareable_information.py @@ -0,0 +1,95 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class ShareableInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, is_shareable=None, capif_prov_doms=None): # noqa: E501 + """ShareableInformation - a model defined in OpenAPI + + :param is_shareable: The is_shareable of this ShareableInformation. # noqa: E501 + :type is_shareable: bool + :param capif_prov_doms: The capif_prov_doms of this ShareableInformation. # noqa: E501 + :type capif_prov_doms: List[str] + """ + self.openapi_types = { + 'is_shareable': bool, + 'capif_prov_doms': List[str] + } + + self.attribute_map = { + 'is_shareable': 'isShareable', + 'capif_prov_doms': 'capifProvDoms' + } + + self._is_shareable = is_shareable + self._capif_prov_doms = capif_prov_doms + + @classmethod + def from_dict(cls, dikt) -> 'ShareableInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ShareableInformation of this ShareableInformation. # noqa: E501 + :rtype: ShareableInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def is_shareable(self) -> bool: + """Gets the is_shareable of this ShareableInformation. + + Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + + :return: The is_shareable of this ShareableInformation. + :rtype: bool + """ + return self._is_shareable + + @is_shareable.setter + def is_shareable(self, is_shareable: bool): + """Sets the is_shareable of this ShareableInformation. + + Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + + :param is_shareable: The is_shareable of this ShareableInformation. + :type is_shareable: bool + """ + if is_shareable is None: + raise ValueError("Invalid value for `is_shareable`, must not be `None`") # noqa: E501 + + self._is_shareable = is_shareable + + @property + def capif_prov_doms(self) -> List[str]: + """Gets the capif_prov_doms of this ShareableInformation. + + List of CAPIF provider domains to which the service API information to be shared. # noqa: E501 + + :return: The capif_prov_doms of this ShareableInformation. + :rtype: List[str] + """ + return self._capif_prov_doms + + @capif_prov_doms.setter + def capif_prov_doms(self, capif_prov_doms: List[str]): + """Sets the capif_prov_doms of this ShareableInformation. + + List of CAPIF provider domains to which the service API information to be shared. # noqa: E501 + + :param capif_prov_doms: The capif_prov_doms of this ShareableInformation. + :type capif_prov_doms: List[str] + """ + if capif_prov_doms is not None and len(capif_prov_doms) < 1: + raise ValueError("Invalid value for `capif_prov_doms`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._capif_prov_doms = capif_prov_doms diff --git a/services/helper/helper_service/services/api/models/supported_gad_shapes.py b/services/helper/helper_service/services/api/models/supported_gad_shapes.py new file mode 100644 index 00000000..81ef146f --- /dev/null +++ b/services/helper/helper_service/services/api/models/supported_gad_shapes.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class SupportedGADShapes(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """SupportedGADShapes - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'SupportedGADShapes': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The SupportedGADShapes of this SupportedGADShapes. # noqa: E501 + :rtype: SupportedGADShapes + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/uncertainty_ellipse.py b/services/helper/helper_service/services/api/models/uncertainty_ellipse.py new file mode 100644 index 00000000..b93bc86a --- /dev/null +++ b/services/helper/helper_service/services/api/models/uncertainty_ellipse.py @@ -0,0 +1,133 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class UncertaintyEllipse(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, semi_major=None, semi_minor=None, orientation_major=None): # noqa: E501 + """UncertaintyEllipse - a model defined in OpenAPI + + :param semi_major: The semi_major of this UncertaintyEllipse. # noqa: E501 + :type semi_major: float + :param semi_minor: The semi_minor of this UncertaintyEllipse. # noqa: E501 + :type semi_minor: float + :param orientation_major: The orientation_major of this UncertaintyEllipse. # noqa: E501 + :type orientation_major: int + """ + self.openapi_types = { + 'semi_major': float, + 'semi_minor': float, + 'orientation_major': int + } + + self.attribute_map = { + 'semi_major': 'semiMajor', + 'semi_minor': 'semiMinor', + 'orientation_major': 'orientationMajor' + } + + self._semi_major = semi_major + self._semi_minor = semi_minor + self._orientation_major = orientation_major + + @classmethod + def from_dict(cls, dikt) -> 'UncertaintyEllipse': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The UncertaintyEllipse of this UncertaintyEllipse. # noqa: E501 + :rtype: UncertaintyEllipse + """ + return util.deserialize_model(dikt, cls) + + @property + def semi_major(self) -> float: + """Gets the semi_major of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :return: The semi_major of this UncertaintyEllipse. + :rtype: float + """ + return self._semi_major + + @semi_major.setter + def semi_major(self, semi_major: float): + """Sets the semi_major of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :param semi_major: The semi_major of this UncertaintyEllipse. + :type semi_major: float + """ + if semi_major is None: + raise ValueError("Invalid value for `semi_major`, must not be `None`") # noqa: E501 + if semi_major is not None and semi_major < 0: # noqa: E501 + raise ValueError("Invalid value for `semi_major`, must be a value greater than or equal to `0`") # noqa: E501 + + self._semi_major = semi_major + + @property + def semi_minor(self) -> float: + """Gets the semi_minor of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :return: The semi_minor of this UncertaintyEllipse. + :rtype: float + """ + return self._semi_minor + + @semi_minor.setter + def semi_minor(self, semi_minor: float): + """Sets the semi_minor of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :param semi_minor: The semi_minor of this UncertaintyEllipse. + :type semi_minor: float + """ + if semi_minor is None: + raise ValueError("Invalid value for `semi_minor`, must not be `None`") # noqa: E501 + if semi_minor is not None and semi_minor < 0: # noqa: E501 + raise ValueError("Invalid value for `semi_minor`, must be a value greater than or equal to `0`") # noqa: E501 + + self._semi_minor = semi_minor + + @property + def orientation_major(self) -> int: + """Gets the orientation_major of this UncertaintyEllipse. + + Indicates value of orientation angle. # noqa: E501 + + :return: The orientation_major of this UncertaintyEllipse. + :rtype: int + """ + return self._orientation_major + + @orientation_major.setter + def orientation_major(self, orientation_major: int): + """Sets the orientation_major of this UncertaintyEllipse. + + Indicates value of orientation angle. # noqa: E501 + + :param orientation_major: The orientation_major of this UncertaintyEllipse. + :type orientation_major: int + """ + if orientation_major is None: + raise ValueError("Invalid value for `orientation_major`, must not be `None`") # noqa: E501 + if orientation_major is not None and orientation_major > 180: # noqa: E501 + raise ValueError("Invalid value for `orientation_major`, must be a value less than or equal to `180`") # noqa: E501 + if orientation_major is not None and orientation_major < 0: # noqa: E501 + raise ValueError("Invalid value for `orientation_major`, must be a value greater than or equal to `0`") # noqa: E501 + + self._orientation_major = orientation_major diff --git a/services/helper/helper_service/services/api/models/version.py b/services/helper/helper_service/services/api/models/version.py new file mode 100644 index 00000000..79ccbdf9 --- /dev/null +++ b/services/helper/helper_service/services/api/models/version.py @@ -0,0 +1,157 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.custom_operation import CustomOperation +from api.models.resource import Resource +from api import util + +from api.models.custom_operation import CustomOperation # noqa: E501 +from api.models.resource import Resource # noqa: E501 + +class Version(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_version=None, expiry=None, resources=None, cust_operations=None): # noqa: E501 + """Version - a model defined in OpenAPI + + :param api_version: The api_version of this Version. # noqa: E501 + :type api_version: str + :param expiry: The expiry of this Version. # noqa: E501 + :type expiry: datetime + :param resources: The resources of this Version. # noqa: E501 + :type resources: List[Resource] + :param cust_operations: The cust_operations of this Version. # noqa: E501 + :type cust_operations: List[CustomOperation] + """ + self.openapi_types = { + 'api_version': str, + 'expiry': datetime, + 'resources': List[Resource], + 'cust_operations': List[CustomOperation] + } + + self.attribute_map = { + 'api_version': 'apiVersion', + 'expiry': 'expiry', + 'resources': 'resources', + 'cust_operations': 'custOperations' + } + + self._api_version = api_version + self._expiry = expiry + self._resources = resources + self._cust_operations = cust_operations + + @classmethod + def from_dict(cls, dikt) -> 'Version': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Version of this Version. # noqa: E501 + :rtype: Version + """ + return util.deserialize_model(dikt, cls) + + @property + def api_version(self) -> str: + """Gets the api_version of this Version. + + API major version in URI (e.g. v1) # noqa: E501 + + :return: The api_version of this Version. + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version: str): + """Sets the api_version of this Version. + + API major version in URI (e.g. v1) # noqa: E501 + + :param api_version: The api_version of this Version. + :type api_version: str + """ + if api_version is None: + raise ValueError("Invalid value for `api_version`, must not be `None`") # noqa: E501 + + self._api_version = api_version + + @property + def expiry(self) -> datetime: + """Gets the expiry of this Version. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :return: The expiry of this Version. + :rtype: datetime + """ + return self._expiry + + @expiry.setter + def expiry(self, expiry: datetime): + """Sets the expiry of this Version. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :param expiry: The expiry of this Version. + :type expiry: datetime + """ + + self._expiry = expiry + + @property + def resources(self) -> List[Resource]: + """Gets the resources of this Version. + + Resources supported by the API. # noqa: E501 + + :return: The resources of this Version. + :rtype: List[Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources: List[Resource]): + """Sets the resources of this Version. + + Resources supported by the API. # noqa: E501 + + :param resources: The resources of this Version. + :type resources: List[Resource] + """ + if resources is not None and len(resources) < 1: + raise ValueError("Invalid value for `resources`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._resources = resources + + @property + def cust_operations(self) -> List[CustomOperation]: + """Gets the cust_operations of this Version. + + Custom operations without resource association. # noqa: E501 + + :return: The cust_operations of this Version. + :rtype: List[CustomOperation] + """ + return self._cust_operations + + @cust_operations.setter + def cust_operations(self, cust_operations: List[CustomOperation]): + """Sets the cust_operations of this Version. + + Custom operations without resource association. # noqa: E501 + + :param cust_operations: The cust_operations of this Version. + :type cust_operations: List[CustomOperation] + """ + if cust_operations is not None and len(cust_operations) < 1: + raise ValueError("Invalid value for `cust_operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._cust_operations = cust_operations diff --git a/services/helper/helper_service/services/api/models/websock_notif_config.py b/services/helper/helper_service/services/api/models/websock_notif_config.py new file mode 100644 index 00000000..3c05d398 --- /dev/null +++ b/services/helper/helper_service/services/api/models/websock_notif_config.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class WebsockNotifConfig(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, websocket_uri=None, request_websocket_uri=None): # noqa: E501 + """WebsockNotifConfig - a model defined in OpenAPI + + :param websocket_uri: The websocket_uri of this WebsockNotifConfig. # noqa: E501 + :type websocket_uri: str + :param request_websocket_uri: The request_websocket_uri of this WebsockNotifConfig. # noqa: E501 + :type request_websocket_uri: bool + """ + self.openapi_types = { + 'websocket_uri': str, + 'request_websocket_uri': bool + } + + self.attribute_map = { + 'websocket_uri': 'websocketUri', + 'request_websocket_uri': 'requestWebsocketUri' + } + + self._websocket_uri = websocket_uri + self._request_websocket_uri = request_websocket_uri + + @classmethod + def from_dict(cls, dikt) -> 'WebsockNotifConfig': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The WebsockNotifConfig of this WebsockNotifConfig. # noqa: E501 + :rtype: WebsockNotifConfig + """ + return util.deserialize_model(dikt, cls) + + @property + def websocket_uri(self) -> str: + """Gets the websocket_uri of this WebsockNotifConfig. + + string formatted according to IETF RFC 3986 identifying a referenced resource. # noqa: E501 + + :return: The websocket_uri of this WebsockNotifConfig. + :rtype: str + """ + return self._websocket_uri + + @websocket_uri.setter + def websocket_uri(self, websocket_uri: str): + """Sets the websocket_uri of this WebsockNotifConfig. + + string formatted according to IETF RFC 3986 identifying a referenced resource. # noqa: E501 + + :param websocket_uri: The websocket_uri of this WebsockNotifConfig. + :type websocket_uri: str + """ + + self._websocket_uri = websocket_uri + + @property + def request_websocket_uri(self) -> bool: + """Gets the request_websocket_uri of this WebsockNotifConfig. + + Set by the SCS/AS to indicate that the Websocket delivery is requested. # noqa: E501 + + :return: The request_websocket_uri of this WebsockNotifConfig. + :rtype: bool + """ + return self._request_websocket_uri + + @request_websocket_uri.setter + def request_websocket_uri(self, request_websocket_uri: bool): + """Sets the request_websocket_uri of this WebsockNotifConfig. + + Set by the SCS/AS to indicate that the Websocket delivery is requested. # noqa: E501 + + :param request_websocket_uri: The request_websocket_uri of this WebsockNotifConfig. + :type request_websocket_uri: bool + """ + + self._request_websocket_uri = request_websocket_uri diff --git a/services/helper/helper_service/services/api/openapi/openapi.yaml b/services/helper/helper_service/services/api/openapi/openapi.yaml new file mode 100644 index 00000000..334e6962 --- /dev/null +++ b/services/helper/helper_service/services/api/openapi/openapi.yaml @@ -0,0 +1,5494 @@ +openapi: 3.0.1 +info: + description: | + CAPIF Helper API for browsing CAPIF runtime data: invokers, providers, services, + security bindings, and subscriptions/events. This is an internal helper interface. + title: Helper API + version: 1.0.0 +servers: +- url: "{apiRoot}/api" + variables: + apiRoot: + default: http://localhost:8080 + description: Base URL of the Helper service. +paths: + /deleteEntities/{uuid}: + delete: + description: "Deletes all CAPIF entities (invokers, providers, services, security\ + \ contexts, events) associated with the given UUID." + operationId: helper_controller_delete_entities + parameters: + - description: UUID of the user whose entities are to be deleted. + explode: false + in: path + name: uuid + required: true + schema: + type: string + style: simple + responses: + "200": + description: Entities deleted successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Delete entities by UUID + x-openapi-router-controller: api.controllers.default_controller + /getEvents: + get: + description: Returns CAPIF event subscriptions or delivered events. + operationId: helper_controller_get_events + parameters: + - description: Filter by subscriber identifier. + explode: true + in: query + name: subscriber_id + required: false + schema: + type: string + style: form + - description: Filter by subscription identifier. + explode: true + in: query + name: subscription_id + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseEvent' + description: Paged list of events. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve CAPIF events + x-openapi-router-controller: api.controllers.default_controller + /getInvokers: + get: + description: Returns invoker entries with pagination and optional filters. + operationId: helper_controller_get_invokers + parameters: + - description: Filter by invoker UUID. + explode: true + in: query + name: uuid + required: false + schema: + type: string + style: form + - description: Filter by CAPIF `apiInvokerId`. + explode: true + in: query + name: api_invoker_id + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - description: Sort direction. + explode: true + in: query + name: sort_order + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseInvoker' + description: Paged list of invokers. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve API invokers + x-openapi-router-controller: api.controllers.default_controller + /getProviders: + get: + description: Returns provider domains (CAPIF provider domains / AEF providers) + with pagination. + operationId: helper_controller_get_providers + parameters: + - description: Filter by provider UUID. + explode: true + in: query + name: uuid + required: false + schema: + type: string + style: form + - description: Filter by provider domain ID. + explode: true + in: query + name: api_prov_dom_id + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - description: Sort direction. + explode: true + in: query + name: sort_order + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseProvider' + description: Paged list of providers. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve providers + x-openapi-router-controller: api.controllers.default_controller + /getSecurity: + get: + description: Returns security credentials/bindings for a given invoker. + operationId: helper_controller_get_security + parameters: + - description: Filter by invoker identifier. + explode: true + in: query + name: invoker_id + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseSecurity' + description: Paged list of security entries. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve security associations + x-openapi-router-controller: api.controllers.default_controller + /getServices: + get: + description: Returns published APIs/services exposed by providers. + operationId: helper_controller_get_services + parameters: + - description: Filter by service identifier. + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form + - description: Filter by APF identifier. + explode: true + in: query + name: apf_id + required: false + schema: + type: string + style: form + - description: Filter by API name. + explode: true + in: query + name: api_name + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - description: Sort direction. + explode: true + in: query + name: sort_order + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseService' + description: Paged list of services. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve services + x-openapi-router-controller: api.controllers.default_controller +components: + responses: + BadRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + InternalError: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + GenericError: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + schemas: + ErrorResponse: + description: Generic error payload. + example: + details: details + message: message + properties: + message: + title: message + type: string + details: + title: details + type: string + title: ErrorResponse + type: object + PaginatedResponseBase: + description: Common pagination envelope. + properties: + total: + description: Total number of resources in CAPIF. + example: 42 + title: total + type: integer + long: + description: Total number of resources that match the given parameters + example: 0 + title: long + type: integer + totalPages: + description: Total number of pages given page size. + example: 20 + title: totalPages + type: integer + sort_order: + description: Sorting by creation date of the resources (ascending or descending). + enum: + - asc + - desc + example: asc + title: sort_order + type: string + title: PaginatedResponseBase + type: object + PaginatedResponseInvoker: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + invokers: + description: CAPIF invokers list + items: + $ref: '#/components/schemas/APIInvokerEnrolmentDetails' + type: array + type: object + example: + total: 42 + totalPages: 20 + invokers: + - notificationDestination: notificationDestination + supportedFeatures: supportedFeatures + apiInvokerId: apiInvokerId + apiInvokerInformation: apiInvokerInformation + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + onboardingInformation: + apiInvokerPublicKey: apiInvokerPublicKey + onboardingSecret: onboardingSecret + apiInvokerCertificate: apiInvokerCertificate + onboarding_date: 2000-01-23T04:56:07.000+00:00 + requestTestNotification: true + username: username + apiList: + serviceAPIDescriptions: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - notificationDestination: notificationDestination + supportedFeatures: supportedFeatures + apiInvokerId: apiInvokerId + apiInvokerInformation: apiInvokerInformation + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + onboardingInformation: + apiInvokerPublicKey: apiInvokerPublicKey + onboardingSecret: onboardingSecret + apiInvokerCertificate: apiInvokerCertificate + onboarding_date: 2000-01-23T04:56:07.000+00:00 + requestTestNotification: true + username: username + apiList: + serviceAPIDescriptions: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + sort_order: asc + long: 0 + title: PaginatedResponseInvoker + PaginatedResponseProvider: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + providers: + description: CAPIF providers list + items: + $ref: '#/components/schemas/APIProviderEnrolmentDetails' + type: array + type: object + example: + total: 42 + totalPages: 20 + sort_order: asc + long: 0 + providers: + - regSec: regSec + apiProvFuncs: + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + failReason: failReason + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + apiProvDomId: apiProvDomId + apiProvDomInfo: apiProvDomInfo + onboarding_date: 2000-01-23T04:56:07.000+00:00 + suppFeat: suppFeat + username: username + - regSec: regSec + apiProvFuncs: + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + failReason: failReason + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + apiProvDomId: apiProvDomId + apiProvDomInfo: apiProvDomInfo + onboarding_date: 2000-01-23T04:56:07.000+00:00 + suppFeat: suppFeat + username: username + title: PaginatedResponseProvider + PaginatedResponseService: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + services: + description: CAPIF services list. + items: + $ref: '#/components/schemas/ServiceAPIDescription' + type: array + type: object + example: + total: 42 + totalPages: 20 + services: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + sort_order: asc + long: 0 + title: PaginatedResponseService + PaginatedResponseSecurity: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + security: + description: CAPIF security context list. + items: + $ref: '#/components/schemas/ServiceSecurity' + type: array + type: object + example: + total: 42 + security: + - notificationDestination: notificationDestination + api_invoker_id: api_invoker_id + supportedFeatures: supportedFeatures + securityInfo: + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + requestTestNotification: true + - notificationDestination: notificationDestination + api_invoker_id: api_invoker_id + supportedFeatures: supportedFeatures + securityInfo: + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + requestTestNotification: true + totalPages: 20 + sort_order: asc + long: 0 + title: PaginatedResponseSecurity + PaginatedResponseEvent: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + events: + description: CAPIF events list. + items: + $ref: '#/components/schemas/EventSubscription' + type: array + type: object + example: + total: 42 + totalPages: 20 + sort_order: asc + long: 0 + events: + - notificationDestination: notificationDestination + eventFilters: + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + supportedFeatures: supportedFeatures + eventReq: + notifMethod: PERIODIC + partitionCriteria: + - TAC + - TAC + grpRepTime: 5 + notifFlag: ACTIVATE + monDur: 2000-01-23T04:56:07.000+00:00 + immRep: true + maxReportNbr: 0 + repPeriod: 6 + sampRatio: 15 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + events: + - SERVICE_API_AVAILABLE + - SERVICE_API_AVAILABLE + requestTestNotification: true + - notificationDestination: notificationDestination + eventFilters: + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + supportedFeatures: supportedFeatures + eventReq: + notifMethod: PERIODIC + partitionCriteria: + - TAC + - TAC + grpRepTime: 5 + notifFlag: ACTIVATE + monDur: 2000-01-23T04:56:07.000+00:00 + immRep: true + maxReportNbr: 0 + repPeriod: 6 + sampRatio: 15 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + events: + - SERVICE_API_AVAILABLE + - SERVICE_API_AVAILABLE + requestTestNotification: true + title: PaginatedResponseEvent + APIInvokerEnrolmentDetails: + description: Information about the API Invoker that requested to onboard + example: + notificationDestination: notificationDestination + supportedFeatures: supportedFeatures + apiInvokerId: apiInvokerId + apiInvokerInformation: apiInvokerInformation + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + onboardingInformation: + apiInvokerPublicKey: apiInvokerPublicKey + onboardingSecret: onboardingSecret + apiInvokerCertificate: apiInvokerCertificate + onboarding_date: 2000-01-23T04:56:07.000+00:00 + requestTestNotification: true + username: username + apiList: + serviceAPIDescriptions: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + properties: + onboarding_date: + description: Invoker onboarding date + format: date-time + title: onboarding_date + type: string + username: + description: User who registered the invoker + title: username + type: string + uuid: + description: uuid of the user who registered the invoker + format: uuid + title: uuid + type: string + apiInvokerId: + description: | + API invoker ID assigned by the CAPIF core function to the API invoker while on-boarding the API invoker. Shall not be present in the HTTP POST request from the API invoker to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. + readOnly: true + title: apiInvokerId + type: string + onboardingInformation: + $ref: '#/components/schemas/OnboardingInformation' + notificationDestination: + description: string providing an URI formatted according to IETF RFC 3986. + title: Uri + type: string + requestTestNotification: + description: | + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + title: requestTestNotification + type: boolean + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + apiList: + $ref: '#/components/schemas/APIList' + apiInvokerInformation: + description: | + Generic information related to the API invoker such as details of the device or the application. + title: apiInvokerInformation + type: string + supportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + required: + - notificationDestination + - onboardingInformation + title: APIInvokerEnrolmentDetails + type: object + APIProviderEnrolmentDetails: + description: Represents an API provider domain's enrolment details. + example: + regSec: regSec + apiProvFuncs: + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + failReason: failReason + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + apiProvDomId: apiProvDomId + apiProvDomInfo: apiProvDomInfo + onboarding_date: 2000-01-23T04:56:07.000+00:00 + suppFeat: suppFeat + username: username + properties: + onboarding_date: + description: Provider onboarding date + format: date-time + title: onboarding_date + type: string + username: + description: User who registered the provider + title: username + type: string + uuid: + description: uuid of the user who registered the provider + format: uuid + title: uuid + type: string + apiProvDomId: + description: | + API provider domain ID assigned by the CAPIF core function to the API management function while registering the API provider domain. Shall not be present in the HTTP POST request from the API Management function to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. + readOnly: true + title: apiProvDomId + type: string + regSec: + description: | + Security information necessary for the CAPIF core function to validate the registration of the API provider domain. Shall be present in HTTP POST request from API management function to CAPIF core function for API provider domain registration. + title: regSec + type: string + apiProvFuncs: + description: | + A list of individual API provider domain functions details. When included by the API management function in the HTTP request message, it lists the API provider domain functions that the API management function intends to register/update in registration or update registration procedure. When included by the CAPIF core function in the HTTP response message, it lists the API domain functions details that are registered or updated successfully. + items: + $ref: '#/components/schemas/APIProviderFunctionDetails' + minItems: 1 + title: apiProvFuncs + type: array + apiProvDomInfo: + description: | + Generic information related to the API provider domain such as details of the API provider applications. + title: apiProvDomInfo + type: string + suppFeat: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + failReason: + description: | + Registration or update specific failure information of failed API provider domain function registrations.Shall be present in the HTTP response body if atleast one of the API provider domain function registration or update registration fails. + title: failReason + type: string + required: + - regSec + title: APIProviderEnrolmentDetails + type: object + ServiceSecurity: + description: | + Represents the details of the security method for each service API interface. When included by the API invoker, it indicates the preferred method of security. When included by the CAPIF core function, it indicates the security method to be used for the service API interface. + example: + notificationDestination: notificationDestination + api_invoker_id: api_invoker_id + supportedFeatures: supportedFeatures + securityInfo: + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + requestTestNotification: true + properties: + api_invoker_id: + description: Id of the invoker of this security context. + title: api_invoker_id + type: string + securityInfo: + items: + $ref: '#/components/schemas/SecurityInformation' + minimum: 1 + title: securityInfo + type: array + notificationDestination: + description: string providing an URI formatted according to IETF RFC 3986. + title: Uri + type: string + requestTestNotification: + description: | + Set to true by API invoker to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + title: requestTestNotification + type: boolean + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + supportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + required: + - notificationDestination + - securityInfo + title: ServiceSecurity + type: object + SecurityInformation: + description: Represents the interface details and the security method. + example: + selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + nullable: true + oneOf: [] + properties: + interfaceDetails: + $ref: '#/components/schemas/InterfaceDescription' + aefId: + description: Identifier of the API exposing function + title: aefId + type: string + apiId: + description: API identifier + title: apiId + type: string + prefSecurityMethods: + description: Security methods preferred by the API invoker for the API interface. + items: + $ref: '#/components/schemas/SecurityMethod' + minItems: 1 + title: prefSecurityMethods + type: array + selSecurityMethod: + $ref: '#/components/schemas/SecurityMethod' + authenticationInfo: + description: Authentication related information + title: authenticationInfo + type: string + authorizationInfo: + description: Authorization related information + title: authorizationInfo + type: string + required: + - prefSecurityMethods + title: SecurityInformation + type: object + EventSubscription: + description: Represents an individual CAPIF Event Subscription resource. + example: + notificationDestination: notificationDestination + eventFilters: + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + supportedFeatures: supportedFeatures + eventReq: + notifMethod: PERIODIC + partitionCriteria: + - TAC + - TAC + grpRepTime: 5 + notifFlag: ACTIVATE + monDur: 2000-01-23T04:56:07.000+00:00 + immRep: true + maxReportNbr: 0 + repPeriod: 6 + sampRatio: 15 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + events: + - SERVICE_API_AVAILABLE + - SERVICE_API_AVAILABLE + requestTestNotification: true + properties: + events: + description: Subscribed events + items: + $ref: '#/components/schemas/CAPIFEvent' + minItems: 1 + title: events + type: array + eventFilters: + description: Subscribed event filters + items: + $ref: '#/components/schemas/CAPIFEventFilter' + minItems: 1 + title: eventFilters + type: array + eventReq: + $ref: '#/components/schemas/ReportingInformation' + notificationDestination: + description: string providing an URI formatted according to IETF RFC 3986. + title: Uri + type: string + requestTestNotification: + description: | + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + title: requestTestNotification + type: boolean + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + supportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + required: + - events + - notificationDestination + title: EventSubscription + type: object + OnboardingInformation: + description: Represents on-boarding information of the API invoker. + example: + apiInvokerPublicKey: apiInvokerPublicKey + onboardingSecret: onboardingSecret + apiInvokerCertificate: apiInvokerCertificate + properties: + apiInvokerPublicKey: + description: The API Invoker's public key + title: apiInvokerPublicKey + type: string + apiInvokerCertificate: + description: | + The API Invoker's generic client certificate, provided by the CAPIF core function. + title: apiInvokerCertificate + type: string + onboardingSecret: + description: | + The API Invoker's onboarding secret, provided by the CAPIF core function. + title: onboardingSecret + type: string + required: + - apiInvokerPublicKey + title: OnboardingInformation + type: object + APIProviderFunctionDetails: + description: Represents API provider domain function's details. + example: + apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + properties: + apiProvFuncId: + description: | + API provider domain functionID assigned by the CAPIF core function to the API provider domain function while registering/updating the API provider domain. Shall not be present in the HTTP POST request from the API management function to the CAPIF core function, to register itself. Shall be present in all other HTTP requests and responses. + title: apiProvFuncId + type: string + regInfo: + $ref: '#/components/schemas/RegistrationInformation' + apiProvFuncRole: + $ref: '#/components/schemas/ApiProviderFuncRole' + apiProvFuncInfo: + description: | + Generic information related to the API provider domain function such as details of the API provider applications. + title: apiProvFuncInfo + type: string + required: + - apiProvFuncRole + - regInfo + title: APIProviderFunctionDetails + type: object + ApiProviderFuncRole: + anyOf: + - enum: + - AEF + - APF + - AMF + type: string + - description: | + This string provides forward-compatiblity with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - AEF: API provider function is API Exposing Function. + - APF: API provider function is API Publishing Function. + - AMF: API Provider function is API Management Function. + title: ApiProviderFuncRole + RegistrationInformation: + description: | + Represents registration information of an individual API provider domain function. + example: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + properties: + apiProvPubKey: + description: Public Key of API Provider domain function. + title: apiProvPubKey + type: string + apiProvCert: + description: API provider domain function's client certificate + title: apiProvCert + type: string + required: + - apiProvPubKey + title: RegistrationInformation + type: object + APIList: + description: Represents a list of APIs. + example: + serviceAPIDescriptions: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + properties: + serviceAPIDescriptions: + description: The list of service APIs that the API Invoker is allowed to + invoke. + items: + $ref: '#/components/schemas/ServiceAPIDescription' + minItems: 1 + title: serviceAPIDescriptions + type: array + title: APIList + type: object + Uri: + description: string providing an URI formatted according to IETF RFC 3986. + title: Uri + type: string + WebsockNotifConfig: + description: Represents the configuration information for the delivery of notifications + over Websockets. + example: + requestWebsocketUri: true + websocketUri: websocketUri + properties: + websocketUri: + description: string formatted according to IETF RFC 3986 identifying a referenced + resource. + title: Link + type: string + requestWebsocketUri: + description: Set by the SCS/AS to indicate that the Websocket delivery is + requested. + title: requestWebsocketUri + type: boolean + title: WebsockNotifConfig + type: object + Link: + description: string formatted according to IETF RFC 3986 identifying a referenced + resource. + title: Link + type: string + SupportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + ServiceAPIDescription: + description: Represents the description of a service API as published by the + APF. + example: + serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + properties: + apiName: + description: "API name, it is set as {apiName} part of the URI structure\ + \ as defined in clause 5.2.4 of 3GPP TS 29.122." + title: apiName + type: string + apiId: + description: | + API identifier assigned by the CAPIF core function to the published service API. Shall not be present in the HTTP POST request from the API publishing function to the CAPIF core function. Shall be present in the HTTP POST response from the CAPIF core function to the API publishing function and in the HTTP GET response from the CAPIF core function to the API invoker (discovery API). + title: apiId + type: string + aefProfiles: + description: | + AEF profile information, which includes the exposed API details (e.g. protocol). + items: + $ref: '#/components/schemas/AefProfile' + minItems: 1 + title: aefProfiles + type: array + description: + description: Text description of the API + title: description + type: string + supportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + shareableInfo: + $ref: '#/components/schemas/ShareableInformation' + serviceAPICategory: + title: serviceAPICategory + type: string + apiSuppFeats: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + pubApiPath: + $ref: '#/components/schemas/PublishedApiPath' + ccfId: + description: CAPIF core function identifier. + title: ccfId + type: string + required: + - apiName + title: ServiceAPIDescription + type: object + AefProfile: + description: Represents the AEF profile data. + example: + protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + nullable: true + oneOf: [] + properties: + aefId: + description: Identifier of the API exposing function + title: aefId + type: string + versions: + description: API version + items: + $ref: '#/components/schemas/Version' + minItems: 1 + title: versions + type: array + protocol: + $ref: '#/components/schemas/Protocol' + dataFormat: + $ref: '#/components/schemas/DataFormat' + securityMethods: + description: Security methods supported by the AEF + items: + $ref: '#/components/schemas/SecurityMethod' + minItems: 1 + title: securityMethods + type: array + domainName: + description: Domain to which API belongs to + title: domainName + type: string + interfaceDescriptions: + description: Interface details + items: + $ref: '#/components/schemas/InterfaceDescription' + minItems: 1 + title: interfaceDescriptions + type: array + aefLocation: + $ref: '#/components/schemas/AefLocation' + required: + - aefId + - versions + title: AefProfile + type: object + ShareableInformation: + description: | + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domains. + example: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + properties: + isShareable: + description: | + Set to "true" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to "false". + title: isShareable + type: boolean + capifProvDoms: + description: | + List of CAPIF provider domains to which the service API information to be shared. + items: + type: string + minItems: 1 + title: capifProvDoms + type: array + required: + - isShareable + title: ShareableInformation + type: object + PublishedApiPath: + description: Represents the published API path within the same CAPIF provider + domain. + example: + ccfIds: + - ccfIds + - ccfIds + properties: + ccfIds: + description: A list of CCF identifiers where the service API is already + published. + items: + type: string + minItems: 1 + title: ccfIds + type: array + title: PublishedApiPath + type: object + Version: + description: Represents the API version information. + example: + apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + properties: + apiVersion: + description: API major version in URI (e.g. v1) + title: apiVersion + type: string + expiry: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime + type: string + resources: + description: Resources supported by the API. + items: + $ref: '#/components/schemas/Resource' + minItems: 1 + title: resources + type: array + custOperations: + description: Custom operations without resource association. + items: + $ref: '#/components/schemas/CustomOperation' + minItems: 1 + title: custOperations + type: array + required: + - apiVersion + title: Version + type: object + Protocol: + anyOf: + - enum: + - HTTP_1_1 + - HTTP_2 + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - HTTP_1_1: HTTP version 1.1 + - HTTP_2: HTTP version 2 + title: Protocol + DataFormat: + anyOf: + - enum: + - JSON + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - JSON: JavaScript Object Notation + title: DataFormat + SecurityMethod: + anyOf: + - enum: + - PSK + - PKI + - OAUTH + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - PSK: Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122 + - PKI: Security method 2 (Using PKI) as described in 3GPP TS 33.122 + - OAUTH: Security method 3 (TLS with OAuth token) as described in 3GPP TS 33.122 + title: SecurityMethod + Resource: + description: Represents the API resource data. + example: + operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + properties: + resourceName: + description: Resource name + title: resourceName + type: string + commType: + $ref: '#/components/schemas/CommunicationType' + uri: + description: | + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + title: uri + type: string + custOpName: + description: | + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. + title: custOpName + type: string + operations: + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + minItems: 1 + title: operations + type: array + description: + description: Text description of the API resource + title: description + type: string + required: + - commType + - resourceName + - uri + title: Resource + type: object + CustomOperation: + description: Represents the description of a custom operation. + example: + operations: + - null + - null + commType: null + description: description + custOpName: custOpName + properties: + commType: + $ref: '#/components/schemas/CommunicationType' + custOpName: + description: | + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. + title: custOpName + type: string + operations: + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + minItems: 1 + title: operations + type: array + description: + description: Text description of the custom operation + title: description + type: string + required: + - commType + - custOpName + title: CustomOperation + type: object + CommunicationType: + anyOf: + - enum: + - REQUEST_RESPONSE + - SUBSCRIBE_NOTIFY + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - REQUEST_RESPONSE: The communication is of the type request-response + - SUBSCRIBE_NOTIFY: The communication is of the type subscribe-notify + title: CommunicationType + Operation: + anyOf: + - enum: + - GET + - POST + - PUT + - PATCH + - DELETE + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - GET: HTTP GET method + - POST: HTTP POST method + - PUT: HTTP PUT method + - PATCH: HTTP PATCH method + - DELETE: HTTP DELETE method + title: Operation + InterfaceDescription: + description: Represents the description of an API's interface. + example: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + nullable: true + oneOf: [] + properties: + ipv4Addr: + description: string identifying a Ipv4 address formatted in the "dotted + decimal" notation as defined in IETF RFC 1166. + title: Ipv4Addr + type: string + ipv6Addr: + description: string identifying a Ipv6 address formatted according to clause + 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 + of IETF RFC 5952 shall not be used. + title: Ipv6Addr + type: string + port: + description: Unsigned integer with valid values between 0 and 65535. + maximum: 65535 + minimum: 0 + title: Port + type: integer + securityMethods: + description: | + Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. + items: + $ref: '#/components/schemas/SecurityMethod' + minItems: 1 + title: securityMethods + type: array + title: InterfaceDescription + type: object + Ipv4Addr: + description: string identifying a Ipv4 address formatted in the "dotted decimal" + notation as defined in IETF RFC 1166. + title: Ipv4Addr + type: string + Ipv6Addr: + description: string identifying a Ipv6 address formatted according to clause + 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of + IETF RFC 5952 shall not be used. + title: Ipv6Addr + type: string + Port: + description: Unsigned integer with valid values between 0 and 65535. + maximum: 65535 + minimum: 0 + title: Port + type: integer + AefLocation: + description: | + The location information (e.g. civic address, GPS coordinates, data center ID) where the AEF providing the service API is located. + example: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + properties: + civicAddr: + $ref: '#/components/schemas/CivicAddress' + geoArea: + $ref: '#/components/schemas/GeographicArea' + dcId: + description: | + Identifies the data center where the AEF providing the service API is located. + title: dcId + type: string + title: AefLocation + type: object + DateTime: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime + type: string + CivicAddress: + description: Indicates a Civic address. + example: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + properties: + country: + title: country + type: string + A1: + title: A1 + type: string + A2: + title: A2 + type: string + A3: + title: A3 + type: string + A4: + title: A4 + type: string + A5: + title: A5 + type: string + A6: + title: A6 + type: string + PRD: + title: PRD + type: string + POD: + title: POD + type: string + STS: + title: STS + type: string + HNO: + title: HNO + type: string + HNS: + title: HNS + type: string + LMK: + title: LMK + type: string + LOC: + title: LOC + type: string + NAM: + title: NAM + type: string + PC: + title: PC + type: string + BLD: + title: BLD + type: string + UNIT: + title: UNIT + type: string + FLR: + title: FLR + type: string + ROOM: + title: ROOM + type: string + PLC: + title: PLC + type: string + PCN: + title: PCN + type: string + POBOX: + title: POBOX + type: string + ADDCODE: + title: ADDCODE + type: string + SEAT: + title: SEAT + type: string + RD: + title: RD + type: string + RDSEC: + title: RDSEC + type: string + RDBR: + title: RDBR + type: string + RDSUBBR: + title: RDSUBBR + type: string + PRM: + title: PRM + type: string + POM: + title: POM + type: string + usageRules: + title: usageRules + type: string + method: + title: method + type: string + providedBy: + title: providedBy + type: string + title: CivicAddress + type: object + GeographicArea: + anyOf: + - $ref: '#/components/schemas/Point' + - $ref: '#/components/schemas/PointUncertaintyCircle' + - $ref: '#/components/schemas/PointUncertaintyEllipse' + - $ref: '#/components/schemas/Polygon' + - $ref: '#/components/schemas/PointAltitude' + - $ref: '#/components/schemas/PointAltitudeUncertainty' + - $ref: '#/components/schemas/EllipsoidArc' + description: Geographic area specified by different shape. + title: GeographicArea + Point: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + required: + - point + type: object + description: Ellipsoid Point. + example: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + title: Point + GADShape: + description: Common base type for GAD shapes. + discriminator: + mapping: + POINT: '#/components/schemas/Point' + POINT_UNCERTAINTY_CIRCLE: '#/components/schemas/PointUncertaintyCircle' + POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/PointUncertaintyEllipse' + POLYGON: '#/components/schemas/Polygon' + POINT_ALTITUDE: '#/components/schemas/PointAltitude' + POINT_ALTITUDE_UNCERTAINTY: '#/components/schemas/PointAltitudeUncertainty' + ELLIPSOID_ARC: '#/components/schemas/EllipsoidArc' + LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/Local2dPointUncertaintyEllipse' + LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID: '#/components/schemas/Local3dPointUncertaintyEllipsoid' + propertyName: shape + properties: + shape: + $ref: '#/components/schemas/SupportedGADShapes' + required: + - shape + title: GADShape + type: object + GeographicalCoordinates: + description: Geographical coordinates. + example: + lon: 36.988422590534526 + lat: -63.615366350946985 + properties: + lon: + format: double + maximum: 180 + minimum: -180 + title: lon + type: number + lat: + format: double + maximum: 90 + minimum: -90 + title: lat + type: number + required: + - lat + - lon + title: GeographicalCoordinates + type: object + SupportedGADShapes: + anyOf: + - enum: + - POINT + - POINT_UNCERTAINTY_CIRCLE + - POINT_UNCERTAINTY_ELLIPSE + - POLYGON + - POINT_ALTITUDE + - POINT_ALTITUDE_UNCERTAINTY + - ELLIPSOID_ARC + - LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE + - LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID + type: string + - type: string + description: Indicates supported GAD shapes. + title: SupportedGADShapes + PointUncertaintyCircle: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertainty: + $ref: '#/components/schemas/Uncertainty' + required: + - point + - uncertainty + type: object + description: Ellipsoid point with uncertainty circle. + title: PointUncertaintyCircle + Uncertainty: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + PointUncertaintyEllipse: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + confidence: + $ref: '#/components/schemas/Confidence' + required: + - confidence + - point + - uncertaintyEllipse + type: object + description: Ellipsoid point with uncertainty ellipse. + title: PointUncertaintyEllipse + UncertaintyEllipse: + description: Ellipse with uncertainty. + properties: + semiMajor: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + semiMinor: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + orientationMajor: + description: Indicates value of orientation angle. + maximum: 180 + minimum: 0 + title: Orientation + type: integer + required: + - orientationMajor + - semiMajor + - semiMinor + title: UncertaintyEllipse + type: object + Confidence: + description: Indicates value of confidence. + maximum: 100 + minimum: 0 + type: integer + Orientation: + description: Indicates value of orientation angle. + maximum: 180 + minimum: 0 + title: Orientation + type: integer + Polygon: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + pointList: + $ref: '#/components/schemas/PointList' + required: + - pointList + type: object + description: Polygon. + title: Polygon + PointList: + description: List of points. + items: + $ref: '#/components/schemas/GeographicalCoordinates' + maxItems: 15 + minItems: 3 + type: array + PointAltitude: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + required: + - altitude + - point + type: object + description: Ellipsoid point with altitude. + title: PointAltitude + Altitude: + description: Indicates value of altitude. + format: double + maximum: 32767 + minimum: -32767 + type: number + PointAltitudeUncertainty: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + uncertaintyAltitude: + $ref: '#/components/schemas/Uncertainty' + confidence: + $ref: '#/components/schemas/Confidence' + required: + - altitude + - confidence + - point + - uncertaintyAltitude + - uncertaintyEllipse + type: object + description: Ellipsoid point with altitude and uncertainty ellipsoid. + title: PointAltitudeUncertainty + EllipsoidArc: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + innerRadius: + $ref: '#/components/schemas/InnerRadius' + uncertaintyRadius: + $ref: '#/components/schemas/Uncertainty' + offsetAngle: + $ref: '#/components/schemas/Angle' + includedAngle: + $ref: '#/components/schemas/Angle' + confidence: + $ref: '#/components/schemas/Confidence' + required: + - confidence + - includedAngle + - innerRadius + - offsetAngle + - point + - uncertaintyRadius + type: object + description: Ellipsoid Arc. + title: EllipsoidArc + InnerRadius: + description: Indicates value of the inner radius. + format: int32 + maximum: 327675 + minimum: 0 + type: integer + Angle: + description: Indicates value of angle. + maximum: 360 + minimum: 0 + type: integer + CAPIFEvent: + anyOf: + - enum: + - SERVICE_API_AVAILABLE + - SERVICE_API_UNAVAILABLE + - SERVICE_API_UPDATE + - API_INVOKER_ONBOARDED + - API_INVOKER_OFFBOARDED + - SERVICE_API_INVOCATION_SUCCESS + - SERVICE_API_INVOCATION_FAILURE + - ACCESS_CONTROL_POLICY_UPDATE + - ACCESS_CONTROL_POLICY_UNAVAILABLE + - API_INVOKER_AUTHORIZATION_REVOKED + - API_INVOKER_UPDATED + - API_TOPOLOGY_HIDING_CREATED + - API_TOPOLOGY_HIDING_REVOKED + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - SERVICE_API_AVAILABLE: Events related to the availability of service APIs after the service APIs are published. + - SERVICE_API_UNAVAILABLE: Events related to the unavailability of service APIs after the service APIs are unpublished. + - SERVICE_API_UPDATE: Events related to change in service API information. + - API_INVOKER_ONBOARDED: Events related to API invoker onboarded to CAPIF. + - API_INVOKER_OFFBOARDED: Events related to API invoker offboarded from CAPIF. + - SERVICE_API_INVOCATION_SUCCESS: Events related to the successful invocation of service APIs. + - SERVICE_API_INVOCATION_FAILURE: Events related to the failed invocation of service APIs. + - ACCESS_CONTROL_POLICY_UPDATE: Events related to the update for the access control policy related to the service APIs. + - ACCESS_CONTROL_POLICY_UNAVAILABLE: Events related to the unavailability of the access control policy related to the service APIs. + - API_INVOKER_AUTHORIZATION_REVOKED: Events related to the revocation of the authorization of API invokers to access the service APIs. + - API_INVOKER_UPDATED: Events related to API invoker profile updated to CAPIF. + - API_TOPOLOGY_HIDING_CREATED: Events related to the creation or update of the API topology hiding information of the service APIs after the service APIs are published. + - API_TOPOLOGY_HIDING_REVOKED: Events related to the revocation of the API topology hiding information of the service APIs after the service APIs are unpublished. + title: CAPIFEvent + CAPIFEventFilter: + description: Represents a CAPIF event filter. + example: + aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + properties: + apiIds: + description: Identifier of the service API + items: + type: string + minItems: 1 + title: apiIds + type: array + apiInvokerIds: + description: Identity of the API invoker + items: + type: string + minItems: 1 + title: apiInvokerIds + type: array + aefIds: + description: Identifier of the API exposing function + items: + type: string + minItems: 1 + title: aefIds + type: array + title: CAPIFEventFilter + type: object + ReportingInformation: + description: Represents the type of reporting that the subscription requires. + example: + notifMethod: PERIODIC + partitionCriteria: + - TAC + - TAC + grpRepTime: 5 + notifFlag: ACTIVATE + monDur: 2000-01-23T04:56:07.000+00:00 + immRep: true + maxReportNbr: 0 + repPeriod: 6 + sampRatio: 15 + properties: + immRep: + title: immRep + type: boolean + notifMethod: + $ref: '#/components/schemas/NotificationMethod' + maxReportNbr: + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are\ + \ permissible." + minimum: 0 + title: Uinteger + type: integer + monDur: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime + type: string + repPeriod: + description: indicating a time in seconds. + title: DurationSec + type: integer + sampRatio: + description: "Unsigned integer indicating Sampling Ratio (see clauses 4.15.1\ + \ of 3GPP TS 23.502), expressed in percent. \n" + maximum: 100 + minimum: 1 + title: SamplingRatio + type: integer + partitionCriteria: + description: Criteria for partitioning the UEs before applying the sampling + ratio. + items: + $ref: '#/components/schemas/PartitioningCriteria' + minItems: 1 + title: partitionCriteria + type: array + grpRepTime: + description: indicating a time in seconds. + title: DurationSec + type: integer + notifFlag: + $ref: '#/components/schemas/NotificationFlag' + title: ReportingInformation + type: object + NotificationMethod: + anyOf: + - enum: + - PERIODIC + - ONE_TIME + - ON_EVENT_DETECTION + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - PERIODIC + - ONE_TIME + - ON_EVENT_DETECTION + title: NotificationMethod + Uinteger: + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are permissible." + minimum: 0 + title: Uinteger + type: integer + DurationSec: + description: indicating a time in seconds. + title: DurationSec + type: integer + SamplingRatio: + description: "Unsigned integer indicating Sampling Ratio (see clauses 4.15.1\ + \ of 3GPP TS 23.502), expressed in percent. \n" + maximum: 100 + minimum: 1 + title: SamplingRatio + type: integer + PartitioningCriteria: + anyOf: + - enum: + - TAC + - SUBPLMN + - GEOAREA + - SNSSAI + - DNN + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - "TAC": Type Allocation Code + - "SUBPLMN": Subscriber PLMN ID + - "GEOAREA": Geographical area, i.e. list(s) of TAI(s) + - "SNSSAI": S-NSSAI + - "DNN": DNN + title: PartitioningCriteria + NotificationFlag: + anyOf: + - enum: + - ACTIVATE + - DEACTIVATE + - RETRIEVAL + type: string + - description: "This string provides forward-compatibility with future extensions\ + \ to the enumeration but is not used to encode content defined in the present\ + \ version of this API. \n" + type: string + description: |- + Possible values are: + - ACTIVATE: The event notification is activated. + - DEACTIVATE: The event notification is deactivated and shall be muted. The available + event(s) shall be stored. + - RETRIEVAL: The event notification shall be sent to the NF service consumer(s), + after that, is muted again. + title: NotificationFlag diff --git a/services/helper/helper_service/services/api/typing_utils.py b/services/helper/helper_service/services/api/typing_utils.py new file mode 100644 index 00000000..74e3c913 --- /dev/null +++ b/services/helper/helper_service/services/api/typing_utils.py @@ -0,0 +1,30 @@ +import sys + +if sys.version_info < (3, 7): + import typing + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return type(klass) == typing.GenericMeta + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__extra__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__extra__ == list + +else: + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return hasattr(klass, '__origin__') + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__origin__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__origin__ == list diff --git a/services/helper/helper_service/services/api/util.py b/services/helper/helper_service/services/api/util.py new file mode 100644 index 00000000..c05d0ed0 --- /dev/null +++ b/services/helper/helper_service/services/api/util.py @@ -0,0 +1,147 @@ +import datetime + +import typing +from api import typing_utils + + +def _deserialize(data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if klass in (int, float, str, bool, bytearray): + return _deserialize_primitive(data, klass) + elif klass == object: + return _deserialize_object(data) + elif klass == datetime.date: + return deserialize_date(data) + elif klass == datetime.datetime: + return deserialize_datetime(data) + elif typing_utils.is_generic(klass): + if typing_utils.is_list(klass): + return _deserialize_list(data, klass.__args__[0]) + if typing_utils.is_dict(klass): + return _deserialize_dict(data, klass.__args__[1]) + else: + return deserialize_model(data, klass) + + +def _deserialize_primitive(data, klass): + """Deserializes to primitive type. + + :param data: data to deserialize. + :param klass: class literal. + + :return: int, long, float, str, bool. + :rtype: int | long | float | str | bool + """ + try: + value = klass(data) + except UnicodeEncodeError: + value = data + except TypeError: + value = data + return value + + +def _deserialize_object(value): + """Return an original value. + + :return: object. + """ + return value + + +def deserialize_date(string): + """Deserializes string to date. + + :param string: str. + :type string: str + :return: date. + :rtype: date + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + + +def deserialize_datetime(string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :type string: str + :return: datetime. + :rtype: datetime + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + + +def deserialize_model(data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :type data: dict | list + :param klass: class literal. + :return: model object. + """ + instance = klass() + + if not instance.openapi_types: + return data + + for attr, attr_type in instance.openapi_types.items(): + if data is not None \ + and instance.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): + value = data[instance.attribute_map[attr]] + setattr(instance, attr, _deserialize(value, attr_type)) + + return instance + + +def _deserialize_list(data, boxed_type): + """Deserializes a list and its elements. + + :param data: list to deserialize. + :type data: list + :param boxed_type: class literal. + + :return: deserialized list. + :rtype: list + """ + return [_deserialize(sub_data, boxed_type) + for sub_data in data] + + +def _deserialize_dict(data, boxed_type): + """Deserializes a dict and its elements. + + :param data: dict to deserialize. + :type data: dict + :param boxed_type: class literal. + + :return: deserialized dict. + :rtype: dict + """ + return {k: _deserialize(v, boxed_type) + for k, v in data.items() } diff --git a/services/helper/helper_service/services/configuration/__init__.py b/services/helper/helper_service/services/configuration/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/services/helper/helper_service/services/configuration/__main__.py b/services/helper/helper_service/services/configuration/__main__.py new file mode 100644 index 00000000..30956708 --- /dev/null +++ b/services/helper/helper_service/services/configuration/__main__.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import connexion + +from configuration import encoder + + +def main(): + app = connexion.App(__name__, specification_dir='./openapi/') + app.app.json_encoder = encoder.JSONEncoder + app.add_api('openapi.yaml', + arguments={'title': 'Helper Configuration API'}, + pythonic_params=True) + + app.run(port=8080) + + +if __name__ == '__main__': + main() diff --git a/services/helper/helper_service/services/configuration/controllers/__init__.py b/services/helper/helper_service/services/configuration/controllers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/services/helper/helper_service/services/configuration/controllers/default_controller.py b/services/helper/helper_service/services/configuration/controllers/default_controller.py new file mode 100644 index 00000000..49742bc1 --- /dev/null +++ b/services/helper/helper_service/services/configuration/controllers/default_controller.py @@ -0,0 +1,116 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from configuration.models.config_category_create_request import ConfigCategoryCreateRequest # noqa: E501 +from configuration.models.config_category_remove_request import ConfigCategoryRemoveRequest # noqa: E501 +from configuration.models.config_param_remove_request import ConfigParamRemoveRequest # noqa: E501 +from configuration.models.config_param_update_request import ConfigParamUpdateRequest # noqa: E501 +from configuration.models.generic_error import GenericError # noqa: E501 +from configuration import util + + +def dynamic_config_controller_add_new_config_setting(body): # noqa: E501 + """Add new config setting at path + + Adds a new key/value inside an existing category using \"param_path\" and \"new_value\". # noqa: E501 + + :param config_param_update_request: + :type config_param_update_request: dict | bytes + + :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + """ + config_param_update_request = body + if connexion.request.is_json: + config_param_update_request = ConfigParamUpdateRequest.from_dict(connexion.request.get_json()) # noqa: E501 + return 'do some magic!' + + +def dynamic_config_controller_add_new_configuration(body): # noqa: E501 + """Add new configuration category + + Adds a brand new top-level category. # noqa: E501 + + :param config_category_create_request: + :type config_category_create_request: dict | bytes + + :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + """ + config_category_create_request = body + if connexion.request.is_json: + config_category_create_request = ConfigCategoryCreateRequest.from_dict(connexion.request.get_json()) # noqa: E501 + return 'do some magic!' + + +def dynamic_config_controller_get_configuration(): # noqa: E501 + """Read full configuration + + Returns the entire CAPIF configuration document. # noqa: E501 + + + :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + """ + return 'do some magic!' + + +def dynamic_config_controller_remove_config_category(body): # noqa: E501 + """Remove configuration category + + Deletes an entire top-level category by name. # noqa: E501 + + :param config_category_remove_request: + :type config_category_remove_request: dict | bytes + + :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + """ + config_category_remove_request = body + if connexion.request.is_json: + config_category_remove_request = ConfigCategoryRemoveRequest.from_dict(connexion.request.get_json()) # noqa: E501 + return 'do some magic!' + + +def dynamic_config_controller_remove_config_param(body): # noqa: E501 + """Remove config parameter + + Deletes a leaf parameter by dotted path. # noqa: E501 + + :param config_param_remove_request: + :type config_param_remove_request: dict | bytes + + :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + """ + config_param_remove_request = body + if connexion.request.is_json: + config_param_remove_request = ConfigParamRemoveRequest.from_dict(connexion.request.get_json()) # noqa: E501 + return 'do some magic!' + + +def dynamic_config_controller_replace_configuration(body): # noqa: E501 + """Replace entire configuration + + Replaces the configuration document with a new one. # noqa: E501 + + :param request_body: + :type request_body: Dict[str, ] + + :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + """ + request_body = body + return 'do some magic!' + + +def dynamic_config_controller_update_config_param(body): # noqa: E501 + """Update single config parameter + + Updates a single setting inside the configuration using a dotted path selector. # noqa: E501 + + :param config_param_update_request: + :type config_param_update_request: dict | bytes + + :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + """ + config_param_update_request = body + if connexion.request.is_json: + config_param_update_request = ConfigParamUpdateRequest.from_dict(connexion.request.get_json()) # noqa: E501 + return 'do some magic!' diff --git a/services/helper/helper_service/services/configuration/controllers/security_controller.py b/services/helper/helper_service/services/configuration/controllers/security_controller.py new file mode 100644 index 00000000..6d294ffd --- /dev/null +++ b/services/helper/helper_service/services/configuration/controllers/security_controller.py @@ -0,0 +1,2 @@ +from typing import List + diff --git a/services/helper/helper_service/services/configuration/encoder.py b/services/helper/helper_service/services/configuration/encoder.py new file mode 100644 index 00000000..27e1d86a --- /dev/null +++ b/services/helper/helper_service/services/configuration/encoder.py @@ -0,0 +1,19 @@ +from connexion.apps.flask_app import FlaskJSONEncoder + +from configuration.models.base_model import Model + + +class JSONEncoder(FlaskJSONEncoder): + include_nulls = False + + def default(self, o): + if isinstance(o, Model): + dikt = {} + for attr in o.openapi_types: + value = getattr(o, attr) + if value is None and not self.include_nulls: + continue + attr = o.attribute_map[attr] + dikt[attr] = value + return dikt + return FlaskJSONEncoder.default(self, o) diff --git a/services/helper/helper_service/services/configuration/models/__init__.py b/services/helper/helper_service/services/configuration/models/__init__.py new file mode 100644 index 00000000..63402577 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/__init__.py @@ -0,0 +1,7 @@ +# flake8: noqa +# import models into model package +from configuration.models.config_category_create_request import ConfigCategoryCreateRequest +from configuration.models.config_category_remove_request import ConfigCategoryRemoveRequest +from configuration.models.config_param_remove_request import ConfigParamRemoveRequest +from configuration.models.config_param_update_request import ConfigParamUpdateRequest +from configuration.models.generic_error import GenericError diff --git a/services/helper/helper_service/services/configuration/models/base_model.py b/services/helper/helper_service/services/configuration/models/base_model.py new file mode 100644 index 00000000..aa9250b3 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/base_model.py @@ -0,0 +1,68 @@ +import pprint + +import typing + +from configuration import util + +T = typing.TypeVar('T') + + +class Model: + # openapiTypes: The key is attribute name and the + # value is attribute type. + openapi_types: typing.Dict[str, type] = {} + + # attributeMap: The key is attribute name and the + # value is json key in definition. + attribute_map: typing.Dict[str, str] = {} + + @classmethod + def from_dict(cls: typing.Type[T], dikt) -> T: + """Returns the dict as a model""" + return util.deserialize_model(dikt, cls) + + def to_dict(self): + """Returns the model properties as a dict + + :rtype: dict + """ + result = {} + + for attr in self.openapi_types: + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model + + :rtype: str + """ + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/services/helper/helper_service/services/configuration/models/config_category_create_request.py b/services/helper/helper_service/services/configuration/models/config_category_create_request.py new file mode 100644 index 00000000..305c43f1 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/config_category_create_request.py @@ -0,0 +1,95 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class ConfigCategoryCreateRequest(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, category_name=None, category_values=None): # noqa: E501 + """ConfigCategoryCreateRequest - a model defined in OpenAPI + + :param category_name: The category_name of this ConfigCategoryCreateRequest. # noqa: E501 + :type category_name: str + :param category_values: The category_values of this ConfigCategoryCreateRequest. # noqa: E501 + :type category_values: Dict[str, object] + """ + self.openapi_types = { + 'category_name': str, + 'category_values': Dict[str, object] + } + + self.attribute_map = { + 'category_name': 'category_name', + 'category_values': 'category_values' + } + + self._category_name = category_name + self._category_values = category_values + + @classmethod + def from_dict(cls, dikt) -> 'ConfigCategoryCreateRequest': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ConfigCategoryCreateRequest of this ConfigCategoryCreateRequest. # noqa: E501 + :rtype: ConfigCategoryCreateRequest + """ + return util.deserialize_model(dikt, cls) + + @property + def category_name(self) -> str: + """Gets the category_name of this ConfigCategoryCreateRequest. + + Name of the new configuration category. # noqa: E501 + + :return: The category_name of this ConfigCategoryCreateRequest. + :rtype: str + """ + return self._category_name + + @category_name.setter + def category_name(self, category_name: str): + """Sets the category_name of this ConfigCategoryCreateRequest. + + Name of the new configuration category. # noqa: E501 + + :param category_name: The category_name of this ConfigCategoryCreateRequest. + :type category_name: str + """ + if category_name is None: + raise ValueError("Invalid value for `category_name`, must not be `None`") # noqa: E501 + + self._category_name = category_name + + @property + def category_values(self) -> Dict[str, object]: + """Gets the category_values of this ConfigCategoryCreateRequest. + + Key/value pairs that compose the new category. # noqa: E501 + + :return: The category_values of this ConfigCategoryCreateRequest. + :rtype: Dict[str, object] + """ + return self._category_values + + @category_values.setter + def category_values(self, category_values: Dict[str, object]): + """Sets the category_values of this ConfigCategoryCreateRequest. + + Key/value pairs that compose the new category. # noqa: E501 + + :param category_values: The category_values of this ConfigCategoryCreateRequest. + :type category_values: Dict[str, object] + """ + if category_values is None: + raise ValueError("Invalid value for `category_values`, must not be `None`") # noqa: E501 + + self._category_values = category_values diff --git a/services/helper/helper_service/services/configuration/models/config_category_remove_request.py b/services/helper/helper_service/services/configuration/models/config_category_remove_request.py new file mode 100644 index 00000000..ac9dca7d --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/config_category_remove_request.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class ConfigCategoryRemoveRequest(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, category_name=None): # noqa: E501 + """ConfigCategoryRemoveRequest - a model defined in OpenAPI + + :param category_name: The category_name of this ConfigCategoryRemoveRequest. # noqa: E501 + :type category_name: str + """ + self.openapi_types = { + 'category_name': str + } + + self.attribute_map = { + 'category_name': 'category_name' + } + + self._category_name = category_name + + @classmethod + def from_dict(cls, dikt) -> 'ConfigCategoryRemoveRequest': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ConfigCategoryRemoveRequest of this ConfigCategoryRemoveRequest. # noqa: E501 + :rtype: ConfigCategoryRemoveRequest + """ + return util.deserialize_model(dikt, cls) + + @property + def category_name(self) -> str: + """Gets the category_name of this ConfigCategoryRemoveRequest. + + Name of the category to remove. # noqa: E501 + + :return: The category_name of this ConfigCategoryRemoveRequest. + :rtype: str + """ + return self._category_name + + @category_name.setter + def category_name(self, category_name: str): + """Sets the category_name of this ConfigCategoryRemoveRequest. + + Name of the category to remove. # noqa: E501 + + :param category_name: The category_name of this ConfigCategoryRemoveRequest. + :type category_name: str + """ + if category_name is None: + raise ValueError("Invalid value for `category_name`, must not be `None`") # noqa: E501 + + self._category_name = category_name diff --git a/services/helper/helper_service/services/configuration/models/config_param_remove_request.py b/services/helper/helper_service/services/configuration/models/config_param_remove_request.py new file mode 100644 index 00000000..858723c9 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/config_param_remove_request.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class ConfigParamRemoveRequest(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, param_path=None): # noqa: E501 + """ConfigParamRemoveRequest - a model defined in OpenAPI + + :param param_path: The param_path of this ConfigParamRemoveRequest. # noqa: E501 + :type param_path: str + """ + self.openapi_types = { + 'param_path': str + } + + self.attribute_map = { + 'param_path': 'param_path' + } + + self._param_path = param_path + + @classmethod + def from_dict(cls, dikt) -> 'ConfigParamRemoveRequest': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ConfigParamRemoveRequest of this ConfigParamRemoveRequest. # noqa: E501 + :rtype: ConfigParamRemoveRequest + """ + return util.deserialize_model(dikt, cls) + + @property + def param_path(self) -> str: + """Gets the param_path of this ConfigParamRemoveRequest. + + Dotted path to the configuration value to delete. # noqa: E501 + + :return: The param_path of this ConfigParamRemoveRequest. + :rtype: str + """ + return self._param_path + + @param_path.setter + def param_path(self, param_path: str): + """Sets the param_path of this ConfigParamRemoveRequest. + + Dotted path to the configuration value to delete. # noqa: E501 + + :param param_path: The param_path of this ConfigParamRemoveRequest. + :type param_path: str + """ + if param_path is None: + raise ValueError("Invalid value for `param_path`, must not be `None`") # noqa: E501 + + self._param_path = param_path diff --git a/services/helper/helper_service/services/configuration/models/config_param_update_request.py b/services/helper/helper_service/services/configuration/models/config_param_update_request.py new file mode 100644 index 00000000..6d608e78 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/config_param_update_request.py @@ -0,0 +1,95 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class ConfigParamUpdateRequest(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, param_path=None, new_value=None): # noqa: E501 + """ConfigParamUpdateRequest - a model defined in OpenAPI + + :param param_path: The param_path of this ConfigParamUpdateRequest. # noqa: E501 + :type param_path: str + :param new_value: The new_value of this ConfigParamUpdateRequest. # noqa: E501 + :type new_value: object + """ + self.openapi_types = { + 'param_path': str, + 'new_value': object + } + + self.attribute_map = { + 'param_path': 'param_path', + 'new_value': 'new_value' + } + + self._param_path = param_path + self._new_value = new_value + + @classmethod + def from_dict(cls, dikt) -> 'ConfigParamUpdateRequest': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ConfigParamUpdateRequest of this ConfigParamUpdateRequest. # noqa: E501 + :rtype: ConfigParamUpdateRequest + """ + return util.deserialize_model(dikt, cls) + + @property + def param_path(self) -> str: + """Gets the param_path of this ConfigParamUpdateRequest. + + Dotted path to the configuration value to update. # noqa: E501 + + :return: The param_path of this ConfigParamUpdateRequest. + :rtype: str + """ + return self._param_path + + @param_path.setter + def param_path(self, param_path: str): + """Sets the param_path of this ConfigParamUpdateRequest. + + Dotted path to the configuration value to update. # noqa: E501 + + :param param_path: The param_path of this ConfigParamUpdateRequest. + :type param_path: str + """ + if param_path is None: + raise ValueError("Invalid value for `param_path`, must not be `None`") # noqa: E501 + + self._param_path = param_path + + @property + def new_value(self) -> object: + """Gets the new_value of this ConfigParamUpdateRequest. + + New value for the configuration parameter. # noqa: E501 + + :return: The new_value of this ConfigParamUpdateRequest. + :rtype: object + """ + return self._new_value + + @new_value.setter + def new_value(self, new_value: object): + """Sets the new_value of this ConfigParamUpdateRequest. + + New value for the configuration parameter. # noqa: E501 + + :param new_value: The new_value of this ConfigParamUpdateRequest. + :type new_value: object + """ + if new_value is None: + raise ValueError("Invalid value for `new_value`, must not be `None`") # noqa: E501 + + self._new_value = new_value diff --git a/services/helper/helper_service/services/configuration/models/generic_error.py b/services/helper/helper_service/services/configuration/models/generic_error.py new file mode 100644 index 00000000..506bc0f3 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/generic_error.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class GenericError(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, code=None, message=None): # noqa: E501 + """GenericError - a model defined in OpenAPI + + :param code: The code of this GenericError. # noqa: E501 + :type code: str + :param message: The message of this GenericError. # noqa: E501 + :type message: str + """ + self.openapi_types = { + 'code': str, + 'message': str + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message' + } + + self._code = code + self._message = message + + @classmethod + def from_dict(cls, dikt) -> 'GenericError': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GenericError of this GenericError. # noqa: E501 + :rtype: GenericError + """ + return util.deserialize_model(dikt, cls) + + @property + def code(self) -> str: + """Gets the code of this GenericError. + + + :return: The code of this GenericError. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code: str): + """Sets the code of this GenericError. + + + :param code: The code of this GenericError. + :type code: str + """ + if code is None: + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self) -> str: + """Gets the message of this GenericError. + + + :return: The message of this GenericError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message: str): + """Sets the message of this GenericError. + + + :param message: The message of this GenericError. + :type message: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message diff --git a/services/helper/helper_service/services/configuration/openapi/openapi.yaml b/services/helper/helper_service/services/configuration/openapi/openapi.yaml new file mode 100644 index 00000000..7c2c8830 --- /dev/null +++ b/services/helper/helper_service/services/configuration/openapi/openapi.yaml @@ -0,0 +1,364 @@ +openapi: 3.0.1 +info: + description: | + CAPIF Helper Configuration API. Allows reading and modifying the runtime configuration + stored in MongoDB (ACL policy, certificate expiration, security priorities, etc). + title: Helper Configuration API + version: 1.0.0 +servers: +- url: "{apiRoot}/configuration" + variables: + apiRoot: + default: http://localhost:8080 + description: Base URL of the Helper service. +paths: + /addNewConfiguration: + post: + description: Adds a new key/value inside an existing category using "param_path" + and "new_value". + operationId: dynamic_config_controller_add_new_config_setting + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Setting added + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Add new config setting at path + x-openapi-router-controller: configuration.controllers.default_controller + /configuration/category: + delete: + description: Deletes an entire top-level category by name. + operationId: dynamic_config_controller_remove_config_category + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigCategoryRemoveRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Category removed + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Remove configuration category + x-openapi-router-controller: configuration.controllers.default_controller + post: + description: Adds a brand new top-level category. + operationId: dynamic_config_controller_add_new_configuration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigCategoryCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Category added + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Add new configuration category + x-openapi-router-controller: configuration.controllers.default_controller + /getConfiguration: + get: + description: Returns the entire CAPIF configuration document. + operationId: dynamic_config_controller_get_configuration + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Current configuration + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Read full configuration + x-openapi-router-controller: configuration.controllers.default_controller + /removeConfigParam: + delete: + description: Deletes a leaf parameter by dotted path. + operationId: dynamic_config_controller_remove_config_param + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamRemoveRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Parameter removed + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Remove config parameter + x-openapi-router-controller: configuration.controllers.default_controller + /replaceConfiguration: + put: + description: Replaces the configuration document with a new one. + operationId: dynamic_config_controller_replace_configuration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Updated configuration + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Replace entire configuration + x-openapi-router-controller: configuration.controllers.default_controller + /updateConfigParam: + patch: + description: Updates a single setting inside the configuration using a dotted + path selector. + operationId: dynamic_config_controller_update_config_param + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Parameter updated + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Update single config parameter + x-openapi-router-controller: configuration.controllers.default_controller +components: + responses: + BadRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + InternalError: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + GenericError: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + schemas: + CapifConfiguration: + additionalProperties: true + description: CAPIF runtime configuration document. + type: object + ConfigParamUpdateRequest: + example: + param_path: param_path + new_value: "" + properties: + param_path: + description: Dotted path to the configuration value to update. + title: param_path + type: string + new_value: + description: New value for the configuration parameter. + title: new_value + required: + - new_value + - param_path + title: ConfigParamUpdateRequest + type: object + ConfigParamRemoveRequest: + example: + param_path: param_path + properties: + param_path: + description: Dotted path to the configuration value to delete. + title: param_path + type: string + required: + - param_path + title: ConfigParamRemoveRequest + type: object + ConfigCategoryCreateRequest: + example: + category_values: + key: "" + category_name: category_name + properties: + category_name: + description: Name of the new configuration category. + title: category_name + type: string + category_values: + additionalProperties: true + description: Key/value pairs that compose the new category. + title: category_values + type: object + required: + - category_name + - category_values + title: ConfigCategoryCreateRequest + type: object + ConfigCategoryRemoveRequest: + example: + category_name: category_name + properties: + category_name: + description: Name of the category to remove. + title: category_name + type: string + required: + - category_name + title: ConfigCategoryRemoveRequest + type: object + GenericError: + example: + code: code + message: message + properties: + code: + title: code + type: string + message: + title: message + type: string + required: + - code + - message + title: GenericError + type: object diff --git a/services/helper/helper_service/services/configuration/typing_utils.py b/services/helper/helper_service/services/configuration/typing_utils.py new file mode 100644 index 00000000..74e3c913 --- /dev/null +++ b/services/helper/helper_service/services/configuration/typing_utils.py @@ -0,0 +1,30 @@ +import sys + +if sys.version_info < (3, 7): + import typing + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return type(klass) == typing.GenericMeta + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__extra__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__extra__ == list + +else: + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return hasattr(klass, '__origin__') + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__origin__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__origin__ == list diff --git a/services/helper/helper_service/services/configuration/util.py b/services/helper/helper_service/services/configuration/util.py new file mode 100644 index 00000000..f96d28fd --- /dev/null +++ b/services/helper/helper_service/services/configuration/util.py @@ -0,0 +1,147 @@ +import datetime + +import typing +from configuration import typing_utils + + +def _deserialize(data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if klass in (int, float, str, bool, bytearray): + return _deserialize_primitive(data, klass) + elif klass == object: + return _deserialize_object(data) + elif klass == datetime.date: + return deserialize_date(data) + elif klass == datetime.datetime: + return deserialize_datetime(data) + elif typing_utils.is_generic(klass): + if typing_utils.is_list(klass): + return _deserialize_list(data, klass.__args__[0]) + if typing_utils.is_dict(klass): + return _deserialize_dict(data, klass.__args__[1]) + else: + return deserialize_model(data, klass) + + +def _deserialize_primitive(data, klass): + """Deserializes to primitive type. + + :param data: data to deserialize. + :param klass: class literal. + + :return: int, long, float, str, bool. + :rtype: int | long | float | str | bool + """ + try: + value = klass(data) + except UnicodeEncodeError: + value = data + except TypeError: + value = data + return value + + +def _deserialize_object(value): + """Return an original value. + + :return: object. + """ + return value + + +def deserialize_date(string): + """Deserializes string to date. + + :param string: str. + :type string: str + :return: date. + :rtype: date + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + + +def deserialize_datetime(string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :type string: str + :return: datetime. + :rtype: datetime + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + + +def deserialize_model(data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :type data: dict | list + :param klass: class literal. + :return: model object. + """ + instance = klass() + + if not instance.openapi_types: + return data + + for attr, attr_type in instance.openapi_types.items(): + if data is not None \ + and instance.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): + value = data[instance.attribute_map[attr]] + setattr(instance, attr, _deserialize(value, attr_type)) + + return instance + + +def _deserialize_list(data, boxed_type): + """Deserializes a list and its elements. + + :param data: list to deserialize. + :type data: list + :param boxed_type: class literal. + + :return: deserialized list. + :rtype: list + """ + return [_deserialize(sub_data, boxed_type) + for sub_data in data] + + +def _deserialize_dict(data, boxed_type): + """Deserializes a dict and its elements. + + :param data: dict to deserialize. + :type data: dict + :param boxed_type: class literal. + + :return: deserialized dict. + :rtype: dict + """ + return {k: _deserialize(v, boxed_type) + for k, v in data.items() } diff --git a/services/helper/requirements.txt b/services/helper/requirements.txt index 33e44310..e240c8ae 100644 --- a/services/helper/requirements.txt +++ b/services/helper/requirements.txt @@ -1,12 +1,18 @@ -python_dateutil == 2.9.0.post0 -setuptools == 80.9.0 -Flask == 3.0.3 -pymongo == 4.7.3 -flask_jwt_extended == 4.6.0 -pyopenssl == 25.3.0 -pyyaml == 6.0.1 -requests == 2.32.2 +connexion[swagger-ui] >= 2.6.0; python_version>="3.6" +# 2.3 is the last version that supports python 3.4-3.5 +connexion[swagger-ui] <= 2.3.0; python_version=="3.5" or python_version=="3.4" +# prevent breaking dependencies from advent of connexion>=3.0 +connexion[swagger-ui] <= 2.14.2; python_version>"3.4" +# connexion requires werkzeug but connexion < 2.4.0 does not install werkzeug +# we must peg werkzeug versions below to fix connexion +# https://github.com/zalando/connexion/pull/1044 +werkzeug == 0.16.1; python_version=="3.5" or python_version=="3.4" +swagger-ui-bundle >= 0.0.2 +python_dateutil >= 2.6.0 +setuptools >= 21.0.0 +Flask == 2.1.1 gunicorn == 23.0.0 uvicorn == 0.34.2 asgiref == 3.8.1 -packaging == 24.0 +pymongo == 4.7.3 +pyopenssl == 25.3.0 diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index 49591bdd..dfea48b8 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -177,8 +177,10 @@ http { add_header Content-Type 'application/problem+json'; return 401 $helper_error_message; } - proxy_set_header X-SSL-Client-Cert $ssl_client_cert; - proxy_pass http://helper:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://helper:8080/; } } -- GitLab From 89d37fe0282eda279432d0a47d05941e9bf486fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Tue, 11 Nov 2025 13:06:07 +0100 Subject: [PATCH 030/101] set resgister hostname to typical one --- helm/capif/charts/ocf-register/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/capif/charts/ocf-register/values.yaml b/helm/capif/charts/ocf-register/values.yaml index dbe8c071..af2ca9f1 100644 --- a/helm/capif/charts/ocf-register/values.yaml +++ b/helm/capif/charts/ocf-register/values.yaml @@ -21,7 +21,7 @@ env: vaultPort: 8200 vaultAccessToken: dev-only-token capifHostname: capif-test.example.int - registerHostname: register.example.int + registerHostname: register logLevel: "INFO" timeout: "30" -- GitLab From 1c7ad31ac9b9e3386d3b0ade29e988bc6ca92012 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 13 Nov 2025 11:58:39 +0100 Subject: [PATCH 031/101] New modular helper service --- services/helper/helper_service/app.py | 5 +- .../controllers/helper_controller.py | 199 -------------- services/helper/helper_service/db/db.py | 28 +- .../helper_service/openapi_helper_api.yaml | 14 + .../openapi_helper_configuration.yaml | 142 +++++++--- .../api/controllers/default_controller.py | 27 +- .../api}/core/helper_operations.py | 176 +----------- .../services/api/openapi/openapi.yaml | 27 ++ .../controllers/default_controller.py | 87 +++--- .../core/configuration_operations.py | 181 +++++++++++++ .../services/configuration/models/__init__.py | 7 +- .../models/capif_configuration.py | 119 +++++++++ .../models/config_category_remove_request.py | 65 ----- .../models/config_param_remove_request.py | 65 ----- .../services/configuration/models/settings.py | 119 +++++++++ .../models/settings_acl_policy_settings.py | 119 +++++++++ .../models/settings_certificates_expiry.py | 119 +++++++++ .../settings_security_method_priority.py | 113 ++++++++ .../configuration/openapi/openapi.yaml | 252 +++++++++++++----- 19 files changed, 1200 insertions(+), 664 deletions(-) delete mode 100644 services/helper/helper_service/controllers/helper_controller.py rename services/helper/helper_service/{ => services/api}/core/helper_operations.py (55%) create mode 100644 services/helper/helper_service/services/configuration/core/configuration_operations.py create mode 100644 services/helper/helper_service/services/configuration/models/capif_configuration.py delete mode 100644 services/helper/helper_service/services/configuration/models/config_category_remove_request.py delete mode 100644 services/helper/helper_service/services/configuration/models/config_param_remove_request.py create mode 100644 services/helper/helper_service/services/configuration/models/settings.py create mode 100644 services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py create mode 100644 services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py create mode 100644 services/helper/helper_service/services/configuration/models/settings_security_method_priority.py diff --git a/services/helper/helper_service/app.py b/services/helper/helper_service/app.py index cfb842ba..3b1f18b2 100644 --- a/services/helper/helper_service/app.py +++ b/services/helper/helper_service/app.py @@ -3,9 +3,8 @@ import logging import os import requests from config import Config -from controllers.helper_controller import helper_routes from pathlib import Path -from db.db import MongoDatabse +from db.db import get_mongo import connexion import sys from flask import Flask @@ -28,7 +27,7 @@ app = connexion.App(__name__, specification_dir=str(SERVICES_DIR)) config = Config().get_config() # Connect MongoDB and get TTL for superadmin certificate -db = MongoDatabse() +db = get_mongo() capif_config = db.get_col_by_name("capif_configuration").find_one({}) ttl_superadmin_cert = capif_config["settings"]["certificates_expiry"].get("ttl_superadmin_cert", "43000h") diff --git a/services/helper/helper_service/controllers/helper_controller.py b/services/helper/helper_service/controllers/helper_controller.py deleted file mode 100644 index 8d50f7c0..00000000 --- a/services/helper/helper_service/controllers/helper_controller.py +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/env python3 - -from config import Config -from core.helper_operations import HelperOperations -from flask import Blueprint, current_app, jsonify, request - -config = Config().get_config() - -helper_routes = Blueprint("helper_routes", __name__) -helper_operation = HelperOperations() - -@helper_routes.route("/helper/getInvokers", methods=["GET"]) -def getInvokers(): - uuid = request.args.get('uuid') - invoker_id = request.args.get('api_invoker_id') - page_size = request.args.get('page_size') - page = request.args.get('page') - sort_order = request.args.get('sort_order') - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"uuid: {uuid}, invoker_id: {invoker_id}, page: {page}, page_size: {page_size}, sort_order: {sort_order}") - - return helper_operation.get_invokers(uuid, invoker_id, page, page_size, sort_order) - -@helper_routes.route("/helper/getProviders", methods=["GET"]) -def getProviders(): - uuid = request.args.get('uuid') - provider_id = request.args.get('api_prov_dom_id') - page_size = request.args.get('page_size') - page = request.args.get('page') - sort_order = request.args.get('sort_order') - - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"uuid: {uuid}, provider_id: {provider_id}, page: {page}, page_size: {page_size}, sort_order: {sort_order}") - - return helper_operation.get_providers(uuid, provider_id, page, page_size, sort_order) - - -@helper_routes.route("/helper/getServices", methods=["GET"]) -def getServices(): - service_id = request.args.get('service_id') - apf_id = request.args.get('apf_id') - api_name = request.args.get('api_name') - page_size = request.args.get('page_size') - page = request.args.get('page') - sort_order = request.args.get('sort_order') - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"service_id: {service_id}, apf_id: {apf_id}, api_name: {api_name}, page: {page}, page_size: {page_size}, sort_order: {sort_order}") - - return helper_operation.get_services(service_id, apf_id, api_name, page, page_size, sort_order) - -@helper_routes.route("/helper/getSecurity", methods=["GET"]) -def getSecurity(): - invoker_id = request.args.get('invoker_id') - page_size = request.args.get('page_size') - page = request.args.get('page') - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"invoker_id: {invoker_id}, page: {page}, page_size: {page_size} ") - - return helper_operation.get_security(invoker_id, page, page_size) - -@helper_routes.route("/helper/getEvents", methods=["GET"]) -def getEvents(): - subscriber_id = request.args.get('subscriber_id') - subscription_id = request.args.get('subscription_id') - page_size = request.args.get('page_size') - page = request.args.get('page') - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"subscriber_id: {subscriber_id}, subscription_id: {subscription_id}, page: {page}, page_size: {page_size} ") - - return helper_operation.get_events(subscriber_id, subscription_id, page, page_size) - - -@helper_routes.route("/helper/deleteEntities/", methods=["DELETE"]) -def deleteUserEntities(uuid): - return helper_operation.remove_entities(uuid) - - -@helper_routes.route("/helper/getConfiguration", methods=["GET"]) -def getConfiguration(): - """Returns the current configuration""" - return helper_operation.get_configuration() - - -@helper_routes.route("/helper/updateConfigParam", methods=["PATCH"]) -def updateConfigParam(): - """Updates a single configuration parameter""" - data = request.json - param_path = data.get("param_path") - new_value = data.get("new_value") - - if not param_path or new_value is None: - return jsonify(message="Missing 'param_path' or 'new_value' in request body"), 400 - - return helper_operation.update_config_param(param_path, new_value) - - -@helper_routes.route("/helper/replaceConfiguration", methods=["PUT"]) -def replaceConfiguration(): - """Replaces the entire configuration with a new one""" - new_config = request.json - if not new_config: - return jsonify(message="Missing new configuration in request body"), 400 - - return helper_operation.replace_configuration(new_config) - - -@helper_routes.route("/helper/addNewConfiguration", methods=["POST"]) -def add_new_configuration(): - """Adds a new category inside 'settings'.""" - data = request.json - category_name = data.get("category_name") - category_values = data.get("category_values") - - if not category_name or not category_values: - return jsonify(message="Missing 'category_name' or 'category_values' in request body"), 400 - - return helper_operation.add_new_configuration(category_name, category_values) - -@helper_routes.route("/helper/addNewConfigSetting", methods=["PATCH"]) -def add_new_config_setting(): - """Adds a new configuration inside 'settings'.""" - data = request.json - param_path = data.get("param_path") - new_value = data.get("new_value") - - if not param_path or new_value is None: - return jsonify(message="Missing 'param_path' or 'new_value' in request body"), 400 - - return helper_operation.add_new_config_setting(param_path, new_value) - - -@helper_routes.route("/helper/removeConfigParam", methods=["DELETE"]) -def remove_config_param(): - """Deletes a specific parameter inside 'settings'.""" - data = request.json - param_path = data.get("param_path") - - if not param_path: - return jsonify(message="Missing 'param_path' in request body"), 400 - - return helper_operation.remove_config_param(param_path) - - -@helper_routes.route("/helper/removeConfigCategory", methods=["DELETE"]) -def remove_config_category(): - """Deletes an entire category inside 'settings'.""" - data = request.json - category_name = data.get("category_name") - - if not category_name: - return jsonify(message="Missing 'category_name' in request body"), 400 - - return helper_operation.remove_config_category(category_name) - - -@helper_routes.route("/helper/getCcfId", methods=["GET"]) -def get_ccf_id(): - """Returns the current CAPIF ccfId""" - return helper_operation.get_ccf_id() diff --git a/services/helper/helper_service/db/db.py b/services/helper/helper_service/db/db.py index 30c25e8b..757933d3 100644 --- a/services/helper/helper_service/db/db.py +++ b/services/helper/helper_service/db/db.py @@ -1,5 +1,6 @@ import time import secrets +from threading import Lock from bson.codec_options import CodecOptions from config import Config @@ -9,7 +10,26 @@ from pymongo.errors import AutoReconnect class MongoDatabse(): - def __init__(self): + _instance = None + _lock = Lock() + + def __new__(cls): + if cls._instance is None: + with cls._lock: + if cls._instance is None: # double-checked + cls._instance = super().__new__(cls) + cls._instance._init_once() + return cls._instance + + def close(self): + if getattr(self, "_client", None): + self._client.close() + self._client = None + + def get_col_by_name(self, name): + return self.db[name].with_options(codec_options=CodecOptions(tz_aware=True)) + + def _init_once(self): self.config = Config().get_config() self.db = self.__connect() self.invoker_col = self.config['mongo']['invoker_col'] @@ -78,3 +98,9 @@ class MongoDatabse(): print("Capif_configuration already contains data with a unique ccf_id. No default values inserted.") +_singleton = None +def get_mongo(): + global _singleton + if _singleton is None: + _singleton = MongoDatabse() + return _singleton \ No newline at end of file diff --git a/services/helper/helper_service/openapi_helper_api.yaml b/services/helper/helper_service/openapi_helper_api.yaml index 97dddd89..c6cd3412 100644 --- a/services/helper/helper_service/openapi_helper_api.yaml +++ b/services/helper/helper_service/openapi_helper_api.yaml @@ -33,6 +33,20 @@ paths: $ref: '#/components/responses/InternalError' default: $ref: '#/components/responses/GenericError' + /getCcfId: + get: + summary: Get CCF ID + description: Retrieves the CCF ID of the CAPIF Core Function. + operationId: helper_controller.get_ccf_id + responses: + '200': + description: CCF ID retrieved successfully. + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' /getInvokers: get: summary: Retrieve API invokers diff --git a/services/helper/helper_service/openapi_helper_configuration.yaml b/services/helper/helper_service/openapi_helper_configuration.yaml index 58312ba5..55698cb2 100644 --- a/services/helper/helper_service/openapi_helper_configuration.yaml +++ b/services/helper/helper_service/openapi_helper_configuration.yaml @@ -16,7 +16,7 @@ paths: get: summary: Read full configuration description: Returns the entire CAPIF configuration document. - operationId: dynamic_config_controller.get_configuration + operationId: configuration_controller.get_configuration responses: '200': description: Current configuration @@ -100,20 +100,20 @@ paths: $ref: '#/components/responses/InternalError' default: $ref: '#/components/responses/GenericError' - /removeConfigParam: - delete: - summary: Remove config parameter - description: Deletes a leaf parameter by dotted path. - operationId: dynamic_config_controller.remove_config_param + /addNewConfigSetting: + patch: + summary: Add new configuration category + description: Adds a brand new top-level category. + operationId: dynamic_config_controller.add_new_configuration requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/ConfigParamRemoveRequest' + $ref: '#/components/schemas/ConfigCategoryCreateRequest' responses: '200': - description: Parameter removed + description: Category added content: application/json: schema: @@ -124,20 +124,21 @@ paths: $ref: '#/components/responses/InternalError' default: $ref: '#/components/responses/GenericError' - /configuration/category: - post: - summary: Add new configuration category - description: Adds a brand new top-level category. - operationId: dynamic_config_controller.add_new_configuration - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigCategoryCreateRequest' + /removeConfigParam: + delete: + summary: Remove config parameter + description: Deletes a leaf parameter by dotted path. + operationId: dynamic_config_controller.remove_config_param + parameters: + - name: param_path + in: query + required: true + schema: + type: string + description: Parameter path to remove responses: '200': - description: Category added + description: Parameter removed content: application/json: schema: @@ -148,16 +149,18 @@ paths: $ref: '#/components/responses/InternalError' default: $ref: '#/components/responses/GenericError' + /removeConfigCategory: delete: summary: Remove configuration category description: Deletes an entire top-level category by name. operationId: dynamic_config_controller.remove_config_category - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigCategoryRemoveRequest' + parameters: + - name: config_path + in: query + required: true + schema: + type: string + description: Configuration path to remove responses: '200': description: Category removed @@ -196,7 +199,19 @@ components: type: object additionalProperties: true description: CAPIF runtime configuration document. - + properties: + config_name: + type: string + example: default + description: Configuration name + version: + type: string + example: 1.0 + description: configuration version + settings: + type: object + items: + $ref: '#/components/schemas/Settings' ConfigParamUpdateRequest: type: object required: @@ -208,14 +223,6 @@ components: description: Dotted path to the configuration value to update. new_value: description: New value for the configuration parameter. - ConfigParamRemoveRequest: - type: object - required: - - param_path - properties: - param_path: - type: string - description: Dotted path to the configuration value to delete. ConfigCategoryCreateRequest: type: object required: @@ -229,14 +236,6 @@ components: type: object additionalProperties: true description: Key/value pairs that compose the new category. - ConfigCategoryRemoveRequest: - type: object - required: - - category_name - properties: - category_name: - type: string - description: Name of the category to remove. GenericError: type: object properties: @@ -247,3 +246,60 @@ components: required: - code - message + Settings: + type: object + description: Configuration Settings + properties: + certificates_expiry: + type: object + description: Expiry configuration for certificates + properties: + ttl_superadmin_cert: + type: string + example: 4300h + description: ttl for superadmin certificates + ttl_invoker_cert: + type: string + example: 4300h + description: ttl for invoker certificates + ttl_provider_cert: + type: string + example: 4300h + description: ttl for provider certificates + security_method_priority: + type: object + description: priority to follow in granting the security method + properties: + oauth: + type: integer + example: 1 + pki: + type: integer + example: 2 + psk: + type: integer + example: 3 + acl_policy_settings: + type: object + description: default access policies + properties: + allowed_total_invocations: + type: string + example: 5 + description: total number of requests the invoker can make + allowed_invocations_per_second: + type: string + example: 5 + description: total number of requests the invoker can make per second + allowed_invocations_time_range_days: + type: integer + example: 365 + description: time range when an invoker can make requests + + + + + + + + \ No newline at end of file diff --git a/services/helper/helper_service/services/api/controllers/default_controller.py b/services/helper/helper_service/services/api/controllers/default_controller.py index 171b2414..7b8d451c 100644 --- a/services/helper/helper_service/services/api/controllers/default_controller.py +++ b/services/helper/helper_service/services/api/controllers/default_controller.py @@ -11,6 +11,10 @@ from api.models.paginated_response_security import PaginatedResponseSecurity # from api.models.paginated_response_service import PaginatedResponseService # noqa: E501 from api import util +from ..core.helper_operations import HelperOperations + + +helper_operations = HelperOperations() def helper_controller_delete_entities(uuid): # noqa: E501 """Delete entities by UUID @@ -22,7 +26,18 @@ def helper_controller_delete_entities(uuid): # noqa: E501 :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] """ - return 'do some magic!' + return helper_operations.remove_entities(uuid) + + +def helper_controller_get_ccf_id(): # noqa: E501 + """Get CCF ID + + Retrieves the CCF ID of the CAPIF Core Function. # noqa: E501 + + + :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] + """ + return helper_operations.get_ccf_id() def helper_controller_get_events(subscriber_id=None, subscription_id=None, page_size=None, page=None): # noqa: E501 @@ -41,7 +56,7 @@ def helper_controller_get_events(subscriber_id=None, subscription_id=None, page_ :rtype: Union[PaginatedResponseEvent, Tuple[PaginatedResponseEvent, int], Tuple[PaginatedResponseEvent, int, Dict[str, str]] """ - return 'do some magic!' + return helper_operations.get_events(subscriber_id, subscription_id, page_size, page) def helper_controller_get_invokers(uuid=None, api_invoker_id=None, page_size=None, page=None, sort_order=None): # noqa: E501 @@ -62,7 +77,7 @@ def helper_controller_get_invokers(uuid=None, api_invoker_id=None, page_size=Non :rtype: Union[PaginatedResponseInvoker, Tuple[PaginatedResponseInvoker, int], Tuple[PaginatedResponseInvoker, int, Dict[str, str]] """ - return 'do some magic!' + return helper_operations.get_invokers(uuid, api_invoker_id, page_size, page, sort_order) def helper_controller_get_providers(uuid=None, api_prov_dom_id=None, page_size=None, page=None, sort_order=None): # noqa: E501 @@ -83,7 +98,7 @@ def helper_controller_get_providers(uuid=None, api_prov_dom_id=None, page_size=N :rtype: Union[PaginatedResponseProvider, Tuple[PaginatedResponseProvider, int], Tuple[PaginatedResponseProvider, int, Dict[str, str]] """ - return 'do some magic!' + return helper_operations.get_providers(uuid, api_prov_dom_id, page_size, page, sort_order) def helper_controller_get_security(invoker_id=None, page_size=None, page=None): # noqa: E501 @@ -100,7 +115,7 @@ def helper_controller_get_security(invoker_id=None, page_size=None, page=None): :rtype: Union[PaginatedResponseSecurity, Tuple[PaginatedResponseSecurity, int], Tuple[PaginatedResponseSecurity, int, Dict[str, str]] """ - return 'do some magic!' + return helper_operations.get_security(invoker_id, page_size, page) def helper_controller_get_services(service_id=None, apf_id=None, api_name=None, page_size=None, page=None, sort_order=None): # noqa: E501 @@ -123,4 +138,4 @@ def helper_controller_get_services(service_id=None, apf_id=None, api_name=None, :rtype: Union[PaginatedResponseService, Tuple[PaginatedResponseService, int], Tuple[PaginatedResponseService, int, Dict[str, str]] """ - return 'do some magic!' + return helper_operations.get_services(service_id, apf_id, api_name, page_size, page, sort_order) diff --git a/services/helper/helper_service/core/helper_operations.py b/services/helper/helper_service/services/api/core/helper_operations.py similarity index 55% rename from services/helper/helper_service/core/helper_operations.py rename to services/helper/helper_service/services/api/core/helper_operations.py index 6f1fe63e..f0e5514d 100644 --- a/services/helper/helper_service/core/helper_operations.py +++ b/services/helper/helper_service/services/api/core/helper_operations.py @@ -3,27 +3,16 @@ import os import pymongo import requests from config import Config -from db.db import MongoDatabse +from db.db import get_mongo from flask import current_app, jsonify -from utils.utils import ( - convert_dict_keys_to_snake_case, - convert_nested_values, - convert_value_to_original_type, - get_nested_value, - to_snake_case, - validate_snake_case_keys -) - class HelperOperations: - PROTECTED_FIELDS = ["ccf_id"] - def __init__(self): - self.db = MongoDatabse() + self.db = get_mongo() self.mimetype = 'application/json' self.config = Config().get_config() - + def get_invokers(self, uuid, invoker_id, page, page_size, sort_order): current_app.logger.debug(f"Getting the invokers") invoker_col = self.db.get_col_by_name(self.db.invoker_col) @@ -56,7 +45,6 @@ class HelperOperations: totalPages = pages, sortOrder = sort_order), 200 - def get_providers(self, uuid, provider_id, page, page_size, sort_order): current_app.logger.debug(f"Getting the providers") provider_col = self.db.get_col_by_name(self.db.provider_col) @@ -210,164 +198,6 @@ class HelperOperations: current_app.logger.debug(f"User entities removed successfully") return jsonify(message="User entities removed successfully"), 200 - - def get_configuration(self): - """Get all current settings.""" - current_app.logger.debug("Retrieving current CAPIF configuration") - config_col = self.db.get_col_by_name(self.db.capif_configuration) - config = config_col.find_one({}, {"_id": 0}) - - if not config: - return jsonify(message="No CAPIF configuration found"), 404 - - return jsonify(config), 200 - - - def update_config_param(self, param_path, new_value): - """ - Updates a single parameter in the configuration. - param_path: Path of the parameter (e.g., settings.acl_policy_settings.allowed_total_invocations) - """ - current_app.logger.debug(f"Updating configuration parameter: {param_path} with value: {new_value}") - - # Protect immutable fields - if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): - return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be modified"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - existing_config = config_col.find_one({}, {"_id": 0}) - current_value = get_nested_value(existing_config, param_path) - - if current_value is None: - return jsonify(message=f"The parameter '{param_path}' does not exist in the configuration"), 404 - - converted_value = convert_value_to_original_type(new_value, current_value) - - if isinstance(converted_value, tuple): - return converted_value - - update_query = {"$set": {param_path: converted_value}} - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or parameter '{param_path}' not updated"), 404 - - return jsonify(message=f"Parameter '{param_path}' updated successfully"), 200 - - - def replace_configuration(self, new_config): - current_app.logger.debug("Replacing entire CAPIF configuration") - - error_response = validate_snake_case_keys(new_config) - if error_response: - return error_response - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - existing_config = config_col.find_one({}, {"_id": 0}) - - if not existing_config: - return jsonify(message="No existing configuration found"), 404 - - # Preserve protected fields - for field in self.PROTECTED_FIELDS: - if field in existing_config: - new_config[field] = existing_config[field] - - new_config = convert_nested_values(new_config, existing_config) - result = config_col.replace_one({}, new_config, upsert=True) - - return jsonify(message="Configuration replaced successfully (protected fields preserved)"), 200 - - - def add_new_configuration(self, category_name, category_values): - """ - Add a new category of parameters in 'settings'. - """ - current_app.logger.debug(f"Adding new category: {category_name} with values: {category_values}") - - # Block protected field creation - if category_name in self.PROTECTED_FIELDS: - return jsonify(message=f"The category '{category_name}' is immutable and cannot be modified"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - category_name_snake = to_snake_case(category_name) - category_values_snake = convert_dict_keys_to_snake_case(category_values) - - update_query = {"$set": {f"settings.{category_name_snake}": category_values_snake}} - - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or category '{category_name_snake}' not added"), 404 - - return jsonify(message=f"Category '{category_name_snake}' added successfully"), 200 - - - def add_new_config_setting(self, param_path, new_value): - """Add a new parameter in 'settings'.""" - current_app.logger.debug(f"Adding new configuration setting: {param_path} with value: {new_value}") - - # Block protected field creation - if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): - return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be added or modified"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) - - update_query = {"$set": {f"settings.{param_path_snake}": new_value}} - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or parameter '{param_path_snake}' not updated"), 404 - - return jsonify(message=f"Parameter '{param_path_snake}' added successfully"), 200 - - - def remove_config_param(self, param_path): - """Removes a specific parameter inside 'settings'.""" - current_app.logger.debug(f"Removing configuration parameter: {param_path}") - - # Prevent deletion of protected fields - if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): - return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be removed"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) - - update_query = {"$unset": {f"settings.{param_path_snake}": ""}} - - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or parameter '{param_path_snake}' not removed"), 404 - - return jsonify(message=f"Parameter '{param_path_snake}' removed successfully"), 200 - - - def remove_config_category(self, category_name): - """Removes an entire category inside 'settings'.""" - current_app.logger.debug(f"Removing configuration category: {category_name}") - - # Prevent deletion of protected fields - if category_name in self.PROTECTED_FIELDS: - return jsonify(message=f"The category '{category_name}' is immutable and cannot be removed"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - category_name_snake = to_snake_case(category_name) - - update_query = {"$unset": {f"settings.{category_name_snake}": ""}} - - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or category '{category_name_snake}' not removed"), 404 - - return jsonify(message=f"Category '{category_name_snake}' removed successfully"), 200 def get_ccf_id(self): """ diff --git a/services/helper/helper_service/services/api/openapi/openapi.yaml b/services/helper/helper_service/services/api/openapi/openapi.yaml index 334e6962..9853138b 100644 --- a/services/helper/helper_service/services/api/openapi/openapi.yaml +++ b/services/helper/helper_service/services/api/openapi/openapi.yaml @@ -49,6 +49,33 @@ paths: description: Generic error response. summary: Delete entities by UUID x-openapi-router-controller: api.controllers.default_controller + /getCcfId: + get: + description: Retrieves the CCF ID of the CAPIF Core Function. + operationId: helper_controller_get_ccf_id + responses: + "200": + description: CCF ID retrieved successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Get CCF ID + x-openapi-router-controller: api.controllers.default_controller /getEvents: get: description: Returns CAPIF event subscriptions or delivered events. diff --git a/services/helper/helper_service/services/configuration/controllers/default_controller.py b/services/helper/helper_service/services/configuration/controllers/default_controller.py index 49742bc1..100bedac 100644 --- a/services/helper/helper_service/services/configuration/controllers/default_controller.py +++ b/services/helper/helper_service/services/configuration/controllers/default_controller.py @@ -3,13 +3,26 @@ from typing import Dict from typing import Tuple from typing import Union +from configuration.models.capif_configuration import CapifConfiguration # noqa: E501 from configuration.models.config_category_create_request import ConfigCategoryCreateRequest # noqa: E501 -from configuration.models.config_category_remove_request import ConfigCategoryRemoveRequest # noqa: E501 -from configuration.models.config_param_remove_request import ConfigParamRemoveRequest # noqa: E501 from configuration.models.config_param_update_request import ConfigParamUpdateRequest # noqa: E501 from configuration.models.generic_error import GenericError # noqa: E501 from configuration import util +from ..core.configuration_operations import ConfigurationOperations + +config_operations = ConfigurationOperations() + +def configuration_controller_get_configuration(): # noqa: E501 + """Read full configuration + + Returns the entire CAPIF configuration document. # noqa: E501 + + + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] + """ + return config_operations.get_configuration() + def dynamic_config_controller_add_new_config_setting(body): # noqa: E501 """Add new config setting at path @@ -19,12 +32,15 @@ def dynamic_config_controller_add_new_config_setting(body): # noqa: E501 :param config_param_update_request: :type config_param_update_request: dict | bytes - :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] """ config_param_update_request = body if connexion.request.is_json: config_param_update_request = ConfigParamUpdateRequest.from_dict(connexion.request.get_json()) # noqa: E501 - return 'do some magic!' + return config_operations.add_new_config_setting( + config_param_update_request.param_path, + config_param_update_request.new_value + ) def dynamic_config_controller_add_new_configuration(body): # noqa: E501 @@ -35,55 +51,41 @@ def dynamic_config_controller_add_new_configuration(body): # noqa: E501 :param config_category_create_request: :type config_category_create_request: dict | bytes - :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] """ config_category_create_request = body if connexion.request.is_json: config_category_create_request = ConfigCategoryCreateRequest.from_dict(connexion.request.get_json()) # noqa: E501 - return 'do some magic!' - - -def dynamic_config_controller_get_configuration(): # noqa: E501 - """Read full configuration - - Returns the entire CAPIF configuration document. # noqa: E501 - - - :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] - """ - return 'do some magic!' + return config_operations.add_new_configuration( + config_category_create_request.category_name, + config_category_create_request.category_values + ) -def dynamic_config_controller_remove_config_category(body): # noqa: E501 +def dynamic_config_controller_remove_config_category(config_path): # noqa: E501 """Remove configuration category Deletes an entire top-level category by name. # noqa: E501 - :param config_category_remove_request: - :type config_category_remove_request: dict | bytes + :param config_path: Configuration path to remove + :type config_path: str - :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] """ - config_category_remove_request = body - if connexion.request.is_json: - config_category_remove_request = ConfigCategoryRemoveRequest.from_dict(connexion.request.get_json()) # noqa: E501 - return 'do some magic!' + return config_operations.remove_config_category(config_path) -def dynamic_config_controller_remove_config_param(body): # noqa: E501 +def dynamic_config_controller_remove_config_param(param_path): # noqa: E501 """Remove config parameter Deletes a leaf parameter by dotted path. # noqa: E501 - :param config_param_remove_request: - :type config_param_remove_request: dict | bytes + :param param_path: Parameter path to remove + :type param_path: str - :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] """ - config_param_remove_request = body - if connexion.request.is_json: - config_param_remove_request = ConfigParamRemoveRequest.from_dict(connexion.request.get_json()) # noqa: E501 - return 'do some magic!' + return config_operations.remove_config_param(param_path) def dynamic_config_controller_replace_configuration(body): # noqa: E501 @@ -91,13 +93,15 @@ def dynamic_config_controller_replace_configuration(body): # noqa: E501 Replaces the configuration document with a new one. # noqa: E501 - :param request_body: - :type request_body: Dict[str, ] + :param capif_configuration: + :type capif_configuration: dict | bytes - :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] """ - request_body = body - return 'do some magic!' + capif_configuration = body + if connexion.request.is_json: + capif_configuration = CapifConfiguration.from_dict(connexion.request.get_json()) # noqa: E501 + return config_operations.replace_configuration(capif_configuration.to_dict()) def dynamic_config_controller_update_config_param(body): # noqa: E501 @@ -108,9 +112,12 @@ def dynamic_config_controller_update_config_param(body): # noqa: E501 :param config_param_update_request: :type config_param_update_request: dict | bytes - :rtype: Union[Dict[str, object], Tuple[Dict[str, object], int], Tuple[Dict[str, object], int, Dict[str, str]] + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] """ config_param_update_request = body if connexion.request.is_json: config_param_update_request = ConfigParamUpdateRequest.from_dict(connexion.request.get_json()) # noqa: E501 - return 'do some magic!' + return config_operations.update_config_param( + config_param_update_request.param_path, + config_param_update_request.new_value + ) diff --git a/services/helper/helper_service/services/configuration/core/configuration_operations.py b/services/helper/helper_service/services/configuration/core/configuration_operations.py new file mode 100644 index 00000000..a820b5d9 --- /dev/null +++ b/services/helper/helper_service/services/configuration/core/configuration_operations.py @@ -0,0 +1,181 @@ +import os + +import pymongo +import requests +from config import Config +from db.db import MongoDatabse +from flask import current_app, jsonify +from utils.utils import ( + convert_dict_keys_to_snake_case, + convert_nested_values, + convert_value_to_original_type, + get_nested_value, + to_snake_case, + validate_snake_case_keys +) + +class ConfigurationOperations: + + PROTECTED_FIELDS = ["ccf_id"] + + def __init__(self): + self.db = MongoDatabse() + self.mimetype = 'application/json' + self.config = Config().get_config() + + def get_configuration(self): + """Get all current settings.""" + current_app.logger.debug("Retrieving current CAPIF configuration") + config_col = self.db.get_col_by_name(self.db.capif_configuration) + config = config_col.find_one({}, {"_id": 0}) + + if not config: + return jsonify(message="No CAPIF configuration found"), 404 + + return jsonify(config), 200 + + def update_config_param(self, param_path, new_value): + """ + Updates a single parameter in the configuration. + param_path: Path of the parameter (e.g., settings.acl_policy_settings.allowed_total_invocations) + """ + current_app.logger.debug(f"Updating configuration parameter: {param_path} with value: {new_value}") + + # Protect immutable fields + if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): + return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be modified"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + existing_config = config_col.find_one({}, {"_id": 0}) + current_value = get_nested_value(existing_config, param_path) + + if current_value is None: + return jsonify(message=f"The parameter '{param_path}' does not exist in the configuration"), 404 + + converted_value = convert_value_to_original_type(new_value, current_value) + + if isinstance(converted_value, tuple): + return converted_value + + update_query = {"$set": {param_path: converted_value}} + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or parameter '{param_path}' not updated"), 404 + + return jsonify(message=f"Parameter '{param_path}' updated successfully"), 200 + + + def replace_configuration(self, new_config): + current_app.logger.debug("Replacing entire CAPIF configuration") + + error_response = validate_snake_case_keys(new_config) + if error_response: + return error_response + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + existing_config = config_col.find_one({}, {"_id": 0}) + + if not existing_config: + return jsonify(message="No existing configuration found"), 404 + + # Preserve protected fields + for field in self.PROTECTED_FIELDS: + if field in existing_config: + new_config[field] = existing_config[field] + + new_config = convert_nested_values(new_config, existing_config) + result = config_col.replace_one({}, new_config, upsert=True) + + return jsonify(message="Configuration replaced successfully (protected fields preserved)"), 200 + + + def add_new_configuration(self, category_name, category_values): + """ + Add a new category of parameters in 'settings'. + """ + current_app.logger.debug(f"Adding new category: {category_name} with values: {category_values}") + + # Block protected field creation + if category_name in self.PROTECTED_FIELDS: + return jsonify(message=f"The category '{category_name}' is immutable and cannot be modified"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + category_name_snake = to_snake_case(category_name) + category_values_snake = convert_dict_keys_to_snake_case(category_values) + + update_query = {"$set": {f"settings.{category_name_snake}": category_values_snake}} + + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or category '{category_name_snake}' not added"), 404 + + return jsonify(message=f"Category '{category_name_snake}' added successfully"), 200 + + + def add_new_config_setting(self, param_path, new_value): + """Add a new parameter in 'settings'.""" + current_app.logger.debug(f"Adding new configuration setting: {param_path} with value: {new_value}") + + # Block protected field creation + if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): + return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be added or modified"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) + + update_query = {"$set": {f"settings.{param_path_snake}": new_value}} + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or parameter '{param_path_snake}' not updated"), 404 + + return jsonify(message=f"Parameter '{param_path_snake}' added successfully"), 200 + + + def remove_config_param(self, param_path): + """Removes a specific parameter inside 'settings'.""" + current_app.logger.debug(f"Removing configuration parameter: {param_path}") + + # Prevent deletion of protected fields + if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): + return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be removed"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) + + update_query = {"$unset": {f"settings.{param_path_snake}": ""}} + + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or parameter '{param_path_snake}' not removed"), 404 + + return jsonify(message=f"Parameter '{param_path_snake}' removed successfully"), 200 + + + def remove_config_category(self, category_name): + """Removes an entire category inside 'settings'.""" + current_app.logger.debug(f"Removing configuration category: {category_name}") + + # Prevent deletion of protected fields + if category_name in self.PROTECTED_FIELDS: + return jsonify(message=f"The category '{category_name}' is immutable and cannot be removed"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + category_name_snake = to_snake_case(category_name) + + update_query = {"$unset": {f"settings.{category_name_snake}": ""}} + + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or category '{category_name_snake}' not removed"), 404 + + return jsonify(message=f"Category '{category_name_snake}' removed successfully"), 200 \ No newline at end of file diff --git a/services/helper/helper_service/services/configuration/models/__init__.py b/services/helper/helper_service/services/configuration/models/__init__.py index 63402577..951c845b 100644 --- a/services/helper/helper_service/services/configuration/models/__init__.py +++ b/services/helper/helper_service/services/configuration/models/__init__.py @@ -1,7 +1,10 @@ # flake8: noqa # import models into model package +from configuration.models.capif_configuration import CapifConfiguration from configuration.models.config_category_create_request import ConfigCategoryCreateRequest -from configuration.models.config_category_remove_request import ConfigCategoryRemoveRequest -from configuration.models.config_param_remove_request import ConfigParamRemoveRequest from configuration.models.config_param_update_request import ConfigParamUpdateRequest from configuration.models.generic_error import GenericError +from configuration.models.settings import Settings +from configuration.models.settings_acl_policy_settings import SettingsAclPolicySettings +from configuration.models.settings_certificates_expiry import SettingsCertificatesExpiry +from configuration.models.settings_security_method_priority import SettingsSecurityMethodPriority diff --git a/services/helper/helper_service/services/configuration/models/capif_configuration.py b/services/helper/helper_service/services/configuration/models/capif_configuration.py new file mode 100644 index 00000000..e51aa812 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/capif_configuration.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration.models.settings import Settings +from configuration import util + +from configuration.models.settings import Settings # noqa: E501 + +class CapifConfiguration(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, config_name=None, version=None, settings=None): # noqa: E501 + """CapifConfiguration - a model defined in OpenAPI + + :param config_name: The config_name of this CapifConfiguration. # noqa: E501 + :type config_name: str + :param version: The version of this CapifConfiguration. # noqa: E501 + :type version: str + :param settings: The settings of this CapifConfiguration. # noqa: E501 + :type settings: List[Settings] + """ + self.openapi_types = { + 'config_name': str, + 'version': str, + 'settings': List[Settings] + } + + self.attribute_map = { + 'config_name': 'config_name', + 'version': 'version', + 'settings': 'settings' + } + + self._config_name = config_name + self._version = version + self._settings = settings + + @classmethod + def from_dict(cls, dikt) -> 'CapifConfiguration': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CapifConfiguration of this CapifConfiguration. # noqa: E501 + :rtype: CapifConfiguration + """ + return util.deserialize_model(dikt, cls) + + @property + def config_name(self) -> str: + """Gets the config_name of this CapifConfiguration. + + Configuration name # noqa: E501 + + :return: The config_name of this CapifConfiguration. + :rtype: str + """ + return self._config_name + + @config_name.setter + def config_name(self, config_name: str): + """Sets the config_name of this CapifConfiguration. + + Configuration name # noqa: E501 + + :param config_name: The config_name of this CapifConfiguration. + :type config_name: str + """ + + self._config_name = config_name + + @property + def version(self) -> str: + """Gets the version of this CapifConfiguration. + + configuration version # noqa: E501 + + :return: The version of this CapifConfiguration. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version: str): + """Sets the version of this CapifConfiguration. + + configuration version # noqa: E501 + + :param version: The version of this CapifConfiguration. + :type version: str + """ + + self._version = version + + @property + def settings(self) -> List[Settings]: + """Gets the settings of this CapifConfiguration. + + + :return: The settings of this CapifConfiguration. + :rtype: List[Settings] + """ + return self._settings + + @settings.setter + def settings(self, settings: List[Settings]): + """Sets the settings of this CapifConfiguration. + + + :param settings: The settings of this CapifConfiguration. + :type settings: List[Settings] + """ + + self._settings = settings diff --git a/services/helper/helper_service/services/configuration/models/config_category_remove_request.py b/services/helper/helper_service/services/configuration/models/config_category_remove_request.py deleted file mode 100644 index ac9dca7d..00000000 --- a/services/helper/helper_service/services/configuration/models/config_category_remove_request.py +++ /dev/null @@ -1,65 +0,0 @@ -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model -from configuration import util - - -class ConfigCategoryRemoveRequest(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - def __init__(self, category_name=None): # noqa: E501 - """ConfigCategoryRemoveRequest - a model defined in OpenAPI - - :param category_name: The category_name of this ConfigCategoryRemoveRequest. # noqa: E501 - :type category_name: str - """ - self.openapi_types = { - 'category_name': str - } - - self.attribute_map = { - 'category_name': 'category_name' - } - - self._category_name = category_name - - @classmethod - def from_dict(cls, dikt) -> 'ConfigCategoryRemoveRequest': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The ConfigCategoryRemoveRequest of this ConfigCategoryRemoveRequest. # noqa: E501 - :rtype: ConfigCategoryRemoveRequest - """ - return util.deserialize_model(dikt, cls) - - @property - def category_name(self) -> str: - """Gets the category_name of this ConfigCategoryRemoveRequest. - - Name of the category to remove. # noqa: E501 - - :return: The category_name of this ConfigCategoryRemoveRequest. - :rtype: str - """ - return self._category_name - - @category_name.setter - def category_name(self, category_name: str): - """Sets the category_name of this ConfigCategoryRemoveRequest. - - Name of the category to remove. # noqa: E501 - - :param category_name: The category_name of this ConfigCategoryRemoveRequest. - :type category_name: str - """ - if category_name is None: - raise ValueError("Invalid value for `category_name`, must not be `None`") # noqa: E501 - - self._category_name = category_name diff --git a/services/helper/helper_service/services/configuration/models/config_param_remove_request.py b/services/helper/helper_service/services/configuration/models/config_param_remove_request.py deleted file mode 100644 index 858723c9..00000000 --- a/services/helper/helper_service/services/configuration/models/config_param_remove_request.py +++ /dev/null @@ -1,65 +0,0 @@ -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model -from configuration import util - - -class ConfigParamRemoveRequest(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - def __init__(self, param_path=None): # noqa: E501 - """ConfigParamRemoveRequest - a model defined in OpenAPI - - :param param_path: The param_path of this ConfigParamRemoveRequest. # noqa: E501 - :type param_path: str - """ - self.openapi_types = { - 'param_path': str - } - - self.attribute_map = { - 'param_path': 'param_path' - } - - self._param_path = param_path - - @classmethod - def from_dict(cls, dikt) -> 'ConfigParamRemoveRequest': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The ConfigParamRemoveRequest of this ConfigParamRemoveRequest. # noqa: E501 - :rtype: ConfigParamRemoveRequest - """ - return util.deserialize_model(dikt, cls) - - @property - def param_path(self) -> str: - """Gets the param_path of this ConfigParamRemoveRequest. - - Dotted path to the configuration value to delete. # noqa: E501 - - :return: The param_path of this ConfigParamRemoveRequest. - :rtype: str - """ - return self._param_path - - @param_path.setter - def param_path(self, param_path: str): - """Sets the param_path of this ConfigParamRemoveRequest. - - Dotted path to the configuration value to delete. # noqa: E501 - - :param param_path: The param_path of this ConfigParamRemoveRequest. - :type param_path: str - """ - if param_path is None: - raise ValueError("Invalid value for `param_path`, must not be `None`") # noqa: E501 - - self._param_path = param_path diff --git a/services/helper/helper_service/services/configuration/models/settings.py b/services/helper/helper_service/services/configuration/models/settings.py new file mode 100644 index 00000000..c658eae4 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/settings.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration.models.settings_acl_policy_settings import SettingsAclPolicySettings +from configuration.models.settings_certificates_expiry import SettingsCertificatesExpiry +from configuration.models.settings_security_method_priority import SettingsSecurityMethodPriority +from configuration import util + +from configuration.models.settings_acl_policy_settings import SettingsAclPolicySettings # noqa: E501 +from configuration.models.settings_certificates_expiry import SettingsCertificatesExpiry # noqa: E501 +from configuration.models.settings_security_method_priority import SettingsSecurityMethodPriority # noqa: E501 + +class Settings(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, certificates_expiry=None, security_method_priority=None, acl_policy_settings=None): # noqa: E501 + """Settings - a model defined in OpenAPI + + :param certificates_expiry: The certificates_expiry of this Settings. # noqa: E501 + :type certificates_expiry: SettingsCertificatesExpiry + :param security_method_priority: The security_method_priority of this Settings. # noqa: E501 + :type security_method_priority: SettingsSecurityMethodPriority + :param acl_policy_settings: The acl_policy_settings of this Settings. # noqa: E501 + :type acl_policy_settings: SettingsAclPolicySettings + """ + self.openapi_types = { + 'certificates_expiry': SettingsCertificatesExpiry, + 'security_method_priority': SettingsSecurityMethodPriority, + 'acl_policy_settings': SettingsAclPolicySettings + } + + self.attribute_map = { + 'certificates_expiry': 'certificates_expiry', + 'security_method_priority': 'security_method_priority', + 'acl_policy_settings': 'acl_policy_settings' + } + + self._certificates_expiry = certificates_expiry + self._security_method_priority = security_method_priority + self._acl_policy_settings = acl_policy_settings + + @classmethod + def from_dict(cls, dikt) -> 'Settings': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Settings of this Settings. # noqa: E501 + :rtype: Settings + """ + return util.deserialize_model(dikt, cls) + + @property + def certificates_expiry(self) -> SettingsCertificatesExpiry: + """Gets the certificates_expiry of this Settings. + + + :return: The certificates_expiry of this Settings. + :rtype: SettingsCertificatesExpiry + """ + return self._certificates_expiry + + @certificates_expiry.setter + def certificates_expiry(self, certificates_expiry: SettingsCertificatesExpiry): + """Sets the certificates_expiry of this Settings. + + + :param certificates_expiry: The certificates_expiry of this Settings. + :type certificates_expiry: SettingsCertificatesExpiry + """ + + self._certificates_expiry = certificates_expiry + + @property + def security_method_priority(self) -> SettingsSecurityMethodPriority: + """Gets the security_method_priority of this Settings. + + + :return: The security_method_priority of this Settings. + :rtype: SettingsSecurityMethodPriority + """ + return self._security_method_priority + + @security_method_priority.setter + def security_method_priority(self, security_method_priority: SettingsSecurityMethodPriority): + """Sets the security_method_priority of this Settings. + + + :param security_method_priority: The security_method_priority of this Settings. + :type security_method_priority: SettingsSecurityMethodPriority + """ + + self._security_method_priority = security_method_priority + + @property + def acl_policy_settings(self) -> SettingsAclPolicySettings: + """Gets the acl_policy_settings of this Settings. + + + :return: The acl_policy_settings of this Settings. + :rtype: SettingsAclPolicySettings + """ + return self._acl_policy_settings + + @acl_policy_settings.setter + def acl_policy_settings(self, acl_policy_settings: SettingsAclPolicySettings): + """Sets the acl_policy_settings of this Settings. + + + :param acl_policy_settings: The acl_policy_settings of this Settings. + :type acl_policy_settings: SettingsAclPolicySettings + """ + + self._acl_policy_settings = acl_policy_settings diff --git a/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py b/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py new file mode 100644 index 00000000..d018f225 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class SettingsAclPolicySettings(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, allowed_total_invocations=None, allowed_invocations_per_second=None, allowed_invocations_time_range_days=None): # noqa: E501 + """SettingsAclPolicySettings - a model defined in OpenAPI + + :param allowed_total_invocations: The allowed_total_invocations of this SettingsAclPolicySettings. # noqa: E501 + :type allowed_total_invocations: str + :param allowed_invocations_per_second: The allowed_invocations_per_second of this SettingsAclPolicySettings. # noqa: E501 + :type allowed_invocations_per_second: str + :param allowed_invocations_time_range_days: The allowed_invocations_time_range_days of this SettingsAclPolicySettings. # noqa: E501 + :type allowed_invocations_time_range_days: int + """ + self.openapi_types = { + 'allowed_total_invocations': str, + 'allowed_invocations_per_second': str, + 'allowed_invocations_time_range_days': int + } + + self.attribute_map = { + 'allowed_total_invocations': 'allowed_total_invocations', + 'allowed_invocations_per_second': 'allowed_invocations_per_second', + 'allowed_invocations_time_range_days': 'allowed_invocations_time_range_days' + } + + self._allowed_total_invocations = allowed_total_invocations + self._allowed_invocations_per_second = allowed_invocations_per_second + self._allowed_invocations_time_range_days = allowed_invocations_time_range_days + + @classmethod + def from_dict(cls, dikt) -> 'SettingsAclPolicySettings': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Settings_acl_policy_settings of this SettingsAclPolicySettings. # noqa: E501 + :rtype: SettingsAclPolicySettings + """ + return util.deserialize_model(dikt, cls) + + @property + def allowed_total_invocations(self) -> str: + """Gets the allowed_total_invocations of this SettingsAclPolicySettings. + + total number of requests the invoker can make # noqa: E501 + + :return: The allowed_total_invocations of this SettingsAclPolicySettings. + :rtype: str + """ + return self._allowed_total_invocations + + @allowed_total_invocations.setter + def allowed_total_invocations(self, allowed_total_invocations: str): + """Sets the allowed_total_invocations of this SettingsAclPolicySettings. + + total number of requests the invoker can make # noqa: E501 + + :param allowed_total_invocations: The allowed_total_invocations of this SettingsAclPolicySettings. + :type allowed_total_invocations: str + """ + + self._allowed_total_invocations = allowed_total_invocations + + @property + def allowed_invocations_per_second(self) -> str: + """Gets the allowed_invocations_per_second of this SettingsAclPolicySettings. + + total number of requests the invoker can make per second # noqa: E501 + + :return: The allowed_invocations_per_second of this SettingsAclPolicySettings. + :rtype: str + """ + return self._allowed_invocations_per_second + + @allowed_invocations_per_second.setter + def allowed_invocations_per_second(self, allowed_invocations_per_second: str): + """Sets the allowed_invocations_per_second of this SettingsAclPolicySettings. + + total number of requests the invoker can make per second # noqa: E501 + + :param allowed_invocations_per_second: The allowed_invocations_per_second of this SettingsAclPolicySettings. + :type allowed_invocations_per_second: str + """ + + self._allowed_invocations_per_second = allowed_invocations_per_second + + @property + def allowed_invocations_time_range_days(self) -> int: + """Gets the allowed_invocations_time_range_days of this SettingsAclPolicySettings. + + time range when an invoker can make requests # noqa: E501 + + :return: The allowed_invocations_time_range_days of this SettingsAclPolicySettings. + :rtype: int + """ + return self._allowed_invocations_time_range_days + + @allowed_invocations_time_range_days.setter + def allowed_invocations_time_range_days(self, allowed_invocations_time_range_days: int): + """Sets the allowed_invocations_time_range_days of this SettingsAclPolicySettings. + + time range when an invoker can make requests # noqa: E501 + + :param allowed_invocations_time_range_days: The allowed_invocations_time_range_days of this SettingsAclPolicySettings. + :type allowed_invocations_time_range_days: int + """ + + self._allowed_invocations_time_range_days = allowed_invocations_time_range_days diff --git a/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py b/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py new file mode 100644 index 00000000..c08aaad0 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class SettingsCertificatesExpiry(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, ttl_superadmin_cert=None, ttl_invoker_cert=None, ttl_provider_cert=None): # noqa: E501 + """SettingsCertificatesExpiry - a model defined in OpenAPI + + :param ttl_superadmin_cert: The ttl_superadmin_cert of this SettingsCertificatesExpiry. # noqa: E501 + :type ttl_superadmin_cert: str + :param ttl_invoker_cert: The ttl_invoker_cert of this SettingsCertificatesExpiry. # noqa: E501 + :type ttl_invoker_cert: str + :param ttl_provider_cert: The ttl_provider_cert of this SettingsCertificatesExpiry. # noqa: E501 + :type ttl_provider_cert: str + """ + self.openapi_types = { + 'ttl_superadmin_cert': str, + 'ttl_invoker_cert': str, + 'ttl_provider_cert': str + } + + self.attribute_map = { + 'ttl_superadmin_cert': 'ttl_superadmin_cert', + 'ttl_invoker_cert': 'ttl_invoker_cert', + 'ttl_provider_cert': 'ttl_provider_cert' + } + + self._ttl_superadmin_cert = ttl_superadmin_cert + self._ttl_invoker_cert = ttl_invoker_cert + self._ttl_provider_cert = ttl_provider_cert + + @classmethod + def from_dict(cls, dikt) -> 'SettingsCertificatesExpiry': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Settings_certificates_expiry of this SettingsCertificatesExpiry. # noqa: E501 + :rtype: SettingsCertificatesExpiry + """ + return util.deserialize_model(dikt, cls) + + @property + def ttl_superadmin_cert(self) -> str: + """Gets the ttl_superadmin_cert of this SettingsCertificatesExpiry. + + ttl for superadmin certificates # noqa: E501 + + :return: The ttl_superadmin_cert of this SettingsCertificatesExpiry. + :rtype: str + """ + return self._ttl_superadmin_cert + + @ttl_superadmin_cert.setter + def ttl_superadmin_cert(self, ttl_superadmin_cert: str): + """Sets the ttl_superadmin_cert of this SettingsCertificatesExpiry. + + ttl for superadmin certificates # noqa: E501 + + :param ttl_superadmin_cert: The ttl_superadmin_cert of this SettingsCertificatesExpiry. + :type ttl_superadmin_cert: str + """ + + self._ttl_superadmin_cert = ttl_superadmin_cert + + @property + def ttl_invoker_cert(self) -> str: + """Gets the ttl_invoker_cert of this SettingsCertificatesExpiry. + + ttl for invoker certificates # noqa: E501 + + :return: The ttl_invoker_cert of this SettingsCertificatesExpiry. + :rtype: str + """ + return self._ttl_invoker_cert + + @ttl_invoker_cert.setter + def ttl_invoker_cert(self, ttl_invoker_cert: str): + """Sets the ttl_invoker_cert of this SettingsCertificatesExpiry. + + ttl for invoker certificates # noqa: E501 + + :param ttl_invoker_cert: The ttl_invoker_cert of this SettingsCertificatesExpiry. + :type ttl_invoker_cert: str + """ + + self._ttl_invoker_cert = ttl_invoker_cert + + @property + def ttl_provider_cert(self) -> str: + """Gets the ttl_provider_cert of this SettingsCertificatesExpiry. + + ttl for provider certificates # noqa: E501 + + :return: The ttl_provider_cert of this SettingsCertificatesExpiry. + :rtype: str + """ + return self._ttl_provider_cert + + @ttl_provider_cert.setter + def ttl_provider_cert(self, ttl_provider_cert: str): + """Sets the ttl_provider_cert of this SettingsCertificatesExpiry. + + ttl for provider certificates # noqa: E501 + + :param ttl_provider_cert: The ttl_provider_cert of this SettingsCertificatesExpiry. + :type ttl_provider_cert: str + """ + + self._ttl_provider_cert = ttl_provider_cert diff --git a/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py b/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py new file mode 100644 index 00000000..4dcc573b --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py @@ -0,0 +1,113 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class SettingsSecurityMethodPriority(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, oauth=None, pki=None, psk=None): # noqa: E501 + """SettingsSecurityMethodPriority - a model defined in OpenAPI + + :param oauth: The oauth of this SettingsSecurityMethodPriority. # noqa: E501 + :type oauth: int + :param pki: The pki of this SettingsSecurityMethodPriority. # noqa: E501 + :type pki: int + :param psk: The psk of this SettingsSecurityMethodPriority. # noqa: E501 + :type psk: int + """ + self.openapi_types = { + 'oauth': int, + 'pki': int, + 'psk': int + } + + self.attribute_map = { + 'oauth': 'oauth', + 'pki': 'pki', + 'psk': 'psk' + } + + self._oauth = oauth + self._pki = pki + self._psk = psk + + @classmethod + def from_dict(cls, dikt) -> 'SettingsSecurityMethodPriority': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Settings_security_method_priority of this SettingsSecurityMethodPriority. # noqa: E501 + :rtype: SettingsSecurityMethodPriority + """ + return util.deserialize_model(dikt, cls) + + @property + def oauth(self) -> int: + """Gets the oauth of this SettingsSecurityMethodPriority. + + + :return: The oauth of this SettingsSecurityMethodPriority. + :rtype: int + """ + return self._oauth + + @oauth.setter + def oauth(self, oauth: int): + """Sets the oauth of this SettingsSecurityMethodPriority. + + + :param oauth: The oauth of this SettingsSecurityMethodPriority. + :type oauth: int + """ + + self._oauth = oauth + + @property + def pki(self) -> int: + """Gets the pki of this SettingsSecurityMethodPriority. + + + :return: The pki of this SettingsSecurityMethodPriority. + :rtype: int + """ + return self._pki + + @pki.setter + def pki(self, pki: int): + """Sets the pki of this SettingsSecurityMethodPriority. + + + :param pki: The pki of this SettingsSecurityMethodPriority. + :type pki: int + """ + + self._pki = pki + + @property + def psk(self) -> int: + """Gets the psk of this SettingsSecurityMethodPriority. + + + :return: The psk of this SettingsSecurityMethodPriority. + :rtype: int + """ + return self._psk + + @psk.setter + def psk(self, psk: int): + """Sets the psk of this SettingsSecurityMethodPriority. + + + :param psk: The psk of this SettingsSecurityMethodPriority. + :type psk: int + """ + + self._psk = psk diff --git a/services/helper/helper_service/services/configuration/openapi/openapi.yaml b/services/helper/helper_service/services/configuration/openapi/openapi.yaml index 7c2c8830..2e23c81e 100644 --- a/services/helper/helper_service/services/configuration/openapi/openapi.yaml +++ b/services/helper/helper_service/services/configuration/openapi/openapi.yaml @@ -12,16 +12,15 @@ servers: default: http://localhost:8080 description: Base URL of the Helper service. paths: - /addNewConfiguration: - post: - description: Adds a new key/value inside an existing category using "param_path" - and "new_value". - operationId: dynamic_config_controller_add_new_config_setting + /addNewConfigSetting: + patch: + description: Adds a brand new top-level category. + operationId: dynamic_config_controller_add_new_configuration requestBody: content: application/json: schema: - $ref: '#/components/schemas/ConfigParamUpdateRequest' + $ref: '#/components/schemas/ConfigCategoryCreateRequest' required: true responses: "200": @@ -29,7 +28,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CapifConfiguration' - description: Setting added + description: Category added "400": content: application/json: @@ -48,17 +47,18 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Generic error response - summary: Add new config setting at path + summary: Add new configuration category x-openapi-router-controller: configuration.controllers.default_controller - /configuration/category: - delete: - description: Deletes an entire top-level category by name. - operationId: dynamic_config_controller_remove_config_category + /addNewConfiguration: + post: + description: Adds a new key/value inside an existing category using "param_path" + and "new_value". + operationId: dynamic_config_controller_add_new_config_setting requestBody: content: application/json: schema: - $ref: '#/components/schemas/ConfigCategoryRemoveRequest' + $ref: '#/components/schemas/ConfigParamUpdateRequest' required: true responses: "200": @@ -66,7 +66,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CapifConfiguration' - description: Category removed + description: Setting added "400": content: application/json: @@ -85,30 +85,19 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Generic error response - summary: Remove configuration category + summary: Add new config setting at path x-openapi-router-controller: configuration.controllers.default_controller - post: - description: Adds a brand new top-level category. - operationId: dynamic_config_controller_add_new_configuration - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigCategoryCreateRequest' - required: true + /getConfiguration: + get: + description: Returns the entire CAPIF configuration document. + operationId: configuration_controller_get_configuration responses: "200": content: application/json: schema: $ref: '#/components/schemas/CapifConfiguration' - description: Category added - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Bad request + description: Current configuration "500": content: application/json: @@ -121,19 +110,34 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Generic error response - summary: Add new configuration category + summary: Read full configuration x-openapi-router-controller: configuration.controllers.default_controller - /getConfiguration: - get: - description: Returns the entire CAPIF configuration document. - operationId: dynamic_config_controller_get_configuration + /removeConfigCategory: + delete: + description: Deletes an entire top-level category by name. + operationId: dynamic_config_controller_remove_config_category + parameters: + - description: Configuration path to remove + explode: true + in: query + name: config_path + required: true + schema: + type: string + style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/CapifConfiguration' - description: Current configuration + description: Category removed + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request "500": content: application/json: @@ -146,18 +150,21 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Generic error response - summary: Read full configuration + summary: Remove configuration category x-openapi-router-controller: configuration.controllers.default_controller /removeConfigParam: delete: description: Deletes a leaf parameter by dotted path. operationId: dynamic_config_controller_remove_config_param - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigParamRemoveRequest' + parameters: + - description: Parameter path to remove + explode: true + in: query + name: param_path required: true + schema: + type: string + style: form responses: "200": content: @@ -284,6 +291,48 @@ components: CapifConfiguration: additionalProperties: true description: CAPIF runtime configuration document. + example: + config_name: default + settings: + - security_method_priority: + psk: 3 + oauth: 1 + pki: 2 + acl_policy_settings: + allowed_invocations_time_range_days: 365 + allowed_invocations_per_second: "5" + allowed_total_invocations: "5" + certificates_expiry: + ttl_superadmin_cert: 4300h + ttl_invoker_cert: 4300h + ttl_provider_cert: 4300h + - security_method_priority: + psk: 3 + oauth: 1 + pki: 2 + acl_policy_settings: + allowed_invocations_time_range_days: 365 + allowed_invocations_per_second: "5" + allowed_total_invocations: "5" + certificates_expiry: + ttl_superadmin_cert: 4300h + ttl_invoker_cert: 4300h + ttl_provider_cert: 4300h + version: "1.0" + properties: + config_name: + description: Configuration name + example: default + type: string + version: + description: configuration version + example: "1.0" + type: string + settings: + items: + $ref: '#/components/schemas/Settings' + type: object + title: CapifConfiguration type: object ConfigParamUpdateRequest: example: @@ -302,18 +351,6 @@ components: - param_path title: ConfigParamUpdateRequest type: object - ConfigParamRemoveRequest: - example: - param_path: param_path - properties: - param_path: - description: Dotted path to the configuration value to delete. - title: param_path - type: string - required: - - param_path - title: ConfigParamRemoveRequest - type: object ConfigCategoryCreateRequest: example: category_values: @@ -334,18 +371,6 @@ components: - category_values title: ConfigCategoryCreateRequest type: object - ConfigCategoryRemoveRequest: - example: - category_name: category_name - properties: - category_name: - description: Name of the category to remove. - title: category_name - type: string - required: - - category_name - title: ConfigCategoryRemoveRequest - type: object GenericError: example: code: code @@ -362,3 +387,96 @@ components: - message title: GenericError type: object + Settings: + description: Configuration Settings + example: + security_method_priority: + psk: 3 + oauth: 1 + pki: 2 + acl_policy_settings: + allowed_invocations_time_range_days: 365 + allowed_invocations_per_second: "5" + allowed_total_invocations: "5" + certificates_expiry: + ttl_superadmin_cert: 4300h + ttl_invoker_cert: 4300h + ttl_provider_cert: 4300h + properties: + certificates_expiry: + $ref: '#/components/schemas/Settings_certificates_expiry' + security_method_priority: + $ref: '#/components/schemas/Settings_security_method_priority' + acl_policy_settings: + $ref: '#/components/schemas/Settings_acl_policy_settings' + title: Settings + type: object + Settings_certificates_expiry: + description: Expiry configuration for certificates + example: + ttl_superadmin_cert: 4300h + ttl_invoker_cert: 4300h + ttl_provider_cert: 4300h + properties: + ttl_superadmin_cert: + description: ttl for superadmin certificates + example: 4300h + title: ttl_superadmin_cert + type: string + ttl_invoker_cert: + description: ttl for invoker certificates + example: 4300h + title: ttl_invoker_cert + type: string + ttl_provider_cert: + description: ttl for provider certificates + example: 4300h + title: ttl_provider_cert + type: string + title: Settings_certificates_expiry + type: object + Settings_security_method_priority: + description: priority to follow in granting the security method + example: + psk: 3 + oauth: 1 + pki: 2 + properties: + oauth: + example: 1 + title: oauth + type: integer + pki: + example: 2 + title: pki + type: integer + psk: + example: 3 + title: psk + type: integer + title: Settings_security_method_priority + type: object + Settings_acl_policy_settings: + description: default access policies + example: + allowed_invocations_time_range_days: 365 + allowed_invocations_per_second: "5" + allowed_total_invocations: "5" + properties: + allowed_total_invocations: + description: total number of requests the invoker can make + example: "5" + title: allowed_total_invocations + type: string + allowed_invocations_per_second: + description: total number of requests the invoker can make per second + example: "5" + title: allowed_invocations_per_second + type: string + allowed_invocations_time_range_days: + description: time range when an invoker can make requests + example: 365 + title: allowed_invocations_time_range_days + type: integer + title: Settings_acl_policy_settings + type: object -- GitLab From a24f90c34b153d4f53ebe5defcb33e7aa69ce03b Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Fri, 14 Nov 2025 12:19:29 +0100 Subject: [PATCH 032/101] Fix tests helper endpoints --- tests/resources/common/basicRequests.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/resources/common/basicRequests.robot b/tests/resources/common/basicRequests.robot index 2fcd1894..e4f13fe7 100644 --- a/tests/resources/common/basicRequests.robot +++ b/tests/resources/common/basicRequests.robot @@ -958,7 +958,7 @@ Create Security Context Between invoker and provider Get Number Of Services ${resp}= Get Request Capif - ... /helper/getServices + ... /helper/api/getServices ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${SUPERADMIN_USERNAME} -- GitLab From 123a512876c29a51e46df2a36433f301e2093faa Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 17 Nov 2025 09:22:13 +0100 Subject: [PATCH 033/101] Fix install vault script according to new k8s verstion contants --- helm/scripts/install_capif.sh | 319 +++++++++++++++++----------------- helm/scripts/install_vault.sh | 2 +- 2 files changed, 163 insertions(+), 158 deletions(-) diff --git a/helm/scripts/install_capif.sh b/helm/scripts/install_capif.sh index 803b59cf..8abe725b 100755 --- a/helm/scripts/install_capif.sh +++ b/helm/scripts/install_capif.sh @@ -18,160 +18,165 @@ helm $KUBECONFIG dependency build $HELM_DIR/capif/ ### check ingress_ip.oneke and get ip from ingress-nginx-controller kubectl $KUBECONFIG get svc -A | grep ingress-nginx-controller -helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART $HELM_DIR/capif/ \ ---set grafana.enabled=true \ ---set grafana.ingress.enabled=true \ ---set grafana.ingress.hosts[0].host=ocf-mon-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN \ ---set grafana.ingress.hosts[0].paths[0].path="/" \ ---set grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ ---set grafana.env.prometheusUrl=$PROMETHEUS_URL \ ---set grafana.env.tempoUrl="http://$CAPIF_NAME_VERSION_CHART-tempo:3100" \ ---set grafana.persistence.storageClass=$CAPIF_STORAGE_CLASS \ ---set grafana.persistence.storage=$CAPIF_GRAFANA_STORAGE_SIZE \ ---set fluentbit.enabled=true \ ---set loki.enabled=true \ ---set loki.persistence.storageClass=$CAPIF_STORAGE_CLASS \ ---set loki.persistence.storage=$CAPIF_LOKI_STORAGE_SIZE \ ---set tempo.tempo.metricsGenerator.remoteWriteUrl=$PROMETHEUS_URL/api/v1/write \ ---set tempo.persistence.size=$CAPIF_TEMPO_STORAGE_SIZE \ ---set otelcollector.enabled=true \ ---set otelcollector.configMap.tempoEndpoint=$CAPIF_NAME_VERSION_CHART-tempo:4317 \ ---set ocf-access-control-policy.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-access-control-policy-api \ ---set ocf-access-control-policy.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-access-control-policy.image.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-access-control-policy.monitoring="true" \ ---set ocf-access-control-policy.env.logLevel="$LOG_LEVEL" \ ---set ocf-api-invocation-logs.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-logging-api-invocation-api \ ---set ocf-api-invocation-logs.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-api-invocation-logs.env.monitoring="true" \ ---set ocf-api-invocation-logs.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-api-invocation-logs.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ ---set ocf-api-invocation-logs.env.vaultPort=$VAULT_PORT \ ---set ocf-api-invocation-logs.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set ocf-api-invocation-logs.env.logLevel="$LOG_LEVEL" \ ---set ocf-api-invoker-management.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-api-invoker-management-api \ ---set ocf-api-invoker-management.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-api-invoker-management.env.monitoring="true" \ ---set ocf-api-invoker-management.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-api-invoker-management.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ ---set ocf-api-invoker-management.env.vaultPort=$VAULT_PORT \ ---set ocf-api-invoker-management.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set ocf-api-invoker-management.env.logLevel="$LOG_LEVEL" \ ---set ocf-api-provider-management.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-api-provider-management-api \ ---set ocf-api-provider-management.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-api-provider-management.env.monitoring="true" \ ---set ocf-api-provider-management.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-api-provider-management.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ ---set ocf-api-provider-management.env.logLevel="$LOG_LEVEL" \ ---set ocf-api-provider-management.env.vaultPort=$VAULT_PORT \ ---set ocf-api-provider-management.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set ocf-events.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-events-api \ ---set ocf-events.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-events.env.monitoring="true" \ ---set ocf-events.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-events.env.logLevel="$LOG_LEVEL" \ ---set ocf-routing-info.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-routing-info-api \ ---set ocf-routing-info.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-routing-info.env.monitoring="true" \ ---set ocf-routing-info.env.logLevel="$LOG_LEVEL" \ ---set ocf-security.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-security-api \ ---set ocf-security.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-security.env.monitoring="true" \ ---set ocf-security.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-security.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ ---set ocf-security.env.vaultPort=$VAULT_PORT \ ---set ocf-security.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set ocf-security.env.logLevel="$LOG_LEVEL" \ ---set ocf-register.image.repository=$CAPIF_DOCKER_REGISTRY/register \ ---set ocf-register.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-register.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ ---set ocf-register.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set ocf-register.env.vaultPort=$VAULT_PORT \ ---set ocf-register.env.mongoHost=mongo-register \ ---set ocf-register.env.mongoPort=27017 \ ---set ocf-register.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-register.ingress.enabled=true \ ---set ocf-register.ingress.hosts[0].host=$REGISTER_HOSTNAME \ ---set ocf-register.ingress.hosts[0].paths[0].path="/" \ ---set ocf-register.ingress.hosts[0].paths[0].pathType="Prefix" \ ---set ocf-register.env.logLevel="$LOG_LEVEL" \ ---set ocf-register.extraConfigPod.hostAliases[0].hostnames[0]=$CAPIF_HOSTNAME \ ---set ocf-register.extraConfigPod.hostAliases[0].ip=$K8S_IP \ ---set ocf-auditing-api-logs.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-auditing-api \ ---set ocf-auditing-api-logs.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-auditing-api-logs.env.monitoring="true" \ ---set ocf-auditing-api-logs.env.logLevel="$LOG_LEVEL" \ ---set ocf-publish-service-api.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-publish-service-api \ ---set ocf-publish-service-api.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-publish-service-api.env.monitoring="true" \ ---set ocf-publish-service-api.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-publish-service-api.env.logLevel="$LOG_LEVEL" \ ---set ocf-discover-service-api.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-discover-service-api \ ---set ocf-discover-service-api.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-discover-service-api.env.monitoring="true" \ ---set ocf-discover-service-api.env.logLevel="$LOG_LEVEL" \ ---set nginx.image.repository=$CAPIF_DOCKER_REGISTRY/nginx \ ---set nginx.image.tag=$CAPIF_IMAGE_TAG \ ---set nginx.env.capifHostname=$CAPIF_HOSTNAME \ ---set nginx.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ ---set nginx.env.vaultPort=$VAULT_PORT \ ---set nginx.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set nginx.ingress.enabled=true \ ---set nginx.ingress.hosts[0].host=$CAPIF_HOSTNAME \ ---set nginx.ingress.hosts[0].paths[0].path="/" \ ---set nginx.ingress.hosts[0].paths[0].pathType="Prefix" \ ---set nginx.env.logLevel="$LOG_LEVEL" \ ---set ocf-helper.image.repository=$CAPIF_DOCKER_REGISTRY/helper \ ---set ocf-helper.image.tag=$CAPIF_IMAGE_TAG \ ---set ocf-helper.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ ---set ocf-helper.env.vaultPort=$VAULT_PORT \ ---set ocf-helper.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ ---set ocf-helper.env.capifHostname=$CAPIF_HOSTNAME \ ---set ocf-helper.env.logLevel="$LOG_LEVEL" \ ---set mock-server.enabled=true \ ---set mock-server.image.repository=$CAPIF_DOCKER_REGISTRY/mock-server \ ---set mock-server.image.tag=$CAPIF_IMAGE_TAG \ ---set mock-server.ingress.enabled=true \ ---set mock-server.ingress.hosts[0].host=mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN \ ---set mock-server.ingress.hosts[0].paths[0].path="/" \ ---set mock-server.ingress.hosts[0].paths[0].pathType="Prefix" \ ---set mock-server.env.logLevel="$LOG_LEVEL" \ ---set mock-server.service.port=$MOCK_SERVER_PORT \ ---set mock-server.livenessProbe.tcpSocket.port=$MOCK_SERVER_PORT \ ---set mongo-register.image.repository=$BASE_DOCKER_REGISTRY/mongo \ ---set mongo-register.image.tag=6.0.2 \ ---set mongo-register.persistence.storageClass=$CAPIF_STORAGE_CLASS \ ---set mongo-register.persistence.storage=$CAPIF_MONGO_REGISTER_STORAGE_SIZE \ ---set mongo-register.extraFlags[0]="--repair" \ ---set mongo-register-express.enabled=true \ ---set mongo-register-express.ingress.enabled=true \ ---set mongo-register-express.ingress.hosts[0].host="mongo-express-register-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN" \ ---set mongo-register-express.ingress.hosts[0].paths[0].path="/" \ ---set mongo-register-express.ingress.hosts[0].paths[0].pathType="Prefix" \ ---set mongo.persistence.storageClass=$CAPIF_STORAGE_CLASS \ ---set mongo.persistence.storage=$CAPIF_MONGO_STORAGE_SIZE \ ---set mongo.extraFlags[0]="--repair" \ ---set mongo.image.repository=$BASE_DOCKER_REGISTRY/mongo \ ---set mongo.image.tag=6.0.2 \ ---set mongo.busybox.repository=$BASE_DOCKER_REGISTRY/busybox \ ---set mongo.busybox.tag=1.37.0 \ ---set mongo-express.enabled=true \ ---set mongo-express.ingress.enabled=true \ ---set mongo-express.ingress.hosts[0].host="mongo-express-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN" \ ---set mongo-express.ingress.hosts[0].paths[0].path="/" \ ---set mongo-express.ingress.hosts[0].paths[0].pathType="Prefix" \ ---set redis.image.repository=$BASE_DOCKER_REGISTRY/redis \ ---set redis.image.tag=7.4.2-alpine \ ---set celery-beat.image.repository=$CAPIF_DOCKER_REGISTRY/celery \ ---set celery-beat.image.tag=$CAPIF_IMAGE_TAG \ ---set celery-beat.env.celeryModel=beat \ ---set celery-beat.env.redisHost=redis \ ---set celery-beat.env.redisPort=6379 \ ---set celery-beat.env.logLevel="$LOG_LEVEL" \ ---set celery-worker.image.repository=$CAPIF_DOCKER_REGISTRY/celery \ ---set celery-worker.image.tag=$CAPIF_IMAGE_TAG \ ---set celery-worker.env.celeryModel=worker \ ---set celery-worker.env.redisHost=redis \ ---set celery-worker.env.redisPort=6379 \ ---set celery-worker.env.logLevel="$LOG_LEVEL" \ ---wait --timeout=10m --create-namespace --atomic $CAPIF_RESOURCES_RESERVE $CAPIF_STORAGE_ACCESS_MODE $CAPIF_RUN_AS_USER_CONFIG +install_capif_helm() { + local extra_args=("$@") + helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART $HELM_DIR/capif/ \ + --set grafana.enabled=true \ + --set grafana.ingress.enabled=true \ + --set grafana.ingress.hosts[0].host=ocf-mon-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN \ + --set grafana.ingress.hosts[0].paths[0].path="/" \ + --set grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ + --set grafana.env.prometheusUrl=$PROMETHEUS_URL \ + --set grafana.env.tempoUrl="http://$CAPIF_NAME_VERSION_CHART-tempo:3100" \ + --set grafana.persistence.storageClass=$CAPIF_STORAGE_CLASS \ + --set grafana.persistence.storage=$CAPIF_GRAFANA_STORAGE_SIZE \ + --set fluentbit.enabled=true \ + --set loki.enabled=true \ + --set loki.persistence.storageClass=$CAPIF_STORAGE_CLASS \ + --set loki.persistence.storage=$CAPIF_LOKI_STORAGE_SIZE \ + --set tempo.tempo.metricsGenerator.remoteWriteUrl=$PROMETHEUS_URL/api/v1/write \ + --set tempo.persistence.size=$CAPIF_TEMPO_STORAGE_SIZE \ + --set otelcollector.enabled=true \ + --set otelcollector.configMap.tempoEndpoint=$CAPIF_NAME_VERSION_CHART-tempo:4317 \ + --set ocf-access-control-policy.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-access-control-policy-api \ + --set ocf-access-control-policy.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-access-control-policy.image.env.capifHostname=$CAPIF_HOSTNAME \ + --set ocf-access-control-policy.monitoring="true" \ + --set ocf-access-control-policy.env.logLevel="$LOG_LEVEL" \ + --set ocf-api-invocation-logs.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-logging-api-invocation-api \ + --set ocf-api-invocation-logs.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-api-invocation-logs.env.monitoring="true" \ + --set ocf-api-invocation-logs.env.capifHostname=$CAPIF_HOSTNAME \ + --set ocf-api-invocation-logs.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ + --set ocf-api-invocation-logs.env.vaultPort=$VAULT_PORT \ + --set ocf-api-invocation-logs.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ + --set ocf-api-invocation-logs.env.logLevel="$LOG_LEVEL" \ + --set ocf-api-invoker-management.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-api-invoker-management-api \ + --set ocf-api-invoker-management.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-api-invoker-management.env.monitoring="true" \ + --set ocf-api-invoker-management.env.capifHostname=$CAPIF_HOSTNAME \ + --set ocf-api-invoker-management.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ + --set ocf-api-invoker-management.env.vaultPort=$VAULT_PORT \ + --set ocf-api-invoker-management.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ + --set ocf-api-invoker-management.env.logLevel="$LOG_LEVEL" \ + --set ocf-api-provider-management.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-api-provider-management-api \ + --set ocf-api-provider-management.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-api-provider-management.env.monitoring="true" \ + --set ocf-api-provider-management.env.capifHostname=$CAPIF_HOSTNAME \ + --set ocf-api-provider-management.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ + --set ocf-api-provider-management.env.logLevel="$LOG_LEVEL" \ + --set ocf-api-provider-management.env.vaultPort=$VAULT_PORT \ + --set ocf-api-provider-management.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ + --set ocf-events.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-events-api \ + --set ocf-events.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-events.env.monitoring="true" \ + --set ocf-events.env.capifHostname=$CAPIF_HOSTNAME \ + --set ocf-events.env.logLevel="$LOG_LEVEL" \ + --set ocf-routing-info.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-routing-info-api \ + --set ocf-routing-info.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-routing-info.env.monitoring="true" \ + --set ocf-routing-info.env.logLevel="$LOG_LEVEL" \ + --set ocf-security.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-security-api \ + --set ocf-security.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-security.env.monitoring="true" \ + --set ocf-security.env.capifHostname=$CAPIF_HOSTNAME \ + --set ocf-security.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ + --set ocf-security.env.vaultPort=$VAULT_PORT \ + --set ocf-security.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ + --set ocf-security.env.logLevel="$LOG_LEVEL" \ + --set ocf-register.image.repository=$CAPIF_DOCKER_REGISTRY/register \ + --set ocf-register.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-register.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ + --set ocf-register.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ + --set ocf-register.env.vaultPort=$VAULT_PORT \ + --set ocf-register.env.mongoHost=mongo-register \ + --set ocf-register.env.mongoPort=27017 \ + --set ocf-register.env.capifHostname=$CAPIF_HOSTNAME \ + --set ocf-register.ingress.enabled=true \ + --set ocf-register.ingress.hosts[0].host=$REGISTER_HOSTNAME \ + --set ocf-register.ingress.hosts[0].paths[0].path="/" \ + --set ocf-register.ingress.hosts[0].paths[0].pathType="Prefix" \ + --set ocf-register.env.logLevel="$LOG_LEVEL" \ + --set ocf-register.extraConfigPod.hostAliases[0].hostnames[0]=$CAPIF_HOSTNAME \ + --set ocf-register.extraConfigPod.hostAliases[0].ip=$K8S_IP \ + --set ocf-auditing-api-logs.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-auditing-api \ + --set ocf-auditing-api-logs.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-auditing-api-logs.env.monitoring="true" \ + --set ocf-auditing-api-logs.env.logLevel="$LOG_LEVEL" \ + --set ocf-publish-service-api.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-publish-service-api \ + --set ocf-publish-service-api.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-publish-service-api.env.monitoring="true" \ + --set ocf-publish-service-api.env.capifHostname=$CAPIF_HOSTNAME \ + --set ocf-publish-service-api.env.logLevel="$LOG_LEVEL" \ + --set ocf-discover-service-api.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-discover-service-api \ + --set ocf-discover-service-api.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-discover-service-api.env.monitoring="true" \ + --set ocf-discover-service-api.env.logLevel="$LOG_LEVEL" \ + --set nginx.image.repository=$CAPIF_DOCKER_REGISTRY/nginx \ + --set nginx.image.tag=$CAPIF_IMAGE_TAG \ + --set nginx.env.capifHostname=$CAPIF_HOSTNAME \ + --set nginx.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ + --set nginx.env.vaultPort=$VAULT_PORT \ + --set nginx.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ + --set nginx.ingress.enabled=true \ + --set nginx.ingress.hosts[0].host=$CAPIF_HOSTNAME \ + --set nginx.ingress.hosts[0].paths[0].path="/" \ + --set nginx.ingress.hosts[0].paths[0].pathType="Prefix" \ + --set nginx.env.logLevel="$LOG_LEVEL" \ + --set ocf-helper.image.repository=$CAPIF_DOCKER_REGISTRY/helper \ + --set ocf-helper.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-helper.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ + --set ocf-helper.env.vaultPort=$VAULT_PORT \ + --set ocf-helper.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ + --set ocf-helper.env.capifHostname=$CAPIF_HOSTNAME \ + --set ocf-helper.env.logLevel="$LOG_LEVEL" \ + --set mock-server.enabled=true \ + --set mock-server.image.repository=$CAPIF_DOCKER_REGISTRY/mock-server \ + --set mock-server.image.tag=$CAPIF_IMAGE_TAG \ + --set mock-server.ingress.enabled=true \ + --set mock-server.ingress.hosts[0].host=mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN \ + --set mock-server.ingress.hosts[0].paths[0].path="/" \ + --set mock-server.ingress.hosts[0].paths[0].pathType="Prefix" \ + --set mock-server.env.logLevel="$LOG_LEVEL" \ + --set mock-server.service.port=$MOCK_SERVER_PORT \ + --set mock-server.livenessProbe.tcpSocket.port=$MOCK_SERVER_PORT \ + --set mongo-register.image.repository=$BASE_DOCKER_REGISTRY/mongo \ + --set mongo-register.image.tag=6.0.2 \ + --set mongo-register.persistence.storageClass=$CAPIF_STORAGE_CLASS \ + --set mongo-register.persistence.storage=$CAPIF_MONGO_REGISTER_STORAGE_SIZE \ + --set mongo-register.extraFlags[0]="--repair" \ + --set mongo-register-express.enabled=true \ + --set mongo-register-express.ingress.enabled=true \ + --set mongo-register-express.ingress.hosts[0].host="mongo-express-register-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN" \ + --set mongo-register-express.ingress.hosts[0].paths[0].path="/" \ + --set mongo-register-express.ingress.hosts[0].paths[0].pathType="Prefix" \ + --set mongo.persistence.storageClass=$CAPIF_STORAGE_CLASS \ + --set mongo.persistence.storage=$CAPIF_MONGO_STORAGE_SIZE \ + --set mongo.extraFlags[0]="--repair" \ + --set mongo.image.repository=$BASE_DOCKER_REGISTRY/mongo \ + --set mongo.image.tag=6.0.2 \ + --set mongo.busybox.repository=$BASE_DOCKER_REGISTRY/busybox \ + --set mongo.busybox.tag=1.37.0 \ + --set mongo-express.enabled=true \ + --set mongo-express.ingress.enabled=true \ + --set mongo-express.ingress.hosts[0].host="mongo-express-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN" \ + --set mongo-express.ingress.hosts[0].paths[0].path="/" \ + --set mongo-express.ingress.hosts[0].paths[0].pathType="Prefix" \ + --set redis.image.repository=$BASE_DOCKER_REGISTRY/redis \ + --set redis.image.tag=7.4.2-alpine \ + --set celery-beat.image.repository=$CAPIF_DOCKER_REGISTRY/celery \ + --set celery-beat.image.tag=$CAPIF_IMAGE_TAG \ + --set celery-beat.env.celeryModel=beat \ + --set celery-beat.env.redisHost=redis \ + --set celery-beat.env.redisPort=6379 \ + --set celery-beat.env.logLevel="$LOG_LEVEL" \ + --set celery-worker.image.repository=$CAPIF_DOCKER_REGISTRY/celery \ + --set celery-worker.image.tag=$CAPIF_IMAGE_TAG \ + --set celery-worker.env.celeryModel=worker \ + --set celery-worker.env.redisHost=redis \ + --set celery-worker.env.redisPort=6379 \ + --set celery-worker.env.logLevel="$LOG_LEVEL" \ + --wait --timeout=10m --create-namespace --atomic $CAPIF_RESOURCES_RESERVE $CAPIF_STORAGE_ACCESS_MODE $CAPIF_RUN_AS_USER_CONFIG "${extra_args[@]}" +} + +install_capif_helm diff --git a/helm/scripts/install_vault.sh b/helm/scripts/install_vault.sh index 52dfbdf3..c9fb249e 100755 --- a/helm/scripts/install_vault.sh +++ b/helm/scripts/install_vault.sh @@ -132,7 +132,7 @@ while true; do if [ "$FAILED_JOB_STATUS" != "" ]; then echo "The vault job fails, check variables." exit -1 - elif [ "$SUCCEEDED_JOB_STATUS" != "" ] && (( SUCCEEDED_JOB_STATUS > 0 )) && [ "$COMPLETED_TYPE_JOB_STATUS" == "Complete" ] && [ "$COMPLETION_JOB_STATUS" == "True" ]; then + elif [ "$SUCCEEDED_JOB_STATUS" != "" ] && (( SUCCEEDED_JOB_STATUS > 0 )) && { [ "$COMPLETED_TYPE_JOB_STATUS" == "Complete" ] || [ "$COMPLETED_TYPE_JOB_STATUS" == "SuccessCriteriaMet" ]; } && [ "$COMPLETION_JOB_STATUS" == "True" ]; then echo "The vault job succeeded." break else -- GitLab From 875298e56a6bbb271494e7d530174c60cf727d4b Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 17 Nov 2025 09:25:54 +0100 Subject: [PATCH 034/101] Setup tags on components --- helm/capif/Chart.yaml | 48 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/helm/capif/Chart.yaml b/helm/capif/Chart.yaml index 89785865..07697e0f 100644 --- a/helm/capif/Chart.yaml +++ b/helm/capif/Chart.yaml @@ -22,57 +22,85 @@ appVersion: "v3.1.6" dependencies: - name: ocf-access-control-policy version: "*" + tags: ["core"] - name: ocf-api-invoker-management version: "*" + tags: ["core"] - name: ocf-api-provider-management version: "*" + tags: ["core"] - name: ocf-api-invocation-logs version: "*" + tags: ["core"] - name: ocf-events version: "*" + tags: ["core"] - name: ocf-helper version: "*" + tags: ["core"] - name: ocf-routing-info version: "*" + tags: ["core"] - name: ocf-security version: "*" - - name: ocf-register - version: "*" - - name: mongo-register - version: "*" + tags: ["core"] - name: ocf-auditing-api-logs version: "*" + tags: ["core"] - name: ocf-publish-service-api version: "*" + tags: ["core"] - name: ocf-discover-service-api version: "*" - - name: mongo - version: "*" - - name: mongo-express - version: "*" - - name: mongo-register-express - version: "*" + tags: ["core"] - name: nginx version: "*" + tags: ["core"] - name: mock-server version: "*" + tags: ["core"] - name: redis version: "*" + tags: ["core"] - name: fluentbit version: "*" + tags: ["core"] - name: grafana version: "*" + tags: ["core"] - name: loki version: "*" + tags: ["core"] - name: otelcollector version: "*" + tags: ["core"] - name: renderer version: "*" + tags: ["core"] - name: celery-beat version: "*" + tags: ["core"] - name: celery-worker version: "*" + tags: ["core"] - name: "tempo" condition: tempo.enabled repository: "https://grafana.github.io/helm-charts" version: "^1.3.1" + tags: ["core"] + - name: ocf-register + version: "*" + tags: ["register"] + - name: mongo-register + version: "*" + tags: ["register-db"] + - name: mongo-register-express + version: "*" + tags: ["register-db"] + - name: mongo + version: "*" + tags: ["core-db"] + - name: mongo-express + version: "*" + tags: ["core-db"] + -- GitLab From 1e7262f0967af4168a809a30f9b043c40f9dea47 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 17 Nov 2025 09:28:30 +0100 Subject: [PATCH 035/101] Add tags to Values on capif helm --- helm/capif/values.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helm/capif/values.yaml b/helm/capif/values.yaml index 9ecc11e0..dfd4a6bd 100644 --- a/helm/capif/values.yaml +++ b/helm/capif/values.yaml @@ -3,6 +3,12 @@ # -- tempo, fluentbit, grafana, loki, otelcollector and renderer. # -- prometheus service must be previously installed in kubernetes +tags: + core: true + core-db: true + register: true + register-db: true + # -- With tempo.enabled: false. It won't be deployed tempo: enabled: true -- GitLab From dcc5c998305bda9b5a4c22c0e3c983b1eecfb004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Mon, 17 Nov 2025 17:20:34 +0100 Subject: [PATCH 036/101] Set registerHostname env var for ocf-register --- helm/scripts/install_capif.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/helm/scripts/install_capif.sh b/helm/scripts/install_capif.sh index 8abe725b..48cdb156 100755 --- a/helm/scripts/install_capif.sh +++ b/helm/scripts/install_capif.sh @@ -86,6 +86,7 @@ install_capif_helm() { --set ocf-security.env.logLevel="$LOG_LEVEL" \ --set ocf-register.image.repository=$CAPIF_DOCKER_REGISTRY/register \ --set ocf-register.image.tag=$CAPIF_IMAGE_TAG \ + --set ocf-register.env.registerHostname=$REGISTER_HOSTNAME \ --set ocf-register.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ --set ocf-register.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ --set ocf-register.env.vaultPort=$VAULT_PORT \ -- GitLab From ea60914090216943f033552792b9d44e7ed6ae78 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Tue, 18 Nov 2025 12:15:50 +0100 Subject: [PATCH 037/101] New generate script and app.py with dynamic packages --- services/helper/helper_service/app.py | 28 ++++++---- services/helper/helper_service/generate.sh | 60 +++++++++++----------- 2 files changed, 47 insertions(+), 41 deletions(-) diff --git a/services/helper/helper_service/app.py b/services/helper/helper_service/app.py index 3b1f18b2..88d918b9 100644 --- a/services/helper/helper_service/app.py +++ b/services/helper/helper_service/app.py @@ -98,19 +98,27 @@ if not package_paths: logger.error("No package paths defined in configuration.") raise Exception("No package paths defined in configuration.") -# Add API endpoints -app.add_api( - package_paths["configuration_api"]["openapi_file"], - arguments={"title": "Helper Configuration API"}, - pythonic_params=True, - base_path=package_paths["configuration_api"]["path"] +# Dynamically add all APIs defined in package_paths +for name, pkg in package_paths.items(): + openapi_file = pkg.get("openapi_file") + base_path = pkg.get("path") + + if not openapi_file or not base_path: + logger.warning(f"Skipping package_path '{name}' because 'openapi_file' or 'path' is missing.") + continue + + # Build a readable title from the key, e.g. "helper_api" -> "Helper Api" + title = name.replace("_", " ").title() + + logger.info( + f"Adding API '{name}': openapi_file='{openapi_file}', base_path='{base_path}', title='{title}'" ) -app.add_api( - package_paths["helper_api"]["openapi_file"], - arguments={"title": "Helper API"}, + app.add_api( + openapi_file, # relative to specification_dir (SERVICES_DIR) + arguments={"title": title}, pythonic_params=True, - base_path=package_paths["helper_api"]["path"] + base_path=base_path ) diff --git a/services/helper/helper_service/generate.sh b/services/helper/helper_service/generate.sh index ba55b0a8..7c67dacb 100755 --- a/services/helper/helper_service/generate.sh +++ b/services/helper/helper_service/generate.sh @@ -1,30 +1,33 @@ #!/bin/bash set -e -rm -rf services/configuration services/api +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + echo "Example: $0 openapi/auth.yaml auth" + exit 1 +fi -# Generate API 1 -openapi-generator generate \ - -i openapi_helper_configuration.yaml \ - -g python-flask \ - -o services/configuration \ - --additional-properties=packageName=configuration +YAML_PATH="$1" +SERVICE_NAME="$2" +SERVICE_DIR="services/$SERVICE_NAME" -# Generate API 2 +# Clean previous service folder if it exists +rm -rf "$SERVICE_DIR" + +# Generate the service using OpenAPI Generator openapi-generator generate \ - -i openapi_helper_api.yaml \ + -i "$YAML_PATH" \ -g python-flask \ - -o services/api \ - --additional-properties=packageName=api - -# ✅ Move generated inner folder to root service folder -mv services/configuration/configuration/* services/configuration/ -rm -rf services/configuration/configuration + -o "$SERVICE_DIR" \ + --additional-properties=packageName="$SERVICE_NAME" -mv services/api/api/* services/api/ -rm -rf services/api/api +# Move generated inner folder to the root of the service directory +if [ -d "$SERVICE_DIR/$SERVICE_NAME" ]; then + mv "$SERVICE_DIR/$SERVICE_NAME"/* "$SERVICE_DIR"/ + rm -rf "$SERVICE_DIR/$SERVICE_NAME" +fi -# 🧹 Files to remove +# Files to delete FILES_TO_DELETE=( ".dockerignore" ".gitignore" @@ -39,7 +42,7 @@ FILES_TO_DELETE=( "tox.ini" ) -# 🗑 Directories to remove +# Directories to delete DIRS_TO_DELETE=( ".openapi-generator" ".github" @@ -47,18 +50,13 @@ DIRS_TO_DELETE=( "docs" ) -for service in services/configuration services/api; do - - # Remove files - for file in "${FILES_TO_DELETE[@]}"; do - rm -f "$service/$file" - done - - # Remove directories - for dir in "${DIRS_TO_DELETE[@]}"; do - rm -rf "$service/$dir" - done +# Remove unnecessary files and folders +for file in "${FILES_TO_DELETE[@]}"; do + rm -f "$SERVICE_DIR/$file" +done +for dir in "${DIRS_TO_DELETE[@]}"; do + rm -rf "$SERVICE_DIR/$dir" done -echo "✅ Services generated, reorganized and cleaned successfully." +echo "✅ Service '$SERVICE_NAME' successfully generated from '$YAML_PATH'" -- GitLab From 753d2d80b0f78cd69bd2dcb6409db8b3a49012d8 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Tue, 18 Nov 2025 12:39:13 +0100 Subject: [PATCH 038/101] Fix db access --- .../services/configuration/core/configuration_operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/helper/helper_service/services/configuration/core/configuration_operations.py b/services/helper/helper_service/services/configuration/core/configuration_operations.py index a820b5d9..49a3e4ab 100644 --- a/services/helper/helper_service/services/configuration/core/configuration_operations.py +++ b/services/helper/helper_service/services/configuration/core/configuration_operations.py @@ -3,7 +3,7 @@ import os import pymongo import requests from config import Config -from db.db import MongoDatabse +from db.db import get_mongo from flask import current_app, jsonify from utils.utils import ( convert_dict_keys_to_snake_case, @@ -19,7 +19,7 @@ class ConfigurationOperations: PROTECTED_FIELDS = ["ccf_id"] def __init__(self): - self.db = MongoDatabse() + self.db = get_mongo() self.mimetype = 'application/json' self.config = Config().get_config() -- GitLab From 60a530da7080497d058b5de5c26899573523bf84 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 20 Nov 2025 10:33:38 +0100 Subject: [PATCH 039/101] Added helper packages to helm helper-configmap --- .../ocf-helper/templates/ocf-helper-configmap.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml b/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml index fe3e1c17..2ca7ca43 100644 --- a/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml +++ b/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml @@ -26,4 +26,15 @@ data: {{- if .Values.capifConfiguration }} capif_configuration: {{ .Values.capifConfiguration | toYaml | nindent 6 }} - {{- end }} \ No newline at end of file + {{- end }} + + package_paths: { + "helper_api": { + "path": "/api", + "openapi_file": "api/openapi/openapi.yaml" + }, + "configuration_api": { + "path": "/configuration", + "openapi_file": "configuration/openapi/openapi.yaml" + } + } \ No newline at end of file -- GitLab From 57d6bff7909e834ef97e03be9b810f3fd619c36f Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Wed, 26 Nov 2025 10:10:04 +0100 Subject: [PATCH 040/101] REL 19 Access_Control_Policy_API --- .../.openapi-generator/FILES | 2 + .../controllers/default_controller.py | 10 ++ .../controllers/security_controller.py | 1 + .../capif_acl/encoder.py | 5 +- .../capif_acl/models/__init__.py | 7 ++ .../models/access_control_policy_list.py | 8 +- .../capif_acl/models/api_invoker_policy.py | 44 ++++++- .../capif_acl/models/base_model.py | 1 + .../capif_acl/models/invalid_param.py | 5 +- .../capif_acl/models/net_slice_id.py | 119 ++++++++++++++++++ .../capif_acl/models/problem_details.py | 11 +- .../capif_acl/models/snssai.py | 101 +++++++++++++++ .../capif_acl/models/time_range_list.py | 5 +- .../capif_acl/openapi/openapi.yaml | 110 +++++++++++++++- .../capif_acl/test/__init__.py | 3 +- .../capif_acl/test/test_default_controller.py | 4 + .../capif_acl/util.py | 2 +- .../setup.py | 5 +- 18 files changed, 417 insertions(+), 26 deletions(-) create mode 100644 services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/net_slice_id.py create mode 100644 services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/snssai.py diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/FILES index eeda92fd..2c87d479 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/FILES @@ -16,7 +16,9 @@ capif_acl/models/access_control_policy_list.py capif_acl/models/api_invoker_policy.py capif_acl/models/base_model.py capif_acl/models/invalid_param.py +capif_acl/models/net_slice_id.py capif_acl/models/problem_details.py +capif_acl/models/snssai.py capif_acl/models/time_range_list.py capif_acl/openapi/openapi.yaml capif_acl/test/__init__.py diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py index 6c201ea4..0dda71fa 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py @@ -1,3 +1,12 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from capif_acl.models.access_control_policy_list import AccessControlPolicyList # noqa: E501 +from capif_acl.models.problem_details import ProblemDetails # noqa: E501 +from capif_acl import util + from functools import wraps from cryptography import x509 @@ -43,3 +52,4 @@ def access_control_policy_list_service_api_id_get(service_api_id, aef_id, api_in """ current_app.logger.debug("Obtaining service ACLs") return accessControlPolicyApi().get_acl(service_api_id, aef_id, api_invoker_id, supported_features) + diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller.py index 8b137891..6d294ffd 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller.py @@ -1 +1,2 @@ +from typing import List diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/encoder.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/encoder.py index 627a7bd7..ac47112c 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/encoder.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/encoder.py @@ -1,6 +1,7 @@ -from capif_acl.models.base_model import Model from connexion.jsonifier import JSONEncoder +from capif_acl.models.base_model import Model + class CustomJSONEncoder(JSONEncoder): include_nulls = False @@ -15,4 +16,4 @@ class CustomJSONEncoder(JSONEncoder): attr = o.attribute_map[attr] dikt[attr] = value return dikt - return JSONEncoder.default(self, o) \ No newline at end of file + return JSONEncoder.default(self, o) diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/__init__.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/__init__.py index d036df69..42d3cf58 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/__init__.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/__init__.py @@ -1,2 +1,9 @@ # flake8: noqa # import models into model package +from capif_acl.models.access_control_policy_list import AccessControlPolicyList +from capif_acl.models.api_invoker_policy import ApiInvokerPolicy +from capif_acl.models.invalid_param import InvalidParam +from capif_acl.models.net_slice_id import NetSliceId +from capif_acl.models.problem_details import ProblemDetails +from capif_acl.models.snssai import Snssai +from capif_acl.models.time_range_list import TimeRangeList diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/access_control_policy_list.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/access_control_policy_list.py index 19dea5dc..a851ac32 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/access_control_policy_list.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/access_control_policy_list.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_acl import util -from capif_acl.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 +from typing import List, Dict # noqa: F401 + from capif_acl.models.base_model import Model +from capif_acl.models.api_invoker_policy import ApiInvokerPolicy +from capif_acl import util +from capif_acl.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 class AccessControlPolicyList(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/api_invoker_policy.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/api_invoker_policy.py index cdd35e29..b7172cc4 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/api_invoker_policy.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/api_invoker_policy.py @@ -1,10 +1,14 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_acl import util +from typing import List, Dict # noqa: F401 + from capif_acl.models.base_model import Model -from capif_acl.models.time_range_list import TimeRangeList # noqa: E501 +from capif_acl.models.net_slice_id import NetSliceId +from capif_acl.models.time_range_list import TimeRangeList +from capif_acl import util +from capif_acl.models.net_slice_id import NetSliceId # noqa: E501 +from capif_acl.models.time_range_list import TimeRangeList # noqa: E501 class ApiInvokerPolicy(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,7 +16,7 @@ class ApiInvokerPolicy(Model): Do not edit the class manually. """ - def __init__(self, api_invoker_id=None, allowed_total_invocations=None, allowed_invocations_per_second=None, allowed_invocation_time_range_list=None): # noqa: E501 + def __init__(self, api_invoker_id=None, allowed_total_invocations=None, allowed_invocations_per_second=None, allowed_invocation_time_range_list=None, net_slice_info=None): # noqa: E501 """ApiInvokerPolicy - a model defined in OpenAPI :param api_invoker_id: The api_invoker_id of this ApiInvokerPolicy. # noqa: E501 @@ -23,25 +27,30 @@ class ApiInvokerPolicy(Model): :type allowed_invocations_per_second: int :param allowed_invocation_time_range_list: The allowed_invocation_time_range_list of this ApiInvokerPolicy. # noqa: E501 :type allowed_invocation_time_range_list: List[TimeRangeList] + :param net_slice_info: The net_slice_info of this ApiInvokerPolicy. # noqa: E501 + :type net_slice_info: List[NetSliceId] """ self.openapi_types = { 'api_invoker_id': str, 'allowed_total_invocations': int, 'allowed_invocations_per_second': int, - 'allowed_invocation_time_range_list': List[TimeRangeList] + 'allowed_invocation_time_range_list': List[TimeRangeList], + 'net_slice_info': List[NetSliceId] } self.attribute_map = { 'api_invoker_id': 'apiInvokerId', 'allowed_total_invocations': 'allowedTotalInvocations', 'allowed_invocations_per_second': 'allowedInvocationsPerSecond', - 'allowed_invocation_time_range_list': 'allowedInvocationTimeRangeList' + 'allowed_invocation_time_range_list': 'allowedInvocationTimeRangeList', + 'net_slice_info': 'netSliceInfo' } self._api_invoker_id = api_invoker_id self._allowed_total_invocations = allowed_total_invocations self._allowed_invocations_per_second = allowed_invocations_per_second self._allowed_invocation_time_range_list = allowed_invocation_time_range_list + self._net_slice_info = net_slice_info @classmethod def from_dict(cls, dikt) -> 'ApiInvokerPolicy': @@ -149,3 +158,26 @@ class ApiInvokerPolicy(Model): raise ValueError("Invalid value for `allowed_invocation_time_range_list`, number of items must be greater than or equal to `0`") # noqa: E501 self._allowed_invocation_time_range_list = allowed_invocation_time_range_list + + @property + def net_slice_info(self) -> List[NetSliceId]: + """Gets the net_slice_info of this ApiInvokerPolicy. + + + :return: The net_slice_info of this ApiInvokerPolicy. + :rtype: List[NetSliceId] + """ + return self._net_slice_info + + @net_slice_info.setter + def net_slice_info(self, net_slice_info: List[NetSliceId]): + """Sets the net_slice_info of this ApiInvokerPolicy. + + + :param net_slice_info: The net_slice_info of this ApiInvokerPolicy. + :type net_slice_info: List[NetSliceId] + """ + if net_slice_info is not None and len(net_slice_info) < 1: + raise ValueError("Invalid value for `net_slice_info`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._net_slice_info = net_slice_info diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model.py index 2e2e14aa..fed13c90 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from capif_acl import util diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/invalid_param.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/invalid_param.py index b94db8da..a6789dc2 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/invalid_param.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_acl import util +from typing import List, Dict # noqa: F401 + from capif_acl.models.base_model import Model +from capif_acl import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/net_slice_id.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/net_slice_id.py new file mode 100644 index 00000000..ceb03573 --- /dev/null +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/net_slice_id.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from capif_acl.models.base_model import Model +from capif_acl.models.snssai import Snssai +from capif_acl import util + +from capif_acl.models.snssai import Snssai # noqa: E501 + +class NetSliceId(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, snssai=None, nsi_id=None, ensi=None): # noqa: E501 + """NetSliceId - a model defined in OpenAPI + + :param snssai: The snssai of this NetSliceId. # noqa: E501 + :type snssai: Snssai + :param nsi_id: The nsi_id of this NetSliceId. # noqa: E501 + :type nsi_id: str + :param ensi: The ensi of this NetSliceId. # noqa: E501 + :type ensi: str + """ + self.openapi_types = { + 'snssai': Snssai, + 'nsi_id': str, + 'ensi': str + } + + self.attribute_map = { + 'snssai': 'snssai', + 'nsi_id': 'nsiId', + 'ensi': 'ensi' + } + + self._snssai = snssai + self._nsi_id = nsi_id + self._ensi = ensi + + @classmethod + def from_dict(cls, dikt) -> 'NetSliceId': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NetSliceId of this NetSliceId. # noqa: E501 + :rtype: NetSliceId + """ + return util.deserialize_model(dikt, cls) + + @property + def snssai(self) -> Snssai: + """Gets the snssai of this NetSliceId. + + + :return: The snssai of this NetSliceId. + :rtype: Snssai + """ + return self._snssai + + @snssai.setter + def snssai(self, snssai: Snssai): + """Sets the snssai of this NetSliceId. + + + :param snssai: The snssai of this NetSliceId. + :type snssai: Snssai + """ + + self._snssai = snssai + + @property + def nsi_id(self) -> str: + """Gets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :return: The nsi_id of this NetSliceId. + :rtype: str + """ + return self._nsi_id + + @nsi_id.setter + def nsi_id(self, nsi_id: str): + """Sets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :param nsi_id: The nsi_id of this NetSliceId. + :type nsi_id: str + """ + + self._nsi_id = nsi_id + + @property + def ensi(self) -> str: + """Gets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :return: The ensi of this NetSliceId. + :rtype: str + """ + return self._ensi + + @ensi.setter + def ensi(self, ensi: str): + """Sets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :param ensi: The ensi of this NetSliceId. + :type ensi: str + """ + + self._ensi = ensi diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/problem_details.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/problem_details.py index bf02e50e..8473fc2b 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/problem_details.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_acl import util +from typing import List, Dict # noqa: F401 + from capif_acl.models.base_model import Model -from capif_acl.models.invalid_param import InvalidParam # noqa: E501 +from capif_acl.models.invalid_param import InvalidParam +import re +from capif_acl import util +from capif_acl.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/snssai.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/snssai.py new file mode 100644 index 00000000..07efac3b --- /dev/null +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/snssai.py @@ -0,0 +1,101 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from capif_acl.models.base_model import Model +import re +from capif_acl import util + +import re # noqa: E501 + +class Snssai(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, sst=None, sd=None): # noqa: E501 + """Snssai - a model defined in OpenAPI + + :param sst: The sst of this Snssai. # noqa: E501 + :type sst: int + :param sd: The sd of this Snssai. # noqa: E501 + :type sd: str + """ + self.openapi_types = { + 'sst': int, + 'sd': str + } + + self.attribute_map = { + 'sst': 'sst', + 'sd': 'sd' + } + + self._sst = sst + self._sd = sd + + @classmethod + def from_dict(cls, dikt) -> 'Snssai': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Snssai of this Snssai. # noqa: E501 + :rtype: Snssai + """ + return util.deserialize_model(dikt, cls) + + @property + def sst(self) -> int: + """Gets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :return: The sst of this Snssai. + :rtype: int + """ + return self._sst + + @sst.setter + def sst(self, sst: int): + """Sets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :param sst: The sst of this Snssai. + :type sst: int + """ + if sst is None: + raise ValueError("Invalid value for `sst`, must not be `None`") # noqa: E501 + if sst is not None and sst > 255: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value less than or equal to `255`") # noqa: E501 + if sst is not None and sst < 0: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value greater than or equal to `0`") # noqa: E501 + + self._sst = sst + + @property + def sd(self) -> str: + """Gets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :return: The sd of this Snssai. + :rtype: str + """ + return self._sd + + @sd.setter + def sd(self, sd: str): + """Sets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :param sd: The sd of this Snssai. + :type sd: str + """ + if sd is not None and not re.search(r'^[A-Fa-f0-9]{6}$', sd): # noqa: E501 + raise ValueError(r"Invalid value for `sd`, must be a follow pattern or equal to `/^[A-Fa-f0-9]{6}$/`") # noqa: E501 + + self._sd = sd diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/time_range_list.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/time_range_list.py index 71f38cfc..b9c47240 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/time_range_list.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/time_range_list.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_acl import util +from typing import List, Dict # noqa: F401 + from capif_acl.models.base_model import Model +from capif_acl import util class TimeRangeList(Model): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/openapi/openapi.yaml b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/openapi/openapi.yaml index eebcdfe3..d3c40009 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/openapi/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.0 info: - description: "API for access control policy. \n© 2024, 3GPP Organizational Partners\ + description: "API for access control policy. \n© 2025, 3GPP Organizational Partners\ \ (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Access_Control_Policy_API - version: 1.3.0 + version: 1.4.0-alpha.1 externalDocs: - description: 3GPP TS 29.222 V18.6.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V19.4.0 Common API Framework for 3GPP Northbound APIs url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: - url: "{apiRoot}/access-control-policy/v1" @@ -213,6 +213,17 @@ components: apiInvokerPolicies: - apiInvokerId: apiInvokerId allowedTotalInvocations: 0 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 @@ -221,6 +232,17 @@ components: allowedInvocationsPerSecond: 6 - apiInvokerId: apiInvokerId allowedTotalInvocations: 0 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 @@ -242,6 +264,17 @@ components: example: apiInvokerId: apiInvokerId allowedTotalInvocations: 0 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 @@ -271,6 +304,12 @@ components: minItems: 0 title: allowedInvocationTimeRangeList type: array + netSliceInfo: + items: + $ref: '#/components/schemas/NetSliceId' + minItems: 1 + title: netSliceInfo + type: array required: - apiInvokerId title: ApiInvokerPolicy @@ -367,8 +406,73 @@ components: - param title: InvalidParam type: object + NetSliceId: + description: | + Represents the network slice identification information. + example: + ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId + nullable: true + oneOf: + - required: [snssai] + - required: [nsiId] + - required: [ensi] + properties: + snssai: + $ref: '#/components/schemas/Snssai' + nsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string + ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string + title: NetSliceId + type: object + Ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string DateTime: description: string with format "date-time" as defined in OpenAPI. format: date-time title: DateTime type: string + Snssai: + description: | + When Snssai needs to be converted to string (e.g. when used in maps as key), the string shall be composed of one to three digits "sst" optionally followed by "-" and 6 hexadecimal digits "sd". + example: + sd: sd + sst: 37 + properties: + sst: + description: "Unsigned integer, within the range 0 to 255, representing\ + \ the Slice/Service Type. It indicates the expected Network Slice behaviour\ + \ in terms of features and services. Values 0 to 127 correspond to the\ + \ standardized SST range. Values 128 to 255 correspond to the Operator-specific\ + \ range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are\ + \ defined in clause 5.15.2.2 of 3GPP TS 23.501. \n" + maximum: 255 + minimum: 0 + title: sst + type: integer + sd: + description: | + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. + pattern: "^[A-Fa-f0-9]{6}$" + title: sd + type: string + required: + - sst + title: Snssai + type: object + NsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/__init__.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/__init__.py index f70a615e..5d664f82 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/__init__.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/__init__.py @@ -1,9 +1,10 @@ import logging import connexion -from capif_acl.encoder import JSONEncoder from flask_testing import TestCase +from capif_acl.encoder import JSONEncoder + class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/test_default_controller.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/test_default_controller.py index f7ba5cee..d2f9a54a 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/test_default_controller.py @@ -1,5 +1,9 @@ import unittest +from flask import json + +from capif_acl.models.access_control_policy_list import AccessControlPolicyList # noqa: E501 +from capif_acl.models.problem_details import ProblemDetails # noqa: E501 from capif_acl.test import BaseTestCase diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/util.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/util.py index 9fc4382f..4cbc3489 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/util.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/util.py @@ -1,8 +1,8 @@ import datetime +import typing from capif_acl import typing_utils - def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py b/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py index 276b24f9..53e0880a 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py @@ -1,4 +1,5 @@ -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "capif_acl" VERSION = "1.0.0" @@ -30,7 +31,7 @@ setup( entry_points={ 'console_scripts': ['capif_acl=capif_acl.__main__:main']}, long_description="""\ - API for access control policy. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for access control policy. © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) -- GitLab From 898ae96b43d4c0d80285cd06210696880b1d4bef Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Wed, 26 Nov 2025 11:18:20 +0100 Subject: [PATCH 041/101] REL 19 API_Invoker_Management_API --- .../.openapi-generator/FILES | 16 +- ...pi_invoker_enrolment_details_controller.py | 61 -- ...oarded_api_invoker_document_controller.py} | 49 +- ...rded_api_invokers_collection_controller.py | 37 + .../controllers/security_controller.py | 29 + .../api_invoker_management/encoder.py | 3 +- .../api_invoker_management/models/__init__.py | 55 + .../models/aef_location.py | 9 +- .../models/aef_profile.py | 16 +- .../api_invoker_management/models/api_info.py | 91 ++ .../models/api_invoker_enrolment_details.py | 53 +- .../api_invoker_enrolment_details_patch.py | 9 +- .../api_invoker_management/models/api_list.py | 12 +- .../models/api_status.py | 9 +- .../models/base_model.py | 1 + .../models/civic_address.py | 5 +- .../models/communication_type.py | 5 +- .../models/custom_operation.py | 9 +- .../models/data_format.py | 5 +- .../models/ellipsoid_arc.py | 10 +- .../models/enrol_fail_cause.py | 34 + .../models/enrol_fail_reason.py | 93 ++ .../models/gad_shape.py | 8 +- .../models/geographic_area.py | 17 +- .../models/geographical_coordinates.py | 5 +- .../models/interface_description.py | 12 +- .../models/invalid_param.py | 5 +- .../models/ip_addr_range.py | 9 +- .../models/ipv4_address_range.py | 8 +- .../models/ipv6_addr1.py | 5 +- .../models/ipv6_address_range.py | 8 +- .../local2d_point_uncertainty_ellipse.py | 12 +- .../local3d_point_uncertainty_ellipsoid.py | 12 +- .../models/local_origin.py | 9 +- .../models/net_slice_id.py | 119 +++ .../models/o_auth_grant_type.py | 5 +- .../models/onboarding_criteria.py | 95 ++ .../models/onboarding_fail_reason.py | 34 + .../models/onboarding_information.py | 41 +- .../models/onboarding_notification.py | 13 +- .../models/operation.py | 5 +- .../api_invoker_management/models/point.py | 10 +- .../models/point_altitude.py | 10 +- .../models/point_altitude_uncertainty.py | 11 +- .../models/point_uncertainty_circle.py | 10 +- .../models/point_uncertainty_ellipse.py | 11 +- .../api_invoker_management/models/polygon.py | 10 +- .../models/problem_details.py | 11 +- .../api_invoker_management/models/protocol.py | 5 +- .../models/published_api_path.py | 5 +- .../models/related_criteria.py | 121 +++ .../models/relative_cartesian_location.py | 5 +- .../api_invoker_management/models/resource.py | 10 +- .../models/security_method.py | 5 +- .../models/service_api_description.py | 56 +- .../models/service_kpis.py | 8 +- .../models/shareable_information.py | 9 +- .../api_invoker_management/models/snssai.py | 101 ++ .../models/supported_gad_shapes.py | 5 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../api_invoker_management/models/version.py | 9 +- .../models/websock_notif_config.py | 5 +- .../openapi/openapi.yaml | 956 ++++++++++++------ .../api_invoker_management/test/__init__.py | 3 +- .../test/test_default_controller.py | 67 -- ...pi_invoker_enrolment_details_controller.py | 35 - ...boarded_api_invoker_document_controller.py | 69 ++ ...rded_api_invokers_collection_controller.py | 34 + .../api_invoker_management/util.py | 2 +- .../setup.py | 5 +- 71 files changed, 2006 insertions(+), 625 deletions(-) delete mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_api_invoker_enrolment_details_controller.py rename services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/{default_controller.py => individual_on_boarded_api_invoker_document_controller.py} (65%) create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/on_boarded_api_invokers_collection_controller.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_info.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_cause.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_reason.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/net_slice_id.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_criteria.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_fail_reason.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/related_criteria.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/snssai.py delete mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_default_controller.py delete mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_api_invoker_enrolment_details_controller.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_on_boarded_api_invoker_document_controller.py create mode 100644 services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_on_boarded_api_invokers_collection_controller.py diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/FILES b/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/FILES index 716733b5..ae0d5d92 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/FILES @@ -8,13 +8,14 @@ git_push.sh api_invoker_management/__init__.py api_invoker_management/__main__.py api_invoker_management/controllers/__init__.py -api_invoker_management/controllers/default_controller.py -api_invoker_management/controllers/individual_api_invoker_enrolment_details_controller.py +api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py +api_invoker_management/controllers/on_boarded_api_invokers_collection_controller.py api_invoker_management/controllers/security_controller.py api_invoker_management/encoder.py api_invoker_management/models/__init__.py api_invoker_management/models/aef_location.py api_invoker_management/models/aef_profile.py +api_invoker_management/models/api_info.py api_invoker_management/models/api_invoker_enrolment_details.py api_invoker_management/models/api_invoker_enrolment_details_patch.py api_invoker_management/models/api_list.py @@ -25,6 +26,8 @@ api_invoker_management/models/communication_type.py api_invoker_management/models/custom_operation.py api_invoker_management/models/data_format.py api_invoker_management/models/ellipsoid_arc.py +api_invoker_management/models/enrol_fail_cause.py +api_invoker_management/models/enrol_fail_reason.py api_invoker_management/models/gad_shape.py api_invoker_management/models/geographic_area.py api_invoker_management/models/geographical_coordinates.py @@ -37,7 +40,10 @@ api_invoker_management/models/ipv6_address_range.py api_invoker_management/models/local2d_point_uncertainty_ellipse.py api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py api_invoker_management/models/local_origin.py +api_invoker_management/models/net_slice_id.py api_invoker_management/models/o_auth_grant_type.py +api_invoker_management/models/onboarding_criteria.py +api_invoker_management/models/onboarding_fail_reason.py api_invoker_management/models/onboarding_information.py api_invoker_management/models/onboarding_notification.py api_invoker_management/models/operation.py @@ -50,12 +56,14 @@ api_invoker_management/models/polygon.py api_invoker_management/models/problem_details.py api_invoker_management/models/protocol.py api_invoker_management/models/published_api_path.py +api_invoker_management/models/related_criteria.py api_invoker_management/models/relative_cartesian_location.py api_invoker_management/models/resource.py api_invoker_management/models/security_method.py api_invoker_management/models/service_api_description.py api_invoker_management/models/service_kpis.py api_invoker_management/models/shareable_information.py +api_invoker_management/models/snssai.py api_invoker_management/models/supported_gad_shapes.py api_invoker_management/models/uncertainty_ellipse.py api_invoker_management/models/uncertainty_ellipsoid.py @@ -63,8 +71,8 @@ api_invoker_management/models/version.py api_invoker_management/models/websock_notif_config.py api_invoker_management/openapi/openapi.yaml api_invoker_management/test/__init__.py -api_invoker_management/test/test_default_controller.py -api_invoker_management/test/test_individual_api_invoker_enrolment_details_controller.py +api_invoker_management/test/test_individual_on_boarded_api_invoker_document_controller.py +api_invoker_management/test/test_on_boarded_api_invokers_collection_controller.py api_invoker_management/typing_utils.py api_invoker_management/util.py requirements.txt diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_api_invoker_enrolment_details_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_api_invoker_enrolment_details_controller.py deleted file mode 100644 index a033932b..00000000 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_api_invoker_enrolment_details_controller.py +++ /dev/null @@ -1,61 +0,0 @@ -from flask import current_app, request -from functools import wraps -from cryptography import x509 -from cryptography.hazmat.backends import default_backend - -from ..core.apiinvokerenrolmentdetails import InvokerManagementOperations -from ..core.validate_user import ControlAccess -from api_invoker_management.models.api_invoker_enrolment_details_patch import \ - APIInvokerEnrolmentDetailsPatch # noqa: E501 - -invoker_operations = InvokerManagementOperations() -valid_user = ControlAccess() - - -def cert_validation(): - def _cert_validation(f): - @wraps(f) - def __cert_validation(*args, **kwargs): - - args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] - cert_raw = cert_tmp.replace('\t', '') - - cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) - - cn = cert.subject.get_attributes_for_oid(x509.OID_COMMON_NAME)[0].value.strip() - - if cn != "superadmin": - cert_signature = cert.signature.hex() - result = valid_user.validate_user_cert(args["onboardingId"], cert_signature) - - if result is not None: - return result - - result = f(**kwargs) - return result - return __cert_validation - return _cert_validation - - -@cert_validation() -def modify_ind_api_invoke_enrolment(onboarding_id, body): # noqa: E501 - """modify_ind_api_invoke_enrolment - - Modify an individual API invoker details. # noqa: E501 - - :param onboarding_id: - :type onboarding_id: str - :param api_invoker_enrolment_details_patch: - :type api_invoker_enrolment_details_patch: dict | bytes - - :rtype: Union[APIInvokerEnrolmentDetails, Tuple[APIInvokerEnrolmentDetails, int], Tuple[APIInvokerEnrolmentDetails, int, Dict[str, str]] - """ - current_app.logger.info("Updating invoker") - if request.is_json: - body = APIInvokerEnrolmentDetailsPatch.from_dict(request.get_json()) # noqa: E501 - - res = invoker_operations.patch_apiinvokerenrolmentdetail(onboarding_id, body) - - return res - diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/default_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py similarity index 65% rename from services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/default_controller.py rename to services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py index 09ffb624..a3a9e746 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/default_controller.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py @@ -1,13 +1,19 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + from functools import wraps from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request -from flask_jwt_extended import get_jwt_identity, jwt_required from ..core.apiinvokerenrolmentdetails import InvokerManagementOperations from ..core.validate_user import ControlAccess from ..models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 +from api_invoker_management.models.api_invoker_enrolment_details_patch import \ + APIInvokerEnrolmentDetailsPatch # noqa: E501 invoker_operations = InvokerManagementOperations() valid_user = ControlAccess() @@ -38,12 +44,12 @@ def cert_validation(): return _cert_validation @cert_validation() -def onboarded_invokers_onboarding_id_delete(onboarding_id): # noqa: E501 - """onboarded_invokers_onboarding_id_delete +def delete_ind_onboarded_api_invoker(onboarding_id): # noqa: E501 + """Delete an existing Individual On-boarded API Invoker resource. - Deletes an individual API Invoker. # noqa: E501 + Deletes an existing Individual On-boarded API Invoker. # noqa: E501 - :param onboarding_id: String identifying an individual on-boarded API invoker resource + :param onboarding_id: :type onboarding_id: str :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] @@ -54,44 +60,43 @@ def onboarded_invokers_onboarding_id_delete(onboarding_id): # noqa: E501 return res @cert_validation() -def onboarded_invokers_onboarding_id_put(onboarding_id, body): # noqa: E501 - """onboarded_invokers_onboarding_id_put +def modify_ind_api_invoke_enrolment(onboarding_id, body): # noqa: E501 + """modify_ind_api_invoke_enrolment - Updates an individual API invoker details. # noqa: E501 + # noqa: E501 - :param onboarding_id: String identifying an individual on-boarded API invoker resource + :param onboarding_id: :type onboarding_id: str - :param api_invoker_enrolment_details: representation of the API invoker details to be updated in CAPIF core function - :type api_invoker_enrolment_details: dict | bytes + :param api_invoker_enrolment_details_patch: + :type api_invoker_enrolment_details_patch: dict | bytes :rtype: Union[APIInvokerEnrolmentDetails, Tuple[APIInvokerEnrolmentDetails, int], Tuple[APIInvokerEnrolmentDetails, int, Dict[str, str]] """ current_app.logger.info("Updating invoker") if request.is_json: - body = APIInvokerEnrolmentDetails.from_dict(request.get_json()) # noqa: E501 + body = APIInvokerEnrolmentDetailsPatch.from_dict(request.get_json()) # noqa: E501 - res = invoker_operations.update_apiinvokerenrolmentdetail(onboarding_id,body) + res = invoker_operations.patch_apiinvokerenrolmentdetail(onboarding_id, body) return res -@jwt_required() -def onboarded_invokers_post(body): # noqa: E501 - """onboarded_invokers_post +@cert_validation() +def update_ind_onboarded_api_invoker(onboarding_id, body): # noqa: E501 + """Update an existing Individual On-boarded API Invoker resource. - Creates a new individual API Invoker profile. # noqa: E501 + # noqa: E501 + :param onboarding_id: + :type onboarding_id: str :param api_invoker_enrolment_details: :type api_invoker_enrolment_details: dict | bytes :rtype: Union[APIInvokerEnrolmentDetails, Tuple[APIInvokerEnrolmentDetails, int], Tuple[APIInvokerEnrolmentDetails, int, Dict[str, str]] """ - identity = get_jwt_identity() - username, uuid = identity.split() - - current_app.logger.info("Creating Invoker") + current_app.logger.info("Updating invoker") if request.is_json: body = APIInvokerEnrolmentDetails.from_dict(request.get_json()) # noqa: E501 - res = invoker_operations.add_apiinvokerenrolmentdetail(body, username, uuid) + res = invoker_operations.update_apiinvokerenrolmentdetail(onboarding_id,body) return res diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/on_boarded_api_invokers_collection_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/on_boarded_api_invokers_collection_controller.py new file mode 100644 index 00000000..0dd83f9f --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/on_boarded_api_invokers_collection_controller.py @@ -0,0 +1,37 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 +from api_invoker_management.models.problem_details import ProblemDetails # noqa: E501 +from api_invoker_management import util + +from ..core.apiinvokerenrolmentdetails import InvokerManagementOperations + +from flask import current_app, request +from flask_jwt_extended import get_jwt_identity, jwt_required + +invoker_operations = InvokerManagementOperations() + +@jwt_required() +def create_onboarded_api_invoker(body): # noqa: E501 + """Request the Creation of a new On-boarded API Invoker. + + # noqa: E501 + + :param api_invoker_enrolment_details: + :type api_invoker_enrolment_details: dict | bytes + + :rtype: Union[APIInvokerEnrolmentDetails, Tuple[APIInvokerEnrolmentDetails, int], Tuple[APIInvokerEnrolmentDetails, int, Dict[str, str]] + """ + identity = get_jwt_identity() + username, uuid = identity.split() + + current_app.logger.info("Creating Invoker") + if request.is_json: + body = APIInvokerEnrolmentDetails.from_dict(request.get_json()) # noqa: E501 + + res = invoker_operations.add_apiinvokerenrolmentdetail(body, username, uuid) + + return res diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller.py index 139597f9..84b3c466 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller.py @@ -1,2 +1,31 @@ +from typing import List +def info_from_oAuth2ClientCredentials(token): + """ + Validate and decode token. + Returned value will be passed in 'token_info' parameter of your operation function, if there is one. + 'sub' or 'uid' will be set in 'user' parameter of your operation function, if there is one. + 'scope' or 'scopes' will be passed to scope validation function. + + :param token Token provided by Authorization header + :type token: str + :return: Decoded token information or None if token is invalid + :rtype: dict | None + """ + return {'scopes': ['read:pets', 'write:pets'], 'uid': 'user_id'} + + +def validate_scope_oAuth2ClientCredentials(required_scopes, token_scopes): + """ + Validate required scopes are included in token scope + + :param required_scopes Required scope to access called API + :type required_scopes: List[str] + :param token_scopes Scope present in token + :type token_scopes: List[str] + :return: True if access to called API is allowed + :rtype: bool + """ + return set(required_scopes).issubset(set(token_scopes)) + diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/encoder.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/encoder.py index 9c06b11b..7dd3039e 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/encoder.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/encoder.py @@ -1,6 +1,7 @@ -from api_invoker_management.models.base_model import Model from connexion.jsonifier import JSONEncoder +from api_invoker_management.models.base_model import Model + class CustomJSONEncoder(JSONEncoder): include_nulls = False diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/__init__.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/__init__.py index d036df69..b6bf8cc3 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/__init__.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/__init__.py @@ -1,2 +1,57 @@ # flake8: noqa # import models into model package +from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails +from api_invoker_management.models.api_invoker_enrolment_details_patch import APIInvokerEnrolmentDetailsPatch +from api_invoker_management.models.api_list import APIList +from api_invoker_management.models.aef_location import AefLocation +from api_invoker_management.models.aef_profile import AefProfile +from api_invoker_management.models.api_info import ApiInfo +from api_invoker_management.models.api_status import ApiStatus +from api_invoker_management.models.civic_address import CivicAddress +from api_invoker_management.models.communication_type import CommunicationType +from api_invoker_management.models.custom_operation import CustomOperation +from api_invoker_management.models.data_format import DataFormat +from api_invoker_management.models.ellipsoid_arc import EllipsoidArc +from api_invoker_management.models.enrol_fail_cause import EnrolFailCause +from api_invoker_management.models.enrol_fail_reason import EnrolFailReason +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.geographic_area import GeographicArea +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management.models.interface_description import InterfaceDescription +from api_invoker_management.models.invalid_param import InvalidParam +from api_invoker_management.models.ip_addr_range import IpAddrRange +from api_invoker_management.models.ipv4_address_range import Ipv4AddressRange +from api_invoker_management.models.ipv6_addr1 import Ipv6Addr1 +from api_invoker_management.models.ipv6_address_range import Ipv6AddressRange +from api_invoker_management.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse +from api_invoker_management.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid +from api_invoker_management.models.local_origin import LocalOrigin +from api_invoker_management.models.net_slice_id import NetSliceId +from api_invoker_management.models.o_auth_grant_type import OAuthGrantType +from api_invoker_management.models.onboarding_criteria import OnboardingCriteria +from api_invoker_management.models.onboarding_fail_reason import OnboardingFailReason +from api_invoker_management.models.onboarding_information import OnboardingInformation +from api_invoker_management.models.onboarding_notification import OnboardingNotification +from api_invoker_management.models.operation import Operation +from api_invoker_management.models.point import Point +from api_invoker_management.models.point_altitude import PointAltitude +from api_invoker_management.models.point_altitude_uncertainty import PointAltitudeUncertainty +from api_invoker_management.models.point_uncertainty_circle import PointUncertaintyCircle +from api_invoker_management.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from api_invoker_management.models.polygon import Polygon +from api_invoker_management.models.problem_details import ProblemDetails +from api_invoker_management.models.protocol import Protocol +from api_invoker_management.models.published_api_path import PublishedApiPath +from api_invoker_management.models.related_criteria import RelatedCriteria +from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation +from api_invoker_management.models.resource import Resource +from api_invoker_management.models.security_method import SecurityMethod +from api_invoker_management.models.service_api_description import ServiceAPIDescription +from api_invoker_management.models.service_kpis import ServiceKpis +from api_invoker_management.models.shareable_information import ShareableInformation +from api_invoker_management.models.snssai import Snssai +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse +from api_invoker_management.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from api_invoker_management.models.version import Version +from api_invoker_management.models.websock_notif_config import WebsockNotifConfig diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_location.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_location.py index 512c9804..226cef2c 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_location.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_location.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.civic_address import CivicAddress +from api_invoker_management.models.geographic_area import GeographicArea +from api_invoker_management import util + from api_invoker_management.models.civic_address import CivicAddress # noqa: E501 from api_invoker_management.models.geographic_area import GeographicArea # noqa: E501 - class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_profile.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_profile.py index 62866226..d650c30b 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_profile.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_profile.py @@ -1,9 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.aef_location import AefLocation +from api_invoker_management.models.data_format import DataFormat +from api_invoker_management.models.interface_description import InterfaceDescription +from api_invoker_management.models.ip_addr_range import IpAddrRange +from api_invoker_management.models.o_auth_grant_type import OAuthGrantType +from api_invoker_management.models.protocol import Protocol +from api_invoker_management.models.security_method import SecurityMethod +from api_invoker_management.models.service_kpis import ServiceKpis +from api_invoker_management.models.version import Version from api_invoker_management import util + from api_invoker_management.models.aef_location import AefLocation # noqa: E501 -from api_invoker_management.models.base_model import Model from api_invoker_management.models.data_format import DataFormat # noqa: E501 from api_invoker_management.models.interface_description import InterfaceDescription # noqa: E501 from api_invoker_management.models.ip_addr_range import IpAddrRange # noqa: E501 @@ -13,7 +24,6 @@ from api_invoker_management.models.security_method import SecurityMethod # noqa from api_invoker_management.models.service_kpis import ServiceKpis # noqa: E501 from api_invoker_management.models.version import Version # noqa: E501 - class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_info.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_info.py new file mode 100644 index 00000000..d22c7d91 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_info.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management import util + + +class ApiInfo(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_name=None, supported_api_versions=None): # noqa: E501 + """ApiInfo - a model defined in OpenAPI + + :param api_name: The api_name of this ApiInfo. # noqa: E501 + :type api_name: str + :param supported_api_versions: The supported_api_versions of this ApiInfo. # noqa: E501 + :type supported_api_versions: List[str] + """ + self.openapi_types = { + 'api_name': str, + 'supported_api_versions': List[str] + } + + self.attribute_map = { + 'api_name': 'apiName', + 'supported_api_versions': 'supportedApiVersions' + } + + self._api_name = api_name + self._supported_api_versions = supported_api_versions + + @classmethod + def from_dict(cls, dikt) -> 'ApiInfo': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ApiInfo of this ApiInfo. # noqa: E501 + :rtype: ApiInfo + """ + return util.deserialize_model(dikt, cls) + + @property + def api_name(self) -> str: + """Gets the api_name of this ApiInfo. + + + :return: The api_name of this ApiInfo. + :rtype: str + """ + return self._api_name + + @api_name.setter + def api_name(self, api_name: str): + """Sets the api_name of this ApiInfo. + + + :param api_name: The api_name of this ApiInfo. + :type api_name: str + """ + if api_name is None: + raise ValueError("Invalid value for `api_name`, must not be `None`") # noqa: E501 + + self._api_name = api_name + + @property + def supported_api_versions(self) -> List[str]: + """Gets the supported_api_versions of this ApiInfo. + + + :return: The supported_api_versions of this ApiInfo. + :rtype: List[str] + """ + return self._supported_api_versions + + @supported_api_versions.setter + def supported_api_versions(self, supported_api_versions: List[str]): + """Sets the supported_api_versions of this ApiInfo. + + + :param supported_api_versions: The supported_api_versions of this ApiInfo. + :type supported_api_versions: List[str] + """ + if supported_api_versions is not None and len(supported_api_versions) < 1: + raise ValueError("Invalid value for `supported_api_versions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._supported_api_versions = supported_api_versions diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details.py index bec061ae..e80fb47d 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details.py @@ -1,13 +1,20 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.api_list import APIList +from api_invoker_management.models.enrol_fail_reason import EnrolFailReason +from api_invoker_management.models.onboarding_information import OnboardingInformation +from api_invoker_management.models.websock_notif_config import WebsockNotifConfig +import re from api_invoker_management import util + from api_invoker_management.models.api_list import APIList # noqa: E501 -from api_invoker_management.models.base_model import Model +from api_invoker_management.models.enrol_fail_reason import EnrolFailReason # noqa: E501 from api_invoker_management.models.onboarding_information import OnboardingInformation # noqa: E501 from api_invoker_management.models.websock_notif_config import WebsockNotifConfig # noqa: E501 - +import re # noqa: E501 class APIInvokerEnrolmentDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,7 +22,7 @@ class APIInvokerEnrolmentDetails(Model): Do not edit the class manually. """ - def __init__(self, api_invoker_id=None, onboarding_information=None, notification_destination=None, request_test_notification=None, websock_notif_config=None, api_list=None, api_invoker_information=None, exp_time=None, supported_features=None): # noqa: E501 + def __init__(self, api_invoker_id=None, onboarding_information=None, notification_destination=None, request_test_notification=None, websock_notif_config=None, api_list=None, api_invoker_information=None, exp_time=None, supported_features=None, failure_reasons=None): # noqa: E501 """APIInvokerEnrolmentDetails - a model defined in OpenAPI :param api_invoker_id: The api_invoker_id of this APIInvokerEnrolmentDetails. # noqa: E501 @@ -36,6 +43,8 @@ class APIInvokerEnrolmentDetails(Model): :type exp_time: datetime :param supported_features: The supported_features of this APIInvokerEnrolmentDetails. # noqa: E501 :type supported_features: str + :param failure_reasons: The failure_reasons of this APIInvokerEnrolmentDetails. # noqa: E501 + :type failure_reasons: List[EnrolFailReason] """ self.openapi_types = { 'api_invoker_id': str, @@ -46,7 +55,8 @@ class APIInvokerEnrolmentDetails(Model): 'api_list': APIList, 'api_invoker_information': str, 'exp_time': datetime, - 'supported_features': str + 'supported_features': str, + 'failure_reasons': List[EnrolFailReason] } self.attribute_map = { @@ -58,7 +68,8 @@ class APIInvokerEnrolmentDetails(Model): 'api_list': 'apiList', 'api_invoker_information': 'apiInvokerInformation', 'exp_time': 'expTime', - 'supported_features': 'supportedFeatures' + 'supported_features': 'supportedFeatures', + 'failure_reasons': 'failureReasons' } self._api_invoker_id = api_invoker_id @@ -70,6 +81,7 @@ class APIInvokerEnrolmentDetails(Model): self._api_invoker_information = api_invoker_information self._exp_time = exp_time self._supported_features = supported_features + self._failure_reasons = failure_reasons @classmethod def from_dict(cls, dikt) -> 'APIInvokerEnrolmentDetails': @@ -157,7 +169,7 @@ class APIInvokerEnrolmentDetails(Model): def request_test_notification(self) -> bool: """Gets the request_test_notification of this APIInvokerEnrolmentDetails. - Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + Set to true to request the CCF to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 :return: The request_test_notification of this APIInvokerEnrolmentDetails. :rtype: bool @@ -168,7 +180,7 @@ class APIInvokerEnrolmentDetails(Model): def request_test_notification(self, request_test_notification: bool): """Sets the request_test_notification of this APIInvokerEnrolmentDetails. - Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + Set to true to request the CCF to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 :param request_test_notification: The request_test_notification of this APIInvokerEnrolmentDetails. :type request_test_notification: bool @@ -288,3 +300,26 @@ class APIInvokerEnrolmentDetails(Model): raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 self._supported_features = supported_features + + @property + def failure_reasons(self) -> List[EnrolFailReason]: + """Gets the failure_reasons of this APIInvokerEnrolmentDetails. + + + :return: The failure_reasons of this APIInvokerEnrolmentDetails. + :rtype: List[EnrolFailReason] + """ + return self._failure_reasons + + @failure_reasons.setter + def failure_reasons(self, failure_reasons: List[EnrolFailReason]): + """Sets the failure_reasons of this APIInvokerEnrolmentDetails. + + + :param failure_reasons: The failure_reasons of this APIInvokerEnrolmentDetails. + :type failure_reasons: List[EnrolFailReason] + """ + if failure_reasons is not None and len(failure_reasons) < 1: + raise ValueError("Invalid value for `failure_reasons`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._failure_reasons = failure_reasons diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details_patch.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details_patch.py index c827f22b..0ac660c7 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details_patch.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details_patch.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.api_list import APIList +from api_invoker_management.models.onboarding_information import OnboardingInformation from api_invoker_management import util + from api_invoker_management.models.api_list import APIList # noqa: E501 -from api_invoker_management.models.base_model import Model from api_invoker_management.models.onboarding_information import OnboardingInformation # noqa: E501 - class APIInvokerEnrolmentDetailsPatch(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_list.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_list.py index 25ddd003..e071cbb8 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_list.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_list.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model -from api_invoker_management.models.service_api_description import ServiceAPIDescription # noqa: E501 +from api_invoker_management.models.service_api_description import ServiceAPIDescription +from api_invoker_management import util +from api_invoker_management.models.service_api_description import ServiceAPIDescription # noqa: E501 class APIList(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -43,7 +45,7 @@ class APIList(Model): def service_api_descriptions(self) -> List[ServiceAPIDescription]: """Gets the service_api_descriptions of this APIList. - Represents the list of service APIs that the API Invoker is allowed to invoke. # noqa: E501 + Represents the list of service APIs that the API Invoker is allowed to invoke. # noqa: E501 :return: The service_api_descriptions of this APIList. :rtype: List[ServiceAPIDescription] @@ -54,7 +56,7 @@ class APIList(Model): def service_api_descriptions(self, service_api_descriptions: List[ServiceAPIDescription]): """Sets the service_api_descriptions of this APIList. - Represents the list of service APIs that the API Invoker is allowed to invoke. # noqa: E501 + Represents the list of service APIs that the API Invoker is allowed to invoke. # noqa: E501 :param service_api_descriptions: The service_api_descriptions of this APIList. :type service_api_descriptions: List[ServiceAPIDescription] diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_status.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_status.py index 7bf0540b..88a87c78 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_status.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_status.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class ApiStatus(Model): @@ -42,7 +43,7 @@ class ApiStatus(Model): def aef_ids(self) -> List[str]: """Gets the aef_ids of this ApiStatus. - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # noqa: E501 + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 :return: The aef_ids of this ApiStatus. :rtype: List[str] @@ -53,7 +54,7 @@ class ApiStatus(Model): def aef_ids(self, aef_ids: List[str]): """Sets the aef_ids of this ApiStatus. - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # noqa: E501 + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 :param aef_ids: The aef_ids of this ApiStatus. :type aef_ids: List[str] diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model.py index 19dfa2af..9975e6c9 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from api_invoker_management import util diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/civic_address.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/civic_address.py index 640aff79..a70b83c3 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/civic_address.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/civic_address.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type.py index 0f199361..a09339c5 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/custom_operation.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/custom_operation.py index 0fc56782..c39874de 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/custom_operation.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/custom_operation.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.communication_type import CommunicationType +from api_invoker_management.models.operation import Operation +from api_invoker_management import util + from api_invoker_management.models.communication_type import CommunicationType # noqa: E501 from api_invoker_management.models.operation import Operation # noqa: E501 - class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format.py index f6ba60af..3b5ef198 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class DataFormat(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py index de005059..48576865 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management import util + from api_invoker_management.models.gad_shape import GADShape # noqa: E501 from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_cause.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_cause.py new file mode 100644 index 00000000..612a847c --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_cause.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management import util + + +class EnrolFailCause(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """EnrolFailCause - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'EnrolFailCause': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The EnrolFailCause of this EnrolFailCause. # noqa: E501 + :rtype: EnrolFailCause + """ + return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_reason.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_reason.py new file mode 100644 index 00000000..6acbaab3 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_reason.py @@ -0,0 +1,93 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.enrol_fail_cause import EnrolFailCause +from api_invoker_management import util + +from api_invoker_management.models.enrol_fail_cause import EnrolFailCause # noqa: E501 + +class EnrolFailReason(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_name=None, failure_code=None): # noqa: E501 + """EnrolFailReason - a model defined in OpenAPI + + :param api_name: The api_name of this EnrolFailReason. # noqa: E501 + :type api_name: List[str] + :param failure_code: The failure_code of this EnrolFailReason. # noqa: E501 + :type failure_code: EnrolFailCause + """ + self.openapi_types = { + 'api_name': List[str], + 'failure_code': EnrolFailCause + } + + self.attribute_map = { + 'api_name': 'apiName', + 'failure_code': 'failureCode' + } + + self._api_name = api_name + self._failure_code = failure_code + + @classmethod + def from_dict(cls, dikt) -> 'EnrolFailReason': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The EnrolFailReason of this EnrolFailReason. # noqa: E501 + :rtype: EnrolFailReason + """ + return util.deserialize_model(dikt, cls) + + @property + def api_name(self) -> List[str]: + """Gets the api_name of this EnrolFailReason. + + + :return: The api_name of this EnrolFailReason. + :rtype: List[str] + """ + return self._api_name + + @api_name.setter + def api_name(self, api_name: List[str]): + """Sets the api_name of this EnrolFailReason. + + + :param api_name: The api_name of this EnrolFailReason. + :type api_name: List[str] + """ + if api_name is None: + raise ValueError("Invalid value for `api_name`, must not be `None`") # noqa: E501 + + self._api_name = api_name + + @property + def failure_code(self) -> EnrolFailCause: + """Gets the failure_code of this EnrolFailReason. + + + :return: The failure_code of this EnrolFailReason. + :rtype: EnrolFailCause + """ + return self._failure_code + + @failure_code.setter + def failure_code(self, failure_code: EnrolFailCause): + """Sets the failure_code of this EnrolFailReason. + + + :param failure_code: The failure_code of this EnrolFailReason. + :type failure_code: EnrolFailCause + """ + if failure_code is None: + raise ValueError("Invalid value for `failure_code`, must not be `None`") # noqa: E501 + + self._failure_code = failure_code diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/gad_shape.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/gad_shape.py index 496c79b9..fdbb7ff5 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/gad_shape.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/gad_shape.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management import util +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographic_area.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographic_area.py index 2ec1f553..11758707 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographic_area.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographic_area.py @@ -1,8 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.ellipsoid_arc import EllipsoidArc +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management.models.point import Point +from api_invoker_management.models.point_altitude import PointAltitude +from api_invoker_management.models.point_altitude_uncertainty import PointAltitudeUncertainty +from api_invoker_management.models.point_uncertainty_circle import PointUncertaintyCircle +from api_invoker_management.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from api_invoker_management.models.polygon import Polygon +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse +from api_invoker_management import util + from api_invoker_management.models.ellipsoid_arc import EllipsoidArc # noqa: E501 from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from api_invoker_management.models.point import Point # noqa: E501 @@ -14,7 +26,6 @@ from api_invoker_management.models.polygon import Polygon # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographical_coordinates.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographical_coordinates.py index 8c660935..1e82fce5 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographical_coordinates.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/interface_description.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/interface_description.py index 3a9d6f55..86301d32 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/interface_description.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/interface_description.py @@ -1,12 +1,16 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.o_auth_grant_type import OAuthGrantType +from api_invoker_management.models.security_method import SecurityMethod +import re +from api_invoker_management import util + from api_invoker_management.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from api_invoker_management.models.security_method import SecurityMethod # noqa: E501 - +import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/invalid_param.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/invalid_param.py index 20270842..9fd06e46 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/invalid_param.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ip_addr_range.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ip_addr_range.py index 70ad8a6f..f831d595 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ip_addr_range.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.ipv4_address_range import Ipv4AddressRange +from api_invoker_management.models.ipv6_address_range import Ipv6AddressRange +from api_invoker_management import util + from api_invoker_management.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 from api_invoker_management.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 - class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv4_address_range.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv4_address_range.py index 822aaa85..bddd1688 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv4_address_range.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +import re +from api_invoker_management import util +import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py index 0d7d43f4..ac8e6e66 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_address_range.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_address_range.py index 9dc04924..0b461670 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_address_range.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model -from api_invoker_management.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 +from api_invoker_management.models.ipv6_addr1 import Ipv6Addr1 +from api_invoker_management import util +from api_invoker_management.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 class Ipv6AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local2d_point_uncertainty_ellipse.py index 5e05b820..b68d5903 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local2d_point_uncertainty_ellipse.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.local_origin import LocalOrigin +from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse +from api_invoker_management import util + from api_invoker_management.models.gad_shape import GADShape # noqa: E501 from api_invoker_management.models.local_origin import LocalOrigin # noqa: E501 from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py index 22c894f2..1ea64800 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.local_origin import LocalOrigin +from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from api_invoker_management import util + from api_invoker_management.models.gad_shape import GADShape # noqa: E501 from api_invoker_management.models.local_origin import LocalOrigin # noqa: E501 from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from api_invoker_management.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 - class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local_origin.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local_origin.py index 489ceef8..1f5eb93a 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local_origin.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local_origin.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.geographic_area import GeographicArea +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management import util + from api_invoker_management.models.geographic_area import GeographicArea # noqa: E501 from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 - class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/net_slice_id.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/net_slice_id.py new file mode 100644 index 00000000..70691a8e --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/net_slice_id.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.snssai import Snssai +from api_invoker_management import util + +from api_invoker_management.models.snssai import Snssai # noqa: E501 + +class NetSliceId(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, snssai=None, nsi_id=None, ensi=None): # noqa: E501 + """NetSliceId - a model defined in OpenAPI + + :param snssai: The snssai of this NetSliceId. # noqa: E501 + :type snssai: Snssai + :param nsi_id: The nsi_id of this NetSliceId. # noqa: E501 + :type nsi_id: str + :param ensi: The ensi of this NetSliceId. # noqa: E501 + :type ensi: str + """ + self.openapi_types = { + 'snssai': Snssai, + 'nsi_id': str, + 'ensi': str + } + + self.attribute_map = { + 'snssai': 'snssai', + 'nsi_id': 'nsiId', + 'ensi': 'ensi' + } + + self._snssai = snssai + self._nsi_id = nsi_id + self._ensi = ensi + + @classmethod + def from_dict(cls, dikt) -> 'NetSliceId': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NetSliceId of this NetSliceId. # noqa: E501 + :rtype: NetSliceId + """ + return util.deserialize_model(dikt, cls) + + @property + def snssai(self) -> Snssai: + """Gets the snssai of this NetSliceId. + + + :return: The snssai of this NetSliceId. + :rtype: Snssai + """ + return self._snssai + + @snssai.setter + def snssai(self, snssai: Snssai): + """Sets the snssai of this NetSliceId. + + + :param snssai: The snssai of this NetSliceId. + :type snssai: Snssai + """ + + self._snssai = snssai + + @property + def nsi_id(self) -> str: + """Gets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :return: The nsi_id of this NetSliceId. + :rtype: str + """ + return self._nsi_id + + @nsi_id.setter + def nsi_id(self, nsi_id: str): + """Sets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :param nsi_id: The nsi_id of this NetSliceId. + :type nsi_id: str + """ + + self._nsi_id = nsi_id + + @property + def ensi(self) -> str: + """Gets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :return: The ensi of this NetSliceId. + :rtype: str + """ + return self._ensi + + @ensi.setter + def ensi(self, ensi: str): + """Sets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :param ensi: The ensi of this NetSliceId. + :type ensi: str + """ + + self._ensi = ensi diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/o_auth_grant_type.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/o_auth_grant_type.py index a688eb0c..3bc3a6f8 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/o_auth_grant_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_criteria.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_criteria.py new file mode 100644 index 00000000..c1a4ff9a --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_criteria.py @@ -0,0 +1,95 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.related_criteria import RelatedCriteria +from api_invoker_management.models.security_method import SecurityMethod +from api_invoker_management import util + +from api_invoker_management.models.related_criteria import RelatedCriteria # noqa: E501 +from api_invoker_management.models.security_method import SecurityMethod # noqa: E501 + +class OnboardingCriteria(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, sec_methods=None, related_criteria=None): # noqa: E501 + """OnboardingCriteria - a model defined in OpenAPI + + :param sec_methods: The sec_methods of this OnboardingCriteria. # noqa: E501 + :type sec_methods: List[SecurityMethod] + :param related_criteria: The related_criteria of this OnboardingCriteria. # noqa: E501 + :type related_criteria: RelatedCriteria + """ + self.openapi_types = { + 'sec_methods': List[SecurityMethod], + 'related_criteria': RelatedCriteria + } + + self.attribute_map = { + 'sec_methods': 'secMethods', + 'related_criteria': 'relatedCriteria' + } + + self._sec_methods = sec_methods + self._related_criteria = related_criteria + + @classmethod + def from_dict(cls, dikt) -> 'OnboardingCriteria': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The OnboardingCriteria of this OnboardingCriteria. # noqa: E501 + :rtype: OnboardingCriteria + """ + return util.deserialize_model(dikt, cls) + + @property + def sec_methods(self) -> List[SecurityMethod]: + """Gets the sec_methods of this OnboardingCriteria. + + + :return: The sec_methods of this OnboardingCriteria. + :rtype: List[SecurityMethod] + """ + return self._sec_methods + + @sec_methods.setter + def sec_methods(self, sec_methods: List[SecurityMethod]): + """Sets the sec_methods of this OnboardingCriteria. + + + :param sec_methods: The sec_methods of this OnboardingCriteria. + :type sec_methods: List[SecurityMethod] + """ + if sec_methods is None: + raise ValueError("Invalid value for `sec_methods`, must not be `None`") # noqa: E501 + if sec_methods is not None and len(sec_methods) < 1: + raise ValueError("Invalid value for `sec_methods`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._sec_methods = sec_methods + + @property + def related_criteria(self) -> RelatedCriteria: + """Gets the related_criteria of this OnboardingCriteria. + + + :return: The related_criteria of this OnboardingCriteria. + :rtype: RelatedCriteria + """ + return self._related_criteria + + @related_criteria.setter + def related_criteria(self, related_criteria: RelatedCriteria): + """Sets the related_criteria of this OnboardingCriteria. + + + :param related_criteria: The related_criteria of this OnboardingCriteria. + :type related_criteria: RelatedCriteria + """ + + self._related_criteria = related_criteria diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_fail_reason.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_fail_reason.py new file mode 100644 index 00000000..b884aba6 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_fail_reason.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management import util + + +class OnboardingFailReason(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """OnboardingFailReason - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'OnboardingFailReason': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The OnboardingFailReason of this OnboardingFailReason. # noqa: E501 + :rtype: OnboardingFailReason + """ + return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_information.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_information.py index 2ab7410e..e5b4f50e 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_information.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_information.py @@ -1,9 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.onboarding_criteria import OnboardingCriteria +from api_invoker_management import util +from api_invoker_management.models.onboarding_criteria import OnboardingCriteria # noqa: E501 class OnboardingInformation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +14,7 @@ class OnboardingInformation(Model): Do not edit the class manually. """ - def __init__(self, api_invoker_public_key=None, api_invoker_certificate=None, onboarding_secret=None): # noqa: E501 + def __init__(self, api_invoker_public_key=None, api_invoker_certificate=None, onboarding_secret=None, onboarding_criteria=None): # noqa: E501 """OnboardingInformation - a model defined in OpenAPI :param api_invoker_public_key: The api_invoker_public_key of this OnboardingInformation. # noqa: E501 @@ -20,22 +23,27 @@ class OnboardingInformation(Model): :type api_invoker_certificate: str :param onboarding_secret: The onboarding_secret of this OnboardingInformation. # noqa: E501 :type onboarding_secret: str + :param onboarding_criteria: The onboarding_criteria of this OnboardingInformation. # noqa: E501 + :type onboarding_criteria: List[OnboardingCriteria] """ self.openapi_types = { 'api_invoker_public_key': str, 'api_invoker_certificate': str, - 'onboarding_secret': str + 'onboarding_secret': str, + 'onboarding_criteria': List[OnboardingCriteria] } self.attribute_map = { 'api_invoker_public_key': 'apiInvokerPublicKey', 'api_invoker_certificate': 'apiInvokerCertificate', - 'onboarding_secret': 'onboardingSecret' + 'onboarding_secret': 'onboardingSecret', + 'onboarding_criteria': 'onboardingCriteria' } self._api_invoker_public_key = api_invoker_public_key self._api_invoker_certificate = api_invoker_certificate self._onboarding_secret = onboarding_secret + self._onboarding_criteria = onboarding_criteria @classmethod def from_dict(cls, dikt) -> 'OnboardingInformation': @@ -118,3 +126,26 @@ class OnboardingInformation(Model): """ self._onboarding_secret = onboarding_secret + + @property + def onboarding_criteria(self) -> List[OnboardingCriteria]: + """Gets the onboarding_criteria of this OnboardingInformation. + + + :return: The onboarding_criteria of this OnboardingInformation. + :rtype: List[OnboardingCriteria] + """ + return self._onboarding_criteria + + @onboarding_criteria.setter + def onboarding_criteria(self, onboarding_criteria: List[OnboardingCriteria]): + """Sets the onboarding_criteria of this OnboardingInformation. + + + :param onboarding_criteria: The onboarding_criteria of this OnboardingInformation. + :type onboarding_criteria: List[OnboardingCriteria] + """ + if onboarding_criteria is not None and len(onboarding_criteria) < 1: + raise ValueError("Invalid value for `onboarding_criteria`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._onboarding_criteria = onboarding_criteria diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_notification.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_notification.py index c60d37ee..3b1d06dd 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_notification.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_notification.py @@ -1,11 +1,14 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails +from api_invoker_management.models.api_list import APIList from api_invoker_management import util + from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 from api_invoker_management.models.api_list import APIList # noqa: E501 -from api_invoker_management.models.base_model import Model - class OnboardingNotification(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -59,7 +62,7 @@ class OnboardingNotification(Model): def result(self) -> bool: """Gets the result of this OnboardingNotification. - Set to \"true\" indicate successful on-boarding. Otherwise set to \"false\" # noqa: E501 + Set to \"true\" to indicate successful on-boarding. Otherwise set to \"false\". # noqa: E501 :return: The result of this OnboardingNotification. :rtype: bool @@ -70,7 +73,7 @@ class OnboardingNotification(Model): def result(self, result: bool): """Sets the result of this OnboardingNotification. - Set to \"true\" indicate successful on-boarding. Otherwise set to \"false\" # noqa: E501 + Set to \"true\" to indicate successful on-boarding. Otherwise set to \"false\". # noqa: E501 :param result: The result of this OnboardingNotification. :type result: bool diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation.py index 330be5f0..846011b5 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class Operation(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point.py index b9f091ae..82fa8c78 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management import util + from api_invoker_management.models.gad_shape import GADShape # noqa: E501 from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude.py index f4e1481d..514bfe78 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management import util + from api_invoker_management.models.gad_shape import GADShape # noqa: E501 from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude_uncertainty.py index 5f5449dd..71170148 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude_uncertainty.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse +from api_invoker_management import util + from api_invoker_management.models.gad_shape import GADShape # noqa: E501 from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_circle.py index deb1f0a0..2b28dd8f 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_circle.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management import util + from api_invoker_management.models.gad_shape import GADShape # noqa: E501 from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_ellipse.py index ad7cc40d..09c55edb 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_ellipse.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse +from api_invoker_management import util + from api_invoker_management.models.gad_shape import GADShape # noqa: E501 from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py index 0999dd1b..4b939caf 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.gad_shape import GADShape +from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates +from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes +from api_invoker_management import util + from api_invoker_management.models.gad_shape import GADShape # noqa: E501 from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/problem_details.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/problem_details.py index f4405ce2..420db0c1 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/problem_details.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model -from api_invoker_management.models.invalid_param import InvalidParam # noqa: E501 +from api_invoker_management.models.invalid_param import InvalidParam +import re +from api_invoker_management import util +from api_invoker_management.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol.py index 9fefc9c7..efdaa084 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class Protocol(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/published_api_path.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/published_api_path.py index 158dca12..64da80c7 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/published_api_path.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/published_api_path.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class PublishedApiPath(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/related_criteria.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/related_criteria.py new file mode 100644 index 00000000..988eb870 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/related_criteria.py @@ -0,0 +1,121 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.api_info import ApiInfo +from api_invoker_management import util + +from api_invoker_management.models.api_info import ApiInfo # noqa: E501 + +class RelatedCriteria(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, aef_ids=None, apis=None, service_api_categories=None): # noqa: E501 + """RelatedCriteria - a model defined in OpenAPI + + :param aef_ids: The aef_ids of this RelatedCriteria. # noqa: E501 + :type aef_ids: List[str] + :param apis: The apis of this RelatedCriteria. # noqa: E501 + :type apis: List[ApiInfo] + :param service_api_categories: The service_api_categories of this RelatedCriteria. # noqa: E501 + :type service_api_categories: List[str] + """ + self.openapi_types = { + 'aef_ids': List[str], + 'apis': List[ApiInfo], + 'service_api_categories': List[str] + } + + self.attribute_map = { + 'aef_ids': 'aefIds', + 'apis': 'apis', + 'service_api_categories': 'serviceAPICategories' + } + + self._aef_ids = aef_ids + self._apis = apis + self._service_api_categories = service_api_categories + + @classmethod + def from_dict(cls, dikt) -> 'RelatedCriteria': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The RelatedCriteria of this RelatedCriteria. # noqa: E501 + :rtype: RelatedCriteria + """ + return util.deserialize_model(dikt, cls) + + @property + def aef_ids(self) -> List[str]: + """Gets the aef_ids of this RelatedCriteria. + + + :return: The aef_ids of this RelatedCriteria. + :rtype: List[str] + """ + return self._aef_ids + + @aef_ids.setter + def aef_ids(self, aef_ids: List[str]): + """Sets the aef_ids of this RelatedCriteria. + + + :param aef_ids: The aef_ids of this RelatedCriteria. + :type aef_ids: List[str] + """ + if aef_ids is not None and len(aef_ids) < 1: + raise ValueError("Invalid value for `aef_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._aef_ids = aef_ids + + @property + def apis(self) -> List[ApiInfo]: + """Gets the apis of this RelatedCriteria. + + + :return: The apis of this RelatedCriteria. + :rtype: List[ApiInfo] + """ + return self._apis + + @apis.setter + def apis(self, apis: List[ApiInfo]): + """Sets the apis of this RelatedCriteria. + + + :param apis: The apis of this RelatedCriteria. + :type apis: List[ApiInfo] + """ + if apis is not None and len(apis) < 1: + raise ValueError("Invalid value for `apis`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._apis = apis + + @property + def service_api_categories(self) -> List[str]: + """Gets the service_api_categories of this RelatedCriteria. + + + :return: The service_api_categories of this RelatedCriteria. + :rtype: List[str] + """ + return self._service_api_categories + + @service_api_categories.setter + def service_api_categories(self, service_api_categories: List[str]): + """Sets the service_api_categories of this RelatedCriteria. + + + :param service_api_categories: The service_api_categories of this RelatedCriteria. + :type service_api_categories: List[str] + """ + if service_api_categories is not None and len(service_api_categories) < 1: + raise ValueError("Invalid value for `service_api_categories`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._service_api_categories = service_api_categories diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/relative_cartesian_location.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/relative_cartesian_location.py index 82963b5f..5bdb56a9 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/relative_cartesian_location.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/resource.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/resource.py index e30732ae..b9b047b0 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/resource.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/resource.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.communication_type import CommunicationType +from api_invoker_management.models.custom_operation import CustomOperation +from api_invoker_management.models.operation import Operation +from api_invoker_management import util + from api_invoker_management.models.communication_type import CommunicationType # noqa: E501 from api_invoker_management.models.custom_operation import CustomOperation # noqa: E501 from api_invoker_management.models.operation import Operation # noqa: E501 - class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method.py index a5937300..0a9e7394 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_api_description.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_api_description.py index 1b38bd50..185b6270 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_api_description.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_api_description.py @@ -1,14 +1,22 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.aef_profile import AefProfile +from api_invoker_management.models.api_status import ApiStatus +from api_invoker_management.models.net_slice_id import NetSliceId +from api_invoker_management.models.published_api_path import PublishedApiPath +from api_invoker_management.models.shareable_information import ShareableInformation +import re from api_invoker_management import util + from api_invoker_management.models.aef_profile import AefProfile # noqa: E501 from api_invoker_management.models.api_status import ApiStatus # noqa: E501 -from api_invoker_management.models.base_model import Model +from api_invoker_management.models.net_slice_id import NetSliceId # noqa: E501 from api_invoker_management.models.published_api_path import PublishedApiPath # noqa: E501 from api_invoker_management.models.shareable_information import ShareableInformation # noqa: E501 - +import re # noqa: E501 class ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +24,7 @@ class ServiceAPIDescription(Model): Do not edit the class manually. """ - def __init__(self, api_name=None, api_id=None, api_status=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None, api_prov_name=None): # noqa: E501 + def __init__(self, api_name=None, api_id=None, api_status=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None, api_prov_name=None, net_slice_info=None): # noqa: E501 """ServiceAPIDescription - a model defined in OpenAPI :param api_name: The api_name of this ServiceAPIDescription. # noqa: E501 @@ -43,6 +51,8 @@ class ServiceAPIDescription(Model): :type ccf_id: str :param api_prov_name: The api_prov_name of this ServiceAPIDescription. # noqa: E501 :type api_prov_name: str + :param net_slice_info: The net_slice_info of this ServiceAPIDescription. # noqa: E501 + :type net_slice_info: List[NetSliceId] """ self.openapi_types = { 'api_name': str, @@ -56,7 +66,8 @@ class ServiceAPIDescription(Model): 'api_supp_feats': str, 'pub_api_path': PublishedApiPath, 'ccf_id': str, - 'api_prov_name': str + 'api_prov_name': str, + 'net_slice_info': List[NetSliceId] } self.attribute_map = { @@ -71,7 +82,8 @@ class ServiceAPIDescription(Model): 'api_supp_feats': 'apiSuppFeats', 'pub_api_path': 'pubApiPath', 'ccf_id': 'ccfId', - 'api_prov_name': 'apiProvName' + 'api_prov_name': 'apiProvName', + 'net_slice_info': 'netSliceInfo' } self._api_name = api_name @@ -86,6 +98,7 @@ class ServiceAPIDescription(Model): self._pub_api_path = pub_api_path self._ccf_id = ccf_id self._api_prov_name = api_prov_name + self._net_slice_info = net_slice_info @classmethod def from_dict(cls, dikt) -> 'ServiceAPIDescription': @@ -102,7 +115,7 @@ class ServiceAPIDescription(Model): def api_name(self) -> str: """Gets the api_name of this ServiceAPIDescription. - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :return: The api_name of this ServiceAPIDescription. :rtype: str @@ -113,7 +126,7 @@ class ServiceAPIDescription(Model): def api_name(self, api_name: str): """Sets the api_name of this ServiceAPIDescription. - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :param api_name: The api_name of this ServiceAPIDescription. :type api_name: str @@ -375,3 +388,28 @@ class ServiceAPIDescription(Model): """ self._api_prov_name = api_prov_name + + @property + def net_slice_info(self) -> List[NetSliceId]: + """Gets the net_slice_info of this ServiceAPIDescription. + + Represents the applicable network slice identifiers. # noqa: E501 + + :return: The net_slice_info of this ServiceAPIDescription. + :rtype: List[NetSliceId] + """ + return self._net_slice_info + + @net_slice_info.setter + def net_slice_info(self, net_slice_info: List[NetSliceId]): + """Sets the net_slice_info of this ServiceAPIDescription. + + Represents the applicable network slice identifiers. # noqa: E501 + + :param net_slice_info: The net_slice_info of this ServiceAPIDescription. + :type net_slice_info: List[NetSliceId] + """ + if net_slice_info is not None and len(net_slice_info) < 1: + raise ValueError("Invalid value for `net_slice_info`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._net_slice_info = net_slice_info diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_kpis.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_kpis.py index 9314fcd6..e17f70fe 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_kpis.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_kpis.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +import re +from api_invoker_management import util +import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/shareable_information.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/shareable_information.py index 7e73226d..d5641f6a 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/shareable_information.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/shareable_information.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class ShareableInformation(Model): @@ -47,7 +48,7 @@ class ShareableInformation(Model): def is_shareable(self) -> bool: """Gets the is_shareable of this ShareableInformation. - Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. # noqa: E501 :return: The is_shareable of this ShareableInformation. :rtype: bool @@ -58,7 +59,7 @@ class ShareableInformation(Model): def is_shareable(self, is_shareable: bool): """Sets the is_shareable of this ShareableInformation. - Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. # noqa: E501 :param is_shareable: The is_shareable of this ShareableInformation. :type is_shareable: bool diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/snssai.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/snssai.py new file mode 100644 index 00000000..595c1c16 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/snssai.py @@ -0,0 +1,101 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invoker_management.models.base_model import Model +import re +from api_invoker_management import util + +import re # noqa: E501 + +class Snssai(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, sst=None, sd=None): # noqa: E501 + """Snssai - a model defined in OpenAPI + + :param sst: The sst of this Snssai. # noqa: E501 + :type sst: int + :param sd: The sd of this Snssai. # noqa: E501 + :type sd: str + """ + self.openapi_types = { + 'sst': int, + 'sd': str + } + + self.attribute_map = { + 'sst': 'sst', + 'sd': 'sd' + } + + self._sst = sst + self._sd = sd + + @classmethod + def from_dict(cls, dikt) -> 'Snssai': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Snssai of this Snssai. # noqa: E501 + :rtype: Snssai + """ + return util.deserialize_model(dikt, cls) + + @property + def sst(self) -> int: + """Gets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :return: The sst of this Snssai. + :rtype: int + """ + return self._sst + + @sst.setter + def sst(self, sst: int): + """Sets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :param sst: The sst of this Snssai. + :type sst: int + """ + if sst is None: + raise ValueError("Invalid value for `sst`, must not be `None`") # noqa: E501 + if sst is not None and sst > 255: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value less than or equal to `255`") # noqa: E501 + if sst is not None and sst < 0: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value greater than or equal to `0`") # noqa: E501 + + self._sst = sst + + @property + def sd(self) -> str: + """Gets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :return: The sd of this Snssai. + :rtype: str + """ + return self._sd + + @sd.setter + def sd(self, sd: str): + """Sets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :param sd: The sd of this Snssai. + :type sd: str + """ + if sd is not None and not re.search(r'^[A-Fa-f0-9]{6}$', sd): # noqa: E501 + raise ValueError(r"Invalid value for `sd`, must be a follow pattern or equal to `/^[A-Fa-f0-9]{6}$/`") # noqa: E501 + + self._sd = sd diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py index 1242387f..5a361e90 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipse.py index b5a594eb..6db89075 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipse.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipsoid.py index 496846f8..613c6cc8 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipsoid.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/version.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/version.py index 9570e89f..46329299 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/version.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/version.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management.models.custom_operation import CustomOperation +from api_invoker_management.models.resource import Resource +from api_invoker_management import util + from api_invoker_management.models.custom_operation import CustomOperation # noqa: E501 from api_invoker_management.models.resource import Resource # noqa: E501 - class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/websock_notif_config.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/websock_notif_config.py index 1a300a31..4d3f5d7d 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/websock_notif_config.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/websock_notif_config.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invoker_management import util +from typing import List, Dict # noqa: F401 + from api_invoker_management.models.base_model import Model +from api_invoker_management import util class WebsockNotifConfig(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/openapi/openapi.yaml b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/openapi/openapi.yaml index 79907464..08eb26cb 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/openapi/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.0 info: - description: "API for API invoker management. \n© 2024, 3GPP Organizational Partners\ + description: "API for API invoker management. \n© 2025, 3GPP Organizational Partners\ \ (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_API_Invoker_Management_API - version: 1.3.0 + version: 1.4.0-alpha.5 externalDocs: - description: 3GPP TS 29.222 V18.6.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V19.4.0 Common API Framework for 3GPP Northbound APIs url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: - url: "{apiRoot}/api-invoker-management/v1" @@ -20,7 +20,6 @@ paths: notificationDestination: '{$request.body#/notificationDestination}': post: - description: Notify the API Invoker about the onboarding completion operationId: notification_destination_post requestBody: content: @@ -30,7 +29,8 @@ paths: required: true responses: "204": - description: No Content (successful onboarding notification) + description: | + No Content. The onboarding notification is successfully received. "307": description: Temporary Redirect headers: @@ -110,8 +110,7 @@ paths: default: description: Generic Error x-callback-request: true - description: Creates a new individual API Invoker profile. - operationId: onboarded_invokers_post + operationId: create_onboarded_api_invoker requestBody: content: application/json: @@ -124,19 +123,20 @@ paths: application/json: schema: $ref: '#/components/schemas/APIInvokerEnrolmentDetails' - description: API invoker on-boarded successfully. + description: | + Created. The API Invoker is successfully on-boarded. headers: Location: description: | - Contains the URI of the newly created resource, according to the structure {apiRoot}/api-invoker-management/v1/onboardedInvokers/{onboardingId} + Contains the URI of the newly created resource. explode: false required: true schema: type: string style: simple "202": - description: The CAPIF core has accepted the Onboarding request and is processing - it. + description: | + Accepted. The CCF accepted the Onboarding request and is processing it. "400": content: application/problem+json: @@ -199,14 +199,16 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: api_invoker_management.controllers.default_controller + summary: Request the Creation of a new On-boarded API Invoker. + tags: + - On-boarded API Invokers (Collection) + x-openapi-router-controller: api_invoker_management.controllers.on_boarded_api_invokers_collection_controller /onboardedInvokers/{onboardingId}: delete: - description: Deletes an individual API Invoker. - operationId: onboarded_invokers_onboarding_id_delete + description: Deletes an existing Individual On-boarded API Invoker. + operationId: delete_ind_onboarded_api_invoker parameters: - - description: String identifying an individual on-boarded API invoker resource - explode: false + - explode: false in: path name: onboardingId required: true @@ -215,7 +217,8 @@ paths: style: simple responses: "204": - description: The individual API Invoker matching onboardingId was offboarded. + description: | + No Content. The Individual On-boarded API Invoker resource is successfully deleted. "307": description: Temporary Redirect headers: @@ -276,9 +279,11 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: api_invoker_management.controllers.default_controller + summary: Delete an existing Individual On-boarded API Invoker resource. + tags: + - Individual On-boarded API Invoker (Document) + x-openapi-router-controller: api_invoker_management.controllers.individual_on_boarded_api_invoker_document_controller patch: - description: Modify an individual API invoker details. operationId: modify_ind_api_invoke_enrolment parameters: - explode: false @@ -301,11 +306,13 @@ paths: schema: $ref: '#/components/schemas/APIInvokerEnrolmentDetails' description: | - The definition of the service API is modified successfully and a representation of the updated service API is returned in the request body. + OK. The Individual On-boarded API Invoker resource is successfully modified and the representation of the updated resource is returned in the response body. "202": - description: The request is accepted and under processing. + description: | + Accepted. The request is accepted and under processing. "204": - description: No Content. The definition of the service API is modified successfully. + description: | + No Content. The Individual On-boarded API Invoker resource is successfully modified and no content is returned in the response body. "307": description: Temporary Redirect headers: @@ -385,108 +392,12 @@ paths: default: description: Generic Error tags: - - Individual API Invoker enrolment details - x-openapi-router-controller: api_invoker_management.controllers.individual_api_invoker_enrolment_details_controller + - Individual On-boarded API Invoker (Document) + x-openapi-router-controller: api_invoker_management.controllers.individual_on_boarded_api_invoker_document_controller put: - callbacks: - notificationDestination: - '{$request.body#/notificationDestination}': - post: - description: Notify the API Invoker about the API invoker update completion - operationId: notification_destination_post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OnboardingNotification' - required: true - responses: - "204": - description: No Content (successful API invoker update notification) - "307": - description: Temporary Redirect - headers: - Location: - description: An alternative URI of the resource. - required: true - schema: - type: string - "308": - description: Permanent Redirect - headers: - Location: - description: An alternative URI of the resource. - required: true - schema: - type: string - "400": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Bad request - "401": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Unauthorized - "403": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Forbidden - "404": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Not Found - "411": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Length Required - "413": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Content Too Large - "415": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Unsupported Media Type - "429": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Too Many Requests - "500": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Internal Server Error - "503": - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - description: Service Unavailable - default: - description: Generic Error - x-callback-request: true - description: Updates an individual API invoker details. - operationId: onboarded_invokers_onboarding_id_put + operationId: update_ind_onboarded_api_invoker parameters: - - description: String identifying an individual on-boarded API invoker resource - explode: false + - explode: false in: path name: onboardingId required: true @@ -498,8 +409,6 @@ paths: application/json: schema: $ref: '#/components/schemas/APIInvokerEnrolmentDetails' - description: representation of the API invoker details to be updated in CAPIF - core function required: true responses: "200": @@ -507,13 +416,14 @@ paths: application/json: schema: $ref: '#/components/schemas/APIInvokerEnrolmentDetails' - description: API invoker details updated successfully. + description: | + OK. The Individual On-boarded API Invoker resource is successfully updated and the representation of the updated resource is returned in the response body. "202": description: | - The CAPIF core has accepted the API invoker update details request and is processing it. + Accepted. The request is accepted and under processing. "204": description: | - API invoker's information updated successfully, with no content to be sent in the response body. + No Content. The Individual On-boarded API Invoker resource is successfully updated and no content is returned in the response body. "307": description: Temporary Redirect headers: @@ -592,7 +502,10 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: api_invoker_management.controllers.default_controller + summary: Update an existing Individual On-boarded API Invoker resource. + tags: + - Individual On-boarded API Invoker (Document) + x-openapi-router-controller: api_invoker_management.controllers.individual_on_boarded_api_invoker_document_controller components: responses: "400": @@ -675,10 +588,49 @@ components: type: string schemas: OnboardingInformation: - description: Represents on-boarding information of the API invoker. + description: Represents the on-boarding information of the API Invoker. example: apiInvokerPublicKey: apiInvokerPublicKey onboardingSecret: onboardingSecret + onboardingCriteria: + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - PSK + - PSK + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - PSK + - PSK apiInvokerCertificate: apiInvokerCertificate properties: apiInvokerPublicKey: @@ -695,31 +647,26 @@ components: The API Invoker's onboarding secret, provided by the CAPIF core function. title: onboardingSecret type: string + onboardingCriteria: + items: + $ref: '#/components/schemas/OnboardingCriteria' + minItems: 1 + title: onboardingCriteria + type: array required: - apiInvokerPublicKey title: OnboardingInformation type: object APIList: - description: Represents a list of APIs. + description: Represents a list of APIs with the corresponding information. example: serviceAPIDescriptions: - serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -737,8 +684,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -949,8 +896,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -1145,27 +1092,38 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp - pubApiPath: - ccfIds: - - ccfIds - - ccfIds - - serviceAPICategory: serviceAPICategory - ccfId: ccfId - apiName: apiName shareableInfo: capifProvDoms: - capifProvDoms - capifProvDoms isShareable: true - apiProvName: apiProvName - supportedFeatures: supportedFeatures - description: description + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId apiSuppFeats: apiSuppFeats apiId: apiId apiStatus: aefIds: - aefIds - aefIds + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -1183,8 +1141,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -1395,8 +1353,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -1591,14 +1549,36 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds - ccfIds properties: serviceAPIDescriptions: - description: Represents the list of service APIs that the API Invoker is - allowed to invoke. + description: | + Represents the list of service APIs that the API Invoker is allowed to invoke. items: $ref: '#/components/schemas/ServiceAPIDescription' minItems: 1 @@ -1607,20 +1587,67 @@ components: title: APIList type: object APIInvokerEnrolmentDetails: - description: Represents information about the API Invoker that requested to - onboard. + description: Represents the onboarding information of the API Invoker. example: notificationDestination: notificationDestination supportedFeatures: supportedFeatures apiInvokerId: apiInvokerId expTime: 2000-01-23T04:56:07.000+00:00 apiInvokerInformation: apiInvokerInformation + failureReasons: + - apiName: + - apiName + - apiName + failureCode: AUTHORIZATION_ISSUE + - apiName: + - apiName + - apiName + failureCode: AUTHORIZATION_ISSUE websockNotifConfig: requestWebsocketUri: true websocketUri: websocketUri onboardingInformation: apiInvokerPublicKey: apiInvokerPublicKey onboardingSecret: onboardingSecret + onboardingCriteria: + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - PSK + - PSK + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - PSK + - PSK apiInvokerCertificate: apiInvokerCertificate requestTestNotification: true apiList: @@ -1628,20 +1655,9 @@ components: - serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -1659,8 +1675,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -1871,8 +1887,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -2067,27 +2083,38 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp - pubApiPath: - ccfIds: - - ccfIds - - ccfIds - - serviceAPICategory: serviceAPICategory - ccfId: ccfId - apiName: apiName shareableInfo: capifProvDoms: - capifProvDoms - capifProvDoms isShareable: true - apiProvName: apiProvName - supportedFeatures: supportedFeatures - description: description + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId apiSuppFeats: apiSuppFeats apiId: apiId apiStatus: aefIds: - aefIds - aefIds + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -2105,8 +2132,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -2317,8 +2344,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -2513,6 +2540,28 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds @@ -2532,7 +2581,7 @@ components: type: string requestTestNotification: description: | - Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + Set to true to request the CCF to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. title: requestTestNotification type: boolean websockNotifConfig: @@ -2555,13 +2604,19 @@ components: pattern: "^[A-Fa-f0-9]*$" title: SupportedFeatures type: string + failureReasons: + items: + $ref: '#/components/schemas/EnrolFailReason' + minItems: 1 + title: failureReasons + type: array required: - notificationDestination - onboardingInformation title: APIInvokerEnrolmentDetails type: object OnboardingNotification: - description: Represents a notification of on-boarding or update result. + description: Represents a notification of on-boarding creation or update result. example: result: true apiInvokerEnrolmentDetails: @@ -2570,12 +2625,60 @@ components: apiInvokerId: apiInvokerId expTime: 2000-01-23T04:56:07.000+00:00 apiInvokerInformation: apiInvokerInformation + failureReasons: + - apiName: + - apiName + - apiName + failureCode: AUTHORIZATION_ISSUE + - apiName: + - apiName + - apiName + failureCode: AUTHORIZATION_ISSUE websockNotifConfig: requestWebsocketUri: true websocketUri: websocketUri onboardingInformation: apiInvokerPublicKey: apiInvokerPublicKey onboardingSecret: onboardingSecret + onboardingCriteria: + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - PSK + - PSK + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - PSK + - PSK apiInvokerCertificate: apiInvokerCertificate requestTestNotification: true apiList: @@ -2583,20 +2686,9 @@ components: - serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -2614,8 +2706,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -2826,8 +2918,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -3022,27 +3114,38 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp - pubApiPath: - ccfIds: - - ccfIds - - ccfIds - - serviceAPICategory: serviceAPICategory - ccfId: ccfId - apiName: apiName shareableInfo: capifProvDoms: - capifProvDoms - capifProvDoms isShareable: true - apiProvName: apiProvName - supportedFeatures: supportedFeatures - description: description + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId apiSuppFeats: apiSuppFeats apiId: apiId apiStatus: aefIds: - aefIds - aefIds + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -3060,8 +3163,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -3272,8 +3375,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -3468,6 +3571,28 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds @@ -3478,20 +3603,9 @@ components: - serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -3509,8 +3623,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -3721,8 +3835,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -3917,27 +4031,38 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp - pubApiPath: - ccfIds: - - ccfIds - - ccfIds - - serviceAPICategory: serviceAPICategory - ccfId: ccfId - apiName: apiName shareableInfo: capifProvDoms: - capifProvDoms - capifProvDoms isShareable: true - apiProvName: apiProvName - supportedFeatures: supportedFeatures - description: description + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId apiSuppFeats: apiSuppFeats apiId: apiId apiStatus: aefIds: - aefIds - aefIds + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -3955,8 +4080,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -4167,8 +4292,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -4363,14 +4488,36 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds - ccfIds properties: result: - description: Set to "true" indicate successful on-boarding. Otherwise set - to "false" + description: Set to "true" to indicate successful on-boarding. Otherwise + set to "false". title: result type: boolean resourceLocation: @@ -4410,6 +4557,154 @@ components: type: string title: APIInvokerEnrolmentDetailsPatch type: object + OnboardingCriteria: + description: Represents the onboarding criteria information. + example: + relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - PSK + - PSK + properties: + secMethods: + items: + $ref: '#/components/schemas/SecurityMethod' + minItems: 1 + title: secMethods + type: array + relatedCriteria: + $ref: '#/components/schemas/RelatedCriteria' + required: + - secMethods + title: OnboardingCriteria + type: object + RelatedCriteria: + anyOf: + - required: [aefIds] + - required: [apis] + - required: [serviceAPICategories] + not: + required: [apis, serviceAPICategories] + description: Represents onboarding related criteria. + example: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + nullable: true + properties: + aefIds: + items: + type: string + minItems: 1 + title: aefIds + type: array + apis: + items: + $ref: '#/components/schemas/ApiInfo' + minItems: 1 + title: apis + type: array + serviceAPICategories: + items: + type: string + minItems: 1 + title: serviceAPICategories + type: array + title: RelatedCriteria + type: object + ApiInfo: + description: Represents service API identification related information. + example: + apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + properties: + apiName: + title: apiName + type: string + supportedApiVersions: + items: + type: string + minItems: 1 + title: supportedApiVersions + type: array + required: + - apiName + title: ApiInfo + type: object + EnrolFailReason: + description: Represents the failure reason for not those APIs not enrolled successfully. + example: + apiName: + - apiName + - apiName + failureCode: AUTHORIZATION_ISSUE + properties: + apiName: + items: + type: string + title: apiName + type: array + failureCode: + $ref: '#/components/schemas/EnrolFailCause' + required: + - apiName + - failureCode + title: EnrolFailReason + type: object + EnrolFailCause: + enum: + - AUTHORIZATION_ISSUE + - ONBOARDING_CRI_NOT_MET + - UNSPECIFIED + type: string + description: "Represents API Invoker's per API enrollment failure code. \n\ + Possible values are:\n- AUTHORIZATION_ISSUE: Indicates that the service API\ + \ enrollment failed because the service\n API is not authorized for the API\ + \ Invoker.\n- ONBOARDING_CRI_NOT_MET: Indicates that the service API entollment\ + \ failed because the\n onboarding criteria not met for this service API for\ + \ the API Invoker.\n- UNSPECIFIED: Indicates that the service API enrollment\ + \ failed due to an unspecified\n reason.\n" + title: EnrolFailCause + OnboardingFailReason: + enum: + - API_INVOKER_NOT_ALLOWED + - ONBOARDING_CRI_NOT_MET + - OTHER + type: string + description: "Represents the API Invoker onboarding failure reason. \nPossible\ + \ values are:\n- API_INVOKER_NOT_ALLOWED: Indicates that the onboarding of\ + \ the API Invoker failed because\n the API Invoker is not allowed.\n- ONBOARDING_CRI_NOT_MET:\ + \ Indicates that the onboarding of the API Invoker failed because\n the onboarding\ + \ criteria is not met.\n- OTHER: Indicates that the onboarding of the API\ + \ Invoker failed because of other reasons.\n" ProblemDetails: description: Represents additional information and details on an error response. properties: @@ -4484,20 +4779,9 @@ components: serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -4515,8 +4799,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -4727,8 +5011,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -4923,6 +5207,28 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds @@ -4930,7 +5236,7 @@ components: properties: apiName: description: | - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + Contains the API name set to the value of the "" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. title: apiName type: string apiId: @@ -4980,6 +5286,13 @@ components: description: Represents the API provider name. title: apiProvName type: string + netSliceInfo: + description: Represents the applicable network slice identifiers. + items: + $ref: '#/components/schemas/NetSliceId' + minItems: 1 + title: netSliceInfo + type: array required: - apiName title: ServiceAPIDescription @@ -4993,8 +5306,9 @@ components: - aefIds properties: aefIds: - description: | - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the "aefProfiles" attribute within the ServiceAPIDescription data structure. + description: "Indicates the list of AEF ID(s) where the API is active. If\ + \ an empty array is provided, it indicates that the API is inactive in\ + \ all AEF(s). \n" items: type: string title: aefIds @@ -5022,8 +5336,8 @@ components: - start: 2001:db8:85a3::8a2e:370:7334 end: 2001:db8:85a3::8a2e:370:7334 securityMethods: - - PSK - - PSK + - null + - null versions: - apiVersion: apiVersion resources: @@ -5219,7 +5533,7 @@ components: maxReqRate: 0 avalGraComp: avalGraComp nullable: true - oneOf: + oneOf: - required: ["domainName"] - required: ["interfaceDescriptions"] - {} @@ -5706,7 +6020,7 @@ components: title: ServiceKpis type: object IpAddrRange: - anyOf: + anyOf: - required: ["ueIpv4AddrRanges"] - required: ["ueIpv6AddrRanges"] description: Represents the list of public IP ranges @@ -5750,7 +6064,7 @@ components: properties: isShareable: description: | - Set to "true" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to "false". + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. title: isShareable type: boolean capifProvDoms: @@ -5825,6 +6139,39 @@ components: nullable: true title: expTime type: string + NetSliceId: + description: | + Represents the network slice identification information. + example: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + nullable: true + oneOf: + - required: ["snssai"] + - required: ["nsiId"] + - required: ["ensi"] + properties: + snssai: + $ref: '#/components/schemas/Snssai' + nsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string + ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string + title: NetSliceId + type: object + Ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string OAuthGrantType: enum: - CLIENT_CREDENTIALS @@ -6006,13 +6353,13 @@ components: type: object GeographicArea: anyOf: - - $ref: '#/components/schemas/Point' - - $ref: '#/components/schemas/PointUncertaintyCircle' - - $ref: '#/components/schemas/PointUncertaintyEllipse' - - $ref: '#/components/schemas/Polygon' - - $ref: '#/components/schemas/PointAltitude' - - $ref: '#/components/schemas/PointAltitudeUncertainty' - - $ref: '#/components/schemas/EllipsoidArc' + - required: ["Point"] + - required: ["PointUncertaintyCircle"] + - required: ["PointUncertaintyEllipse"] + - required: ["Polygon"] + - required: ["PointAltitude"] + - required: ["PointAltitudeUncertainty"] + - required: ["EllipsoidArc"] description: Geographic area specified by different shape. title: GeographicArea Point: @@ -6455,8 +6802,49 @@ components: example: 2001:db8:85a3::8a2e:370:7334 title: Ipv6Addr_1 type: string + Snssai: + description: | + When Snssai needs to be converted to string (e.g. when used in maps as key), the string shall be composed of one to three digits "sst" optionally followed by "-" and 6 hexadecimal digits "sd". + example: + sd: sd + sst: 237 + properties: + sst: + description: "Unsigned integer, within the range 0 to 255, representing\ + \ the Slice/Service Type. It indicates the expected Network Slice behaviour\ + \ in terms of features and services. Values 0 to 127 correspond to the\ + \ standardized SST range. Values 128 to 255 correspond to the Operator-specific\ + \ range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are\ + \ defined in clause 5.15.2.2 of 3GPP TS 23.501. \n" + maximum: 255 + minimum: 0 + title: sst + type: integer + sd: + description: | + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. + pattern: "^[A-Fa-f0-9]{6}$" + title: sd + type: string + required: + - sst + title: Snssai + type: object + NsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string Float: description: string with format 'float' as defined in OpenAPI. format: float title: Float type: number + securitySchemes: + oAuth2ClientCredentials: + flows: + clientCredentials: + scopes: {} + tokenUrl: "{tokenUrl}" + type: oauth2 + x-tokenInfoFunc: api_invoker_management.controllers.security_controller.info_from_oAuth2ClientCredentials + x-scopeValidateFunc: api_invoker_management.controllers.security_controller.validate_scope_oAuth2ClientCredentials diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/__init__.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/__init__.py index df1dcccb..6f062ad6 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/__init__.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/__init__.py @@ -1,9 +1,10 @@ import logging import connexion -from api_invoker_management.encoder import JSONEncoder from flask_testing import TestCase +from api_invoker_management.encoder import JSONEncoder + class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_default_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_default_controller.py deleted file mode 100644 index 0c5bab82..00000000 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_default_controller.py +++ /dev/null @@ -1,67 +0,0 @@ -import unittest - -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 -from api_invoker_management.models.problem_details import ProblemDetails # noqa: E501 -from api_invoker_management.test import BaseTestCase -from flask import json - - -class TestDefaultController(BaseTestCase): - """DefaultController integration test stubs""" - - def test_onboarded_invokers_onboarding_id_delete(self): - """Test case for onboarded_invokers_onboarding_id_delete - - - """ - headers = { - 'Accept': 'application/problem+json', - } - response = self.client.open( - '/api-invoker-management/v1/onboardedInvokers/{onboarding_id}'.format(onboarding_id='onboarding_id_example'), - method='DELETE', - headers=headers) - self.assert200(response, - 'Response body is : ' + response.data.decode('utf-8')) - - def test_onboarded_invokers_onboarding_id_put(self): - """Test case for onboarded_invokers_onboarding_id_put - - - """ - api_invoker_enrolment_details = {"notificationDestination":"notificationDestination","supportedFeatures":"supportedFeatures","apiInvokerId":"apiInvokerId","expTime":"2000-01-23T04:56:07.000+00:00","apiInvokerInformation":"apiInvokerInformation","websockNotifConfig":{"requestWebsocketUri":True,"websocketUri":"websocketUri"},"onboardingInformation":{"apiInvokerPublicKey":"apiInvokerPublicKey","onboardingSecret":"onboardingSecret","apiInvokerCertificate":"apiInvokerCertificate"},"requestTestNotification":True,"apiList":{"serviceAPIDescriptions":[{"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}},{"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}}]}} - headers = { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - } - response = self.client.open( - '/api-invoker-management/v1/onboardedInvokers/{onboarding_id}'.format(onboarding_id='onboarding_id_example'), - method='PUT', - headers=headers, - data=json.dumps(api_invoker_enrolment_details), - content_type='application/json') - self.assert200(response, - 'Response body is : ' + response.data.decode('utf-8')) - - def test_onboarded_invokers_post(self): - """Test case for onboarded_invokers_post - - - """ - api_invoker_enrolment_details = {"notificationDestination":"notificationDestination","supportedFeatures":"supportedFeatures","apiInvokerId":"apiInvokerId","expTime":"2000-01-23T04:56:07.000+00:00","apiInvokerInformation":"apiInvokerInformation","websockNotifConfig":{"requestWebsocketUri":True,"websocketUri":"websocketUri"},"onboardingInformation":{"apiInvokerPublicKey":"apiInvokerPublicKey","onboardingSecret":"onboardingSecret","apiInvokerCertificate":"apiInvokerCertificate"},"requestTestNotification":True,"apiList":{"serviceAPIDescriptions":[{"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}},{"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}}]}} - headers = { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - } - response = self.client.open( - '/api-invoker-management/v1/onboardedInvokers', - method='POST', - headers=headers, - data=json.dumps(api_invoker_enrolment_details), - content_type='application/json') - self.assert200(response, - 'Response body is : ' + response.data.decode('utf-8')) - - -if __name__ == '__main__': - unittest.main() diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_api_invoker_enrolment_details_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_api_invoker_enrolment_details_controller.py deleted file mode 100644 index 1506dfbb..00000000 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_api_invoker_enrolment_details_controller.py +++ /dev/null @@ -1,35 +0,0 @@ -import unittest - -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 -from api_invoker_management.models.api_invoker_enrolment_details_patch import \ - APIInvokerEnrolmentDetailsPatch # noqa: E501 -from api_invoker_management.models.problem_details import ProblemDetails # noqa: E501 -from api_invoker_management.test import BaseTestCase -from flask import json - - -class TestIndividualAPIInvokerEnrolmentDetailsController(BaseTestCase): - """IndividualAPIInvokerEnrolmentDetailsController integration test stubs""" - - def test_modify_ind_api_invoke_enrolment(self): - """Test case for modify_ind_api_invoke_enrolment - - - """ - api_invoker_enrolment_details_patch = openapi_server.APIInvokerEnrolmentDetailsPatch() - headers = { - 'Accept': 'application/json', - 'Content-Type': 'application/merge-patch+json', - } - response = self.client.open( - '/api-invoker-management/v1/onboardedInvokers/{onboarding_id}'.format(onboarding_id='onboarding_id_example'), - method='PATCH', - headers=headers, - data=json.dumps(api_invoker_enrolment_details_patch), - content_type='application/merge-patch+json') - self.assert200(response, - 'Response body is : ' + response.data.decode('utf-8')) - - -if __name__ == '__main__': - unittest.main() diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_on_boarded_api_invoker_document_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_on_boarded_api_invoker_document_controller.py new file mode 100644 index 00000000..33ae9397 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_on_boarded_api_invoker_document_controller.py @@ -0,0 +1,69 @@ +import unittest + +from flask import json + +from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 +from api_invoker_management.models.api_invoker_enrolment_details_patch import APIInvokerEnrolmentDetailsPatch # noqa: E501 +from api_invoker_management.models.problem_details import ProblemDetails # noqa: E501 +from api_invoker_management.test import BaseTestCase + + +class TestIndividualOnBoardedAPIInvokerDocumentController(BaseTestCase): + """IndividualOnBoardedAPIInvokerDocumentController integration test stubs""" + + def test_delete_ind_onboarded_api_invoker(self): + """Test case for delete_ind_onboarded_api_invoker + + Delete an existing Individual On-boarded API Invoker resource. + """ + headers = { + 'Accept': 'application/problem+json', + } + response = self.client.open( + '/api-invoker-management/v1/onboardedInvokers/{onboarding_id}'.format(onboarding_id='onboarding_id_example'), + method='DELETE', + headers=headers) + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_modify_ind_api_invoke_enrolment(self): + """Test case for modify_ind_api_invoke_enrolment + + + """ + api_invoker_enrolment_details_patch = openapi_server.APIInvokerEnrolmentDetailsPatch() + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/merge-patch+json', + } + response = self.client.open( + '/api-invoker-management/v1/onboardedInvokers/{onboarding_id}'.format(onboarding_id='onboarding_id_example'), + method='PATCH', + headers=headers, + data=json.dumps(api_invoker_enrolment_details_patch), + content_type='application/merge-patch+json') + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_update_ind_onboarded_api_invoker(self): + """Test case for update_ind_onboarded_api_invoker + + Update an existing Individual On-boarded API Invoker resource. + """ + api_invoker_enrolment_details = {"notificationDestination":"notificationDestination","supportedFeatures":"supportedFeatures","apiInvokerId":"apiInvokerId","expTime":"2000-01-23T04:56:07.000+00:00","apiInvokerInformation":"apiInvokerInformation","failureReasons":[{"apiName":["apiName","apiName"],"failureCode":"AUTHORIZATION_ISSUE"},{"apiName":["apiName","apiName"],"failureCode":"AUTHORIZATION_ISSUE"}],"websockNotifConfig":{"requestWebsocketUri":True,"websocketUri":"websocketUri"},"onboardingInformation":{"apiInvokerPublicKey":"apiInvokerPublicKey","onboardingSecret":"onboardingSecret","onboardingCriteria":[{"relatedCriteria":{"aefIds":["aefIds","aefIds"],"apis":[{"apiName":"apiName","supportedApiVersions":["supportedApiVersions","supportedApiVersions"]},{"apiName":"apiName","supportedApiVersions":["supportedApiVersions","supportedApiVersions"]}],"serviceAPICategories":["serviceAPICategories","serviceAPICategories"]},"secMethods":["PSK","PSK"]},{"relatedCriteria":{"aefIds":["aefIds","aefIds"],"apis":[{"apiName":"apiName","supportedApiVersions":["supportedApiVersions","supportedApiVersions"]},{"apiName":"apiName","supportedApiVersions":["supportedApiVersions","supportedApiVersions"]}],"serviceAPICategories":["serviceAPICategories","serviceAPICategories"]},"secMethods":["PSK","PSK"]}],"apiInvokerCertificate":"apiInvokerCertificate"},"requestTestNotification":True,"apiList":{"serviceAPIDescriptions":[{"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":[null,null],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":[null,null],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"netSliceInfo":[{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"},{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"}],"apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}},{"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":[null,null],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":[null,null],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"netSliceInfo":[{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"},{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"}],"apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}}]}} + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + response = self.client.open( + '/api-invoker-management/v1/onboardedInvokers/{onboarding_id}'.format(onboarding_id='onboarding_id_example'), + method='PUT', + headers=headers, + data=json.dumps(api_invoker_enrolment_details), + content_type='application/json') + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + +if __name__ == '__main__': + unittest.main() diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_on_boarded_api_invokers_collection_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_on_boarded_api_invokers_collection_controller.py new file mode 100644 index 00000000..cb2bdf1b --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_on_boarded_api_invokers_collection_controller.py @@ -0,0 +1,34 @@ +import unittest + +from flask import json + +from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 +from api_invoker_management.models.problem_details import ProblemDetails # noqa: E501 +from api_invoker_management.test import BaseTestCase + + +class TestOnBoardedAPIInvokersCollectionController(BaseTestCase): + """OnBoardedAPIInvokersCollectionController integration test stubs""" + + def test_create_onboarded_api_invoker(self): + """Test case for create_onboarded_api_invoker + + Request the Creation of a new On-boarded API Invoker. + """ + api_invoker_enrolment_details = {"notificationDestination":"notificationDestination","supportedFeatures":"supportedFeatures","apiInvokerId":"apiInvokerId","expTime":"2000-01-23T04:56:07.000+00:00","apiInvokerInformation":"apiInvokerInformation","failureReasons":[{"apiName":["apiName","apiName"],"failureCode":"AUTHORIZATION_ISSUE"},{"apiName":["apiName","apiName"],"failureCode":"AUTHORIZATION_ISSUE"}],"websockNotifConfig":{"requestWebsocketUri":True,"websocketUri":"websocketUri"},"onboardingInformation":{"apiInvokerPublicKey":"apiInvokerPublicKey","onboardingSecret":"onboardingSecret","onboardingCriteria":[{"relatedCriteria":{"aefIds":["aefIds","aefIds"],"apis":[{"apiName":"apiName","supportedApiVersions":["supportedApiVersions","supportedApiVersions"]},{"apiName":"apiName","supportedApiVersions":["supportedApiVersions","supportedApiVersions"]}],"serviceAPICategories":["serviceAPICategories","serviceAPICategories"]},"secMethods":["PSK","PSK"]},{"relatedCriteria":{"aefIds":["aefIds","aefIds"],"apis":[{"apiName":"apiName","supportedApiVersions":["supportedApiVersions","supportedApiVersions"]},{"apiName":"apiName","supportedApiVersions":["supportedApiVersions","supportedApiVersions"]}],"serviceAPICategories":["serviceAPICategories","serviceAPICategories"]},"secMethods":["PSK","PSK"]}],"apiInvokerCertificate":"apiInvokerCertificate"},"requestTestNotification":True,"apiList":{"serviceAPIDescriptions":[{"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":[null,null],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":[null,null],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"netSliceInfo":[{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"},{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"}],"apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}},{"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":[null,null],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":[null,null],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"netSliceInfo":[{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"},{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"}],"apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}}]}} + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + response = self.client.open( + '/api-invoker-management/v1/onboardedInvokers', + method='POST', + headers=headers, + data=json.dumps(api_invoker_enrolment_details), + content_type='application/json') + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + +if __name__ == '__main__': + unittest.main() diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/util.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/util.py index cf911e58..2b6fca6c 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/util.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/util.py @@ -1,8 +1,8 @@ import datetime +import typing from api_invoker_management import typing_utils - def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py b/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py index c41926d4..192325be 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py @@ -1,4 +1,5 @@ -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "api_invoker_management" VERSION = "1.0.0" @@ -30,7 +31,7 @@ setup( entry_points={ 'console_scripts': ['api_invoker_management=api_invoker_management.__main__:main']}, long_description="""\ - API for API invoker management. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for API invoker management. © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) -- GitLab From 505f9d9dc4fd704a6d8d182c2676d4c6eddc6b0e Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 27 Nov 2025 10:46:53 +0100 Subject: [PATCH 042/101] REL 19 API_provider_Management_API --- .../controllers/default_controller.py | 10 +++++++++- ...idual_api_provider_enrolment_details_controller.py | 10 ++++++++++ .../controllers/security_controller.py | 2 +- .../api_provider_management/encoder.py | 2 +- .../api_provider_management/models/__init__.py | 7 +++++++ .../models/api_provider_enrolment_details.py | 11 +++++++---- .../models/api_provider_enrolment_details_patch.py | 8 +++++--- .../models/api_provider_func_role.py | 5 +++-- .../models/api_provider_function_details.py | 9 ++++++--- .../api_provider_management/models/base_model.py | 1 + .../api_provider_management/models/invalid_param.py | 5 +++-- .../api_provider_management/models/problem_details.py | 11 +++++++---- .../models/registration_information.py | 5 +++-- .../api_provider_management/test/__init__.py | 3 ++- .../test/test_default_controller.py | 3 ++- ...idual_api_provider_enrolment_details_controller.py | 6 +++--- .../api_provider_management/util.py | 1 + .../setup.py | 3 ++- 18 files changed, 73 insertions(+), 29 deletions(-) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py index 0a67ace6..08a0ba7c 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py @@ -1,3 +1,11 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from api_provider_management.models.problem_details import ProblemDetails # noqa: E501 +from api_provider_management import util + from functools import wraps from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 @@ -9,6 +17,7 @@ from flask_jwt_extended import get_jwt_identity, jwt_required from ..core.provider_enrolment_details_api import ProviderManagementOperations from ..core.validate_user import ControlAccess + provider_management_ops = ProviderManagementOperations() valid_user = ControlAccess() @@ -76,7 +85,6 @@ def registrations_registration_id_delete(registration_id): # noqa: E501 return res - @cert_validation() def registrations_registration_id_put(registration_id, body): # noqa: E501 """registrations_registration_id_put diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py index cefef1ef..10a716a2 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py @@ -1,3 +1,13 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 +from api_provider_management.models.api_provider_enrolment_details_patch import APIProviderEnrolmentDetailsPatch # noqa: E501 +from api_provider_management.models.problem_details import ProblemDetails # noqa: E501 +from api_provider_management import util + from flask import current_app, request from ..core.provider_enrolment_details_api import ProviderManagementOperations diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller.py index 139597f9..6d294ffd 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller.py @@ -1,2 +1,2 @@ - +from typing import List diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py index 51082b27..5b73b33b 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py @@ -1,6 +1,6 @@ from connexion.jsonifier import JSONEncoder -from .models.base_model import Model +from api_provider_management.models.base_model import Model class CustomJSONEncoder(JSONEncoder): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/__init__.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/__init__.py index d036df69..5ad7c47a 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/__init__.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/__init__.py @@ -1,2 +1,9 @@ # flake8: noqa # import models into model package +from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails +from api_provider_management.models.api_provider_enrolment_details_patch import APIProviderEnrolmentDetailsPatch +from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails +from api_provider_management.models.api_provider_func_role import ApiProviderFuncRole +from api_provider_management.models.invalid_param import InvalidParam +from api_provider_management.models.problem_details import ProblemDetails +from api_provider_management.models.registration_information import RegistrationInformation diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details.py index 18f2a1e6..da7fb6da 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_provider_management import util -from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails # noqa: E501 +from typing import List, Dict # noqa: F401 + from api_provider_management.models.base_model import Model +from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails +import re +from api_provider_management import util +from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails # noqa: E501 +import re # noqa: E501 class APIProviderEnrolmentDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details_patch.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details_patch.py index 5f4ab09b..e16230b9 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details_patch.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details_patch.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_provider_management import util -from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails # noqa: E501 +from typing import List, Dict # noqa: F401 + from api_provider_management.models.base_model import Model +from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails +from api_provider_management import util +from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails # noqa: E501 class APIProviderEnrolmentDetailsPatch(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role.py index 78d95461..7f3bb0f7 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_provider_management import util +from typing import List, Dict # noqa: F401 + from api_provider_management.models.base_model import Model +from api_provider_management import util class ApiProviderFuncRole(Model): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_function_details.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_function_details.py index 1c5655bb..d6989b1a 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_function_details.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_function_details.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_provider_management.models.base_model import Model +from api_provider_management.models.api_provider_func_role import ApiProviderFuncRole +from api_provider_management.models.registration_information import RegistrationInformation from api_provider_management import util + from api_provider_management.models.api_provider_func_role import ApiProviderFuncRole # noqa: E501 -from api_provider_management.models.base_model import Model from api_provider_management.models.registration_information import RegistrationInformation # noqa: E501 - class APIProviderFunctionDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model.py index 621b8c7d..4fd1d5c7 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from api_provider_management import util diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/invalid_param.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/invalid_param.py index cb682f81..003aa181 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/invalid_param.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_provider_management import util +from typing import List, Dict # noqa: F401 + from api_provider_management.models.base_model import Model +from api_provider_management import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/problem_details.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/problem_details.py index 9d7f1232..7b4a267d 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/problem_details.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_provider_management import util +from typing import List, Dict # noqa: F401 + from api_provider_management.models.base_model import Model -from api_provider_management.models.invalid_param import InvalidParam # noqa: E501 +from api_provider_management.models.invalid_param import InvalidParam +import re +from api_provider_management import util +from api_provider_management.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/registration_information.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/registration_information.py index 737b0994..3e4d440c 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/registration_information.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/registration_information.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_provider_management import util +from typing import List, Dict # noqa: F401 + from api_provider_management.models.base_model import Model +from api_provider_management import util class RegistrationInformation(Model): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/__init__.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/__init__.py index 7be5050e..9853918d 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/__init__.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/__init__.py @@ -1,9 +1,10 @@ import logging import connexion -from api_provider_management.encoder import JSONEncoder from flask_testing import TestCase +from api_provider_management.encoder import JSONEncoder + class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_default_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_default_controller.py index 120b96f8..2b12ff85 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_default_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_default_controller.py @@ -1,9 +1,10 @@ import unittest +from flask import json + from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 from api_provider_management.models.problem_details import ProblemDetails # noqa: E501 from api_provider_management.test import BaseTestCase -from flask import json class TestDefaultController(BaseTestCase): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py index 9c1819ac..463aa435 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py @@ -1,11 +1,11 @@ import unittest +from flask import json + from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 -from api_provider_management.models.api_provider_enrolment_details_patch import \ - APIProviderEnrolmentDetailsPatch # noqa: E501 +from api_provider_management.models.api_provider_enrolment_details_patch import APIProviderEnrolmentDetailsPatch # noqa: E501 from api_provider_management.models.problem_details import ProblemDetails # noqa: E501 from api_provider_management.test import BaseTestCase -from flask import json class TestIndividualAPIProviderEnrolmentDetailsController(BaseTestCase): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/util.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/util.py index f4f15bc5..cddcd374 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/util.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/util.py @@ -1,5 +1,6 @@ import datetime +import typing from api_provider_management import typing_utils diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/setup.py b/services/TS29222_CAPIF_API_Provider_Management_API/setup.py index 406d0dae..9eba8bdd 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/setup.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/setup.py @@ -1,4 +1,5 @@ -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "api_provider_management" VERSION = "1.0.0" -- GitLab From 6af0b3dcb47e3926ae7442e3d0107864b27cf861 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 27 Nov 2025 11:17:40 +0100 Subject: [PATCH 043/101] REL 19 CAPIF_Auditing_API --- .../.openapi-generator/FILES | 2 + .../logs/controllers/default_controller.py | 22 +++- .../logs/controllers/security_controller.py | 2 +- .../logs/encoder.py | 3 +- .../logs/models/__init__.py | 13 ++ .../logs/models/base_model.py | 1 + .../logs/models/interface_description.py | 12 +- .../logs/models/invalid_param.py | 5 +- .../logs/models/invocation_log.py | 11 +- .../logs/models/invocation_logs.py | 11 +- .../models/invocation_logs_retrieve_res.py | 13 +- .../logs/models/log.py | 48 +++++-- .../logs/models/net_slice_id.py | 119 ++++++++++++++++++ .../logs/models/o_auth_grant_type.py | 5 +- .../logs/models/operation.py | 5 +- .../logs/models/problem_details.py | 11 +- .../logs/models/protocol.py | 5 +- .../logs/models/security_method.py | 5 +- .../logs/models/snssai.py | 101 +++++++++++++++ .../logs/openapi/openapi.yaml | 113 +++++++++++++++-- .../logs/test/__init__.py | 1 + .../logs/test/test_default_controller.py | 6 +- .../TS29222_CAPIF_Auditing_API/logs/util.py | 1 + services/TS29222_CAPIF_Auditing_API/setup.py | 6 +- 24 files changed, 465 insertions(+), 56 deletions(-) create mode 100644 services/TS29222_CAPIF_Auditing_API/logs/models/net_slice_id.py create mode 100644 services/TS29222_CAPIF_Auditing_API/logs/models/snssai.py diff --git a/services/TS29222_CAPIF_Auditing_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Auditing_API/.openapi-generator/FILES index bd1da334..b335347f 100644 --- a/services/TS29222_CAPIF_Auditing_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Auditing_API/.openapi-generator/FILES @@ -19,11 +19,13 @@ logs/models/invocation_log.py logs/models/invocation_logs.py logs/models/invocation_logs_retrieve_res.py logs/models/log.py +logs/models/net_slice_id.py logs/models/o_auth_grant_type.py logs/models/operation.py logs/models/problem_details.py logs/models/protocol.py logs/models/security_method.py +logs/models/snssai.py logs/openapi/openapi.yaml logs/test/__init__.py logs/test/test_default_controller.py diff --git a/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py b/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py index 0f2866e5..fa039fba 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py @@ -1,3 +1,14 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from logs.models.invocation_logs_retrieve_res import InvocationLogsRetrieveRes # noqa: E501 +from logs.models.net_slice_id import NetSliceId # noqa: E501 +from logs.models.operation import Operation # noqa: E501 +from logs.models.problem_details import ProblemDetails # noqa: E501 +from logs import util + from flask import current_app, request from logs import util from logs.models.interface_description import InterfaceDescription # noqa: E501 @@ -40,9 +51,8 @@ def cert_validation(): return __cert_validation return _cert_validation - @cert_validation() -def api_invocation_logs_get(aef_id=None, api_invoker_id=None, time_range_start=None, time_range_end=None, api_id=None, api_name=None, api_version=None, protocol=None, operation=None, result=None, resource_name=None, src_interface=None, dest_interface=None, supported_features=None): # noqa: E501 +def api_invocation_logs_get(aef_id=None, api_invoker_id=None, time_range_start=None, time_range_end=None, api_id=None, api_name=None, api_version=None, protocol=None, operation=None, result=None, resource_name=None, src_interface=None, dest_interface=None, supported_features=None, net_slice_info=None): # noqa: E501 """api_invocation_logs_get Query and retrieve service API invocation logs stored on the CAPIF core function. # noqa: E501 @@ -57,7 +67,7 @@ def api_invocation_logs_get(aef_id=None, api_invoker_id=None, time_range_start=N :type time_range_end: str :param api_id: String identifying the API invoked. :type api_id: str - :param api_name: API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + :param api_name: Contains the API name set to the value of the \"<apiName>\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. :type api_name: str :param api_version: Version of the API which was invoked. :type api_version: str @@ -75,6 +85,8 @@ def api_invocation_logs_get(aef_id=None, api_invoker_id=None, time_range_start=N :type dest_interface: dict | bytes :param supported_features: To filter irrelevant responses related to unsupported features :type supported_features: str + :param net_slice_info: Contains the identifier(s) of the network slice(s) within which the API shall be available. + :type net_slice_info: list | bytes :rtype: Union[InvocationLogsRetrieveRes, Tuple[InvocationLogsRetrieveRes, int], Tuple[InvocationLogsRetrieveRes, int, Dict[str, str]] """ @@ -96,7 +108,9 @@ def api_invocation_logs_get(aef_id=None, api_invoker_id=None, time_range_start=N src_interface = InterfaceDescription.from_dict(request.get_json()) # noqa: E501 if request.is_json: dest_interface = InterfaceDescription.from_dict(request.get_json()) # noqa: E501 - + if request.is_json: + net_slice_info = [NetSliceId.from_dict(d) for d in request.get_json()] # noqa: E501 + query_params = {"aef_id": aef_id, "api_invoker_id": api_invoker_id, "time_range_start": time_range_start, diff --git a/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py b/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py index 139597f9..6d294ffd 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py @@ -1,2 +1,2 @@ - +from typing import List diff --git a/services/TS29222_CAPIF_Auditing_API/logs/encoder.py b/services/TS29222_CAPIF_Auditing_API/logs/encoder.py index f9d89aae..a6803052 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/encoder.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/encoder.py @@ -1,4 +1,5 @@ from connexion.jsonifier import JSONEncoder + from logs.models.base_model import Model @@ -15,4 +16,4 @@ class CustomJSONEncoder(JSONEncoder): attr = o.attribute_map[attr] dikt[attr] = value return dikt - return JSONEncoder.default(self, o) \ No newline at end of file + return JSONEncoder.default(self, o) diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py b/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py index d036df69..c1fbd00c 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py @@ -1,2 +1,15 @@ # flake8: noqa # import models into model package +from logs.models.interface_description import InterfaceDescription +from logs.models.invalid_param import InvalidParam +from logs.models.invocation_log import InvocationLog +from logs.models.invocation_logs import InvocationLogs +from logs.models.invocation_logs_retrieve_res import InvocationLogsRetrieveRes +from logs.models.log import Log +from logs.models.net_slice_id import NetSliceId +from logs.models.o_auth_grant_type import OAuthGrantType +from logs.models.operation import Operation +from logs.models.problem_details import ProblemDetails +from logs.models.protocol import Protocol +from logs.models.security_method import SecurityMethod +from logs.models.snssai import Snssai diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py b/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py index 16381a1d..56493bbf 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from logs import util diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py b/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py index 2a92e75c..b2302306 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py @@ -1,12 +1,16 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model +from logs.models.o_auth_grant_type import OAuthGrantType +from logs.models.security_method import SecurityMethod +import re +from logs import util + from logs.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from logs.models.security_method import SecurityMethod # noqa: E501 - +import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py index bafe0905..7da75a55 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model +from logs import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py index bf5c2ee2..26d42ad5 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model -from logs.models.log import Log # noqa: E501 +from logs.models.log import Log +import re +from logs import util +from logs.models.log import Log # noqa: E501 +import re # noqa: E501 class InvocationLog(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py index 55c37648..f1ed39c0 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model -from logs.models.invocation_log import InvocationLog # noqa: E501 +from logs.models.invocation_log import InvocationLog +import re +from logs import util +from logs.models.invocation_log import InvocationLog # noqa: E501 +import re # noqa: E501 class InvocationLogs(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py index 07455f47..4ebdec7c 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py @@ -1,13 +1,18 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model +from logs.models.invocation_log import InvocationLog +from logs.models.invocation_logs import InvocationLogs +from logs.models.log import Log +import re +from logs import util + from logs.models.invocation_log import InvocationLog # noqa: E501 from logs.models.invocation_logs import InvocationLogs # noqa: E501 from logs.models.log import Log # noqa: E501 - +import re # noqa: E501 class InvocationLogsRetrieveRes(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/log.py b/services/TS29222_CAPIF_Auditing_API/logs/models/log.py index a3c965ee..f6096ffe 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/log.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/log.py @@ -1,20 +1,26 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model +from logs.models.interface_description import InterfaceDescription +from logs.models.net_slice_id import NetSliceId +from logs.models.operation import Operation +from logs.models.protocol import Protocol +from logs import util + from logs.models.interface_description import InterfaceDescription # noqa: E501 +from logs.models.net_slice_id import NetSliceId # noqa: E501 from logs.models.operation import Operation # noqa: E501 from logs.models.protocol import Protocol # noqa: E501 - class Log(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - def __init__(self, api_id=None, api_name=None, api_version=None, resource_name=None, uri=None, protocol=None, operation=None, result=None, invocation_time=None, invocation_latency=None, input_parameters=None, output_parameters=None, src_interface=None, dest_interface=None, fwd_interface=None): # noqa: E501 + def __init__(self, api_id=None, api_name=None, api_version=None, resource_name=None, uri=None, protocol=None, operation=None, result=None, invocation_time=None, invocation_latency=None, input_parameters=None, output_parameters=None, src_interface=None, dest_interface=None, fwd_interface=None, net_slice_info=None): # noqa: E501 """Log - a model defined in OpenAPI :param api_id: The api_id of this Log. # noqa: E501 @@ -47,6 +53,8 @@ class Log(Model): :type dest_interface: InterfaceDescription :param fwd_interface: The fwd_interface of this Log. # noqa: E501 :type fwd_interface: str + :param net_slice_info: The net_slice_info of this Log. # noqa: E501 + :type net_slice_info: NetSliceId """ self.openapi_types = { 'api_id': str, @@ -63,7 +71,8 @@ class Log(Model): 'output_parameters': object, 'src_interface': InterfaceDescription, 'dest_interface': InterfaceDescription, - 'fwd_interface': str + 'fwd_interface': str, + 'net_slice_info': NetSliceId } self.attribute_map = { @@ -81,7 +90,8 @@ class Log(Model): 'output_parameters': 'outputParameters', 'src_interface': 'srcInterface', 'dest_interface': 'destInterface', - 'fwd_interface': 'fwdInterface' + 'fwd_interface': 'fwdInterface', + 'net_slice_info': 'netSliceInfo' } self._api_id = api_id @@ -99,6 +109,7 @@ class Log(Model): self._src_interface = src_interface self._dest_interface = dest_interface self._fwd_interface = fwd_interface + self._net_slice_info = net_slice_info @classmethod def from_dict(cls, dikt) -> 'Log': @@ -140,7 +151,7 @@ class Log(Model): def api_name(self) -> str: """Gets the api_name of this Log. - Name of the API which was invoked, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the invoked API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :return: The api_name of this Log. :rtype: str @@ -151,7 +162,7 @@ class Log(Model): def api_name(self, api_name: str): """Sets the api_name of this Log. - Name of the API which was invoked, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the invoked API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :param api_name: The api_name of this Log. :type api_name: str @@ -461,3 +472,24 @@ class Log(Model): """ self._fwd_interface = fwd_interface + + @property + def net_slice_info(self) -> NetSliceId: + """Gets the net_slice_info of this Log. + + + :return: The net_slice_info of this Log. + :rtype: NetSliceId + """ + return self._net_slice_info + + @net_slice_info.setter + def net_slice_info(self, net_slice_info: NetSliceId): + """Sets the net_slice_info of this Log. + + + :param net_slice_info: The net_slice_info of this Log. + :type net_slice_info: NetSliceId + """ + + self._net_slice_info = net_slice_info diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/net_slice_id.py b/services/TS29222_CAPIF_Auditing_API/logs/models/net_slice_id.py new file mode 100644 index 00000000..110e4cca --- /dev/null +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/net_slice_id.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from logs.models.base_model import Model +from logs.models.snssai import Snssai +from logs import util + +from logs.models.snssai import Snssai # noqa: E501 + +class NetSliceId(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, snssai=None, nsi_id=None, ensi=None): # noqa: E501 + """NetSliceId - a model defined in OpenAPI + + :param snssai: The snssai of this NetSliceId. # noqa: E501 + :type snssai: Snssai + :param nsi_id: The nsi_id of this NetSliceId. # noqa: E501 + :type nsi_id: str + :param ensi: The ensi of this NetSliceId. # noqa: E501 + :type ensi: str + """ + self.openapi_types = { + 'snssai': Snssai, + 'nsi_id': str, + 'ensi': str + } + + self.attribute_map = { + 'snssai': 'snssai', + 'nsi_id': 'nsiId', + 'ensi': 'ensi' + } + + self._snssai = snssai + self._nsi_id = nsi_id + self._ensi = ensi + + @classmethod + def from_dict(cls, dikt) -> 'NetSliceId': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NetSliceId of this NetSliceId. # noqa: E501 + :rtype: NetSliceId + """ + return util.deserialize_model(dikt, cls) + + @property + def snssai(self) -> Snssai: + """Gets the snssai of this NetSliceId. + + + :return: The snssai of this NetSliceId. + :rtype: Snssai + """ + return self._snssai + + @snssai.setter + def snssai(self, snssai: Snssai): + """Sets the snssai of this NetSliceId. + + + :param snssai: The snssai of this NetSliceId. + :type snssai: Snssai + """ + + self._snssai = snssai + + @property + def nsi_id(self) -> str: + """Gets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :return: The nsi_id of this NetSliceId. + :rtype: str + """ + return self._nsi_id + + @nsi_id.setter + def nsi_id(self, nsi_id: str): + """Sets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :param nsi_id: The nsi_id of this NetSliceId. + :type nsi_id: str + """ + + self._nsi_id = nsi_id + + @property + def ensi(self) -> str: + """Gets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :return: The ensi of this NetSliceId. + :rtype: str + """ + return self._ensi + + @ensi.setter + def ensi(self, ensi: str): + """Sets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :param ensi: The ensi of this NetSliceId. + :type ensi: str + """ + + self._ensi = ensi diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Auditing_API/logs/models/o_auth_grant_type.py index 57b4bf4e..280b8ef7 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/o_auth_grant_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model +from logs import util class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py b/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py index cf35e30e..a8efafdc 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model +from logs import util class Operation(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py b/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py index c074f0e5..2a77eb97 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model -from logs.models.invalid_param import InvalidParam # noqa: E501 +from logs.models.invalid_param import InvalidParam +import re +from logs import util +from logs.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py b/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py index e2b23e6b..989d9e4c 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model +from logs import util class Protocol(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py b/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py index 9091c514..b32bbf5b 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from logs import util +from typing import List, Dict # noqa: F401 + from logs.models.base_model import Model +from logs import util class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/snssai.py b/services/TS29222_CAPIF_Auditing_API/logs/models/snssai.py new file mode 100644 index 00000000..d2a6f644 --- /dev/null +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/snssai.py @@ -0,0 +1,101 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from logs.models.base_model import Model +import re +from logs import util + +import re # noqa: E501 + +class Snssai(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, sst=None, sd=None): # noqa: E501 + """Snssai - a model defined in OpenAPI + + :param sst: The sst of this Snssai. # noqa: E501 + :type sst: int + :param sd: The sd of this Snssai. # noqa: E501 + :type sd: str + """ + self.openapi_types = { + 'sst': int, + 'sd': str + } + + self.attribute_map = { + 'sst': 'sst', + 'sd': 'sd' + } + + self._sst = sst + self._sd = sd + + @classmethod + def from_dict(cls, dikt) -> 'Snssai': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Snssai of this Snssai. # noqa: E501 + :rtype: Snssai + """ + return util.deserialize_model(dikt, cls) + + @property + def sst(self) -> int: + """Gets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :return: The sst of this Snssai. + :rtype: int + """ + return self._sst + + @sst.setter + def sst(self, sst: int): + """Sets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :param sst: The sst of this Snssai. + :type sst: int + """ + if sst is None: + raise ValueError("Invalid value for `sst`, must not be `None`") # noqa: E501 + if sst is not None and sst > 255: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value less than or equal to `255`") # noqa: E501 + if sst is not None and sst < 0: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value greater than or equal to `0`") # noqa: E501 + + self._sst = sst + + @property + def sd(self) -> str: + """Gets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :return: The sd of this Snssai. + :rtype: str + """ + return self._sd + + @sd.setter + def sd(self, sd: str): + """Sets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :param sd: The sd of this Snssai. + :type sd: str + """ + if sd is not None and not re.search(r'^[A-Fa-f0-9]{6}$', sd): # noqa: E501 + raise ValueError(r"Invalid value for `sd`, must be a follow pattern or equal to `/^[A-Fa-f0-9]{6}$/`") # noqa: E501 + + self._sd = sd diff --git a/services/TS29222_CAPIF_Auditing_API/logs/openapi/openapi.yaml b/services/TS29222_CAPIF_Auditing_API/logs/openapi/openapi.yaml index 8fb314ae..c1ed51ce 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_Auditing_API/logs/openapi/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.0 info: - description: "API for auditing. \n© 2024, 3GPP Organizational Partners (ARIB, ATIS,\ + description: "API for auditing. \n© 2025, 3GPP Organizational Partners (ARIB, ATIS,\ \ CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Auditing_API - version: 1.3.0 + version: 1.4.0-alpha.2 externalDocs: - description: 3GPP TS 29.222 V18.6.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V19.3.0 Common API Framework for 3GPP Northbound APIs url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: - url: "{apiRoot}/logs/v1" @@ -62,7 +62,7 @@ paths: type: string style: form - description: | - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + Contains the API name set to the value of the "" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. explode: true in: query name: api-name @@ -134,6 +134,18 @@ paths: schema: $ref: '#/components/schemas/SupportedFeatures' style: form + - content: + application/json: + schema: + items: + $ref: '#/components/schemas/NetSliceId' + minItems: 1 + type: array + description: | + Contains the identifier(s) of the network slice(s) within which the API shall be available. + in: query + name: net-slice-info + required: false responses: "200": content: @@ -363,9 +375,9 @@ components: ipv4Addr: ipv4Addr nullable: true oneOf: - - required: ["fqdn"] - - required: ["ipv4Addr"] - - required: ["ipv6Addr"] + - required: ["ipv4Addr"] + - required: ["ipv6Addr"] + - required: ["fqdn"] properties: ipv4Addr: description: | @@ -429,6 +441,39 @@ components: pattern: "^[A-Fa-f0-9]*$" title: SupportedFeatures type: string + NetSliceId: + description: | + Represents the network slice identification information. + example: + ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId + nullable: true + oneOf: + - required: ["snssai"] + - required: ["nsiId"] + - required: ["ensi"] + properties: + snssai: + $ref: '#/components/schemas/Snssai' + nsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string + ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string + title: NetSliceId + type: object + Ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string ProblemDetails: description: Represents additional information and details on an error response. properties: @@ -526,6 +571,12 @@ components: result: result protocol: HTTP_1_1 apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -563,6 +614,12 @@ components: result: result protocol: HTTP_1_1 apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -632,6 +689,12 @@ components: result: result protocol: HTTP_1_1 apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -654,7 +717,7 @@ components: type: string apiName: description: | - Name of the API which was invoked, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + Contains the invoked API name set to the value of the "" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. title: apiName type: string apiVersion: @@ -704,6 +767,8 @@ components: It includes the node identifier (as defined in IETF RFC 7239 of all forwarding entities between the API invoker and the AEF, concatenated with comma and space, e.g. 192.0.2.43:80, unknown:_OBFport, 203.0.113.60 title: fwdInterface type: string + netSliceInfo: + $ref: '#/components/schemas/NetSliceId' required: - apiId - apiName @@ -755,3 +820,35 @@ components: \ authorization code.\n- AUTHORIZATION_CODE_WITH_PKCE: Indicate that the grant\ \ type is authorization code with PKCE.\n" title: OAuthGrantType + Snssai: + description: | + When Snssai needs to be converted to string (e.g. when used in maps as key), the string shall be composed of one to three digits "sst" optionally followed by "-" and 6 hexadecimal digits "sd". + example: + sd: sd + sst: 37 + properties: + sst: + description: "Unsigned integer, within the range 0 to 255, representing\ + \ the Slice/Service Type. It indicates the expected Network Slice behaviour\ + \ in terms of features and services. Values 0 to 127 correspond to the\ + \ standardized SST range. Values 128 to 255 correspond to the Operator-specific\ + \ range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are\ + \ defined in clause 5.15.2.2 of 3GPP TS 23.501. \n" + maximum: 255 + minimum: 0 + title: sst + type: integer + sd: + description: | + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. + pattern: "^[A-Fa-f0-9]{6}$" + title: sd + type: string + required: + - sst + title: Snssai + type: object + NsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string diff --git a/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py b/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py index 9209767d..a3e8ced6 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py @@ -2,6 +2,7 @@ import logging import connexion from flask_testing import TestCase + from logs.encoder import JSONEncoder diff --git a/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py b/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py index 3e2153c6..54565a14 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py @@ -1,7 +1,10 @@ import unittest +from flask import json + from logs.models.interface_description import InterfaceDescription # noqa: E501 from logs.models.invocation_logs_retrieve_res import InvocationLogsRetrieveRes # noqa: E501 +from logs.models.net_slice_id import NetSliceId # noqa: E501 from logs.models.operation import Operation # noqa: E501 from logs.models.problem_details import ProblemDetails # noqa: E501 from logs.models.protocol import Protocol # noqa: E501 @@ -29,7 +32,8 @@ class TestDefaultController(BaseTestCase): ('resource-name', 'resource_name_example'), ('src-interface', openapi_server.InterfaceDescription()), ('dest-interface', openapi_server.InterfaceDescription()), - ('supported-features', 'supported_features_example')] + ('supported-features', 'supported_features_example'), + ('net-slice-info', [openapi_server.NetSliceId()])] headers = { 'Accept': 'application/json', } diff --git a/services/TS29222_CAPIF_Auditing_API/logs/util.py b/services/TS29222_CAPIF_Auditing_API/logs/util.py index 47a58118..f6331d11 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/util.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/util.py @@ -1,5 +1,6 @@ import datetime +import typing from logs import typing_utils diff --git a/services/TS29222_CAPIF_Auditing_API/setup.py b/services/TS29222_CAPIF_Auditing_API/setup.py index cbd1ece8..1e3093b2 100644 --- a/services/TS29222_CAPIF_Auditing_API/setup.py +++ b/services/TS29222_CAPIF_Auditing_API/setup.py @@ -1,5 +1,5 @@ - -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "logs" VERSION = "1.0.0" @@ -31,7 +31,7 @@ setup( entry_points={ 'console_scripts': ['logs=logs.__main__:main']}, long_description="""\ - API for auditing. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for auditing. © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) -- GitLab From 9b1ca4a3089b486ed21a977791b19d01cb9fd1b8 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 27 Nov 2025 11:45:41 +0100 Subject: [PATCH 044/101] REL 19 Discover_Service_API --- .../.openapi-generator/FILES | 3 + .../controllers/default_controller.py | 33 +- .../controllers/security_controller.py | 2 +- .../service_apis/encoder.py | 1 + .../service_apis/models/__init__.py | 46 +++ .../service_apis/models/aef_location.py | 9 +- .../service_apis/models/aef_profile.py | 16 +- .../service_apis/models/api_status.py | 9 +- .../service_apis/models/base_model.py | 1 + .../service_apis/models/civic_address.py | 5 +- .../service_apis/models/communication_type.py | 5 +- .../service_apis/models/custom_operation.py | 9 +- .../service_apis/models/data_format.py | 5 +- .../service_apis/models/discovered_apis.py | 11 +- .../service_apis/models/ellipsoid_arc.py | 10 +- .../service_apis/models/gad_shape.py | 8 +- .../service_apis/models/geographic_area.py | 17 +- .../models/geographical_coordinates.py | 5 +- .../models/interface_description.py | 12 +- .../service_apis/models/invalid_param.py | 5 +- .../service_apis/models/ip_addr_info.py | 5 +- .../service_apis/models/ip_addr_range.py | 9 +- .../service_apis/models/ipv4_address_range.py | 8 +- .../service_apis/models/ipv6_addr1.py | 5 +- .../service_apis/models/ipv6_address_range.py | 8 +- .../local2d_point_uncertainty_ellipse.py | 12 +- .../local3d_point_uncertainty_ellipsoid.py | 12 +- .../service_apis/models/local_origin.py | 9 +- .../service_apis/models/net_slice_id.py | 119 ++++++++ .../service_apis/models/o_auth_grant_type.py | 5 +- .../service_apis/models/operation.py | 5 +- .../service_apis/models/point.py | 10 +- .../service_apis/models/point_altitude.py | 10 +- .../models/point_altitude_uncertainty.py | 11 +- .../models/point_uncertainty_circle.py | 10 +- .../models/point_uncertainty_ellipse.py | 11 +- .../service_apis/models/polygon.py | 10 +- .../service_apis/models/problem_details.py | 11 +- .../service_apis/models/protocol.py | 5 +- .../service_apis/models/published_api_path.py | 5 +- .../models/relative_cartesian_location.py | 5 +- .../service_apis/models/res_oper_info.py | 121 ++++++++ .../service_apis/models/resource.py | 10 +- .../service_apis/models/security_method.py | 5 +- .../models/service_api_description.py | 56 +++- .../service_apis/models/service_kpis.py | 8 +- .../models/shareable_information.py | 9 +- .../service_apis/models/snssai.py | 101 ++++++ .../models/supported_gad_shapes.py | 5 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../service_apis/models/version.py | 9 +- .../service_apis/openapi/openapi.yaml | 289 ++++++++++++++---- .../service_apis/test/__init__.py | 1 + .../test/test_default_controller.py | 11 +- .../service_apis/util.py | 1 + .../setup.py | 6 +- 57 files changed, 942 insertions(+), 197 deletions(-) create mode 100644 services/TS29222_CAPIF_Discover_Service_API/service_apis/models/net_slice_id.py create mode 100644 services/TS29222_CAPIF_Discover_Service_API/service_apis/models/res_oper_info.py create mode 100644 services/TS29222_CAPIF_Discover_Service_API/service_apis/models/snssai.py diff --git a/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/FILES index 58bf0487..a2133fcf 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/FILES @@ -35,6 +35,7 @@ service_apis/models/ipv6_address_range.py service_apis/models/local2d_point_uncertainty_ellipse.py service_apis/models/local3d_point_uncertainty_ellipsoid.py service_apis/models/local_origin.py +service_apis/models/net_slice_id.py service_apis/models/o_auth_grant_type.py service_apis/models/operation.py service_apis/models/point.py @@ -47,11 +48,13 @@ service_apis/models/problem_details.py service_apis/models/protocol.py service_apis/models/published_api_path.py service_apis/models/relative_cartesian_location.py +service_apis/models/res_oper_info.py service_apis/models/resource.py service_apis/models/security_method.py service_apis/models/service_api_description.py service_apis/models/service_kpis.py service_apis/models/shareable_information.py +service_apis/models/snssai.py service_apis/models/supported_gad_shapes.py service_apis/models/uncertainty_ellipse.py service_apis/models/uncertainty_ellipsoid.py diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py index f742f499..5ecf85a2 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py @@ -1,3 +1,21 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from service_apis.models.aef_location import AefLocation # noqa: E501 +from service_apis.models.communication_type import CommunicationType # noqa: E501 +from service_apis.models.data_format import DataFormat # noqa: E501 +from service_apis.models.discovered_apis import DiscoveredAPIs # noqa: E501 +from service_apis.models.ip_addr_info import IpAddrInfo # noqa: E501 +from service_apis.models.net_slice_id import NetSliceId # noqa: E501 +from service_apis.models.o_auth_grant_type import OAuthGrantType # noqa: E501 +from service_apis.models.problem_details import ProblemDetails # noqa: E501 +from service_apis.models.protocol import Protocol # noqa: E501 +from service_apis.models.res_oper_info import ResOperInfo # noqa: E501 +from service_apis.models.service_kpis import ServiceKpis # noqa: E501 +from service_apis import util + import json from functools import wraps from cryptography import x509 @@ -38,15 +56,14 @@ def cert_validation(): return _cert_validation -@cert_validation() -def all_service_apis_get(api_invoker_id, api_name=None, api_version=None, comm_type=None, protocol=None, aef_id=None, data_format=None, api_cat=None, preferred_aef_loc=None, req_api_prov_name=None, supported_features=None, api_supported_features=None, ue_ip_addr=None, service_kpis=None, grant_types=None): # noqa: E501 +def all_service_apis_get(api_invoker_id, api_name=None, api_version=None, comm_type=None, protocol=None, aef_id=None, data_format=None, api_cat=None, preferred_aef_loc=None, req_api_prov_name=None, api_supported_features=None, ue_ip_addr=None, service_kpis=None, net_slice_info=None, grant_types=None, api_ids=None, res_ops=None, supported_features=None): # noqa: E501 """all_service_apis_get Discover published service APIs and retrieve a collection of APIs according to certain filter criteria. # noqa: E501 :param api_invoker_id: String identifying the API invoker assigned by the CAPIF core function. It also represents the CCF identifier in the CAPIF-6/6e interface. :type api_invoker_id: str - :param api_name: API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + :param api_name: Contains the API name set to the value of the \"<apiName>\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. :type api_name: str :param api_version: API major version the URI (e.g. v1). :type api_version: str @@ -64,16 +81,22 @@ def all_service_apis_get(api_invoker_id, api_name=None, api_version=None, comm_t :type preferred_aef_loc: dict | bytes :param req_api_prov_name: Represents the required API provider name. :type req_api_prov_name: str - :param supported_features: Features supported by the NF consumer for the CAPIF Discover Service API. - :type supported_features: str :param api_supported_features: Features supported by the discovered service API indicated by api-name parameter. This may only be present if api-name query parameter is present. :type api_supported_features: str :param ue_ip_addr: Represents the UE IP address information. :type ue_ip_addr: dict | bytes :param service_kpis: Contains iInformation about service characteristics provided by the targeted service API(s). :type service_kpis: dict | bytes + :param net_slice_info: Contains the identifier(s) of the network slice(s) within which the API shall be available. + :type net_slice_info: list | bytes :param grant_types: Contains the OAuth grant types that need to be supported. :type grant_types: list | bytes + :param api_ids: Contains the identifier(s) of the targeted service APIs. When this query parameter is present, then all the other query parameters shall be absent except the supported-features and api-invoker-id query parameters. + :type api_ids: List[str] + :param res_ops: Contains the list of supported API resource(s) and service operation(s). + :type res_ops: list | bytes + :param supported_features: Features supported by the NF consumer for the CAPIF Discover Service API. + :type supported_features: str :rtype: Union[DiscoveredAPIs, Tuple[DiscoveredAPIs, int], Tuple[DiscoveredAPIs, int, Dict[str, str]] """ diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller.py index 139597f9..6d294ffd 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller.py @@ -1,2 +1,2 @@ - +from typing import List diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py index 26d33408..c741e68b 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py @@ -1,4 +1,5 @@ from connexion.jsonifier import JSONEncoder + from service_apis.models.base_model import Model diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/__init__.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/__init__.py index d036df69..c9dd75e1 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/__init__.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/__init__.py @@ -1,2 +1,48 @@ # flake8: noqa # import models into model package +from service_apis.models.aef_location import AefLocation +from service_apis.models.aef_profile import AefProfile +from service_apis.models.api_status import ApiStatus +from service_apis.models.civic_address import CivicAddress +from service_apis.models.communication_type import CommunicationType +from service_apis.models.custom_operation import CustomOperation +from service_apis.models.data_format import DataFormat +from service_apis.models.discovered_apis import DiscoveredAPIs +from service_apis.models.ellipsoid_arc import EllipsoidArc +from service_apis.models.gad_shape import GADShape +from service_apis.models.geographic_area import GeographicArea +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis.models.interface_description import InterfaceDescription +from service_apis.models.invalid_param import InvalidParam +from service_apis.models.ip_addr_info import IpAddrInfo +from service_apis.models.ip_addr_range import IpAddrRange +from service_apis.models.ipv4_address_range import Ipv4AddressRange +from service_apis.models.ipv6_addr1 import Ipv6Addr1 +from service_apis.models.ipv6_address_range import Ipv6AddressRange +from service_apis.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse +from service_apis.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid +from service_apis.models.local_origin import LocalOrigin +from service_apis.models.net_slice_id import NetSliceId +from service_apis.models.o_auth_grant_type import OAuthGrantType +from service_apis.models.operation import Operation +from service_apis.models.point import Point +from service_apis.models.point_altitude import PointAltitude +from service_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty +from service_apis.models.point_uncertainty_circle import PointUncertaintyCircle +from service_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from service_apis.models.polygon import Polygon +from service_apis.models.problem_details import ProblemDetails +from service_apis.models.protocol import Protocol +from service_apis.models.published_api_path import PublishedApiPath +from service_apis.models.relative_cartesian_location import RelativeCartesianLocation +from service_apis.models.res_oper_info import ResOperInfo +from service_apis.models.resource import Resource +from service_apis.models.security_method import SecurityMethod +from service_apis.models.service_api_description import ServiceAPIDescription +from service_apis.models.service_kpis import ServiceKpis +from service_apis.models.shareable_information import ShareableInformation +from service_apis.models.snssai import Snssai +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis.models.uncertainty_ellipse import UncertaintyEllipse +from service_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from service_apis.models.version import Version diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_location.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_location.py index bbceaa45..25fe56a3 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_location.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_location.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.civic_address import CivicAddress +from service_apis.models.geographic_area import GeographicArea +from service_apis import util + from service_apis.models.civic_address import CivicAddress # noqa: E501 from service_apis.models.geographic_area import GeographicArea # noqa: E501 - class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_profile.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_profile.py index 11969441..78ff868a 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_profile.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_profile.py @@ -1,9 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis.models.base_model import Model +from service_apis.models.aef_location import AefLocation +from service_apis.models.data_format import DataFormat +from service_apis.models.interface_description import InterfaceDescription +from service_apis.models.ip_addr_range import IpAddrRange +from service_apis.models.o_auth_grant_type import OAuthGrantType +from service_apis.models.protocol import Protocol +from service_apis.models.security_method import SecurityMethod +from service_apis.models.service_kpis import ServiceKpis +from service_apis.models.version import Version from service_apis import util + from service_apis.models.aef_location import AefLocation # noqa: E501 -from service_apis.models.base_model import Model from service_apis.models.data_format import DataFormat # noqa: E501 from service_apis.models.interface_description import InterfaceDescription # noqa: E501 from service_apis.models.ip_addr_range import IpAddrRange # noqa: E501 @@ -13,7 +24,6 @@ from service_apis.models.security_method import SecurityMethod # noqa: E501 from service_apis.models.service_kpis import ServiceKpis # noqa: E501 from service_apis.models.version import Version # noqa: E501 - class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py index eef94f95..2478315c 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class ApiStatus(Model): @@ -42,7 +43,7 @@ class ApiStatus(Model): def aef_ids(self) -> List[str]: """Gets the aef_ids of this ApiStatus. - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # noqa: E501 + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 :return: The aef_ids of this ApiStatus. :rtype: List[str] @@ -53,7 +54,7 @@ class ApiStatus(Model): def aef_ids(self, aef_ids: List[str]): """Sets the aef_ids of this ApiStatus. - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # noqa: E501 + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 :param aef_ids: The aef_ids of this ApiStatus. :type aef_ids: List[str] diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py index a083ea94..7951efc4 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from service_apis import util diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/civic_address.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/civic_address.py index 7314bca7..67c1a70f 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/civic_address.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/civic_address.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type.py index ea17cb87..04b99a70 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/custom_operation.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/custom_operation.py index fed2a347..b98c3dc9 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/custom_operation.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/custom_operation.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.communication_type import CommunicationType +from service_apis.models.operation import Operation +from service_apis import util + from service_apis.models.communication_type import CommunicationType # noqa: E501 from service_apis.models.operation import Operation # noqa: E501 - class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format.py index 7575f306..875a9539 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class DataFormat(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/discovered_apis.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/discovered_apis.py index a2377563..36a7889a 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/discovered_apis.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/discovered_apis.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model -from service_apis.models.service_api_description import ServiceAPIDescription # noqa: E501 +from service_apis.models.service_api_description import ServiceAPIDescription +import re +from service_apis import util +from service_apis.models.service_api_description import ServiceAPIDescription # noqa: E501 +import re # noqa: E501 class DiscoveredAPIs(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ellipsoid_arc.py index a5747b5e..9f6206bc 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ellipsoid_arc.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.gad_shape import GADShape +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis import util + from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py index dfc5dedb..21e0ee19 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis import util +from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py index 3c2d44c2..dafc9960 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py @@ -1,8 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.ellipsoid_arc import EllipsoidArc +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis.models.point import Point +from service_apis.models.point_altitude import PointAltitude +from service_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty +from service_apis.models.point_uncertainty_circle import PointUncertaintyCircle +from service_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from service_apis.models.polygon import Polygon +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis.models.uncertainty_ellipse import UncertaintyEllipse +from service_apis import util + from service_apis.models.ellipsoid_arc import EllipsoidArc # noqa: E501 from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from service_apis.models.point import Point # noqa: E501 @@ -14,7 +26,6 @@ from service_apis.models.polygon import Polygon # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from service_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py index 755e077a..4eae80d3 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/interface_description.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/interface_description.py index 7c44ba11..da6cd574 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/interface_description.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/interface_description.py @@ -1,12 +1,16 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.o_auth_grant_type import OAuthGrantType +from service_apis.models.security_method import SecurityMethod +import re +from service_apis import util + from service_apis.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from service_apis.models.security_method import SecurityMethod # noqa: E501 - +import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/invalid_param.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/invalid_param.py index 74464bd1..67c79e30 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/invalid_param.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_info.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_info.py index 1791b5a3..3cb739c6 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_info.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_info.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class IpAddrInfo(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_range.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_range.py index b95a30bd..4b86f968 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_range.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.ipv4_address_range import Ipv4AddressRange +from service_apis.models.ipv6_address_range import Ipv6AddressRange +from service_apis import util + from service_apis.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 from service_apis.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 - class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv4_address_range.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv4_address_range.py index e2e91ad7..9d500949 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv4_address_range.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +import re +from service_apis import util +import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py index 7c01304e..d8164b5f 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_address_range.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_address_range.py index b8e1c5e0..e9fc81ec 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_address_range.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model -from service_apis.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 +from service_apis.models.ipv6_addr1 import Ipv6Addr1 +from service_apis import util +from service_apis.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 class Ipv6AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local2d_point_uncertainty_ellipse.py index 105c1408..23464399 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local2d_point_uncertainty_ellipse.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.gad_shape import GADShape +from service_apis.models.local_origin import LocalOrigin +from service_apis.models.relative_cartesian_location import RelativeCartesianLocation +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis.models.uncertainty_ellipse import UncertaintyEllipse +from service_apis import util + from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.local_origin import LocalOrigin # noqa: E501 from service_apis.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from service_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local3d_point_uncertainty_ellipsoid.py index 68e56109..4d9cb7bb 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local3d_point_uncertainty_ellipsoid.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.gad_shape import GADShape +from service_apis.models.local_origin import LocalOrigin +from service_apis.models.relative_cartesian_location import RelativeCartesianLocation +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from service_apis import util + from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.local_origin import LocalOrigin # noqa: E501 from service_apis.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from service_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 - class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local_origin.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local_origin.py index 880120dc..bf20a6d3 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local_origin.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local_origin.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.geographic_area import GeographicArea +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis import util + from service_apis.models.geographic_area import GeographicArea # noqa: E501 from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 - class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/net_slice_id.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/net_slice_id.py new file mode 100644 index 00000000..b015bbaf --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/net_slice_id.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from service_apis.models.base_model import Model +from service_apis.models.snssai import Snssai +from service_apis import util + +from service_apis.models.snssai import Snssai # noqa: E501 + +class NetSliceId(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, snssai=None, nsi_id=None, ensi=None): # noqa: E501 + """NetSliceId - a model defined in OpenAPI + + :param snssai: The snssai of this NetSliceId. # noqa: E501 + :type snssai: Snssai + :param nsi_id: The nsi_id of this NetSliceId. # noqa: E501 + :type nsi_id: str + :param ensi: The ensi of this NetSliceId. # noqa: E501 + :type ensi: str + """ + self.openapi_types = { + 'snssai': Snssai, + 'nsi_id': str, + 'ensi': str + } + + self.attribute_map = { + 'snssai': 'snssai', + 'nsi_id': 'nsiId', + 'ensi': 'ensi' + } + + self._snssai = snssai + self._nsi_id = nsi_id + self._ensi = ensi + + @classmethod + def from_dict(cls, dikt) -> 'NetSliceId': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NetSliceId of this NetSliceId. # noqa: E501 + :rtype: NetSliceId + """ + return util.deserialize_model(dikt, cls) + + @property + def snssai(self) -> Snssai: + """Gets the snssai of this NetSliceId. + + + :return: The snssai of this NetSliceId. + :rtype: Snssai + """ + return self._snssai + + @snssai.setter + def snssai(self, snssai: Snssai): + """Sets the snssai of this NetSliceId. + + + :param snssai: The snssai of this NetSliceId. + :type snssai: Snssai + """ + + self._snssai = snssai + + @property + def nsi_id(self) -> str: + """Gets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :return: The nsi_id of this NetSliceId. + :rtype: str + """ + return self._nsi_id + + @nsi_id.setter + def nsi_id(self, nsi_id: str): + """Sets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :param nsi_id: The nsi_id of this NetSliceId. + :type nsi_id: str + """ + + self._nsi_id = nsi_id + + @property + def ensi(self) -> str: + """Gets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :return: The ensi of this NetSliceId. + :rtype: str + """ + return self._ensi + + @ensi.setter + def ensi(self, ensi: str): + """Sets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :param ensi: The ensi of this NetSliceId. + :type ensi: str + """ + + self._ensi = ensi diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/o_auth_grant_type.py index b5020552..fc93ba2e 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/o_auth_grant_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation.py index a43fd60d..6e0b387e 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class Operation(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point.py index 802b8a3d..a258d339 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.gad_shape import GADShape +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis import util + from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py index 32b8233f..3245960e 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.gad_shape import GADShape +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis import util + from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py index 9a70de0b..aadbd510 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.gad_shape import GADShape +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis.models.uncertainty_ellipse import UncertaintyEllipse +from service_apis import util + from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from service_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py index 2870ddf9..271b19bf 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.gad_shape import GADShape +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis import util + from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py index 32f2ab66..7e7499cf 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.gad_shape import GADShape +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis.models.uncertainty_ellipse import UncertaintyEllipse +from service_apis import util + from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from service_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py index b3374e3f..421b7c36 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.gad_shape import GADShape +from service_apis.models.geographical_coordinates import GeographicalCoordinates +from service_apis.models.supported_gad_shapes import SupportedGADShapes +from service_apis import util + from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/problem_details.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/problem_details.py index ac177318..f1e1241d 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/problem_details.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model -from service_apis.models.invalid_param import InvalidParam # noqa: E501 +from service_apis.models.invalid_param import InvalidParam +import re +from service_apis import util +from service_apis.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol.py index d88a4100..6cc058a0 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class Protocol(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/published_api_path.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/published_api_path.py index 5736c473..a8210648 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/published_api_path.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/published_api_path.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class PublishedApiPath(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/relative_cartesian_location.py index f2f1a689..ee5b860a 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/relative_cartesian_location.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/res_oper_info.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/res_oper_info.py new file mode 100644 index 00000000..9b1d5b95 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/res_oper_info.py @@ -0,0 +1,121 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from service_apis.models.base_model import Model +from service_apis.models.operation import Operation +from service_apis import util + +from service_apis.models.operation import Operation # noqa: E501 + +class ResOperInfo(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, resource=None, operations=None, custom_serv_opers=None): # noqa: E501 + """ResOperInfo - a model defined in OpenAPI + + :param resource: The resource of this ResOperInfo. # noqa: E501 + :type resource: str + :param operations: The operations of this ResOperInfo. # noqa: E501 + :type operations: List[Operation] + :param custom_serv_opers: The custom_serv_opers of this ResOperInfo. # noqa: E501 + :type custom_serv_opers: List[str] + """ + self.openapi_types = { + 'resource': str, + 'operations': List[Operation], + 'custom_serv_opers': List[str] + } + + self.attribute_map = { + 'resource': 'resource', + 'operations': 'operations', + 'custom_serv_opers': 'customServOpers' + } + + self._resource = resource + self._operations = operations + self._custom_serv_opers = custom_serv_opers + + @classmethod + def from_dict(cls, dikt) -> 'ResOperInfo': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ResOperInfo of this ResOperInfo. # noqa: E501 + :rtype: ResOperInfo + """ + return util.deserialize_model(dikt, cls) + + @property + def resource(self) -> str: + """Gets the resource of this ResOperInfo. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The resource of this ResOperInfo. + :rtype: str + """ + return self._resource + + @resource.setter + def resource(self, resource: str): + """Sets the resource of this ResOperInfo. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param resource: The resource of this ResOperInfo. + :type resource: str + """ + + self._resource = resource + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this ResOperInfo. + + + :return: The operations of this ResOperInfo. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this ResOperInfo. + + + :param operations: The operations of this ResOperInfo. + :type operations: List[Operation] + """ + if operations is not None and len(operations) < 1: + raise ValueError("Invalid value for `operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._operations = operations + + @property + def custom_serv_opers(self) -> List[str]: + """Gets the custom_serv_opers of this ResOperInfo. + + + :return: The custom_serv_opers of this ResOperInfo. + :rtype: List[str] + """ + return self._custom_serv_opers + + @custom_serv_opers.setter + def custom_serv_opers(self, custom_serv_opers: List[str]): + """Sets the custom_serv_opers of this ResOperInfo. + + + :param custom_serv_opers: The custom_serv_opers of this ResOperInfo. + :type custom_serv_opers: List[str] + """ + if custom_serv_opers is not None and len(custom_serv_opers) < 1: + raise ValueError("Invalid value for `custom_serv_opers`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._custom_serv_opers = custom_serv_opers diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/resource.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/resource.py index 0f340dfe..f530875d 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/resource.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/resource.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.communication_type import CommunicationType +from service_apis.models.custom_operation import CustomOperation +from service_apis.models.operation import Operation +from service_apis import util + from service_apis.models.communication_type import CommunicationType # noqa: E501 from service_apis.models.custom_operation import CustomOperation # noqa: E501 from service_apis.models.operation import Operation # noqa: E501 - class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method.py index 23372e62..3215ddaa 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_api_description.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_api_description.py index b81515a9..b856ab66 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_api_description.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_api_description.py @@ -1,14 +1,22 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis.models.base_model import Model +from service_apis.models.aef_profile import AefProfile +from service_apis.models.api_status import ApiStatus +from service_apis.models.net_slice_id import NetSliceId +from service_apis.models.published_api_path import PublishedApiPath +from service_apis.models.shareable_information import ShareableInformation +import re from service_apis import util + from service_apis.models.aef_profile import AefProfile # noqa: E501 from service_apis.models.api_status import ApiStatus # noqa: E501 -from service_apis.models.base_model import Model +from service_apis.models.net_slice_id import NetSliceId # noqa: E501 from service_apis.models.published_api_path import PublishedApiPath # noqa: E501 from service_apis.models.shareable_information import ShareableInformation # noqa: E501 - +import re # noqa: E501 class ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +24,7 @@ class ServiceAPIDescription(Model): Do not edit the class manually. """ - def __init__(self, api_name=None, api_id=None, api_status=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None, api_prov_name=None): # noqa: E501 + def __init__(self, api_name=None, api_id=None, api_status=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None, api_prov_name=None, net_slice_info=None): # noqa: E501 """ServiceAPIDescription - a model defined in OpenAPI :param api_name: The api_name of this ServiceAPIDescription. # noqa: E501 @@ -43,6 +51,8 @@ class ServiceAPIDescription(Model): :type ccf_id: str :param api_prov_name: The api_prov_name of this ServiceAPIDescription. # noqa: E501 :type api_prov_name: str + :param net_slice_info: The net_slice_info of this ServiceAPIDescription. # noqa: E501 + :type net_slice_info: List[NetSliceId] """ self.openapi_types = { 'api_name': str, @@ -56,7 +66,8 @@ class ServiceAPIDescription(Model): 'api_supp_feats': str, 'pub_api_path': PublishedApiPath, 'ccf_id': str, - 'api_prov_name': str + 'api_prov_name': str, + 'net_slice_info': List[NetSliceId] } self.attribute_map = { @@ -71,7 +82,8 @@ class ServiceAPIDescription(Model): 'api_supp_feats': 'apiSuppFeats', 'pub_api_path': 'pubApiPath', 'ccf_id': 'ccfId', - 'api_prov_name': 'apiProvName' + 'api_prov_name': 'apiProvName', + 'net_slice_info': 'netSliceInfo' } self._api_name = api_name @@ -86,6 +98,7 @@ class ServiceAPIDescription(Model): self._pub_api_path = pub_api_path self._ccf_id = ccf_id self._api_prov_name = api_prov_name + self._net_slice_info = net_slice_info @classmethod def from_dict(cls, dikt) -> 'ServiceAPIDescription': @@ -102,7 +115,7 @@ class ServiceAPIDescription(Model): def api_name(self) -> str: """Gets the api_name of this ServiceAPIDescription. - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :return: The api_name of this ServiceAPIDescription. :rtype: str @@ -113,7 +126,7 @@ class ServiceAPIDescription(Model): def api_name(self, api_name: str): """Sets the api_name of this ServiceAPIDescription. - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :param api_name: The api_name of this ServiceAPIDescription. :type api_name: str @@ -375,3 +388,28 @@ class ServiceAPIDescription(Model): """ self._api_prov_name = api_prov_name + + @property + def net_slice_info(self) -> List[NetSliceId]: + """Gets the net_slice_info of this ServiceAPIDescription. + + Represents the applicable network slice identifiers. # noqa: E501 + + :return: The net_slice_info of this ServiceAPIDescription. + :rtype: List[NetSliceId] + """ + return self._net_slice_info + + @net_slice_info.setter + def net_slice_info(self, net_slice_info: List[NetSliceId]): + """Sets the net_slice_info of this ServiceAPIDescription. + + Represents the applicable network slice identifiers. # noqa: E501 + + :param net_slice_info: The net_slice_info of this ServiceAPIDescription. + :type net_slice_info: List[NetSliceId] + """ + if net_slice_info is not None and len(net_slice_info) < 1: + raise ValueError("Invalid value for `net_slice_info`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._net_slice_info = net_slice_info diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py index 66dd9e35..de72ad5b 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +import re +from service_apis import util +import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/shareable_information.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/shareable_information.py index 0f0c7b02..ffd69928 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/shareable_information.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/shareable_information.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class ShareableInformation(Model): @@ -47,7 +48,7 @@ class ShareableInformation(Model): def is_shareable(self) -> bool: """Gets the is_shareable of this ShareableInformation. - Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. # noqa: E501 :return: The is_shareable of this ShareableInformation. :rtype: bool @@ -58,7 +59,7 @@ class ShareableInformation(Model): def is_shareable(self, is_shareable: bool): """Sets the is_shareable of this ShareableInformation. - Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. # noqa: E501 :param is_shareable: The is_shareable of this ShareableInformation. :type is_shareable: bool diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/snssai.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/snssai.py new file mode 100644 index 00000000..60f2b8f7 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/snssai.py @@ -0,0 +1,101 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from service_apis.models.base_model import Model +import re +from service_apis import util + +import re # noqa: E501 + +class Snssai(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, sst=None, sd=None): # noqa: E501 + """Snssai - a model defined in OpenAPI + + :param sst: The sst of this Snssai. # noqa: E501 + :type sst: int + :param sd: The sd of this Snssai. # noqa: E501 + :type sd: str + """ + self.openapi_types = { + 'sst': int, + 'sd': str + } + + self.attribute_map = { + 'sst': 'sst', + 'sd': 'sd' + } + + self._sst = sst + self._sd = sd + + @classmethod + def from_dict(cls, dikt) -> 'Snssai': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Snssai of this Snssai. # noqa: E501 + :rtype: Snssai + """ + return util.deserialize_model(dikt, cls) + + @property + def sst(self) -> int: + """Gets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :return: The sst of this Snssai. + :rtype: int + """ + return self._sst + + @sst.setter + def sst(self, sst: int): + """Sets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :param sst: The sst of this Snssai. + :type sst: int + """ + if sst is None: + raise ValueError("Invalid value for `sst`, must not be `None`") # noqa: E501 + if sst is not None and sst > 255: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value less than or equal to `255`") # noqa: E501 + if sst is not None and sst < 0: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value greater than or equal to `0`") # noqa: E501 + + self._sst = sst + + @property + def sd(self) -> str: + """Gets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :return: The sd of this Snssai. + :rtype: str + """ + return self._sd + + @sd.setter + def sd(self, sd: str): + """Sets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :param sd: The sd of this Snssai. + :type sd: str + """ + if sd is not None and not re.search(r'^[A-Fa-f0-9]{6}$', sd): # noqa: E501 + raise ValueError(r"Invalid value for `sd`, must be a follow pattern or equal to `/^[A-Fa-f0-9]{6}$/`") # noqa: E501 + + self._sd = sd diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py index d5e17a12..0f035470 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipse.py index 53e6a3ad..03672693 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipse.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py index bac421f2..6e598a1a 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis import util class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/version.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/version.py index 7efbc3f7..e0a21cc0 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/version.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/version.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from service_apis import util +from typing import List, Dict # noqa: F401 + from service_apis.models.base_model import Model +from service_apis.models.custom_operation import CustomOperation +from service_apis.models.resource import Resource +from service_apis import util + from service_apis.models.custom_operation import CustomOperation # noqa: E501 from service_apis.models.resource import Resource # noqa: E501 - class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/openapi/openapi.yaml b/services/TS29222_CAPIF_Discover_Service_API/service_apis/openapi/openapi.yaml index bcdeb091..32ba5640 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/openapi/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.0 info: - description: "API for discovering service APIs. \n© 2024, 3GPP Organizational Partners\ + description: "API for discovering service APIs. \n© 2025, 3GPP Organizational Partners\ \ (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Discover_Service_API - version: 1.3.1 + version: 1.4.0-alpha.4 externalDocs: - description: 3GPP TS 29.222 V18.7.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V19.4.0 Common API Framework for 3GPP Northbound APIs url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: - url: "{apiRoot}/service-apis/v1" @@ -30,7 +30,7 @@ paths: type: string style: form - description: | - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + Contains the API name set to the value of the "" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. explode: true in: query name: api-name @@ -103,15 +103,6 @@ paths: schema: type: string style: form - - description: Features supported by the NF consumer for the CAPIF Discover - Service API. - explode: true - in: query - name: supported-features - required: false - schema: - $ref: '#/components/schemas/SupportedFeatures' - style: form - description: | Features supported by the discovered service API indicated by api-name parameter. This may only be present if api-name query parameter is present. explode: true @@ -121,23 +112,35 @@ paths: schema: $ref: '#/components/schemas/SupportedFeatures' style: form - - description: Represents the UE IP address information. - explode: true + - content: + application/json: + schema: + $ref: '#/components/schemas/IpAddrInfo' + description: Represents the UE IP address information. in: query name: ue-ip-addr required: false - schema: - $ref: '#/components/schemas/IpAddrInfo' - style: form - - description: | + - content: + application/json: + schema: + $ref: '#/components/schemas/ServiceKpis' + description: | Contains iInformation about service characteristics provided by the targeted service API(s). - explode: true in: query name: service-kpis required: false - schema: - $ref: '#/components/schemas/ServiceKpis' - style: form + - content: + application/json: + schema: + items: + $ref: '#/components/schemas/NetSliceId' + minItems: 1 + type: array + description: | + Contains the identifier(s) of the network slice(s) within which the API shall be available. + in: query + name: net-slice-info + required: false - content: application/json: schema: @@ -149,6 +152,39 @@ paths: in: query name: grant-types required: false + - description: | + Contains the identifier(s) of the targeted service APIs. When this query parameter is present, then all the other query parameters shall be absent except the supported-features and api-invoker-id query parameters. + explode: false + in: query + name: api-ids + required: false + schema: + items: + type: string + minItems: 1 + type: array + style: form + - description: | + Contains the list of supported API resource(s) and service operation(s). + explode: false + in: query + name: res-ops + required: false + schema: + items: + $ref: '#/components/schemas/ResOperInfo' + minItems: 1 + type: array + style: form + - description: Features supported by the NF consumer for the CAPIF Discover + Service API. + explode: true + in: query + name: supported-features + required: false + schema: + $ref: '#/components/schemas/SupportedFeatures' + style: form responses: "200": content: @@ -313,20 +349,9 @@ components: - serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -752,27 +777,38 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp - pubApiPath: - ccfIds: - - ccfIds - - ccfIds - - serviceAPICategory: serviceAPICategory - ccfId: ccfId - apiName: apiName shareableInfo: capifProvDoms: - capifProvDoms - capifProvDoms isShareable: true - apiProvName: apiProvName - supportedFeatures: supportedFeatures - description: description + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId apiSuppFeats: apiSuppFeats apiId: apiId apiStatus: aefIds: - aefIds - aefIds + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -1198,6 +1234,28 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds @@ -1237,24 +1295,47 @@ components: string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used. title: Ipv6Addr type: string + title: IpAddrInfo + type: object + ResOperInfo: + description: | + Represents the resourse and/or service operation. + properties: + resource: + description: string providing an URI formatted according to IETF RFC 3986. + title: type + type: string + operations: + items: + $ref: '#/components/schemas/Operation' + minItems: 1 + title: operations + type: array + customServOpers: + items: + type: string + minItems: 1 + title: customServOpers + type: array + title: ResOperInfo type: object CommunicationType: - type: string enum: - REQUEST_RESPONSE - SUBSCRIBE_NOTIFY + type: string description: "Indicates a communication type of the resource or the custom operation.\ \ \nPossible values are:\n- REQUEST_RESPONSE: The communication is of the\ \ type request-response.\n- SUBSCRIBE_NOTIFY: The communication is of the\ \ type subscribe-notify.\n" title: CommunicationType Protocol: - type: string enum: - HTTP_1_1 - HTTP_2 - MQTT - WEBSOCKET + type: string description: "Indicates a protocol and protocol version used by the API. \n\ Possible values are:\n- HTTP_1_1: Indicates that the protocol is HTTP version\ \ 1.1.\n- HTTP_2: Indicates that the protocol is HTTP version 2.\n- MQTT:\ @@ -1262,11 +1343,11 @@ components: \ Indicates that the protocol is Websocket.\n" title: Protocol DataFormat: - type: string enum: - JSON - XML - PROTOBUF3 + type: string description: "Indicates a data format. \nPossible values are:\n- JSON: Indicates\ \ that the data format is JSON.\n- XML: Indicates that the data format is\ \ Extensible Markup Language.\n- PROTOBUF3: Indicates that the data format\ @@ -1397,6 +1478,39 @@ components: type: integer title: ServiceKpis type: object + NetSliceId: + description: | + Represents the network slice identification information. + example: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + nullable: true + oneOf: + - required: ["snssai"] + - required: ["nsiId"] + - required: ["ensi"] + properties: + snssai: + $ref: '#/components/schemas/Snssai' + nsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string + ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string + title: NetSliceId + type: object + Ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string OAuthGrantType: enum: - CLIENT_CREDENTIALS @@ -1484,20 +1598,9 @@ components: serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -1923,6 +2026,28 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds @@ -1930,7 +2055,7 @@ components: properties: apiName: description: | - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + Contains the API name set to the value of the "" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. title: apiName type: string apiId: @@ -1980,6 +2105,13 @@ components: description: Represents the API provider name. title: apiProvName type: string + netSliceInfo: + description: Represents the applicable network slice identifiers. + items: + $ref: '#/components/schemas/NetSliceId' + minItems: 1 + title: netSliceInfo + type: array required: - apiName title: ServiceAPIDescription @@ -1993,8 +2125,9 @@ components: - aefIds properties: aefIds: - description: | - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the "aefProfiles" attribute within the ServiceAPIDescription data structure. + description: "Indicates the list of AEF ID(s) where the API is active. If\ + \ an empty array is provided, it indicates that the API is inactive in\ + \ all AEF(s). \n" items: type: string title: aefIds @@ -2597,7 +2730,7 @@ components: properties: isShareable: description: | - Set to "true" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to "false". + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. title: isShareable type: boolean capifProvDoms: @@ -3180,6 +3313,38 @@ components: minimum: 0 title: DurationSec type: integer + Snssai: + description: | + When Snssai needs to be converted to string (e.g. when used in maps as key), the string shall be composed of one to three digits "sst" optionally followed by "-" and 6 hexadecimal digits "sd". + example: + sd: sd + sst: 237 + properties: + sst: + description: "Unsigned integer, within the range 0 to 255, representing\ + \ the Slice/Service Type. It indicates the expected Network Slice behaviour\ + \ in terms of features and services. Values 0 to 127 correspond to the\ + \ standardized SST range. Values 128 to 255 correspond to the Operator-specific\ + \ range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are\ + \ defined in clause 5.15.2.2 of 3GPP TS 23.501. \n" + maximum: 255 + minimum: 0 + title: sst + type: integer + sd: + description: | + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. + pattern: "^[A-Fa-f0-9]{6}$" + title: sd + type: string + required: + - sst + title: Snssai + type: object + NsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string DateTime: description: string with format "date-time" as defined in OpenAPI. format: date-time diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/__init__.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/__init__.py index 8b9b70a8..b0510f7c 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/__init__.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/__init__.py @@ -2,6 +2,7 @@ import logging import connexion from flask_testing import TestCase + from service_apis.encoder import JSONEncoder diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py index 6e626023..45bac9f4 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py @@ -1,13 +1,17 @@ import unittest +from flask import json + from service_apis.models.aef_location import AefLocation # noqa: E501 from service_apis.models.communication_type import CommunicationType # noqa: E501 from service_apis.models.data_format import DataFormat # noqa: E501 from service_apis.models.discovered_apis import DiscoveredAPIs # noqa: E501 from service_apis.models.ip_addr_info import IpAddrInfo # noqa: E501 +from service_apis.models.net_slice_id import NetSliceId # noqa: E501 from service_apis.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from service_apis.models.problem_details import ProblemDetails # noqa: E501 from service_apis.models.protocol import Protocol # noqa: E501 +from service_apis.models.res_oper_info import ResOperInfo # noqa: E501 from service_apis.models.service_kpis import ServiceKpis # noqa: E501 from service_apis.test import BaseTestCase @@ -30,11 +34,14 @@ class TestDefaultController(BaseTestCase): ('api-cat', 'api_cat_example'), ('preferred-aef-loc', openapi_server.AefLocation()), ('req-api-prov-name', 'req_api_prov_name_example'), - ('supported-features', 'supported_features_example'), ('api-supported-features', 'api_supported_features_example'), ('ue-ip-addr', openapi_server.IpAddrInfo()), ('service-kpis', openapi_server.ServiceKpis()), - ('grant-types', [openapi_server.OAuthGrantType()])] + ('net-slice-info', [openapi_server.NetSliceId()]), + ('grant-types', [openapi_server.OAuthGrantType()]), + ('api-ids', ['api_ids_example']), + ('res-ops', [openapi_server.ResOperInfo()]), + ('supported-features', 'supported_features_example')] headers = { 'Accept': 'application/json', } diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py index 9800793f..dae6c0e3 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py @@ -1,5 +1,6 @@ import datetime +import typing from service_apis import typing_utils diff --git a/services/TS29222_CAPIF_Discover_Service_API/setup.py b/services/TS29222_CAPIF_Discover_Service_API/setup.py index da11c500..28040819 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/setup.py +++ b/services/TS29222_CAPIF_Discover_Service_API/setup.py @@ -1,5 +1,5 @@ - -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "service_apis" VERSION = "1.0.0" @@ -31,7 +31,7 @@ setup( entry_points={ 'console_scripts': ['service_apis=service_apis.__main__:main']}, long_description="""\ - API for discovering service APIs. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for discovering service APIs. © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) -- GitLab From 6bf8d7e1226edd1aa059614a3fee85b7b3bf34a3 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 27 Nov 2025 12:14:47 +0100 Subject: [PATCH 045/101] REL 19 Events_API --- .../controllers/default_controller.py | 2 +- .../.openapi-generator/FILES | 13 +- ...nts_subscriptions_collection_controller.py | 69 ++ ...vents_subscription_document_controller.py} | 50 +- .../controllers/security_controller.py | 2 +- .../capif_events/encoder.py | 3 +- .../capif_events/models/__init__.py | 73 ++ .../models/access_control_policy_list.py | 8 +- .../models/access_control_policy_list_ext.py | 8 +- .../capif_events/models/aef_location.py | 9 +- .../capif_events/models/aef_profile.py | 16 +- .../capif_events/models/api_info.py | 91 ++ .../capif_events/models/api_invoker_count.py | 93 ++ .../capif_events/models/api_invoker_policy.py | 44 +- .../capif_events/models/api_status.py | 9 +- .../capif_events/models/base_model.py | 1 + .../models/buffered_notifications_action.py | 5 +- .../capif_events/models/capif_event.py | 5 +- .../capif_events/models/capif_event_detail.py | 115 ++- .../capif_events/models/capif_event_filter.py | 17 +- .../capif_events/models/civic_address.py | 5 +- .../capif_events/models/communication_type.py | 5 +- .../capif_events/models/custom_operation.py | 9 +- .../capif_events/models/data_format.py | 5 +- .../capif_events/models/discovery_count.py | 121 +++ .../capif_events/models/ellipsoid_arc.py | 10 +- .../capif_events/models/event_notification.py | 13 +- .../capif_events/models/event_subscription.py | 23 +- .../models/event_subscription_patch.py | 18 +- .../capif_events/models/gad_shape.py | 8 +- .../capif_events/models/geographic_area.py | 17 +- .../models/geographical_coordinates.py | 5 +- .../models/interface_description.py | 12 +- .../capif_events/models/invalid_param.py | 5 +- .../capif_events/models/invocation_log.py | 11 +- .../capif_events/models/ip_addr_range.py | 9 +- .../capif_events/models/ipv4_address_range.py | 8 +- .../models/ipv4_address_range1.py | 8 +- .../capif_events/models/ipv6_addr1.py | 5 +- .../capif_events/models/ipv6_address_range.py | 5 +- .../models/ipv6_address_range1.py | 8 +- .../local2d_point_uncertainty_ellipse.py | 12 +- .../local3d_point_uncertainty_ellipsoid.py | 12 +- .../capif_events/models/local_origin.py | 9 +- .../capif_events/models/log.py | 48 +- .../models/muting_exception_instructions.py | 9 +- .../models/muting_notifications_settings.py | 5 +- .../capif_events/models/net_slice_id.py | 119 +++ .../capif_events/models/notification_flag.py | 5 +- .../models/notification_method.py | 5 +- .../capif_events/models/o_auth_grant_type.py | 5 +- .../models/onboarding_criteria.py | 95 ++ .../capif_events/models/operation.py | 5 +- .../models/partitioning_criteria.py | 5 +- .../capif_events/models/point.py | 10 +- .../capif_events/models/point_altitude.py | 10 +- .../models/point_altitude_uncertainty.py | 11 +- .../models/point_uncertainty_circle.py | 10 +- .../models/point_uncertainty_ellipse.py | 11 +- .../capif_events/models/polygon.py | 10 +- .../capif_events/models/problem_details.py | 11 +- .../capif_events/models/protocol.py | 5 +- .../capif_events/models/published_api_path.py | 5 +- .../capif_events/models/related_criteria.py | 121 +++ .../models/relative_cartesian_location.py | 5 +- .../models/reporting_information.py | 12 +- .../capif_events/models/resource.py | 10 +- .../capif_events/models/routing_rule.py | 10 +- .../capif_events/models/security_method.py | 5 +- .../models/service_api_description.py | 56 +- .../capif_events/models/service_kpis.py | 8 +- .../models/shareable_information.py | 9 +- .../capif_events/models/snssai.py | 101 +++ .../models/subscription_action.py | 5 +- .../models/supported_gad_shapes.py | 5 +- .../capif_events/models/time_range_list.py | 5 +- .../capif_events/models/topology_hiding.py | 8 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../capif_events/models/version.py | 9 +- .../models/websock_notif_config.py | 5 +- .../capif_events/openapi/openapi.yaml | 857 +++++++++++++++--- .../capif_events/test/__init__.py | 3 +- ...nts_subscriptions_collection_controller.py | 34 + ...vents_subscription_document_controller.py} | 44 +- .../capif_events/util.py | 3 +- services/TS29222_CAPIF_Events_API/setup.py | 6 +- 87 files changed, 2290 insertions(+), 401 deletions(-) create mode 100644 services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py rename services/TS29222_CAPIF_Events_API/capif_events/controllers/{default_controller.py => individual_capifs_events_subscription_document_controller.py} (69%) create mode 100644 services/TS29222_CAPIF_Events_API/capif_events/models/api_info.py create mode 100644 services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_count.py create mode 100644 services/TS29222_CAPIF_Events_API/capif_events/models/discovery_count.py create mode 100644 services/TS29222_CAPIF_Events_API/capif_events/models/net_slice_id.py create mode 100644 services/TS29222_CAPIF_Events_API/capif_events/models/onboarding_criteria.py create mode 100644 services/TS29222_CAPIF_Events_API/capif_events/models/related_criteria.py create mode 100644 services/TS29222_CAPIF_Events_API/capif_events/models/snssai.py create mode 100644 services/TS29222_CAPIF_Events_API/capif_events/test/test_capifs_events_subscriptions_collection_controller.py rename services/TS29222_CAPIF_Events_API/capif_events/test/{test_default_controller.py => test_individual_capifs_events_subscription_document_controller.py} (59%) diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py index 5ecf85a2..3fa70732 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py @@ -55,7 +55,7 @@ def cert_validation(): return __cert_validation return _cert_validation - +@cert_validation() def all_service_apis_get(api_invoker_id, api_name=None, api_version=None, comm_type=None, protocol=None, aef_id=None, data_format=None, api_cat=None, preferred_aef_loc=None, req_api_prov_name=None, api_supported_features=None, ue_ip_addr=None, service_kpis=None, net_slice_info=None, grant_types=None, api_ids=None, res_ops=None, supported_features=None): # noqa: E501 """all_service_apis_get diff --git a/services/TS29222_CAPIF_Events_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Events_API/.openapi-generator/FILES index 2bcc916b..2b3745e6 100644 --- a/services/TS29222_CAPIF_Events_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Events_API/.openapi-generator/FILES @@ -8,7 +8,8 @@ git_push.sh capif_events/__init__.py capif_events/__main__.py capif_events/controllers/__init__.py -capif_events/controllers/default_controller.py +capif_events/controllers/capifs_events_subscriptions_collection_controller.py +capif_events/controllers/individual_capifs_events_subscription_document_controller.py capif_events/controllers/security_controller.py capif_events/encoder.py capif_events/models/__init__.py @@ -16,6 +17,8 @@ capif_events/models/access_control_policy_list.py capif_events/models/access_control_policy_list_ext.py capif_events/models/aef_location.py capif_events/models/aef_profile.py +capif_events/models/api_info.py +capif_events/models/api_invoker_count.py capif_events/models/api_invoker_policy.py capif_events/models/api_status.py capif_events/models/base_model.py @@ -27,6 +30,7 @@ capif_events/models/civic_address.py capif_events/models/communication_type.py capif_events/models/custom_operation.py capif_events/models/data_format.py +capif_events/models/discovery_count.py capif_events/models/ellipsoid_arc.py capif_events/models/event_notification.py capif_events/models/event_subscription.py @@ -49,9 +53,11 @@ capif_events/models/local_origin.py capif_events/models/log.py capif_events/models/muting_exception_instructions.py capif_events/models/muting_notifications_settings.py +capif_events/models/net_slice_id.py capif_events/models/notification_flag.py capif_events/models/notification_method.py capif_events/models/o_auth_grant_type.py +capif_events/models/onboarding_criteria.py capif_events/models/operation.py capif_events/models/partitioning_criteria.py capif_events/models/point.py @@ -63,6 +69,7 @@ capif_events/models/polygon.py capif_events/models/problem_details.py capif_events/models/protocol.py capif_events/models/published_api_path.py +capif_events/models/related_criteria.py capif_events/models/relative_cartesian_location.py capif_events/models/reporting_information.py capif_events/models/resource.py @@ -71,6 +78,7 @@ capif_events/models/security_method.py capif_events/models/service_api_description.py capif_events/models/service_kpis.py capif_events/models/shareable_information.py +capif_events/models/snssai.py capif_events/models/subscription_action.py capif_events/models/supported_gad_shapes.py capif_events/models/time_range_list.py @@ -81,7 +89,8 @@ capif_events/models/version.py capif_events/models/websock_notif_config.py capif_events/openapi/openapi.yaml capif_events/test/__init__.py -capif_events/test/test_default_controller.py +capif_events/test/test_capifs_events_subscriptions_collection_controller.py +capif_events/test/test_individual_capifs_events_subscription_document_controller.py capif_events/typing_utils.py capif_events/util.py requirements.txt diff --git a/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py new file mode 100644 index 00000000..688b2584 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py @@ -0,0 +1,69 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from capif_events.models.problem_details import ProblemDetails # noqa: E501 +from capif_events import util + +from functools import wraps + +from capif_events.models.event_subscription import EventSubscription # noqa: E501 +from cryptography import x509 +from cryptography.hazmat.backends import default_backend +from flask import current_app, request + +from ..core.events_apis import EventSubscriptionsOperations +from ..core.validate_user import ControlAccess + +events_ops = EventSubscriptionsOperations() +valid_user = ControlAccess() + +def cert_validation(): + def _cert_validation(f): + @wraps(f) + def __cert_validation(*args, **kwargs): + + args = request.view_args + cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_raw = cert_tmp.replace('\t', '') + + cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) + + cn = cert.subject.get_attributes_for_oid(x509.OID_COMMON_NAME)[0].value.strip() + + if cn != "superadmin": + cert_signature = cert.signature.hex() + if request.method != 'POST': + result = valid_user.validate_user_cert(args["subscriptionId"], args["subscriberId"], cert_signature) + else: + result = valid_user.validate_user_cert(None, args["subscriberId"], cert_signature) + + if result is not None: + return result + + result = f(**kwargs) + return result + return __cert_validation + return _cert_validation + +@cert_validation() +def create_event_subsc(subscriber_id, body): # noqa: E501 + """Create a new CAPIFs Event Subscription. + + # noqa: E501 + + :param subscriber_id: Identifier of the Subscriber + :type subscriber_id: str + :param event_subscription: + :type event_subscription: dict | bytes + + :rtype: Union[EventSubscription, Tuple[EventSubscription, int], Tuple[EventSubscription, int, Dict[str, str]] + """ + current_app.logger.info("Creating event subscription") + if request.is_json: + body = EventSubscription.from_dict(request.get_json()) # noqa: E501 + + res = events_ops.create_event(subscriber_id, body) + + return res diff --git a/services/TS29222_CAPIF_Events_API/capif_events/controllers/default_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py similarity index 69% rename from services/TS29222_CAPIF_Events_API/capif_events/controllers/default_controller.py rename to services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py index 5e6cba2d..72a0b42f 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py @@ -1,3 +1,13 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from capif_events.models.event_subscription import EventSubscription # noqa: E501 +from capif_events.models.event_subscription_patch import EventSubscriptionPatch # noqa: E501 +from capif_events.models.problem_details import ProblemDetails # noqa: E501 +from capif_events import util + from functools import wraps from capif_events.models.event_subscription import EventSubscription # noqa: E501 @@ -40,33 +50,11 @@ def cert_validation(): return __cert_validation return _cert_validation - -@cert_validation() -def subscriber_id_subscriptions_post(subscriber_id, body): # noqa: E501 - """subscriber_id_subscriptions_post - - Creates a new individual CAPIF Event Subscription. # noqa: E501 - - :param subscriber_id: Identifier of the Subscriber - :type subscriber_id: str - :param event_subscription: - :type event_subscription: dict | bytes - - :rtype: Union[EventSubscription, Tuple[EventSubscription, int], Tuple[EventSubscription, int, Dict[str, str]] - """ - current_app.logger.info("Creating event subscription") - if request.is_json: - body = EventSubscription.from_dict(request.get_json()) # noqa: E501 - - res = events_ops.create_event(subscriber_id, body) - - return res - @cert_validation() -def subscriber_id_subscriptions_subscription_id_delete(subscriber_id, subscription_id): # noqa: E501 - """subscriber_id_subscriptions_subscription_id_delete +def delete_ind_event_subsc(subscriber_id, subscription_id): # noqa: E501 + """Delete an existing Individual CAPIF Events Subscription resource. - Deletes an individual CAPIF Event Subscription. # noqa: E501 + # noqa: E501 :param subscriber_id: Identifier of the Subscriber :type subscriber_id: str @@ -82,10 +70,10 @@ def subscriber_id_subscriptions_subscription_id_delete(subscriber_id, subscripti return res @cert_validation() -def subscriber_id_subscriptions_subscription_id_patch(subscriber_id, subscription_id, body): # noqa: E501 - """subscriber_id_subscriptions_subscription_id_patch +def modify_ind_event_subsc(subscriber_id, subscription_id, body): # noqa: E501 + """Modify an existing Individual CAPIF Events Subscription resource. - Modification of an existing individual CAPIF Event Subscription. # noqa: E501 + # noqa: E501 :param subscriber_id: Identifier of the Subscriber :type subscriber_id: str @@ -103,10 +91,10 @@ def subscriber_id_subscriptions_subscription_id_patch(subscriber_id, subscriptio return res @cert_validation() -def subscriber_id_subscriptions_subscription_id_put(subscriber_id, subscription_id, body): # noqa: E501 - """subscriber_id_subscriptions_subscription_id_put +def update_ind_event_subsc(subscriber_id, subscription_id, body): # noqa: E501 + """Update an existing Individual CAPIF Events Subscription resource. - Update of an existing individual CAPIF Event Subscription. # noqa: E501 + # noqa: E501 :param subscriber_id: Identifier of the Subscriber :type subscriber_id: str diff --git a/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller.py index 139597f9..6d294ffd 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller.py @@ -1,2 +1,2 @@ - +from typing import List diff --git a/services/TS29222_CAPIF_Events_API/capif_events/encoder.py b/services/TS29222_CAPIF_Events_API/capif_events/encoder.py index 66b0c8c5..b67f09c2 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/encoder.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/encoder.py @@ -1,6 +1,7 @@ -from capif_events.models.base_model import Model from connexion.jsonifier import JSONEncoder +from capif_events.models.base_model import Model + class CustomJSONEncoder(JSONEncoder): include_nulls = False diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py b/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py index d036df69..8430a152 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py @@ -1,2 +1,75 @@ # flake8: noqa # import models into model package +from capif_events.models.access_control_policy_list import AccessControlPolicyList +from capif_events.models.access_control_policy_list_ext import AccessControlPolicyListExt +from capif_events.models.aef_location import AefLocation +from capif_events.models.aef_profile import AefProfile +from capif_events.models.api_info import ApiInfo +from capif_events.models.api_invoker_count import ApiInvokerCount +from capif_events.models.api_invoker_policy import ApiInvokerPolicy +from capif_events.models.api_status import ApiStatus +from capif_events.models.buffered_notifications_action import BufferedNotificationsAction +from capif_events.models.capif_event import CAPIFEvent +from capif_events.models.capif_event_detail import CAPIFEventDetail +from capif_events.models.capif_event_filter import CAPIFEventFilter +from capif_events.models.civic_address import CivicAddress +from capif_events.models.communication_type import CommunicationType +from capif_events.models.custom_operation import CustomOperation +from capif_events.models.data_format import DataFormat +from capif_events.models.discovery_count import DiscoveryCount +from capif_events.models.ellipsoid_arc import EllipsoidArc +from capif_events.models.event_notification import EventNotification +from capif_events.models.event_subscription import EventSubscription +from capif_events.models.event_subscription_patch import EventSubscriptionPatch +from capif_events.models.gad_shape import GADShape +from capif_events.models.geographic_area import GeographicArea +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events.models.interface_description import InterfaceDescription +from capif_events.models.invalid_param import InvalidParam +from capif_events.models.invocation_log import InvocationLog +from capif_events.models.ip_addr_range import IpAddrRange +from capif_events.models.ipv4_address_range import Ipv4AddressRange +from capif_events.models.ipv4_address_range1 import Ipv4AddressRange1 +from capif_events.models.ipv6_addr1 import Ipv6Addr1 +from capif_events.models.ipv6_address_range import Ipv6AddressRange +from capif_events.models.ipv6_address_range1 import Ipv6AddressRange1 +from capif_events.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse +from capif_events.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid +from capif_events.models.local_origin import LocalOrigin +from capif_events.models.log import Log +from capif_events.models.muting_exception_instructions import MutingExceptionInstructions +from capif_events.models.muting_notifications_settings import MutingNotificationsSettings +from capif_events.models.net_slice_id import NetSliceId +from capif_events.models.notification_flag import NotificationFlag +from capif_events.models.notification_method import NotificationMethod +from capif_events.models.o_auth_grant_type import OAuthGrantType +from capif_events.models.onboarding_criteria import OnboardingCriteria +from capif_events.models.operation import Operation +from capif_events.models.partitioning_criteria import PartitioningCriteria +from capif_events.models.point import Point +from capif_events.models.point_altitude import PointAltitude +from capif_events.models.point_altitude_uncertainty import PointAltitudeUncertainty +from capif_events.models.point_uncertainty_circle import PointUncertaintyCircle +from capif_events.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from capif_events.models.polygon import Polygon +from capif_events.models.problem_details import ProblemDetails +from capif_events.models.protocol import Protocol +from capif_events.models.published_api_path import PublishedApiPath +from capif_events.models.related_criteria import RelatedCriteria +from capif_events.models.relative_cartesian_location import RelativeCartesianLocation +from capif_events.models.reporting_information import ReportingInformation +from capif_events.models.resource import Resource +from capif_events.models.routing_rule import RoutingRule +from capif_events.models.security_method import SecurityMethod +from capif_events.models.service_api_description import ServiceAPIDescription +from capif_events.models.service_kpis import ServiceKpis +from capif_events.models.shareable_information import ShareableInformation +from capif_events.models.snssai import Snssai +from capif_events.models.subscription_action import SubscriptionAction +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events.models.time_range_list import TimeRangeList +from capif_events.models.topology_hiding import TopologyHiding +from capif_events.models.uncertainty_ellipse import UncertaintyEllipse +from capif_events.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from capif_events.models.version import Version +from capif_events.models.websock_notif_config import WebsockNotifConfig diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list.py b/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list.py index 42b98fed..a64c3841 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util -from capif_events.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.api_invoker_policy import ApiInvokerPolicy +from capif_events import util +from capif_events.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 class AccessControlPolicyList(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext.py b/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext.py index 5cdc5543..e99c495c 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util -from capif_events.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.api_invoker_policy import ApiInvokerPolicy +from capif_events import util +from capif_events.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 class AccessControlPolicyListExt(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/aef_location.py b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_location.py index 5c51a242..1f85dba5 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/aef_location.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_location.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.civic_address import CivicAddress +from capif_events.models.geographic_area import GeographicArea +from capif_events import util + from capif_events.models.civic_address import CivicAddress # noqa: E501 from capif_events.models.geographic_area import GeographicArea # noqa: E501 - class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/aef_profile.py b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_profile.py index c29502c6..02ae4b48 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/aef_profile.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_profile.py @@ -1,9 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events.models.aef_location import AefLocation +from capif_events.models.data_format import DataFormat +from capif_events.models.interface_description import InterfaceDescription +from capif_events.models.ip_addr_range import IpAddrRange +from capif_events.models.o_auth_grant_type import OAuthGrantType +from capif_events.models.protocol import Protocol +from capif_events.models.security_method import SecurityMethod +from capif_events.models.service_kpis import ServiceKpis +from capif_events.models.version import Version from capif_events import util + from capif_events.models.aef_location import AefLocation # noqa: E501 -from capif_events.models.base_model import Model from capif_events.models.data_format import DataFormat # noqa: E501 from capif_events.models.interface_description import InterfaceDescription # noqa: E501 from capif_events.models.ip_addr_range import IpAddrRange # noqa: E501 @@ -13,7 +24,6 @@ from capif_events.models.security_method import SecurityMethod # noqa: E501 from capif_events.models.service_kpis import ServiceKpis # noqa: E501 from capif_events.models.version import Version # noqa: E501 - class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/api_info.py b/services/TS29222_CAPIF_Events_API/capif_events/models/api_info.py new file mode 100644 index 00000000..6bc07b05 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/api_info.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events import util + + +class ApiInfo(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_name=None, supported_api_versions=None): # noqa: E501 + """ApiInfo - a model defined in OpenAPI + + :param api_name: The api_name of this ApiInfo. # noqa: E501 + :type api_name: str + :param supported_api_versions: The supported_api_versions of this ApiInfo. # noqa: E501 + :type supported_api_versions: List[str] + """ + self.openapi_types = { + 'api_name': str, + 'supported_api_versions': List[str] + } + + self.attribute_map = { + 'api_name': 'apiName', + 'supported_api_versions': 'supportedApiVersions' + } + + self._api_name = api_name + self._supported_api_versions = supported_api_versions + + @classmethod + def from_dict(cls, dikt) -> 'ApiInfo': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ApiInfo of this ApiInfo. # noqa: E501 + :rtype: ApiInfo + """ + return util.deserialize_model(dikt, cls) + + @property + def api_name(self) -> str: + """Gets the api_name of this ApiInfo. + + + :return: The api_name of this ApiInfo. + :rtype: str + """ + return self._api_name + + @api_name.setter + def api_name(self, api_name: str): + """Sets the api_name of this ApiInfo. + + + :param api_name: The api_name of this ApiInfo. + :type api_name: str + """ + if api_name is None: + raise ValueError("Invalid value for `api_name`, must not be `None`") # noqa: E501 + + self._api_name = api_name + + @property + def supported_api_versions(self) -> List[str]: + """Gets the supported_api_versions of this ApiInfo. + + + :return: The supported_api_versions of this ApiInfo. + :rtype: List[str] + """ + return self._supported_api_versions + + @supported_api_versions.setter + def supported_api_versions(self, supported_api_versions: List[str]): + """Sets the supported_api_versions of this ApiInfo. + + + :param supported_api_versions: The supported_api_versions of this ApiInfo. + :type supported_api_versions: List[str] + """ + if supported_api_versions is not None and len(supported_api_versions) < 1: + raise ValueError("Invalid value for `supported_api_versions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._supported_api_versions = supported_api_versions diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_count.py b/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_count.py new file mode 100644 index 00000000..9387b2ca --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_count.py @@ -0,0 +1,93 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events import util + + +class ApiInvokerCount(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_id=None, count=None): # noqa: E501 + """ApiInvokerCount - a model defined in OpenAPI + + :param api_id: The api_id of this ApiInvokerCount. # noqa: E501 + :type api_id: str + :param count: The count of this ApiInvokerCount. # noqa: E501 + :type count: int + """ + self.openapi_types = { + 'api_id': str, + 'count': int + } + + self.attribute_map = { + 'api_id': 'apiId', + 'count': 'count' + } + + self._api_id = api_id + self._count = count + + @classmethod + def from_dict(cls, dikt) -> 'ApiInvokerCount': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ApiInvokerCount of this ApiInvokerCount. # noqa: E501 + :rtype: ApiInvokerCount + """ + return util.deserialize_model(dikt, cls) + + @property + def api_id(self) -> str: + """Gets the api_id of this ApiInvokerCount. + + + :return: The api_id of this ApiInvokerCount. + :rtype: str + """ + return self._api_id + + @api_id.setter + def api_id(self, api_id: str): + """Sets the api_id of this ApiInvokerCount. + + + :param api_id: The api_id of this ApiInvokerCount. + :type api_id: str + """ + if api_id is None: + raise ValueError("Invalid value for `api_id`, must not be `None`") # noqa: E501 + + self._api_id = api_id + + @property + def count(self) -> int: + """Gets the count of this ApiInvokerCount. + + Contains the number of times the API Invokers requested to onboard the service API(s) API. # noqa: E501 + + :return: The count of this ApiInvokerCount. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count: int): + """Sets the count of this ApiInvokerCount. + + Contains the number of times the API Invokers requested to onboard the service API(s) API. # noqa: E501 + + :param count: The count of this ApiInvokerCount. + :type count: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_policy.py b/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_policy.py index a627518b..869d8253 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_policy.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_policy.py @@ -1,10 +1,14 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model -from capif_events.models.time_range_list import TimeRangeList # noqa: E501 +from capif_events.models.net_slice_id import NetSliceId +from capif_events.models.time_range_list import TimeRangeList +from capif_events import util +from capif_events.models.net_slice_id import NetSliceId # noqa: E501 +from capif_events.models.time_range_list import TimeRangeList # noqa: E501 class ApiInvokerPolicy(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,7 +16,7 @@ class ApiInvokerPolicy(Model): Do not edit the class manually. """ - def __init__(self, api_invoker_id=None, allowed_total_invocations=None, allowed_invocations_per_second=None, allowed_invocation_time_range_list=None): # noqa: E501 + def __init__(self, api_invoker_id=None, allowed_total_invocations=None, allowed_invocations_per_second=None, allowed_invocation_time_range_list=None, net_slice_info=None): # noqa: E501 """ApiInvokerPolicy - a model defined in OpenAPI :param api_invoker_id: The api_invoker_id of this ApiInvokerPolicy. # noqa: E501 @@ -23,25 +27,30 @@ class ApiInvokerPolicy(Model): :type allowed_invocations_per_second: int :param allowed_invocation_time_range_list: The allowed_invocation_time_range_list of this ApiInvokerPolicy. # noqa: E501 :type allowed_invocation_time_range_list: List[TimeRangeList] + :param net_slice_info: The net_slice_info of this ApiInvokerPolicy. # noqa: E501 + :type net_slice_info: List[NetSliceId] """ self.openapi_types = { 'api_invoker_id': str, 'allowed_total_invocations': int, 'allowed_invocations_per_second': int, - 'allowed_invocation_time_range_list': List[TimeRangeList] + 'allowed_invocation_time_range_list': List[TimeRangeList], + 'net_slice_info': List[NetSliceId] } self.attribute_map = { 'api_invoker_id': 'apiInvokerId', 'allowed_total_invocations': 'allowedTotalInvocations', 'allowed_invocations_per_second': 'allowedInvocationsPerSecond', - 'allowed_invocation_time_range_list': 'allowedInvocationTimeRangeList' + 'allowed_invocation_time_range_list': 'allowedInvocationTimeRangeList', + 'net_slice_info': 'netSliceInfo' } self._api_invoker_id = api_invoker_id self._allowed_total_invocations = allowed_total_invocations self._allowed_invocations_per_second = allowed_invocations_per_second self._allowed_invocation_time_range_list = allowed_invocation_time_range_list + self._net_slice_info = net_slice_info @classmethod def from_dict(cls, dikt) -> 'ApiInvokerPolicy': @@ -149,3 +158,26 @@ class ApiInvokerPolicy(Model): raise ValueError("Invalid value for `allowed_invocation_time_range_list`, number of items must be greater than or equal to `0`") # noqa: E501 self._allowed_invocation_time_range_list = allowed_invocation_time_range_list + + @property + def net_slice_info(self) -> List[NetSliceId]: + """Gets the net_slice_info of this ApiInvokerPolicy. + + + :return: The net_slice_info of this ApiInvokerPolicy. + :rtype: List[NetSliceId] + """ + return self._net_slice_info + + @net_slice_info.setter + def net_slice_info(self, net_slice_info: List[NetSliceId]): + """Sets the net_slice_info of this ApiInvokerPolicy. + + + :param net_slice_info: The net_slice_info of this ApiInvokerPolicy. + :type net_slice_info: List[NetSliceId] + """ + if net_slice_info is not None and len(net_slice_info) < 1: + raise ValueError("Invalid value for `net_slice_info`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._net_slice_info = net_slice_info diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/api_status.py b/services/TS29222_CAPIF_Events_API/capif_events/models/api_status.py index 25b8d95c..ca3916f9 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/api_status.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/api_status.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class ApiStatus(Model): @@ -42,7 +43,7 @@ class ApiStatus(Model): def aef_ids(self) -> List[str]: """Gets the aef_ids of this ApiStatus. - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # noqa: E501 + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 :return: The aef_ids of this ApiStatus. :rtype: List[str] @@ -53,7 +54,7 @@ class ApiStatus(Model): def aef_ids(self, aef_ids: List[str]): """Sets the aef_ids of this ApiStatus. - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # noqa: E501 + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 :param aef_ids: The aef_ids of this ApiStatus. :type aef_ids: List[str] diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py b/services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py index 336bc44c..41797264 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from capif_events import util diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py b/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py index b53e72cf..eca65477 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class BufferedNotificationsAction(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event.py b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event.py index 2d55c4ef..fa3a9828 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class CAPIFEvent(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_detail.py b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_detail.py index 6dcc6c7f..a0b033a5 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_detail.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_detail.py @@ -1,21 +1,32 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events.models.access_control_policy_list_ext import AccessControlPolicyListExt +from capif_events.models.api_invoker_count import ApiInvokerCount +from capif_events.models.discovery_count import DiscoveryCount +from capif_events.models.invocation_log import InvocationLog +from capif_events.models.onboarding_criteria import OnboardingCriteria +from capif_events.models.service_api_description import ServiceAPIDescription +from capif_events.models.topology_hiding import TopologyHiding from capif_events import util + from capif_events.models.access_control_policy_list_ext import AccessControlPolicyListExt # noqa: E501 -from capif_events.models.base_model import Model +from capif_events.models.api_invoker_count import ApiInvokerCount # noqa: E501 +from capif_events.models.discovery_count import DiscoveryCount # noqa: E501 from capif_events.models.invocation_log import InvocationLog # noqa: E501 +from capif_events.models.onboarding_criteria import OnboardingCriteria # noqa: E501 from capif_events.models.service_api_description import ServiceAPIDescription # noqa: E501 from capif_events.models.topology_hiding import TopologyHiding # noqa: E501 - class CAPIFEventDetail(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - def __init__(self, service_api_descriptions=None, api_ids=None, api_invoker_ids=None, acc_ctrl_pol_list=None, invocation_logs=None, api_topo_hide=None): # noqa: E501 + def __init__(self, service_api_descriptions=None, api_ids=None, api_invoker_ids=None, acc_ctrl_pol_list=None, invocation_logs=None, api_topo_hide=None, onboarding_criteria=None, onboarded_count=None, discovery_count=None): # noqa: E501 """CAPIFEventDetail - a model defined in OpenAPI :param service_api_descriptions: The service_api_descriptions of this CAPIFEventDetail. # noqa: E501 @@ -30,6 +41,12 @@ class CAPIFEventDetail(Model): :type invocation_logs: List[InvocationLog] :param api_topo_hide: The api_topo_hide of this CAPIFEventDetail. # noqa: E501 :type api_topo_hide: TopologyHiding + :param onboarding_criteria: The onboarding_criteria of this CAPIFEventDetail. # noqa: E501 + :type onboarding_criteria: List[OnboardingCriteria] + :param onboarded_count: The onboarded_count of this CAPIFEventDetail. # noqa: E501 + :type onboarded_count: List[ApiInvokerCount] + :param discovery_count: The discovery_count of this CAPIFEventDetail. # noqa: E501 + :type discovery_count: List[DiscoveryCount] """ self.openapi_types = { 'service_api_descriptions': List[ServiceAPIDescription], @@ -37,7 +54,10 @@ class CAPIFEventDetail(Model): 'api_invoker_ids': List[str], 'acc_ctrl_pol_list': AccessControlPolicyListExt, 'invocation_logs': List[InvocationLog], - 'api_topo_hide': TopologyHiding + 'api_topo_hide': TopologyHiding, + 'onboarding_criteria': List[OnboardingCriteria], + 'onboarded_count': List[ApiInvokerCount], + 'discovery_count': List[DiscoveryCount] } self.attribute_map = { @@ -46,7 +66,10 @@ class CAPIFEventDetail(Model): 'api_invoker_ids': 'apiInvokerIds', 'acc_ctrl_pol_list': 'accCtrlPolList', 'invocation_logs': 'invocationLogs', - 'api_topo_hide': 'apiTopoHide' + 'api_topo_hide': 'apiTopoHide', + 'onboarding_criteria': 'onboardingCriteria', + 'onboarded_count': 'onboardedCount', + 'discovery_count': 'discoveryCount' } self._service_api_descriptions = service_api_descriptions @@ -55,6 +78,9 @@ class CAPIFEventDetail(Model): self._acc_ctrl_pol_list = acc_ctrl_pol_list self._invocation_logs = invocation_logs self._api_topo_hide = api_topo_hide + self._onboarding_criteria = onboarding_criteria + self._onboarded_count = onboarded_count + self._discovery_count = discovery_count @classmethod def from_dict(cls, dikt) -> 'CAPIFEventDetail': @@ -96,7 +122,7 @@ class CAPIFEventDetail(Model): def api_ids(self) -> List[str]: """Gets the api_ids of this CAPIFEventDetail. - Identifier of the service API # noqa: E501 + Identifier of the service API. # noqa: E501 :return: The api_ids of this CAPIFEventDetail. :rtype: List[str] @@ -107,7 +133,7 @@ class CAPIFEventDetail(Model): def api_ids(self, api_ids: List[str]): """Sets the api_ids of this CAPIFEventDetail. - Identifier of the service API # noqa: E501 + Identifier of the service API. # noqa: E501 :param api_ids: The api_ids of this CAPIFEventDetail. :type api_ids: List[str] @@ -121,7 +147,7 @@ class CAPIFEventDetail(Model): def api_invoker_ids(self) -> List[str]: """Gets the api_invoker_ids of this CAPIFEventDetail. - Identity of the API invoker # noqa: E501 + Identity of the API invoker. # noqa: E501 :return: The api_invoker_ids of this CAPIFEventDetail. :rtype: List[str] @@ -132,7 +158,7 @@ class CAPIFEventDetail(Model): def api_invoker_ids(self, api_invoker_ids: List[str]): """Sets the api_invoker_ids of this CAPIFEventDetail. - Identity of the API invoker # noqa: E501 + Identity of the API invoker. # noqa: E501 :param api_invoker_ids: The api_invoker_ids of this CAPIFEventDetail. :type api_invoker_ids: List[str] @@ -208,3 +234,72 @@ class CAPIFEventDetail(Model): """ self._api_topo_hide = api_topo_hide + + @property + def onboarding_criteria(self) -> List[OnboardingCriteria]: + """Gets the onboarding_criteria of this CAPIFEventDetail. + + + :return: The onboarding_criteria of this CAPIFEventDetail. + :rtype: List[OnboardingCriteria] + """ + return self._onboarding_criteria + + @onboarding_criteria.setter + def onboarding_criteria(self, onboarding_criteria: List[OnboardingCriteria]): + """Sets the onboarding_criteria of this CAPIFEventDetail. + + + :param onboarding_criteria: The onboarding_criteria of this CAPIFEventDetail. + :type onboarding_criteria: List[OnboardingCriteria] + """ + if onboarding_criteria is not None and len(onboarding_criteria) < 1: + raise ValueError("Invalid value for `onboarding_criteria`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._onboarding_criteria = onboarding_criteria + + @property + def onboarded_count(self) -> List[ApiInvokerCount]: + """Gets the onboarded_count of this CAPIFEventDetail. + + + :return: The onboarded_count of this CAPIFEventDetail. + :rtype: List[ApiInvokerCount] + """ + return self._onboarded_count + + @onboarded_count.setter + def onboarded_count(self, onboarded_count: List[ApiInvokerCount]): + """Sets the onboarded_count of this CAPIFEventDetail. + + + :param onboarded_count: The onboarded_count of this CAPIFEventDetail. + :type onboarded_count: List[ApiInvokerCount] + """ + if onboarded_count is not None and len(onboarded_count) < 1: + raise ValueError("Invalid value for `onboarded_count`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._onboarded_count = onboarded_count + + @property + def discovery_count(self) -> List[DiscoveryCount]: + """Gets the discovery_count of this CAPIFEventDetail. + + + :return: The discovery_count of this CAPIFEventDetail. + :rtype: List[DiscoveryCount] + """ + return self._discovery_count + + @discovery_count.setter + def discovery_count(self, discovery_count: List[DiscoveryCount]): + """Sets the discovery_count of this CAPIFEventDetail. + + + :param discovery_count: The discovery_count of this CAPIFEventDetail. + :type discovery_count: List[DiscoveryCount] + """ + if discovery_count is not None and len(discovery_count) < 1: + raise ValueError("Invalid value for `discovery_count`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._discovery_count = discovery_count diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_filter.py b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_filter.py index dd7c2d7c..c976f754 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_filter.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_filter.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class CAPIFEventFilter(Model): @@ -52,7 +53,7 @@ class CAPIFEventFilter(Model): def api_ids(self) -> List[str]: """Gets the api_ids of this CAPIFEventFilter. - Identifier of the service API # noqa: E501 + Identifier of the service API. # noqa: E501 :return: The api_ids of this CAPIFEventFilter. :rtype: List[str] @@ -63,7 +64,7 @@ class CAPIFEventFilter(Model): def api_ids(self, api_ids: List[str]): """Sets the api_ids of this CAPIFEventFilter. - Identifier of the service API # noqa: E501 + Identifier of the service API. # noqa: E501 :param api_ids: The api_ids of this CAPIFEventFilter. :type api_ids: List[str] @@ -77,7 +78,7 @@ class CAPIFEventFilter(Model): def api_invoker_ids(self) -> List[str]: """Gets the api_invoker_ids of this CAPIFEventFilter. - Identity of the API invoker # noqa: E501 + Identity of the API invoker. # noqa: E501 :return: The api_invoker_ids of this CAPIFEventFilter. :rtype: List[str] @@ -88,7 +89,7 @@ class CAPIFEventFilter(Model): def api_invoker_ids(self, api_invoker_ids: List[str]): """Sets the api_invoker_ids of this CAPIFEventFilter. - Identity of the API invoker # noqa: E501 + Identity of the API invoker. # noqa: E501 :param api_invoker_ids: The api_invoker_ids of this CAPIFEventFilter. :type api_invoker_ids: List[str] @@ -102,7 +103,7 @@ class CAPIFEventFilter(Model): def aef_ids(self) -> List[str]: """Gets the aef_ids of this CAPIFEventFilter. - Identifier of the API exposing function # noqa: E501 + Identifier of the API exposing function. # noqa: E501 :return: The aef_ids of this CAPIFEventFilter. :rtype: List[str] @@ -113,7 +114,7 @@ class CAPIFEventFilter(Model): def aef_ids(self, aef_ids: List[str]): """Sets the aef_ids of this CAPIFEventFilter. - Identifier of the API exposing function # noqa: E501 + Identifier of the API exposing function. # noqa: E501 :param aef_ids: The aef_ids of this CAPIFEventFilter. :type aef_ids: List[str] diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/civic_address.py b/services/TS29222_CAPIF_Events_API/capif_events/models/civic_address.py index 379ebe0a..5819d5f2 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/civic_address.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/civic_address.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type.py b/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type.py index 3beb1ab1..e5203eb6 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/custom_operation.py b/services/TS29222_CAPIF_Events_API/capif_events/models/custom_operation.py index 4b20ff1e..5676f216 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/custom_operation.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/custom_operation.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.communication_type import CommunicationType +from capif_events.models.operation import Operation +from capif_events import util + from capif_events.models.communication_type import CommunicationType # noqa: E501 from capif_events.models.operation import Operation # noqa: E501 - class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/data_format.py b/services/TS29222_CAPIF_Events_API/capif_events/models/data_format.py index c668244c..adec690a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/data_format.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/data_format.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class DataFormat(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/discovery_count.py b/services/TS29222_CAPIF_Events_API/capif_events/models/discovery_count.py new file mode 100644 index 00000000..0cdb4a03 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/discovery_count.py @@ -0,0 +1,121 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events import util + + +class DiscoveryCount(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_ids=None, discovery_req_count=None, discovery_rsp_count=None): # noqa: E501 + """DiscoveryCount - a model defined in OpenAPI + + :param api_ids: The api_ids of this DiscoveryCount. # noqa: E501 + :type api_ids: List[str] + :param discovery_req_count: The discovery_req_count of this DiscoveryCount. # noqa: E501 + :type discovery_req_count: List[int] + :param discovery_rsp_count: The discovery_rsp_count of this DiscoveryCount. # noqa: E501 + :type discovery_rsp_count: List[int] + """ + self.openapi_types = { + 'api_ids': List[str], + 'discovery_req_count': List[int], + 'discovery_rsp_count': List[int] + } + + self.attribute_map = { + 'api_ids': 'apiIds', + 'discovery_req_count': 'discoveryReqCount', + 'discovery_rsp_count': 'discoveryRspCount' + } + + self._api_ids = api_ids + self._discovery_req_count = discovery_req_count + self._discovery_rsp_count = discovery_rsp_count + + @classmethod + def from_dict(cls, dikt) -> 'DiscoveryCount': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DiscoveryCount of this DiscoveryCount. # noqa: E501 + :rtype: DiscoveryCount + """ + return util.deserialize_model(dikt, cls) + + @property + def api_ids(self) -> List[str]: + """Gets the api_ids of this DiscoveryCount. + + + :return: The api_ids of this DiscoveryCount. + :rtype: List[str] + """ + return self._api_ids + + @api_ids.setter + def api_ids(self, api_ids: List[str]): + """Sets the api_ids of this DiscoveryCount. + + + :param api_ids: The api_ids of this DiscoveryCount. + :type api_ids: List[str] + """ + if api_ids is None: + raise ValueError("Invalid value for `api_ids`, must not be `None`") # noqa: E501 + if api_ids is not None and len(api_ids) < 1: + raise ValueError("Invalid value for `api_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._api_ids = api_ids + + @property + def discovery_req_count(self) -> List[int]: + """Gets the discovery_req_count of this DiscoveryCount. + + + :return: The discovery_req_count of this DiscoveryCount. + :rtype: List[int] + """ + return self._discovery_req_count + + @discovery_req_count.setter + def discovery_req_count(self, discovery_req_count: List[int]): + """Sets the discovery_req_count of this DiscoveryCount. + + + :param discovery_req_count: The discovery_req_count of this DiscoveryCount. + :type discovery_req_count: List[int] + """ + if discovery_req_count is not None and len(discovery_req_count) < 1: + raise ValueError("Invalid value for `discovery_req_count`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._discovery_req_count = discovery_req_count + + @property + def discovery_rsp_count(self) -> List[int]: + """Gets the discovery_rsp_count of this DiscoveryCount. + + + :return: The discovery_rsp_count of this DiscoveryCount. + :rtype: List[int] + """ + return self._discovery_rsp_count + + @discovery_rsp_count.setter + def discovery_rsp_count(self, discovery_rsp_count: List[int]): + """Sets the discovery_rsp_count of this DiscoveryCount. + + + :param discovery_rsp_count: The discovery_rsp_count of this DiscoveryCount. + :type discovery_rsp_count: List[int] + """ + if discovery_rsp_count is not None and len(discovery_rsp_count) < 1: + raise ValueError("Invalid value for `discovery_rsp_count`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._discovery_rsp_count = discovery_rsp_count diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py index 928435e9..b5be85b2 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.gad_shape import GADShape +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events import util + from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/event_notification.py b/services/TS29222_CAPIF_Events_API/capif_events/models/event_notification.py index a77a357e..1e09adbd 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/event_notification.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/event_notification.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.capif_event import CAPIFEvent +from capif_events.models.capif_event_detail import CAPIFEventDetail +from capif_events import util + from capif_events.models.capif_event import CAPIFEvent # noqa: E501 from capif_events.models.capif_event_detail import CAPIFEventDetail # noqa: E501 - class EventNotification(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,7 +57,7 @@ class EventNotification(Model): def subscription_id(self) -> str: """Gets the subscription_id of this EventNotification. - Identifier of the subscription resource to which the notification is related – CAPIF resource identifier # noqa: E501 + Identifier of the subscription resource to which the notification is related. # noqa: E501 :return: The subscription_id of this EventNotification. :rtype: str @@ -65,7 +68,7 @@ class EventNotification(Model): def subscription_id(self, subscription_id: str): """Sets the subscription_id of this EventNotification. - Identifier of the subscription resource to which the notification is related – CAPIF resource identifier # noqa: E501 + Identifier of the subscription resource to which the notification is related. # noqa: E501 :param subscription_id: The subscription_id of this EventNotification. :type subscription_id: str diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription.py b/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription.py index 0470f4e6..77f2940d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription.py @@ -1,14 +1,20 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.capif_event import CAPIFEvent +from capif_events.models.capif_event_filter import CAPIFEventFilter +from capif_events.models.reporting_information import ReportingInformation +from capif_events.models.websock_notif_config import WebsockNotifConfig +import re +from capif_events import util + from capif_events.models.capif_event import CAPIFEvent # noqa: E501 from capif_events.models.capif_event_filter import CAPIFEventFilter # noqa: E501 from capif_events.models.reporting_information import ReportingInformation # noqa: E501 from capif_events.models.websock_notif_config import WebsockNotifConfig # noqa: E501 - +import re # noqa: E501 class EventSubscription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -62,7 +68,6 @@ class EventSubscription(Model): self._websock_notif_config = websock_notif_config self._supported_features = supported_features - @classmethod def from_dict(cls, dikt) -> 'EventSubscription': """Returns the dict as a model @@ -78,7 +83,7 @@ class EventSubscription(Model): def events(self) -> List[CAPIFEvent]: """Gets the events of this EventSubscription. - Subscribed events # noqa: E501 + Subscribed events. # noqa: E501 :return: The events of this EventSubscription. :rtype: List[CAPIFEvent] @@ -89,7 +94,7 @@ class EventSubscription(Model): def events(self, events: List[CAPIFEvent]): """Sets the events of this EventSubscription. - Subscribed events # noqa: E501 + Subscribed events. # noqa: E501 :param events: The events of this EventSubscription. :type events: List[CAPIFEvent] @@ -105,7 +110,7 @@ class EventSubscription(Model): def event_filters(self) -> List[CAPIFEventFilter]: """Gets the event_filters of this EventSubscription. - Subscribed event filters # noqa: E501 + Subscribed event filters. # noqa: E501 :return: The event_filters of this EventSubscription. :rtype: List[CAPIFEventFilter] @@ -116,7 +121,7 @@ class EventSubscription(Model): def event_filters(self, event_filters: List[CAPIFEventFilter]): """Sets the event_filters of this EventSubscription. - Subscribed event filters # noqa: E501 + Subscribed event filters. # noqa: E501 :param event_filters: The event_filters of this EventSubscription. :type event_filters: List[CAPIFEventFilter] diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription_patch.py b/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription_patch.py index 437e372d..cac569a7 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription_patch.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription_patch.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.capif_event import CAPIFEvent +from capif_events.models.capif_event_filter import CAPIFEventFilter +from capif_events.models.reporting_information import ReportingInformation +from capif_events import util + from capif_events.models.capif_event import CAPIFEvent # noqa: E501 from capif_events.models.capif_event_filter import CAPIFEventFilter # noqa: E501 from capif_events.models.reporting_information import ReportingInformation # noqa: E501 - class EventSubscriptionPatch(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -60,7 +64,7 @@ class EventSubscriptionPatch(Model): def events(self) -> List[CAPIFEvent]: """Gets the events of this EventSubscriptionPatch. - Subscribed events # noqa: E501 + Subscribed events. # noqa: E501 :return: The events of this EventSubscriptionPatch. :rtype: List[CAPIFEvent] @@ -71,7 +75,7 @@ class EventSubscriptionPatch(Model): def events(self, events: List[CAPIFEvent]): """Sets the events of this EventSubscriptionPatch. - Subscribed events # noqa: E501 + Subscribed events. # noqa: E501 :param events: The events of this EventSubscriptionPatch. :type events: List[CAPIFEvent] @@ -85,7 +89,7 @@ class EventSubscriptionPatch(Model): def event_filters(self) -> List[CAPIFEventFilter]: """Gets the event_filters of this EventSubscriptionPatch. - Subscribed event filters # noqa: E501 + Subscribed event filters. # noqa: E501 :return: The event_filters of this EventSubscriptionPatch. :rtype: List[CAPIFEventFilter] @@ -96,7 +100,7 @@ class EventSubscriptionPatch(Model): def event_filters(self, event_filters: List[CAPIFEventFilter]): """Sets the event_filters of this EventSubscriptionPatch. - Subscribed event filters # noqa: E501 + Subscribed event filters. # noqa: E501 :param event_filters: The event_filters of this EventSubscriptionPatch. :type event_filters: List[CAPIFEventFilter] diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/gad_shape.py b/services/TS29222_CAPIF_Events_API/capif_events/models/gad_shape.py index 4ff103eb..f669a853 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/gad_shape.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/gad_shape.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events import util +from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py b/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py index f09f9422..45c7018d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py @@ -1,8 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.ellipsoid_arc import EllipsoidArc +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events.models.point import Point +from capif_events.models.point_altitude import PointAltitude +from capif_events.models.point_altitude_uncertainty import PointAltitudeUncertainty +from capif_events.models.point_uncertainty_circle import PointUncertaintyCircle +from capif_events.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from capif_events.models.polygon import Polygon +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events.models.uncertainty_ellipse import UncertaintyEllipse +from capif_events import util + from capif_events.models.ellipsoid_arc import EllipsoidArc # noqa: E501 from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_events.models.point import Point # noqa: E501 @@ -14,7 +26,6 @@ from capif_events.models.polygon import Polygon # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_events.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py b/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py index c0cc15c6..38210506 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/interface_description.py b/services/TS29222_CAPIF_Events_API/capif_events/models/interface_description.py index 69bf2441..e31b30d2 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/interface_description.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/interface_description.py @@ -1,12 +1,16 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.o_auth_grant_type import OAuthGrantType +from capif_events.models.security_method import SecurityMethod +import re +from capif_events import util + from capif_events.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from capif_events.models.security_method import SecurityMethod # noqa: E501 - +import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/invalid_param.py b/services/TS29222_CAPIF_Events_API/capif_events/models/invalid_param.py index ce023bf2..9f3557f5 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/invalid_param.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/invocation_log.py b/services/TS29222_CAPIF_Events_API/capif_events/models/invocation_log.py index 450c08bb..b67a3978 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/invocation_log.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/invocation_log.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model -from capif_events.models.log import Log # noqa: E501 +from capif_events.models.log import Log +import re +from capif_events import util +from capif_events.models.log import Log # noqa: E501 +import re # noqa: E501 class InvocationLog(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ip_addr_range.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ip_addr_range.py index 0c43c0a4..f633723b 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ip_addr_range.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.ipv4_address_range import Ipv4AddressRange +from capif_events.models.ipv6_address_range1 import Ipv6AddressRange1 +from capif_events import util + from capif_events.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 from capif_events.models.ipv6_address_range1 import Ipv6AddressRange1 # noqa: E501 - class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range.py index 2f1dc1f9..10e51773 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +import re +from capif_events import util +import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range1.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range1.py index 8c0d6664..c0291053 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range1.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range1.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +import re +from capif_events import util +import re # noqa: E501 class Ipv4AddressRange1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py index 0dd4716a..d07d4876 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range.py index b7a59aff..17f20cdd 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class Ipv6AddressRange(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range1.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range1.py index 1f992719..4d678058 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range1.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range1.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model -from capif_events.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 +from capif_events.models.ipv6_addr1 import Ipv6Addr1 +from capif_events import util +from capif_events.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 class Ipv6AddressRange1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Events_API/capif_events/models/local2d_point_uncertainty_ellipse.py index 3432c476..694b07d0 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/local2d_point_uncertainty_ellipse.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.gad_shape import GADShape +from capif_events.models.local_origin import LocalOrigin +from capif_events.models.relative_cartesian_location import RelativeCartesianLocation +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events.models.uncertainty_ellipse import UncertaintyEllipse +from capif_events import util + from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.local_origin import LocalOrigin # noqa: E501 from capif_events.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_events.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py index 702a38e1..7f164c4d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.gad_shape import GADShape +from capif_events.models.local_origin import LocalOrigin +from capif_events.models.relative_cartesian_location import RelativeCartesianLocation +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from capif_events import util + from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.local_origin import LocalOrigin # noqa: E501 from capif_events.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_events.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 - class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/local_origin.py b/services/TS29222_CAPIF_Events_API/capif_events/models/local_origin.py index f11e9ffe..f5b69773 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/local_origin.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/local_origin.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.geographic_area import GeographicArea +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events import util + from capif_events.models.geographic_area import GeographicArea # noqa: E501 from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 - class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/log.py b/services/TS29222_CAPIF_Events_API/capif_events/models/log.py index 647a3c08..5328da3b 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/log.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/log.py @@ -1,20 +1,26 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.interface_description import InterfaceDescription +from capif_events.models.net_slice_id import NetSliceId +from capif_events.models.operation import Operation +from capif_events.models.protocol import Protocol +from capif_events import util + from capif_events.models.interface_description import InterfaceDescription # noqa: E501 +from capif_events.models.net_slice_id import NetSliceId # noqa: E501 from capif_events.models.operation import Operation # noqa: E501 from capif_events.models.protocol import Protocol # noqa: E501 - class Log(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - def __init__(self, api_id=None, api_name=None, api_version=None, resource_name=None, uri=None, protocol=None, operation=None, result=None, invocation_time=None, invocation_latency=None, input_parameters=None, output_parameters=None, src_interface=None, dest_interface=None, fwd_interface=None): # noqa: E501 + def __init__(self, api_id=None, api_name=None, api_version=None, resource_name=None, uri=None, protocol=None, operation=None, result=None, invocation_time=None, invocation_latency=None, input_parameters=None, output_parameters=None, src_interface=None, dest_interface=None, fwd_interface=None, net_slice_info=None): # noqa: E501 """Log - a model defined in OpenAPI :param api_id: The api_id of this Log. # noqa: E501 @@ -47,6 +53,8 @@ class Log(Model): :type dest_interface: InterfaceDescription :param fwd_interface: The fwd_interface of this Log. # noqa: E501 :type fwd_interface: str + :param net_slice_info: The net_slice_info of this Log. # noqa: E501 + :type net_slice_info: NetSliceId """ self.openapi_types = { 'api_id': str, @@ -63,7 +71,8 @@ class Log(Model): 'output_parameters': object, 'src_interface': InterfaceDescription, 'dest_interface': InterfaceDescription, - 'fwd_interface': str + 'fwd_interface': str, + 'net_slice_info': NetSliceId } self.attribute_map = { @@ -81,7 +90,8 @@ class Log(Model): 'output_parameters': 'outputParameters', 'src_interface': 'srcInterface', 'dest_interface': 'destInterface', - 'fwd_interface': 'fwdInterface' + 'fwd_interface': 'fwdInterface', + 'net_slice_info': 'netSliceInfo' } self._api_id = api_id @@ -99,6 +109,7 @@ class Log(Model): self._src_interface = src_interface self._dest_interface = dest_interface self._fwd_interface = fwd_interface + self._net_slice_info = net_slice_info @classmethod def from_dict(cls, dikt) -> 'Log': @@ -140,7 +151,7 @@ class Log(Model): def api_name(self) -> str: """Gets the api_name of this Log. - Name of the API which was invoked, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the invoked API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :return: The api_name of this Log. :rtype: str @@ -151,7 +162,7 @@ class Log(Model): def api_name(self, api_name: str): """Sets the api_name of this Log. - Name of the API which was invoked, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the invoked API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :param api_name: The api_name of this Log. :type api_name: str @@ -461,3 +472,24 @@ class Log(Model): """ self._fwd_interface = fwd_interface + + @property + def net_slice_info(self) -> NetSliceId: + """Gets the net_slice_info of this Log. + + + :return: The net_slice_info of this Log. + :rtype: NetSliceId + """ + return self._net_slice_info + + @net_slice_info.setter + def net_slice_info(self, net_slice_info: NetSliceId): + """Sets the net_slice_info of this Log. + + + :param net_slice_info: The net_slice_info of this Log. + :type net_slice_info: NetSliceId + """ + + self._net_slice_info = net_slice_info diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/muting_exception_instructions.py b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_exception_instructions.py index a928f40f..00839244 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/muting_exception_instructions.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_exception_instructions.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.buffered_notifications_action import BufferedNotificationsAction +from capif_events.models.subscription_action import SubscriptionAction +from capif_events import util + from capif_events.models.buffered_notifications_action import BufferedNotificationsAction # noqa: E501 from capif_events.models.subscription_action import SubscriptionAction # noqa: E501 - class MutingExceptionInstructions(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/muting_notifications_settings.py b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_notifications_settings.py index a1de5ef7..ac4ea3d6 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/muting_notifications_settings.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_notifications_settings.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class MutingNotificationsSettings(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/net_slice_id.py b/services/TS29222_CAPIF_Events_API/capif_events/models/net_slice_id.py new file mode 100644 index 00000000..89362ddc --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/net_slice_id.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events.models.snssai import Snssai +from capif_events import util + +from capif_events.models.snssai import Snssai # noqa: E501 + +class NetSliceId(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, snssai=None, nsi_id=None, ensi=None): # noqa: E501 + """NetSliceId - a model defined in OpenAPI + + :param snssai: The snssai of this NetSliceId. # noqa: E501 + :type snssai: Snssai + :param nsi_id: The nsi_id of this NetSliceId. # noqa: E501 + :type nsi_id: str + :param ensi: The ensi of this NetSliceId. # noqa: E501 + :type ensi: str + """ + self.openapi_types = { + 'snssai': Snssai, + 'nsi_id': str, + 'ensi': str + } + + self.attribute_map = { + 'snssai': 'snssai', + 'nsi_id': 'nsiId', + 'ensi': 'ensi' + } + + self._snssai = snssai + self._nsi_id = nsi_id + self._ensi = ensi + + @classmethod + def from_dict(cls, dikt) -> 'NetSliceId': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NetSliceId of this NetSliceId. # noqa: E501 + :rtype: NetSliceId + """ + return util.deserialize_model(dikt, cls) + + @property + def snssai(self) -> Snssai: + """Gets the snssai of this NetSliceId. + + + :return: The snssai of this NetSliceId. + :rtype: Snssai + """ + return self._snssai + + @snssai.setter + def snssai(self, snssai: Snssai): + """Sets the snssai of this NetSliceId. + + + :param snssai: The snssai of this NetSliceId. + :type snssai: Snssai + """ + + self._snssai = snssai + + @property + def nsi_id(self) -> str: + """Gets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :return: The nsi_id of this NetSliceId. + :rtype: str + """ + return self._nsi_id + + @nsi_id.setter + def nsi_id(self, nsi_id: str): + """Sets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :param nsi_id: The nsi_id of this NetSliceId. + :type nsi_id: str + """ + + self._nsi_id = nsi_id + + @property + def ensi(self) -> str: + """Gets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :return: The ensi of this NetSliceId. + :rtype: str + """ + return self._ensi + + @ensi.setter + def ensi(self, ensi: str): + """Sets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :param ensi: The ensi of this NetSliceId. + :type ensi: str + """ + + self._ensi = ensi diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag.py b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag.py index 85bf9cde..fa4d5259 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class NotificationFlag(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method.py b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method.py index b6832cd0..b87ce0b5 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class NotificationMethod(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Events_API/capif_events/models/o_auth_grant_type.py index 42bce003..5d4c4ba6 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/o_auth_grant_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/onboarding_criteria.py b/services/TS29222_CAPIF_Events_API/capif_events/models/onboarding_criteria.py new file mode 100644 index 00000000..5bc1336c --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/onboarding_criteria.py @@ -0,0 +1,95 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events.models.related_criteria import RelatedCriteria +from capif_events.models.security_method import SecurityMethod +from capif_events import util + +from capif_events.models.related_criteria import RelatedCriteria # noqa: E501 +from capif_events.models.security_method import SecurityMethod # noqa: E501 + +class OnboardingCriteria(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, sec_methods=None, related_criteria=None): # noqa: E501 + """OnboardingCriteria - a model defined in OpenAPI + + :param sec_methods: The sec_methods of this OnboardingCriteria. # noqa: E501 + :type sec_methods: List[SecurityMethod] + :param related_criteria: The related_criteria of this OnboardingCriteria. # noqa: E501 + :type related_criteria: RelatedCriteria + """ + self.openapi_types = { + 'sec_methods': List[SecurityMethod], + 'related_criteria': RelatedCriteria + } + + self.attribute_map = { + 'sec_methods': 'secMethods', + 'related_criteria': 'relatedCriteria' + } + + self._sec_methods = sec_methods + self._related_criteria = related_criteria + + @classmethod + def from_dict(cls, dikt) -> 'OnboardingCriteria': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The OnboardingCriteria of this OnboardingCriteria. # noqa: E501 + :rtype: OnboardingCriteria + """ + return util.deserialize_model(dikt, cls) + + @property + def sec_methods(self) -> List[SecurityMethod]: + """Gets the sec_methods of this OnboardingCriteria. + + + :return: The sec_methods of this OnboardingCriteria. + :rtype: List[SecurityMethod] + """ + return self._sec_methods + + @sec_methods.setter + def sec_methods(self, sec_methods: List[SecurityMethod]): + """Sets the sec_methods of this OnboardingCriteria. + + + :param sec_methods: The sec_methods of this OnboardingCriteria. + :type sec_methods: List[SecurityMethod] + """ + if sec_methods is None: + raise ValueError("Invalid value for `sec_methods`, must not be `None`") # noqa: E501 + if sec_methods is not None and len(sec_methods) < 1: + raise ValueError("Invalid value for `sec_methods`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._sec_methods = sec_methods + + @property + def related_criteria(self) -> RelatedCriteria: + """Gets the related_criteria of this OnboardingCriteria. + + + :return: The related_criteria of this OnboardingCriteria. + :rtype: RelatedCriteria + """ + return self._related_criteria + + @related_criteria.setter + def related_criteria(self, related_criteria: RelatedCriteria): + """Sets the related_criteria of this OnboardingCriteria. + + + :param related_criteria: The related_criteria of this OnboardingCriteria. + :type related_criteria: RelatedCriteria + """ + + self._related_criteria = related_criteria diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py b/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py index ae36b029..01c08428 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class Operation(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria.py b/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria.py index e744de1a..1fed743c 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class PartitioningCriteria(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point.py index 68b096fb..25e5dcef 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.gad_shape import GADShape +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events import util + from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py index 637b2e25..e1fbee8d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.gad_shape import GADShape +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events import util + from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py index 81b375b6..965fd431 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.gad_shape import GADShape +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events.models.uncertainty_ellipse import UncertaintyEllipse +from capif_events import util + from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_events.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py index 55ac081d..8ea7284c 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.gad_shape import GADShape +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events import util + from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py index 515a1d18..07f77277 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.gad_shape import GADShape +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events.models.uncertainty_ellipse import UncertaintyEllipse +from capif_events import util + from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_events.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py b/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py index 8d8fe405..8804de2c 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.gad_shape import GADShape +from capif_events.models.geographical_coordinates import GeographicalCoordinates +from capif_events.models.supported_gad_shapes import SupportedGADShapes +from capif_events import util + from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/problem_details.py b/services/TS29222_CAPIF_Events_API/capif_events/models/problem_details.py index 225739b5..4cd85b68 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/problem_details.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model -from capif_events.models.invalid_param import InvalidParam # noqa: E501 +from capif_events.models.invalid_param import InvalidParam +import re +from capif_events import util +from capif_events.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py b/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py index 3fb57d95..437f5b2a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class Protocol(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/published_api_path.py b/services/TS29222_CAPIF_Events_API/capif_events/models/published_api_path.py index f66c1853..f341f1c9 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/published_api_path.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/published_api_path.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class PublishedApiPath(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/related_criteria.py b/services/TS29222_CAPIF_Events_API/capif_events/models/related_criteria.py new file mode 100644 index 00000000..60368b9e --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/related_criteria.py @@ -0,0 +1,121 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events.models.api_info import ApiInfo +from capif_events import util + +from capif_events.models.api_info import ApiInfo # noqa: E501 + +class RelatedCriteria(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, aef_ids=None, apis=None, service_api_categories=None): # noqa: E501 + """RelatedCriteria - a model defined in OpenAPI + + :param aef_ids: The aef_ids of this RelatedCriteria. # noqa: E501 + :type aef_ids: List[str] + :param apis: The apis of this RelatedCriteria. # noqa: E501 + :type apis: List[ApiInfo] + :param service_api_categories: The service_api_categories of this RelatedCriteria. # noqa: E501 + :type service_api_categories: List[str] + """ + self.openapi_types = { + 'aef_ids': List[str], + 'apis': List[ApiInfo], + 'service_api_categories': List[str] + } + + self.attribute_map = { + 'aef_ids': 'aefIds', + 'apis': 'apis', + 'service_api_categories': 'serviceAPICategories' + } + + self._aef_ids = aef_ids + self._apis = apis + self._service_api_categories = service_api_categories + + @classmethod + def from_dict(cls, dikt) -> 'RelatedCriteria': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The RelatedCriteria of this RelatedCriteria. # noqa: E501 + :rtype: RelatedCriteria + """ + return util.deserialize_model(dikt, cls) + + @property + def aef_ids(self) -> List[str]: + """Gets the aef_ids of this RelatedCriteria. + + + :return: The aef_ids of this RelatedCriteria. + :rtype: List[str] + """ + return self._aef_ids + + @aef_ids.setter + def aef_ids(self, aef_ids: List[str]): + """Sets the aef_ids of this RelatedCriteria. + + + :param aef_ids: The aef_ids of this RelatedCriteria. + :type aef_ids: List[str] + """ + if aef_ids is not None and len(aef_ids) < 1: + raise ValueError("Invalid value for `aef_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._aef_ids = aef_ids + + @property + def apis(self) -> List[ApiInfo]: + """Gets the apis of this RelatedCriteria. + + + :return: The apis of this RelatedCriteria. + :rtype: List[ApiInfo] + """ + return self._apis + + @apis.setter + def apis(self, apis: List[ApiInfo]): + """Sets the apis of this RelatedCriteria. + + + :param apis: The apis of this RelatedCriteria. + :type apis: List[ApiInfo] + """ + if apis is not None and len(apis) < 1: + raise ValueError("Invalid value for `apis`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._apis = apis + + @property + def service_api_categories(self) -> List[str]: + """Gets the service_api_categories of this RelatedCriteria. + + + :return: The service_api_categories of this RelatedCriteria. + :rtype: List[str] + """ + return self._service_api_categories + + @service_api_categories.setter + def service_api_categories(self, service_api_categories: List[str]): + """Sets the service_api_categories of this RelatedCriteria. + + + :param service_api_categories: The service_api_categories of this RelatedCriteria. + :type service_api_categories: List[str] + """ + if service_api_categories is not None and len(service_api_categories) < 1: + raise ValueError("Invalid value for `service_api_categories`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._service_api_categories = service_api_categories diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Events_API/capif_events/models/relative_cartesian_location.py index eeeb3d31..5a994928 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/relative_cartesian_location.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/reporting_information.py b/services/TS29222_CAPIF_Events_API/capif_events/models/reporting_information.py index ac8dde65..08e387b0 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/reporting_information.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/reporting_information.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.muting_exception_instructions import MutingExceptionInstructions +from capif_events.models.muting_notifications_settings import MutingNotificationsSettings +from capif_events.models.notification_flag import NotificationFlag +from capif_events.models.notification_method import NotificationMethod +from capif_events.models.partitioning_criteria import PartitioningCriteria +from capif_events import util + from capif_events.models.muting_exception_instructions import MutingExceptionInstructions # noqa: E501 from capif_events.models.muting_notifications_settings import MutingNotificationsSettings # noqa: E501 from capif_events.models.notification_flag import NotificationFlag # noqa: E501 from capif_events.models.notification_method import NotificationMethod # noqa: E501 from capif_events.models.partitioning_criteria import PartitioningCriteria # noqa: E501 - class ReportingInformation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py b/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py index a675ea25..8493f59d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.communication_type import CommunicationType +from capif_events.models.custom_operation import CustomOperation +from capif_events.models.operation import Operation +from capif_events import util + from capif_events.models.communication_type import CommunicationType # noqa: E501 from capif_events.models.custom_operation import CustomOperation # noqa: E501 from capif_events.models.operation import Operation # noqa: E501 - class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/routing_rule.py b/services/TS29222_CAPIF_Events_API/capif_events/models/routing_rule.py index abfb9e61..b59d1dd7 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/routing_rule.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/routing_rule.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events.models.aef_profile import AefProfile +from capif_events.models.ipv4_address_range1 import Ipv4AddressRange1 +from capif_events.models.ipv6_address_range import Ipv6AddressRange from capif_events import util + from capif_events.models.aef_profile import AefProfile # noqa: E501 -from capif_events.models.base_model import Model from capif_events.models.ipv4_address_range1 import Ipv4AddressRange1 # noqa: E501 from capif_events.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 - class RoutingRule(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/security_method.py b/services/TS29222_CAPIF_Events_API/capif_events/models/security_method.py index cf8caff4..ff87e785 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/security_method.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/security_method.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/service_api_description.py b/services/TS29222_CAPIF_Events_API/capif_events/models/service_api_description.py index 88daceb2..69b8d74e 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/service_api_description.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/service_api_description.py @@ -1,14 +1,22 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +from capif_events.models.aef_profile import AefProfile +from capif_events.models.api_status import ApiStatus +from capif_events.models.net_slice_id import NetSliceId +from capif_events.models.published_api_path import PublishedApiPath +from capif_events.models.shareable_information import ShareableInformation +import re from capif_events import util + from capif_events.models.aef_profile import AefProfile # noqa: E501 from capif_events.models.api_status import ApiStatus # noqa: E501 -from capif_events.models.base_model import Model +from capif_events.models.net_slice_id import NetSliceId # noqa: E501 from capif_events.models.published_api_path import PublishedApiPath # noqa: E501 from capif_events.models.shareable_information import ShareableInformation # noqa: E501 - +import re # noqa: E501 class ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +24,7 @@ class ServiceAPIDescription(Model): Do not edit the class manually. """ - def __init__(self, api_name=None, api_id=None, api_status=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None, api_prov_name=None): # noqa: E501 + def __init__(self, api_name=None, api_id=None, api_status=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None, api_prov_name=None, net_slice_info=None): # noqa: E501 """ServiceAPIDescription - a model defined in OpenAPI :param api_name: The api_name of this ServiceAPIDescription. # noqa: E501 @@ -43,6 +51,8 @@ class ServiceAPIDescription(Model): :type ccf_id: str :param api_prov_name: The api_prov_name of this ServiceAPIDescription. # noqa: E501 :type api_prov_name: str + :param net_slice_info: The net_slice_info of this ServiceAPIDescription. # noqa: E501 + :type net_slice_info: List[NetSliceId] """ self.openapi_types = { 'api_name': str, @@ -56,7 +66,8 @@ class ServiceAPIDescription(Model): 'api_supp_feats': str, 'pub_api_path': PublishedApiPath, 'ccf_id': str, - 'api_prov_name': str + 'api_prov_name': str, + 'net_slice_info': List[NetSliceId] } self.attribute_map = { @@ -71,7 +82,8 @@ class ServiceAPIDescription(Model): 'api_supp_feats': 'apiSuppFeats', 'pub_api_path': 'pubApiPath', 'ccf_id': 'ccfId', - 'api_prov_name': 'apiProvName' + 'api_prov_name': 'apiProvName', + 'net_slice_info': 'netSliceInfo' } self._api_name = api_name @@ -86,6 +98,7 @@ class ServiceAPIDescription(Model): self._pub_api_path = pub_api_path self._ccf_id = ccf_id self._api_prov_name = api_prov_name + self._net_slice_info = net_slice_info @classmethod def from_dict(cls, dikt) -> 'ServiceAPIDescription': @@ -102,7 +115,7 @@ class ServiceAPIDescription(Model): def api_name(self) -> str: """Gets the api_name of this ServiceAPIDescription. - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :return: The api_name of this ServiceAPIDescription. :rtype: str @@ -113,7 +126,7 @@ class ServiceAPIDescription(Model): def api_name(self, api_name: str): """Sets the api_name of this ServiceAPIDescription. - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :param api_name: The api_name of this ServiceAPIDescription. :type api_name: str @@ -375,3 +388,28 @@ class ServiceAPIDescription(Model): """ self._api_prov_name = api_prov_name + + @property + def net_slice_info(self) -> List[NetSliceId]: + """Gets the net_slice_info of this ServiceAPIDescription. + + Represents the applicable network slice identifiers. # noqa: E501 + + :return: The net_slice_info of this ServiceAPIDescription. + :rtype: List[NetSliceId] + """ + return self._net_slice_info + + @net_slice_info.setter + def net_slice_info(self, net_slice_info: List[NetSliceId]): + """Sets the net_slice_info of this ServiceAPIDescription. + + Represents the applicable network slice identifiers. # noqa: E501 + + :param net_slice_info: The net_slice_info of this ServiceAPIDescription. + :type net_slice_info: List[NetSliceId] + """ + if net_slice_info is not None and len(net_slice_info) < 1: + raise ValueError("Invalid value for `net_slice_info`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._net_slice_info = net_slice_info diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py b/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py index 5a536e99..7a4789dd 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +import re +from capif_events import util +import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/shareable_information.py b/services/TS29222_CAPIF_Events_API/capif_events/models/shareable_information.py index c67425be..87f74315 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/shareable_information.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/shareable_information.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class ShareableInformation(Model): @@ -47,7 +48,7 @@ class ShareableInformation(Model): def is_shareable(self) -> bool: """Gets the is_shareable of this ShareableInformation. - Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. # noqa: E501 :return: The is_shareable of this ShareableInformation. :rtype: bool @@ -58,7 +59,7 @@ class ShareableInformation(Model): def is_shareable(self, is_shareable: bool): """Sets the is_shareable of this ShareableInformation. - Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. # noqa: E501 :param is_shareable: The is_shareable of this ShareableInformation. :type is_shareable: bool diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/snssai.py b/services/TS29222_CAPIF_Events_API/capif_events/models/snssai.py new file mode 100644 index 00000000..d27756c9 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/snssai.py @@ -0,0 +1,101 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from capif_events.models.base_model import Model +import re +from capif_events import util + +import re # noqa: E501 + +class Snssai(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, sst=None, sd=None): # noqa: E501 + """Snssai - a model defined in OpenAPI + + :param sst: The sst of this Snssai. # noqa: E501 + :type sst: int + :param sd: The sd of this Snssai. # noqa: E501 + :type sd: str + """ + self.openapi_types = { + 'sst': int, + 'sd': str + } + + self.attribute_map = { + 'sst': 'sst', + 'sd': 'sd' + } + + self._sst = sst + self._sd = sd + + @classmethod + def from_dict(cls, dikt) -> 'Snssai': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Snssai of this Snssai. # noqa: E501 + :rtype: Snssai + """ + return util.deserialize_model(dikt, cls) + + @property + def sst(self) -> int: + """Gets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :return: The sst of this Snssai. + :rtype: int + """ + return self._sst + + @sst.setter + def sst(self, sst: int): + """Sets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :param sst: The sst of this Snssai. + :type sst: int + """ + if sst is None: + raise ValueError("Invalid value for `sst`, must not be `None`") # noqa: E501 + if sst is not None and sst > 255: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value less than or equal to `255`") # noqa: E501 + if sst is not None and sst < 0: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value greater than or equal to `0`") # noqa: E501 + + self._sst = sst + + @property + def sd(self) -> str: + """Gets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :return: The sd of this Snssai. + :rtype: str + """ + return self._sd + + @sd.setter + def sd(self, sd: str): + """Sets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :param sd: The sd of this Snssai. + :type sd: str + """ + if sd is not None and not re.search(r'^[A-Fa-f0-9]{6}$', sd): # noqa: E501 + raise ValueError(r"Invalid value for `sd`, must be a follow pattern or equal to `/^[A-Fa-f0-9]{6}$/`") # noqa: E501 + + self._sd = sd diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py b/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py index c0ada57a..99ae834d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class SubscriptionAction(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Events_API/capif_events/models/supported_gad_shapes.py index 919cd5ad..38ff4d53 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/supported_gad_shapes.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/time_range_list.py b/services/TS29222_CAPIF_Events_API/capif_events/models/time_range_list.py index 0adae28c..9a6b6267 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/time_range_list.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/time_range_list.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class TimeRangeList(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/topology_hiding.py b/services/TS29222_CAPIF_Events_API/capif_events/models/topology_hiding.py index 5cb44ed0..0a028785 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/topology_hiding.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/topology_hiding.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model -from capif_events.models.routing_rule import RoutingRule # noqa: E501 +from capif_events.models.routing_rule import RoutingRule +from capif_events import util +from capif_events.models.routing_rule import RoutingRule # noqa: E501 class TopologyHiding(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipse.py index 88c3675d..627eb52b 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipse.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py index 5e7e36ad..f10fac8f 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/version.py b/services/TS29222_CAPIF_Events_API/capif_events/models/version.py index 8185274b..709e34ce 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/version.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/version.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events.models.custom_operation import CustomOperation +from capif_events.models.resource import Resource +from capif_events import util + from capif_events.models.custom_operation import CustomOperation # noqa: E501 from capif_events.models.resource import Resource # noqa: E501 - class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/websock_notif_config.py b/services/TS29222_CAPIF_Events_API/capif_events/models/websock_notif_config.py index de4a84b0..0077354d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/websock_notif_config.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/websock_notif_config.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_events import util +from typing import List, Dict # noqa: F401 + from capif_events.models.base_model import Model +from capif_events import util class WebsockNotifConfig(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/openapi/openapi.yaml b/services/TS29222_CAPIF_Events_API/capif_events/openapi/openapi.yaml index cdf36c36..94874755 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_Events_API/capif_events/openapi/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.0 info: - description: "API for event subscription management. \n© 2024, 3GPP Organizational\ + description: "API for event subscription management. \n© 2025, 3GPP Organizational\ \ Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Events_API - version: 1.3.0 + version: 1.4.0-alpha.3 externalDocs: - description: 3GPP TS 29.222 V18.6.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V19.4.0 Common API Framework for 3GPP Northbound APIs url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: - url: "{apiRoot}/capif-events/v1" @@ -29,7 +29,7 @@ paths: required: true responses: "204": - description: No Content (successful notification) + description: No Content (successful notification). "307": description: Temporary Redirect headers: @@ -109,8 +109,7 @@ paths: default: description: Generic Error x-callback-request: true - description: Creates a new individual CAPIF Event Subscription. - operationId: subscriber_id_subscriptions_post + operationId: create_event_subsc parameters: - description: Identifier of the Subscriber explode: false @@ -132,11 +131,11 @@ paths: application/json: schema: $ref: '#/components/schemas/EventSubscription' - description: Created (Successful creation of subscription) + description: Created (Successful creation of subscription). headers: Location: description: | - Contains the URI of the newly created resource, according to the structure {apiRoot}/capif-events/v1/{subscriberId}/subscriptions/{subscriptionId} + Contains the URI of the newly created resource, according to the structure. explode: false required: true schema: @@ -204,11 +203,13 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_events.controllers.default_controller + summary: Create a new CAPIFs Event Subscription. + tags: + - CAPIFs Events Subscriptions (Collection) + x-openapi-router-controller: capif_events.controllers.capifs_events_subscriptions_collection_controller /{subscriberId}/subscriptions/{subscriptionId}: delete: - description: Deletes an individual CAPIF Event Subscription. - operationId: subscriber_id_subscriptions_subscription_id_delete + operationId: delete_ind_event_subsc parameters: - description: Identifier of the Subscriber explode: false @@ -229,7 +230,7 @@ paths: responses: "204": description: | - The individual CAPIF Events Subscription matching the subscriptionId is deleted. + No Content. The Individual CAPIF Events Subscription resource is successfully deleted. "307": description: Temporary Redirect headers: @@ -290,10 +291,12 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_events.controllers.default_controller + summary: Delete an existing Individual CAPIF Events Subscription resource. + tags: + - Individual CAPIFs Events Subscription (Document) + x-openapi-router-controller: capif_events.controllers.individual_capifs_events_subscription_document_controller patch: - description: Modification of an existing individual CAPIF Event Subscription. - operationId: subscriber_id_subscriptions_subscription_id_patch + operationId: modify_ind_event_subsc parameters: - description: Identifier of the Subscriber explode: false @@ -323,9 +326,25 @@ paths: application/json: schema: $ref: '#/components/schemas/EventSubscription' - description: OK (Successful update of the subscription) + description: OK (Successful modification of the subscription). "204": - description: No Content + description: No Content (Successful modification of the subscription). + "307": + description: Temporary Redirect + headers: + Location: + description: An alternative URI of the resource. + required: true + schema: + type: string + "308": + description: Permanent Redirect + headers: + Location: + description: An alternative URI of the resource. + required: true + schema: + type: string "400": content: application/problem+json: @@ -388,10 +407,12 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_events.controllers.default_controller + summary: Modify an existing Individual CAPIF Events Subscription resource. + tags: + - Individual CAPIFs Events Subscription (Document) + x-openapi-router-controller: capif_events.controllers.individual_capifs_events_subscription_document_controller put: - description: Update of an existing individual CAPIF Event Subscription. - operationId: subscriber_id_subscriptions_subscription_id_put + operationId: update_ind_event_subsc parameters: - description: Identifier of the Subscriber explode: false @@ -423,7 +444,23 @@ paths: $ref: '#/components/schemas/EventSubscription' description: OK (Successful update of the subscription). "204": - description: No Content + description: No Content. (Successful update of the subscription). + "307": + description: Temporary Redirect + headers: + Location: + description: An alternative URI of the resource. + required: true + schema: + type: string + "308": + description: Permanent Redirect + headers: + Location: + description: An alternative URI of the resource. + required: true + schema: + type: string "400": content: application/problem+json: @@ -486,7 +523,10 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_events.controllers.default_controller + summary: Update an existing Individual CAPIF Events Subscription resource. + tags: + - Individual CAPIFs Events Subscription (Document) + x-openapi-router-controller: capif_events.controllers.individual_capifs_events_subscription_document_controller components: responses: "400": @@ -569,7 +609,7 @@ components: type: string schemas: EventSubscription: - description: Represents an individual CAPIF Event Subscription resource. + description: Represents a CAPIF Events Subscription. example: notificationDestination: notificationDestination eventFilters: @@ -619,14 +659,14 @@ components: requestTestNotification: true properties: events: - description: Subscribed events + description: Subscribed events. items: $ref: '#/components/schemas/CAPIFEvent' minItems: 1 title: events type: array eventFilters: - description: Subscribed event filters + description: Subscribed event filters. items: $ref: '#/components/schemas/CAPIFEventFilter' minItems: 1 @@ -657,10 +697,68 @@ components: title: EventSubscription type: object EventNotification: - description: Represents an individual CAPIF Event notification. + description: Represents a CAPIF Events Notification. example: subscriptionId: subscriptionId eventDetail: + onboardingCriteria: + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - null + - null + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - null + - null + discoveryCount: + - discoveryReqCount: + - 1 + - 1 + discoveryRspCount: + - 1 + - 1 + apiIds: + - apiIds + - apiIds + - discoveryReqCount: + - 1 + - 1 + discoveryRspCount: + - 1 + - 1 + apiIds: + - apiIds + - apiIds apiInvokerIds: - apiInvokerIds - apiInvokerIds @@ -691,6 +789,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -728,6 +832,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -769,6 +879,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -806,6 +922,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -1270,43 +1392,59 @@ components: end: 198.51.100.1 - start: 198.51.100.1 end: 198.51.100.1 + onboardedCount: + - count: 7 + apiId: apiId + - count: 7 + apiId: apiId accCtrlPolList: apiInvokerPolicies: - apiInvokerId: apiInvokerId - allowedTotalInvocations: 9 + allowedTotalInvocations: 3 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - allowedInvocationsPerSecond: 3 + allowedInvocationsPerSecond: 2 - apiInvokerId: apiInvokerId - allowedTotalInvocations: 9 + allowedTotalInvocations: 3 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - allowedInvocationsPerSecond: 3 + allowedInvocationsPerSecond: 2 apiId: apiId serviceAPIDescriptions: - serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -1732,27 +1870,38 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp - pubApiPath: - ccfIds: - - ccfIds - - ccfIds - - serviceAPICategory: serviceAPICategory - ccfId: ccfId - apiName: apiName shareableInfo: capifProvDoms: - capifProvDoms - capifProvDoms isShareable: true - apiProvName: apiProvName - supportedFeatures: supportedFeatures - description: description + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId apiSuppFeats: apiSuppFeats apiId: apiId apiStatus: aefIds: - aefIds - aefIds + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -2178,6 +2327,28 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds @@ -2189,7 +2360,7 @@ components: properties: subscriptionId: description: | - Identifier of the subscription resource to which the notification is related – CAPIF resource identifier + Identifier of the subscription resource to which the notification is related. title: subscriptionId type: string events: @@ -2215,21 +2386,21 @@ components: - apiIds properties: apiIds: - description: Identifier of the service API + description: Identifier of the service API. items: type: string minItems: 1 title: apiIds type: array apiInvokerIds: - description: Identity of the API invoker + description: Identity of the API invoker. items: type: string minItems: 1 title: apiInvokerIds type: array aefIds: - description: Identifier of the API exposing function + description: Identifier of the API exposing function. items: type: string minItems: 1 @@ -2238,8 +2409,66 @@ components: title: CAPIFEventFilter type: object CAPIFEventDetail: - description: Represents a CAPIF event details. + description: Represents the CAPIF event related details. example: + onboardingCriteria: + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - null + - null + - relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - null + - null + discoveryCount: + - discoveryReqCount: + - 1 + - 1 + discoveryRspCount: + - 1 + - 1 + apiIds: + - apiIds + - apiIds + - discoveryReqCount: + - 1 + - 1 + discoveryRspCount: + - 1 + - 1 + apiIds: + - apiIds + - apiIds apiInvokerIds: - apiInvokerIds - apiInvokerIds @@ -2270,6 +2499,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -2307,6 +2542,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -2348,6 +2589,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -2385,6 +2632,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -2849,43 +3102,59 @@ components: end: 198.51.100.1 - start: 198.51.100.1 end: 198.51.100.1 + onboardedCount: + - count: 7 + apiId: apiId + - count: 7 + apiId: apiId accCtrlPolList: apiInvokerPolicies: - apiInvokerId: apiInvokerId - allowedTotalInvocations: 9 + allowedTotalInvocations: 3 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - allowedInvocationsPerSecond: 3 + allowedInvocationsPerSecond: 2 - apiInvokerId: apiInvokerId - allowedTotalInvocations: 9 + allowedTotalInvocations: 3 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - allowedInvocationsPerSecond: 3 + allowedInvocationsPerSecond: 2 apiId: apiId serviceAPIDescriptions: - serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -3311,27 +3580,38 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp - pubApiPath: - ccfIds: - - ccfIds - - ccfIds - - serviceAPICategory: serviceAPICategory - ccfId: ccfId - apiName: apiName shareableInfo: capifProvDoms: - capifProvDoms - capifProvDoms isShareable: true - apiProvName: apiProvName - supportedFeatures: supportedFeatures - description: description + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId apiSuppFeats: apiSuppFeats apiId: apiId apiStatus: aefIds: - aefIds - aefIds + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -3757,6 +4037,28 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds @@ -3773,14 +4075,14 @@ components: title: serviceAPIDescriptions type: array apiIds: - description: Identifier of the service API + description: Identifier of the service API. items: type: string minItems: 1 title: apiIds type: array apiInvokerIds: - description: Identity of the API invoker + description: Identity of the API invoker. items: type: string minItems: 1 @@ -3797,6 +4099,24 @@ components: type: array apiTopoHide: $ref: '#/components/schemas/TopologyHiding' + onboardingCriteria: + items: + $ref: '#/components/schemas/OnboardingCriteria' + minItems: 1 + title: onboardingCriteria + type: array + onboardedCount: + items: + $ref: '#/components/schemas/ApiInvokerCount' + minItems: 1 + title: onboardedCount + type: array + discoveryCount: + items: + $ref: '#/components/schemas/DiscoveryCount' + minItems: 1 + title: discoveryCount + type: array title: CAPIFEventDetail type: object AccessControlPolicyListExt: @@ -3810,21 +4130,43 @@ components: example: apiInvokerPolicies: - apiInvokerId: apiInvokerId - allowedTotalInvocations: 9 + allowedTotalInvocations: 3 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - allowedInvocationsPerSecond: 3 + allowedInvocationsPerSecond: 2 - apiInvokerId: apiInvokerId - allowedTotalInvocations: 9 + allowedTotalInvocations: 3 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - allowedInvocationsPerSecond: 3 + allowedInvocationsPerSecond: 2 apiId: apiId required: - apiId @@ -4297,17 +4639,17 @@ components: type: object EventSubscriptionPatch: description: | - Represents the parameters to request the updated of an individual CAPIF Event Subscription resource. + Represents the parameters to request the modification of a CAPIF Events Subscription resource. properties: events: - description: Subscribed events + description: Subscribed events. items: $ref: '#/components/schemas/CAPIFEvent' minItems: 1 title: events type: array eventFilters: - description: Subscribed event filters + description: Subscribed event filters. items: $ref: '#/components/schemas/CAPIFEventFilter' minItems: 1 @@ -4321,6 +4663,64 @@ components: type: string title: EventSubscriptionPatch type: object + ApiInvokerCount: + description: Represents the count data for onboarding. + example: + count: 7 + apiId: apiId + properties: + apiId: + title: apiId + type: string + count: + description: | + Contains the number of times the API Invokers requested to onboard the service API(s) API. + title: count + type: integer + required: + - apiId + - count + title: ApiInvokerCount + type: object + DiscoveryCount: + anyOf: + - required: ["discoveryReqCount"] + - required: ["discoveryRspCount"] + description: Represents the count data for discovery. + example: + discoveryReqCount: + - 1 + - 1 + discoveryRspCount: + - 1 + - 1 + apiIds: + - apiIds + - apiIds + nullable: true + properties: + apiIds: + items: + type: string + minItems: 1 + title: apiIds + type: array + discoveryReqCount: + items: + type: integer + minItems: 1 + title: discoveryReqCount + type: array + discoveryRspCount: + items: + type: integer + minItems: 1 + title: discoveryRspCount + type: array + required: + - apiIds + title: DiscoveryCount + type: object CAPIFEvent: enum: - SERVICE_API_AVAILABLE @@ -4336,6 +4736,9 @@ components: - API_INVOKER_UPDATED - API_TOPOLOGY_HIDING_CREATED - API_TOPOLOGY_HIDING_REVOKED + - API_INVOKER_ONBOARDING_CRITERIA_FAILED + - SERVICE_API_ONBOARDED_BY_API_INVOKERS_COUNT + - SERVICE_API_DISCOVERY_BY_API_INVOKERS_COUNT type: string description: "Describes the CAPIF event. \nPossible values are:\n- SERVICE_API_AVAILABLE:\n\ \ Events related to the availability of service APIs after the service APIs\ @@ -4356,7 +4759,12 @@ components: \ information of the service APIs after the service APIs are published.\n\ - API_TOPOLOGY_HIDING_REVOKED:\n Events related to the revocation of the\ \ API topology hiding information of\n the service APIs after the service\ - \ APIs are unpublished.\n" + \ APIs are unpublished.\n- API_INVOKER_ONBOARDING_CRITERIA_FAILED: Events\ + \ related to API Invoker onboarding criteria\n failed to be met. \n- SERVICE_API_ONBOARDED_BY_API_INVOKERS_COUNT:\ + \ Periodic event related to the number of times the\n API Invokers requested\ + \ to onboard the targeted service API(s).\n- SERVICE_API_DISCOVERY_BY_API_INVOKERS_COUNT:\ + \ Periodic event related to the number of times the\n API Invokers discovered\ + \ the targeted service API(s).\n" title: CAPIFEvent ProblemDetails: description: Represents additional information and details on an error response. @@ -4530,20 +4938,9 @@ components: serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -4969,6 +5366,28 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds @@ -4976,7 +5395,7 @@ components: properties: apiName: description: | - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + Contains the API name set to the value of the "" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. title: apiName type: string apiId: @@ -5026,6 +5445,13 @@ components: description: Represents the API provider name. title: apiProvName type: string + netSliceInfo: + description: Represents the applicable network slice identifiers. + items: + $ref: '#/components/schemas/NetSliceId' + minItems: 1 + title: netSliceInfo + type: array required: - apiName title: ServiceAPIDescription @@ -5039,8 +5465,9 @@ components: - aefIds properties: aefIds: - description: | - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the "aefProfiles" attribute within the ServiceAPIDescription data structure. + description: "Indicates the list of AEF ID(s) where the API is active. If\ + \ an empty array is provided, it indicates that the API is inactive in\ + \ all AEF(s). \n" items: type: string title: aefIds @@ -5265,7 +5692,7 @@ components: maxReqRate: 0 avalGraComp: avalGraComp nullable: true - oneOf: + oneOf: - required: ["domainName"] - required: ["interfaceDescriptions"] - {} @@ -5752,7 +6179,7 @@ components: title: ServiceKpis type: object IpAddrRange: - anyOf: + anyOf: - required: ["ueIpv4AddrRanges"] - required: ["ueIpv6AddrRanges"] description: Represents the list of public IP ranges @@ -5796,7 +6223,7 @@ components: properties: isShareable: description: | - Set to "true" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to "false". + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. title: isShareable type: boolean capifProvDoms: @@ -5859,6 +6286,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -5896,6 +6329,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -5965,6 +6404,12 @@ components: result: result protocol: null apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -5987,7 +6432,7 @@ components: type: string apiName: description: | - Name of the API which was invoked, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + Contains the invoked API name set to the value of the "" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. title: apiName type: string apiVersion: @@ -6037,6 +6482,8 @@ components: It includes the node identifier (as defined in IETF RFC 7239 of all forwarding entities between the API invoker and the AEF, concatenated with comma and space, e.g. 192.0.2.43:80, unknown:_OBFport, 203.0.113.60 title: fwdInterface type: string + netSliceInfo: + $ref: '#/components/schemas/NetSliceId' required: - apiId - apiName @@ -6051,6 +6498,108 @@ components: minimum: 0 title: DurationMs type: integer + OnboardingCriteria: + description: Represents the onboarding criteria information. + example: + relatedCriteria: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + secMethods: + - null + - null + properties: + secMethods: + items: + $ref: '#/components/schemas/SecurityMethod' + minItems: 1 + title: secMethods + type: array + relatedCriteria: + $ref: '#/components/schemas/RelatedCriteria' + required: + - secMethods + title: OnboardingCriteria + type: object + RelatedCriteria: + anyOf: + - required: ["aefIds"] + - required: ["apis"] + - required: ["serviceAPICategories"] + not: + required: [apis, serviceAPICategories] + description: Represents onboarding related criteria. + example: + aefIds: + - aefIds + - aefIds + apis: + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + - apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + serviceAPICategories: + - serviceAPICategories + - serviceAPICategories + nullable: true + properties: + aefIds: + items: + type: string + minItems: 1 + title: aefIds + type: array + apis: + items: + $ref: '#/components/schemas/ApiInfo' + minItems: 1 + title: apis + type: array + serviceAPICategories: + items: + type: string + minItems: 1 + title: serviceAPICategories + type: array + title: RelatedCriteria + type: object + ApiInfo: + description: Represents service API identification related information. + example: + apiName: apiName + supportedApiVersions: + - supportedApiVersions + - supportedApiVersions + properties: + apiName: + title: apiName + type: string + supportedApiVersions: + items: + type: string + minItems: 1 + title: supportedApiVersions + type: array + required: + - apiName + title: ApiInfo + type: object AccessControlPolicyList: description: Represents the access control policy list for a published service API. @@ -6068,13 +6617,24 @@ components: description: Represents the policy of an API Invoker. example: apiInvokerId: apiInvokerId - allowedTotalInvocations: 9 + allowedTotalInvocations: 3 + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId allowedInvocationTimeRangeList: - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - startTime: 2000-01-23T04:56:07.000+00:00 stopTime: 2000-01-23T04:56:07.000+00:00 - allowedInvocationsPerSecond: 3 + allowedInvocationsPerSecond: 2 properties: apiInvokerId: description: API invoker ID assigned by the CAPIF core function @@ -6098,6 +6658,12 @@ components: minItems: 0 title: allowedInvocationTimeRangeList type: array + netSliceInfo: + items: + $ref: '#/components/schemas/NetSliceId' + minItems: 1 + title: netSliceInfo + type: array required: - apiInvokerId title: ApiInvokerPolicy @@ -6394,7 +6960,9 @@ components: - ON_EVENT_DETECTION type: string description: "Represents the notification methods that can be subscribed. \n\ - Possible values are:\n- PERIODIC\n- ONE_TIME\n- ON_EVENT_DETECTION\n" + Possible values are:\n- PERIODIC: The notification is periodically sent.\n\ + - ONE_TIME: The notification is only sent one time.\n- ON_EVENT_DETECTION:\ + \ The notification is sent each time the event is detected.\n" title: NotificationMethod Uinteger: description: "Unsigned Integer, i.e. only value 0 and integers above 0 are permissible." @@ -6492,6 +7060,39 @@ components: type: integer title: MutingNotificationsSettings type: object + NetSliceId: + description: | + Represents the network slice identification information. + example: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + nullable: true + oneOf: + - required: ["snssai"] + - required: ["nsiId"] + - required: ["ensi"] + properties: + snssai: + $ref: '#/components/schemas/Snssai' + nsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string + ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string + title: NetSliceId + type: object + Ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string OAuthGrantType: enum: - CLIENT_CREDENTIALS @@ -7144,6 +7745,38 @@ components: type: string title: Ipv4AddressRange_1 type: object + Snssai: + description: | + When Snssai needs to be converted to string (e.g. when used in maps as key), the string shall be composed of one to three digits "sst" optionally followed by "-" and 6 hexadecimal digits "sd". + example: + sd: sd + sst: 237 + properties: + sst: + description: "Unsigned integer, within the range 0 to 255, representing\ + \ the Slice/Service Type. It indicates the expected Network Slice behaviour\ + \ in terms of features and services. Values 0 to 127 correspond to the\ + \ standardized SST range. Values 128 to 255 correspond to the Operator-specific\ + \ range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are\ + \ defined in clause 5.15.2.2 of 3GPP TS 23.501. \n" + maximum: 255 + minimum: 0 + title: sst + type: integer + sd: + description: | + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. + pattern: "^[A-Fa-f0-9]{6}$" + title: sd + type: string + required: + - sst + title: Snssai + type: object + NsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string Float: description: string with format 'float' as defined in OpenAPI. format: float diff --git a/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py b/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py index 8da9951b..c55e721a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py @@ -1,9 +1,10 @@ import logging import connexion -from capif_events.encoder import JSONEncoder from flask_testing import TestCase +from capif_events.encoder import JSONEncoder + class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/test/test_capifs_events_subscriptions_collection_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/test/test_capifs_events_subscriptions_collection_controller.py new file mode 100644 index 00000000..e5b8b742 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/test/test_capifs_events_subscriptions_collection_controller.py @@ -0,0 +1,34 @@ +import unittest + +from flask import json + +from capif_events.models.event_subscription import EventSubscription # noqa: E501 +from capif_events.models.problem_details import ProblemDetails # noqa: E501 +from capif_events.test import BaseTestCase + + +class TestCAPIFsEventsSubscriptionsCollectionController(BaseTestCase): + """CAPIFsEventsSubscriptionsCollectionController integration test stubs""" + + def test_create_event_subsc(self): + """Test case for create_event_subsc + + Create a new CAPIFs Event Subscription. + """ + event_subscription = {"notificationDestination":"notificationDestination","eventFilters":[{"aefIds":["aefIds","aefIds"],"apiInvokerIds":["apiInvokerIds","apiInvokerIds"],"apiIds":["apiIds","apiIds"]},{"aefIds":["aefIds","aefIds"],"apiInvokerIds":["apiInvokerIds","apiInvokerIds"],"apiIds":["apiIds","apiIds"]}],"supportedFeatures":"supportedFeatures","eventReq":{"notifMethod":"PERIODIC","partitionCriteria":["TAC","TAC"],"grpRepTime":5,"notifFlag":"ACTIVATE","mutingSetting":{"maxNoOfNotif":5,"durationBufferedNotif":2},"monDur":"2000-01-23T04:56:07.000+00:00","immRep":True,"maxReportNbr":0,"repPeriod":6,"sampRatio":15,"notifFlagInstruct":{"bufferedNotifs":"SEND_ALL","subscription":"CLOSE"}},"websockNotifConfig":{"requestWebsocketUri":True,"websocketUri":"websocketUri"},"events":["SERVICE_API_AVAILABLE","SERVICE_API_AVAILABLE"],"requestTestNotification":True} + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + response = self.client.open( + '/capif-events/v1/{subscriber_id}/subscriptions'.format(subscriber_id='subscriber_id_example'), + method='POST', + headers=headers, + data=json.dumps(event_subscription), + content_type='application/json') + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + +if __name__ == '__main__': + unittest.main() diff --git a/services/TS29222_CAPIF_Events_API/capif_events/test/test_default_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/test/test_individual_capifs_events_subscription_document_controller.py similarity index 59% rename from services/TS29222_CAPIF_Events_API/capif_events/test/test_default_controller.py rename to services/TS29222_CAPIF_Events_API/capif_events/test/test_individual_capifs_events_subscription_document_controller.py index 79cc892f..902736ac 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/test/test_individual_capifs_events_subscription_document_controller.py @@ -1,38 +1,20 @@ import unittest +from flask import json + from capif_events.models.event_subscription import EventSubscription # noqa: E501 from capif_events.models.event_subscription_patch import EventSubscriptionPatch # noqa: E501 from capif_events.models.problem_details import ProblemDetails # noqa: E501 from capif_events.test import BaseTestCase -from flask import json - - -class TestDefaultController(BaseTestCase): - """DefaultController integration test stubs""" - def test_subscriber_id_subscriptions_post(self): - """Test case for subscriber_id_subscriptions_post - - """ - event_subscription = {"notificationDestination":"notificationDestination","eventFilters":[{"aefIds":["aefIds","aefIds"],"apiInvokerIds":["apiInvokerIds","apiInvokerIds"],"apiIds":["apiIds","apiIds"]},{"aefIds":["aefIds","aefIds"],"apiInvokerIds":["apiInvokerIds","apiInvokerIds"],"apiIds":["apiIds","apiIds"]}],"supportedFeatures":"supportedFeatures","eventReq":{"notifMethod":"PERIODIC","partitionCriteria":["TAC","TAC"],"grpRepTime":5,"notifFlag":"ACTIVATE","mutingSetting":{"maxNoOfNotif":5,"durationBufferedNotif":2},"monDur":"2000-01-23T04:56:07.000+00:00","immRep":True,"maxReportNbr":0,"repPeriod":6,"sampRatio":15,"notifFlagInstruct":{"bufferedNotifs":"SEND_ALL","subscription":"CLOSE"}},"websockNotifConfig":{"requestWebsocketUri":True,"websocketUri":"websocketUri"},"events":["SERVICE_API_AVAILABLE","SERVICE_API_AVAILABLE"],"requestTestNotification":True} - headers = { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - } - response = self.client.open( - '/capif-events/v1/{subscriber_id}/subscriptions'.format(subscriber_id='subscriber_id_example'), - method='POST', - headers=headers, - data=json.dumps(event_subscription), - content_type='application/json') - self.assert200(response, - 'Response body is : ' + response.data.decode('utf-8')) +class TestIndividualCAPIFsEventsSubscriptionDocumentController(BaseTestCase): + """IndividualCAPIFsEventsSubscriptionDocumentController integration test stubs""" - def test_subscriber_id_subscriptions_subscription_id_delete(self): - """Test case for subscriber_id_subscriptions_subscription_id_delete + def test_delete_ind_event_subsc(self): + """Test case for delete_ind_event_subsc - + Delete an existing Individual CAPIF Events Subscription resource. """ headers = { 'Accept': 'application/problem+json', @@ -44,10 +26,10 @@ class TestDefaultController(BaseTestCase): self.assert200(response, 'Response body is : ' + response.data.decode('utf-8')) - def test_subscriber_id_subscriptions_subscription_id_patch(self): - """Test case for subscriber_id_subscriptions_subscription_id_patch + def test_modify_ind_event_subsc(self): + """Test case for modify_ind_event_subsc - + Modify an existing Individual CAPIF Events Subscription resource. """ event_subscription_patch = openapi_server.EventSubscriptionPatch() headers = { @@ -63,10 +45,10 @@ class TestDefaultController(BaseTestCase): self.assert200(response, 'Response body is : ' + response.data.decode('utf-8')) - def test_subscriber_id_subscriptions_subscription_id_put(self): - """Test case for subscriber_id_subscriptions_subscription_id_put + def test_update_ind_event_subsc(self): + """Test case for update_ind_event_subsc - + Update an existing Individual CAPIF Events Subscription resource. """ event_subscription = {"notificationDestination":"notificationDestination","eventFilters":[{"aefIds":["aefIds","aefIds"],"apiInvokerIds":["apiInvokerIds","apiInvokerIds"],"apiIds":["apiIds","apiIds"]},{"aefIds":["aefIds","aefIds"],"apiInvokerIds":["apiInvokerIds","apiInvokerIds"],"apiIds":["apiIds","apiIds"]}],"supportedFeatures":"supportedFeatures","eventReq":{"notifMethod":"PERIODIC","partitionCriteria":["TAC","TAC"],"grpRepTime":5,"notifFlag":"ACTIVATE","mutingSetting":{"maxNoOfNotif":5,"durationBufferedNotif":2},"monDur":"2000-01-23T04:56:07.000+00:00","immRep":True,"maxReportNbr":0,"repPeriod":6,"sampRatio":15,"notifFlagInstruct":{"bufferedNotifs":"SEND_ALL","subscription":"CLOSE"}},"websockNotifConfig":{"requestWebsocketUri":True,"websocketUri":"websocketUri"},"events":["SERVICE_API_AVAILABLE","SERVICE_API_AVAILABLE"],"requestTestNotification":True} headers = { diff --git a/services/TS29222_CAPIF_Events_API/capif_events/util.py b/services/TS29222_CAPIF_Events_API/capif_events/util.py index f09cd65c..eb23ccea 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/util.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/util.py @@ -1,8 +1,8 @@ import datetime +import typing from capif_events import typing_utils - def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) @@ -56,7 +56,6 @@ def dict_to_camel_case(my_dict): return result - def _deserialize(data, klass): """Deserializes dict, list, str into an object. diff --git a/services/TS29222_CAPIF_Events_API/setup.py b/services/TS29222_CAPIF_Events_API/setup.py index f126a701..59aa0763 100644 --- a/services/TS29222_CAPIF_Events_API/setup.py +++ b/services/TS29222_CAPIF_Events_API/setup.py @@ -1,5 +1,5 @@ - -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "capif_events" VERSION = "1.0.0" @@ -31,7 +31,7 @@ setup( entry_points={ 'console_scripts': ['capif_events=capif_events.__main__:main']}, long_description="""\ - API for event subscription management. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for event subscription management. © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) -- GitLab From 33bcce76de23378ccaca40ec0b39c34e6fd3c528 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 27 Nov 2025 14:24:06 +0100 Subject: [PATCH 046/101] REL 19 Logging_API_Invocation_API --- .../.openapi-generator/FILES | 2 + .../controllers/default_controller.py | 8 +- .../controllers/security_controller.py | 2 +- .../api_invocation_logs/encoder.py | 3 +- .../api_invocation_logs/models/__init__.py | 11 ++ .../api_invocation_logs/models/base_model.py | 1 + .../models/interface_description.py | 12 +- .../models/invalid_param.py | 5 +- .../models/invocation_log.py | 11 +- .../api_invocation_logs/models/log.py | 48 +++++-- .../models/net_slice_id.py | 119 ++++++++++++++++++ .../models/o_auth_grant_type.py | 5 +- .../api_invocation_logs/models/operation.py | 5 +- .../models/problem_details.py | 11 +- .../api_invocation_logs/models/protocol.py | 5 +- .../models/security_method.py | 5 +- .../api_invocation_logs/models/snssai.py | 101 +++++++++++++++ .../api_invocation_logs/openapi/openapi.yaml | 95 +++++++++++++- .../api_invocation_logs/test/__init__.py | 3 +- .../test/test_default_controller.py | 5 +- .../api_invocation_logs/util.py | 2 +- .../setup.py | 6 +- 22 files changed, 420 insertions(+), 45 deletions(-) create mode 100644 services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/net_slice_id.py create mode 100644 services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/snssai.py diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/FILES index fd69e2e1..ee904ed4 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/FILES @@ -17,11 +17,13 @@ api_invocation_logs/models/interface_description.py api_invocation_logs/models/invalid_param.py api_invocation_logs/models/invocation_log.py api_invocation_logs/models/log.py +api_invocation_logs/models/net_slice_id.py api_invocation_logs/models/o_auth_grant_type.py api_invocation_logs/models/operation.py api_invocation_logs/models/problem_details.py api_invocation_logs/models/protocol.py api_invocation_logs/models/security_method.py +api_invocation_logs/models/snssai.py api_invocation_logs/openapi/openapi.yaml api_invocation_logs/test/__init__.py api_invocation_logs/test/test_default_controller.py diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py index f23e6028..9fb8f9b3 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py @@ -1,3 +1,10 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union +from api_invocation_logs.models.problem_details import ProblemDetails # noqa: E501 +from api_invocation_logs import util + from api_invocation_logs.models.invocation_log import InvocationLog # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend @@ -37,7 +44,6 @@ def cert_validation(): return __cert_validation return _cert_validation - @cert_validation() def aef_id_logs_post(aef_id, body): # noqa: E501 """aef_id_logs_post diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller.py index 139597f9..6d294ffd 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller.py @@ -1,2 +1,2 @@ - +from typing import List diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/encoder.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/encoder.py index 28d87693..e072c7d6 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/encoder.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/encoder.py @@ -1,6 +1,7 @@ -from api_invocation_logs.models.base_model import Model from connexion.jsonifier import JSONEncoder +from api_invocation_logs.models.base_model import Model + class CustomJSONEncoder(JSONEncoder): include_nulls = False diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/__init__.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/__init__.py index d036df69..78235692 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/__init__.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/__init__.py @@ -1,2 +1,13 @@ # flake8: noqa # import models into model package +from api_invocation_logs.models.interface_description import InterfaceDescription +from api_invocation_logs.models.invalid_param import InvalidParam +from api_invocation_logs.models.invocation_log import InvocationLog +from api_invocation_logs.models.log import Log +from api_invocation_logs.models.net_slice_id import NetSliceId +from api_invocation_logs.models.o_auth_grant_type import OAuthGrantType +from api_invocation_logs.models.operation import Operation +from api_invocation_logs.models.problem_details import ProblemDetails +from api_invocation_logs.models.protocol import Protocol +from api_invocation_logs.models.security_method import SecurityMethod +from api_invocation_logs.models.snssai import Snssai diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model.py index d7f252ca..642d94a3 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from api_invocation_logs import util diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/interface_description.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/interface_description.py index 03cb6d5a..10e8ad15 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/interface_description.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/interface_description.py @@ -1,12 +1,16 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invocation_logs import util +from typing import List, Dict # noqa: F401 + from api_invocation_logs.models.base_model import Model +from api_invocation_logs.models.o_auth_grant_type import OAuthGrantType +from api_invocation_logs.models.security_method import SecurityMethod +import re +from api_invocation_logs import util + from api_invocation_logs.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from api_invocation_logs.models.security_method import SecurityMethod # noqa: E501 - +import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invalid_param.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invalid_param.py index 18d055db..d7ec5735 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invalid_param.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invocation_logs import util +from typing import List, Dict # noqa: F401 + from api_invocation_logs.models.base_model import Model +from api_invocation_logs import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invocation_log.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invocation_log.py index e7464b7f..6110fce8 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invocation_log.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invocation_log.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invocation_logs import util +from typing import List, Dict # noqa: F401 + from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.log import Log # noqa: E501 +from api_invocation_logs.models.log import Log +import re +from api_invocation_logs import util +from api_invocation_logs.models.log import Log # noqa: E501 +import re # noqa: E501 class InvocationLog(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/log.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/log.py index 84715f30..6ec94e12 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/log.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/log.py @@ -1,20 +1,26 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invocation_logs import util +from typing import List, Dict # noqa: F401 + from api_invocation_logs.models.base_model import Model +from api_invocation_logs.models.interface_description import InterfaceDescription +from api_invocation_logs.models.net_slice_id import NetSliceId +from api_invocation_logs.models.operation import Operation +from api_invocation_logs.models.protocol import Protocol +from api_invocation_logs import util + from api_invocation_logs.models.interface_description import InterfaceDescription # noqa: E501 +from api_invocation_logs.models.net_slice_id import NetSliceId # noqa: E501 from api_invocation_logs.models.operation import Operation # noqa: E501 from api_invocation_logs.models.protocol import Protocol # noqa: E501 - class Log(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - def __init__(self, api_id=None, api_name=None, api_version=None, resource_name=None, uri=None, protocol=None, operation=None, result=None, invocation_time=None, invocation_latency=None, input_parameters=None, output_parameters=None, src_interface=None, dest_interface=None, fwd_interface=None): # noqa: E501 + def __init__(self, api_id=None, api_name=None, api_version=None, resource_name=None, uri=None, protocol=None, operation=None, result=None, invocation_time=None, invocation_latency=None, input_parameters=None, output_parameters=None, src_interface=None, dest_interface=None, fwd_interface=None, net_slice_info=None): # noqa: E501 """Log - a model defined in OpenAPI :param api_id: The api_id of this Log. # noqa: E501 @@ -47,6 +53,8 @@ class Log(Model): :type dest_interface: InterfaceDescription :param fwd_interface: The fwd_interface of this Log. # noqa: E501 :type fwd_interface: str + :param net_slice_info: The net_slice_info of this Log. # noqa: E501 + :type net_slice_info: NetSliceId """ self.openapi_types = { 'api_id': str, @@ -63,7 +71,8 @@ class Log(Model): 'output_parameters': object, 'src_interface': InterfaceDescription, 'dest_interface': InterfaceDescription, - 'fwd_interface': str + 'fwd_interface': str, + 'net_slice_info': NetSliceId } self.attribute_map = { @@ -81,7 +90,8 @@ class Log(Model): 'output_parameters': 'outputParameters', 'src_interface': 'srcInterface', 'dest_interface': 'destInterface', - 'fwd_interface': 'fwdInterface' + 'fwd_interface': 'fwdInterface', + 'net_slice_info': 'netSliceInfo' } self._api_id = api_id @@ -99,6 +109,7 @@ class Log(Model): self._src_interface = src_interface self._dest_interface = dest_interface self._fwd_interface = fwd_interface + self._net_slice_info = net_slice_info @classmethod def from_dict(cls, dikt) -> 'Log': @@ -140,7 +151,7 @@ class Log(Model): def api_name(self) -> str: """Gets the api_name of this Log. - Name of the API which was invoked, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the invoked API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :return: The api_name of this Log. :rtype: str @@ -151,7 +162,7 @@ class Log(Model): def api_name(self, api_name: str): """Sets the api_name of this Log. - Name of the API which was invoked, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the invoked API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :param api_name: The api_name of this Log. :type api_name: str @@ -461,3 +472,24 @@ class Log(Model): """ self._fwd_interface = fwd_interface + + @property + def net_slice_info(self) -> NetSliceId: + """Gets the net_slice_info of this Log. + + + :return: The net_slice_info of this Log. + :rtype: NetSliceId + """ + return self._net_slice_info + + @net_slice_info.setter + def net_slice_info(self, net_slice_info: NetSliceId): + """Sets the net_slice_info of this Log. + + + :param net_slice_info: The net_slice_info of this Log. + :type net_slice_info: NetSliceId + """ + + self._net_slice_info = net_slice_info diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/net_slice_id.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/net_slice_id.py new file mode 100644 index 00000000..66e7c4d3 --- /dev/null +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/net_slice_id.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invocation_logs.models.base_model import Model +from api_invocation_logs.models.snssai import Snssai +from api_invocation_logs import util + +from api_invocation_logs.models.snssai import Snssai # noqa: E501 + +class NetSliceId(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, snssai=None, nsi_id=None, ensi=None): # noqa: E501 + """NetSliceId - a model defined in OpenAPI + + :param snssai: The snssai of this NetSliceId. # noqa: E501 + :type snssai: Snssai + :param nsi_id: The nsi_id of this NetSliceId. # noqa: E501 + :type nsi_id: str + :param ensi: The ensi of this NetSliceId. # noqa: E501 + :type ensi: str + """ + self.openapi_types = { + 'snssai': Snssai, + 'nsi_id': str, + 'ensi': str + } + + self.attribute_map = { + 'snssai': 'snssai', + 'nsi_id': 'nsiId', + 'ensi': 'ensi' + } + + self._snssai = snssai + self._nsi_id = nsi_id + self._ensi = ensi + + @classmethod + def from_dict(cls, dikt) -> 'NetSliceId': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NetSliceId of this NetSliceId. # noqa: E501 + :rtype: NetSliceId + """ + return util.deserialize_model(dikt, cls) + + @property + def snssai(self) -> Snssai: + """Gets the snssai of this NetSliceId. + + + :return: The snssai of this NetSliceId. + :rtype: Snssai + """ + return self._snssai + + @snssai.setter + def snssai(self, snssai: Snssai): + """Sets the snssai of this NetSliceId. + + + :param snssai: The snssai of this NetSliceId. + :type snssai: Snssai + """ + + self._snssai = snssai + + @property + def nsi_id(self) -> str: + """Gets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :return: The nsi_id of this NetSliceId. + :rtype: str + """ + return self._nsi_id + + @nsi_id.setter + def nsi_id(self, nsi_id: str): + """Sets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :param nsi_id: The nsi_id of this NetSliceId. + :type nsi_id: str + """ + + self._nsi_id = nsi_id + + @property + def ensi(self) -> str: + """Gets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :return: The ensi of this NetSliceId. + :rtype: str + """ + return self._ensi + + @ensi.setter + def ensi(self, ensi: str): + """Sets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :param ensi: The ensi of this NetSliceId. + :type ensi: str + """ + + self._ensi = ensi diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/o_auth_grant_type.py index 9c8fcf7d..1165483f 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/o_auth_grant_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invocation_logs import util +from typing import List, Dict # noqa: F401 + from api_invocation_logs.models.base_model import Model +from api_invocation_logs import util class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation.py index a4bea825..513f6d00 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invocation_logs import util +from typing import List, Dict # noqa: F401 + from api_invocation_logs.models.base_model import Model +from api_invocation_logs import util class Operation(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/problem_details.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/problem_details.py index 0f87859c..1ab0e54c 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/problem_details.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invocation_logs import util +from typing import List, Dict # noqa: F401 + from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.invalid_param import InvalidParam # noqa: E501 +from api_invocation_logs.models.invalid_param import InvalidParam +import re +from api_invocation_logs import util +from api_invocation_logs.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol.py index fe449f01..ec4bf3b2 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invocation_logs import util +from typing import List, Dict # noqa: F401 + from api_invocation_logs.models.base_model import Model +from api_invocation_logs import util class Protocol(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method.py index 3f0ff15b..b47fd3ef 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from api_invocation_logs import util +from typing import List, Dict # noqa: F401 + from api_invocation_logs.models.base_model import Model +from api_invocation_logs import util class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/snssai.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/snssai.py new file mode 100644 index 00000000..b5d91b0a --- /dev/null +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/snssai.py @@ -0,0 +1,101 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api_invocation_logs.models.base_model import Model +import re +from api_invocation_logs import util + +import re # noqa: E501 + +class Snssai(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, sst=None, sd=None): # noqa: E501 + """Snssai - a model defined in OpenAPI + + :param sst: The sst of this Snssai. # noqa: E501 + :type sst: int + :param sd: The sd of this Snssai. # noqa: E501 + :type sd: str + """ + self.openapi_types = { + 'sst': int, + 'sd': str + } + + self.attribute_map = { + 'sst': 'sst', + 'sd': 'sd' + } + + self._sst = sst + self._sd = sd + + @classmethod + def from_dict(cls, dikt) -> 'Snssai': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Snssai of this Snssai. # noqa: E501 + :rtype: Snssai + """ + return util.deserialize_model(dikt, cls) + + @property + def sst(self) -> int: + """Gets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :return: The sst of this Snssai. + :rtype: int + """ + return self._sst + + @sst.setter + def sst(self, sst: int): + """Sets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :param sst: The sst of this Snssai. + :type sst: int + """ + if sst is None: + raise ValueError("Invalid value for `sst`, must not be `None`") # noqa: E501 + if sst is not None and sst > 255: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value less than or equal to `255`") # noqa: E501 + if sst is not None and sst < 0: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value greater than or equal to `0`") # noqa: E501 + + self._sst = sst + + @property + def sd(self) -> str: + """Gets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :return: The sd of this Snssai. + :rtype: str + """ + return self._sd + + @sd.setter + def sd(self, sd: str): + """Sets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :param sd: The sd of this Snssai. + :type sd: str + """ + if sd is not None and not re.search(r'^[A-Fa-f0-9]{6}$', sd): # noqa: E501 + raise ValueError(r"Invalid value for `sd`, must be a follow pattern or equal to `/^[A-Fa-f0-9]{6}$/`") # noqa: E501 + + self._sd = sd diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/openapi/openapi.yaml b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/openapi/openapi.yaml index 7e794c1a..7ea3b647 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/openapi/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.0 info: - description: "API for invocation logs. \n© 2024, 3GPP Organizational Partners (ARIB,\ + description: "API for invocation logs. \n© 2025, 3GPP Organizational Partners (ARIB,\ \ ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Logging_API_Invocation_API - version: 1.3.0 + version: 1.4.0-alpha.2 externalDocs: - description: 3GPP TS 29.222 V18.6.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V19.3.0 Common API Framework for 3GPP Northbound APIs url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: - url: "{apiRoot}/api-invocation-logs/v1" @@ -210,6 +210,12 @@ components: result: result protocol: HTTP_1_1 apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -247,6 +253,12 @@ components: result: result protocol: HTTP_1_1 apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -316,6 +328,12 @@ components: result: result protocol: HTTP_1_1 apiVersion: apiVersion + netSliceInfo: + ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId destInterface: ipv6Addr: ipv6Addr grantTypes: @@ -338,7 +356,7 @@ components: type: string apiName: description: | - Name of the API which was invoked, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + Contains the invoked API name set to the value of the "" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. title: apiName type: string apiVersion: @@ -388,6 +406,8 @@ components: It includes the node identifier (as defined in IETF RFC 7239 of all forwarding entities between the API invoker and the AEF, concatenated with comma and space, e.g. 192.0.2.43:80, unknown:_OBFport, 203.0.113.60 title: fwdInterface type: string + netSliceInfo: + $ref: '#/components/schemas/NetSliceId' required: - apiId - apiName @@ -520,7 +540,7 @@ components: apiPrefix: apiPrefix ipv4Addr: ipv4Addr nullable: true - oneOf: + oneOf: - required: ["fqdn"] - required: ["ipv4Addr"] - required: ["ipv6Addr"] @@ -581,6 +601,39 @@ components: \ Security method 2 (Using PKI) as described in 3GPP TS 33.122.\n- OAUTH:\ \ Security method 3 (TLS with OAuth token) as described in 3GPP TS 33.122.\n" title: SecurityMethod + NetSliceId: + description: | + Represents the network slice identification information. + example: + ensi: ensi + snssai: + sd: sd + sst: 37 + nsiId: nsiId + nullable: true + oneOf: + - required: ["snssai"] + - required: ["nsiId"] + - required: ["ensi"] + properties: + snssai: + $ref: '#/components/schemas/Snssai' + nsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string + ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string + title: NetSliceId + type: object + Ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string Ipv4Addr: description: | string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166. @@ -618,3 +671,35 @@ components: \ authorization code.\n- AUTHORIZATION_CODE_WITH_PKCE: Indicate that the grant\ \ type is authorization code with PKCE.\n" title: OAuthGrantType + Snssai: + description: | + When Snssai needs to be converted to string (e.g. when used in maps as key), the string shall be composed of one to three digits "sst" optionally followed by "-" and 6 hexadecimal digits "sd". + example: + sd: sd + sst: 37 + properties: + sst: + description: "Unsigned integer, within the range 0 to 255, representing\ + \ the Slice/Service Type. It indicates the expected Network Slice behaviour\ + \ in terms of features and services. Values 0 to 127 correspond to the\ + \ standardized SST range. Values 128 to 255 correspond to the Operator-specific\ + \ range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are\ + \ defined in clause 5.15.2.2 of 3GPP TS 23.501. \n" + maximum: 255 + minimum: 0 + title: sst + type: integer + sd: + description: | + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. + pattern: "^[A-Fa-f0-9]{6}$" + title: sd + type: string + required: + - sst + title: Snssai + type: object + NsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/__init__.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/__init__.py index 5282c992..52299ec8 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/__init__.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/__init__.py @@ -1,9 +1,10 @@ import logging import connexion -from api_invocation_logs.encoder import JSONEncoder from flask_testing import TestCase +from api_invocation_logs.encoder import JSONEncoder + class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/test_default_controller.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/test_default_controller.py index 1475dbad..534b5d2c 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/test_default_controller.py @@ -1,9 +1,10 @@ import unittest +from flask import json + from api_invocation_logs.models.invocation_log import InvocationLog # noqa: E501 from api_invocation_logs.models.problem_details import ProblemDetails # noqa: E501 from api_invocation_logs.test import BaseTestCase -from flask import json class TestDefaultController(BaseTestCase): @@ -14,7 +15,7 @@ class TestDefaultController(BaseTestCase): """ - invocation_log = {"supportedFeatures":"supportedFeatures","apiInvokerId":"apiInvokerId","aefId":"aefId","logs":[{"apiName":"apiName","invocationTime":"2000-01-23T04:56:07.000+00:00","srcInterface":{"ipv6Addr":"ipv6Addr","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":39500,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"fwdInterface":"fwdInterface","resourceName":"resourceName","uri":"uri","inputParameters":"","invocationLatency":0,"result":"result","protocol":"HTTP_1_1","apiVersion":"apiVersion","destInterface":{"ipv6Addr":"ipv6Addr","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":39500,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"operation":"GET","apiId":"apiId","outputParameters":""},{"apiName":"apiName","invocationTime":"2000-01-23T04:56:07.000+00:00","srcInterface":{"ipv6Addr":"ipv6Addr","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":39500,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"fwdInterface":"fwdInterface","resourceName":"resourceName","uri":"uri","inputParameters":"","invocationLatency":0,"result":"result","protocol":"HTTP_1_1","apiVersion":"apiVersion","destInterface":{"ipv6Addr":"ipv6Addr","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":39500,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"operation":"GET","apiId":"apiId","outputParameters":""}]} + invocation_log = {"supportedFeatures":"supportedFeatures","apiInvokerId":"apiInvokerId","aefId":"aefId","logs":[{"apiName":"apiName","invocationTime":"2000-01-23T04:56:07.000+00:00","srcInterface":{"ipv6Addr":"ipv6Addr","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":39500,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"fwdInterface":"fwdInterface","resourceName":"resourceName","uri":"uri","inputParameters":"","invocationLatency":0,"result":"result","protocol":"HTTP_1_1","apiVersion":"apiVersion","netSliceInfo":{"ensi":"ensi","snssai":{"sd":"sd","sst":37},"nsiId":"nsiId"},"destInterface":{"ipv6Addr":"ipv6Addr","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":39500,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"operation":"GET","apiId":"apiId","outputParameters":""},{"apiName":"apiName","invocationTime":"2000-01-23T04:56:07.000+00:00","srcInterface":{"ipv6Addr":"ipv6Addr","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":39500,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"fwdInterface":"fwdInterface","resourceName":"resourceName","uri":"uri","inputParameters":"","invocationLatency":0,"result":"result","protocol":"HTTP_1_1","apiVersion":"apiVersion","netSliceInfo":{"ensi":"ensi","snssai":{"sd":"sd","sst":37},"nsiId":"nsiId"},"destInterface":{"ipv6Addr":"ipv6Addr","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":39500,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"operation":"GET","apiId":"apiId","outputParameters":""}]} headers = { 'Accept': 'application/json', 'Content-Type': 'application/json', diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/util.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/util.py index 598868c3..a253e469 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/util.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/util.py @@ -1,8 +1,8 @@ import datetime +import typing from api_invocation_logs import typing_utils - def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py index aed84929..e96a0db8 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py @@ -1,5 +1,5 @@ - -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "api_invocation_logs" VERSION = "1.0.0" @@ -31,7 +31,7 @@ setup( entry_points={ 'console_scripts': ['api_invocation_logs=api_invocation_logs.__main__:main']}, long_description="""\ - API for invocation logs. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for invocation logs. © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) -- GitLab From 7fd9bc33af5dc16e36c7a961bc5d2ecdcebac69e Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Thu, 27 Nov 2025 14:48:35 +0100 Subject: [PATCH 047/101] REL 19 New Open Discover Service API --- .../.dockerignore | 72 + .../.gitignore | 66 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 58 + .../.openapi-generator/VERSION | 1 + .../.travis.yml | 14 + .../Dockerfile | 16 + .../README.md | 49 + .../git_push.sh | 57 + .../openapi_server/__init__.py | 0 .../openapi_server/__main__.py | 19 + .../openapi_server/controllers/__init__.py | 0 .../controllers/default_controller.py | 63 + .../controllers/security_controller.py | 2 + .../openapi_server/encoder.py | 19 + .../openapi_server/models/__init__.py | 36 + .../openapi_server/models/aef_location.py | 119 + .../openapi_server/models/api_status.py | 65 + .../openapi_server/models/base_model.py | 68 + .../openapi_server/models/civic_address.py | 919 ++++++ .../models/communication_type.py | 34 + .../openapi_server/models/custom_operation.py | 155 + .../openapi_server/models/data_format.py | 34 + .../openapi_server/models/ellipsoid_arc.py | 265 ++ .../openapi_server/models/gad_shape.py | 65 + .../openapi_server/models/geographic_area.py | 471 +++ .../models/geographical_coordinates.py | 99 + .../openapi_server/models/invalid_param.py | 93 + .../local2d_point_uncertainty_ellipse.py | 191 ++ .../local3d_point_uncertainty_ellipsoid.py | 223 ++ .../openapi_server/models/local_origin.py | 151 + .../openapi_server/models/open_aef_profile.py | 203 ++ .../openapi_server/models/open_api_details.py | 257 ++ .../models/open_discovery_resp.py | 99 + .../openapi_server/models/operation.py | 34 + .../openapi_server/models/point.py | 97 + .../openapi_server/models/point_altitude.py | 131 + .../models/point_altitude_uncertainty.py | 259 ++ .../models/point_uncertainty_circle.py | 129 + .../models/point_uncertainty_ellipse.py | 161 + .../openapi_server/models/polygon.py | 103 + .../openapi_server/models/problem_details.py | 267 ++ .../openapi_server/models/protocol.py | 34 + .../models/relative_cartesian_location.py | 123 + .../openapi_server/models/res_oper_info.py | 121 + .../openapi_server/models/resource.py | 245 ++ .../openapi_server/models/service_kpis.py | 277 ++ .../models/supported_gad_shapes.py | 34 + .../models/uncertainty_ellipse.py | 133 + .../models/uncertainty_ellipsoid.py | 165 + .../openapi_server/models/version.py | 157 + .../openapi_server/openapi/openapi.yaml | 2675 +++++++++++++++++ .../openapi_server/test/__init__.py | 16 + .../test/test_default_controller.py | 50 + .../openapi_server/typing_utils.py | 30 + .../openapi_server/util.py | 147 + .../requirements.txt | 13 + .../setup.py | 37 + .../test-requirements.txt | 4 + .../tox.ini | 11 + 60 files changed, 9459 insertions(+) create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/.dockerignore create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/.gitignore create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator-ignore create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator/FILES create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator/VERSION create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/.travis.yml create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/Dockerfile create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/README.md create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/git_push.sh create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__init__.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__main__.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/__init__.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/default_controller.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/security_controller.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/encoder.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/__init__.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/aef_location.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/api_status.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/base_model.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/civic_address.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/communication_type.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/custom_operation.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/data_format.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/ellipsoid_arc.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/gad_shape.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographic_area.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographical_coordinates.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/invalid_param.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local2d_point_uncertainty_ellipse.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local3d_point_uncertainty_ellipsoid.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local_origin.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_aef_profile.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_api_details.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_discovery_resp.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/operation.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude_uncertainty.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_circle.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_ellipse.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/polygon.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/problem_details.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/protocol.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/relative_cartesian_location.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/res_oper_info.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/resource.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/service_kpis.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/supported_gad_shapes.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipse.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipsoid.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/version.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/openapi/openapi.yaml create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/__init__.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/test_default_controller.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/typing_utils.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/util.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/requirements.txt create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/setup.py create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/test-requirements.txt create mode 100644 services/TS29222_CAPIF_Open_Discover_Service_API/tox.ini diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/.dockerignore b/services/TS29222_CAPIF_Open_Discover_Service_API/.dockerignore new file mode 100644 index 00000000..f9619601 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/.dockerignore @@ -0,0 +1,72 @@ +.travis.yaml +.openapi-generator-ignore +README.md +tox.ini +git_push.sh +test-requirements.txt +setup.py + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/.gitignore b/services/TS29222_CAPIF_Open_Discover_Service_API/.gitignore new file mode 100644 index 00000000..43995bd4 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator-ignore b/services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator/FILES new file mode 100644 index 00000000..9b3cf66d --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator/FILES @@ -0,0 +1,58 @@ +.dockerignore +.gitignore +.openapi-generator-ignore +.travis.yml +Dockerfile +README.md +git_push.sh +openapi_server/__init__.py +openapi_server/__main__.py +openapi_server/controllers/__init__.py +openapi_server/controllers/default_controller.py +openapi_server/controllers/security_controller.py +openapi_server/encoder.py +openapi_server/models/__init__.py +openapi_server/models/aef_location.py +openapi_server/models/api_status.py +openapi_server/models/base_model.py +openapi_server/models/civic_address.py +openapi_server/models/communication_type.py +openapi_server/models/custom_operation.py +openapi_server/models/data_format.py +openapi_server/models/ellipsoid_arc.py +openapi_server/models/gad_shape.py +openapi_server/models/geographic_area.py +openapi_server/models/geographical_coordinates.py +openapi_server/models/invalid_param.py +openapi_server/models/local2d_point_uncertainty_ellipse.py +openapi_server/models/local3d_point_uncertainty_ellipsoid.py +openapi_server/models/local_origin.py +openapi_server/models/open_aef_profile.py +openapi_server/models/open_api_details.py +openapi_server/models/open_discovery_resp.py +openapi_server/models/operation.py +openapi_server/models/point.py +openapi_server/models/point_altitude.py +openapi_server/models/point_altitude_uncertainty.py +openapi_server/models/point_uncertainty_circle.py +openapi_server/models/point_uncertainty_ellipse.py +openapi_server/models/polygon.py +openapi_server/models/problem_details.py +openapi_server/models/protocol.py +openapi_server/models/relative_cartesian_location.py +openapi_server/models/res_oper_info.py +openapi_server/models/resource.py +openapi_server/models/service_kpis.py +openapi_server/models/supported_gad_shapes.py +openapi_server/models/uncertainty_ellipse.py +openapi_server/models/uncertainty_ellipsoid.py +openapi_server/models/version.py +openapi_server/openapi/openapi.yaml +openapi_server/test/__init__.py +openapi_server/test/test_default_controller.py +openapi_server/typing_utils.py +openapi_server/util.py +requirements.txt +setup.py +test-requirements.txt +tox.ini diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator/VERSION new file mode 100644 index 00000000..b23eb275 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.11.0 diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/.travis.yml b/services/TS29222_CAPIF_Open_Discover_Service_API/.travis.yml new file mode 100644 index 00000000..ad71ee5c --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/.travis.yml @@ -0,0 +1,14 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "3.2" + - "3.3" + - "3.4" + - "3.5" + - "3.6" + - "3.7" + - "3.8" +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/Dockerfile b/services/TS29222_CAPIF_Open_Discover_Service_API/Dockerfile new file mode 100644 index 00000000..4857637c --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3-alpine + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +COPY requirements.txt /usr/src/app/ + +RUN pip3 install --no-cache-dir -r requirements.txt + +COPY . /usr/src/app + +EXPOSE 8080 + +ENTRYPOINT ["python3"] + +CMD ["-m", "openapi_server"] \ No newline at end of file diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/README.md b/services/TS29222_CAPIF_Open_Discover_Service_API/README.md new file mode 100644 index 00000000..2786f7a6 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/README.md @@ -0,0 +1,49 @@ +# OpenAPI generated server + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the +[OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This +is an example of building a OpenAPI-enabled Flask server. + +This example uses the [Connexion](https://github.com/zalando/connexion) library on top of Flask. + +## Requirements +Python 3.5.2+ + +## Usage +To run the server, please execute the following from the root directory: + +``` +pip3 install -r requirements.txt +python3 -m openapi_server +``` + +and open your browser to here: + +``` +http://localhost:8080/open-api-disc/v1/ui/ +``` + +Your OpenAPI definition lives here: + +``` +http://localhost:8080/open-api-disc/v1/openapi.json +``` + +To launch the integration tests, use tox: +``` +sudo pip install tox +tox +``` + +## Running with Docker + +To run the server on a Docker container, please execute the following from the root directory: + +```bash +# building the image +docker build -t openapi_server . + +# starting up a container +docker run -p 8080:8080 openapi_server +``` \ No newline at end of file diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/git_push.sh b/services/TS29222_CAPIF_Open_Discover_Service_API/git_push.sh new file mode 100644 index 00000000..f53a75d4 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__init__.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__main__.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__main__.py new file mode 100644 index 00000000..4ebe8e90 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__main__.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import connexion + +from openapi_server import encoder + + +def main(): + app = connexion.App(__name__, specification_dir='./openapi/') + app.app.json_encoder = encoder.JSONEncoder + app.add_api('openapi.yaml', + arguments={'title': 'CAPIF_Open_Discover_Service_API'}, + pythonic_params=True) + + app.run(port=8080) + + +if __name__ == '__main__': + main() diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/__init__.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/default_controller.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/default_controller.py new file mode 100644 index 00000000..44177942 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/default_controller.py @@ -0,0 +1,63 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from openapi_server.models.aef_location import AefLocation # noqa: E501 +from openapi_server.models.communication_type import CommunicationType # noqa: E501 +from openapi_server.models.data_format import DataFormat # noqa: E501 +from openapi_server.models.open_discovery_resp import OpenDiscoveryResp # noqa: E501 +from openapi_server.models.problem_details import ProblemDetails # noqa: E501 +from openapi_server.models.protocol import Protocol # noqa: E501 +from openapi_server.models.res_oper_info import ResOperInfo # noqa: E501 +from openapi_server.models.service_kpis import ServiceKpis # noqa: E501 +from openapi_server import util + + +def service_apis_get(api_names=None, api_versions=None, comm_type=None, protocols=None, data_format=None, api_cats=None, preferred_aef_loc=None, api_prov_names=None, api_supported_features=None, api_ids=None, service_kpis=None, res_ops=None, supported_features=None): # noqa: E501 + """service_apis_get + + Enables Open discovery of the currently registered at the CCF and satisfying a number of filter criteria. # noqa: E501 + + :param api_names: Contains the name(s) of the target Service API(s). + :type api_names: List[str] + :param api_versions: Contains the major version(s) (e.g., v1) of the target Service API(s). + :type api_versions: Dict[str, ] + :param comm_type: Contains the communication type supported by the target Service API(s). + :type comm_type: dict | bytes + :param protocols: Contains the protocol(s) supported by the target Service API(s). + :type protocols: list | bytes + :param data_format: Contains data format(s) supported by the target Service API(s). + :type data_format: dict | bytes + :param api_cats: Contains the category(ies) of the target Service API(s). + :type api_cats: List[str] + :param preferred_aef_loc: Contains the preferred location information for AEF(s) exposing the target Service API(s). This query parameter is ignored by the CCF if there are no matching records at the CCF. + :type preferred_aef_loc: dict | bytes + :param api_prov_names: Contains the name(s) of the provider(s) of the target Service API(s). + :type api_prov_names: List[str] + :param api_supported_features: Contains the features supported by the discovered service API indicated by api-name parameter. This may only be present if api-name query parameter is present. + :type api_supported_features: Dict[str, str] + :param api_ids: Contains the identifier(s) of the targeted service APIs. + :type api_ids: List[str] + :param service_kpis: Contains iInformation about service characteristics provided by the targeted service API(s). + :type service_kpis: dict | bytes + :param res_ops: Contains the list of supported API resource(s) and service operation(s). + :type res_ops: list | bytes + :param supported_features: Contains a list of supported features among the ones defined in clause 8.1.6. This attributed shall be present only when feature negotiation needs to take place. + :type supported_features: str + + :rtype: Union[OpenDiscoveryResp, Tuple[OpenDiscoveryResp, int], Tuple[OpenDiscoveryResp, int, Dict[str, str]] + """ + if connexion.request.is_json: + comm_type = CommunicationType.from_dict(connexion.request.get_json()) # noqa: E501 + if connexion.request.is_json: + protocols = [Protocol.from_dict(d) for d in connexion.request.get_json()] # noqa: E501 + if connexion.request.is_json: + data_format = DataFormat.from_dict(connexion.request.get_json()) # noqa: E501 + if connexion.request.is_json: + preferred_aef_loc = AefLocation.from_dict(connexion.request.get_json()) # noqa: E501 + if connexion.request.is_json: + service_kpis = ServiceKpis.from_dict(connexion.request.get_json()) # noqa: E501 + if connexion.request.is_json: + res_ops = [ResOperInfo.from_dict(d) for d in connexion.request.get_json()] # noqa: E501 + return 'do some magic!' diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/security_controller.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/security_controller.py new file mode 100644 index 00000000..6d294ffd --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/security_controller.py @@ -0,0 +1,2 @@ +from typing import List + diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/encoder.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/encoder.py new file mode 100644 index 00000000..60f4fa67 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/encoder.py @@ -0,0 +1,19 @@ +from connexion.apps.flask_app import FlaskJSONEncoder + +from openapi_server.models.base_model import Model + + +class JSONEncoder(FlaskJSONEncoder): + include_nulls = False + + def default(self, o): + if isinstance(o, Model): + dikt = {} + for attr in o.openapi_types: + value = getattr(o, attr) + if value is None and not self.include_nulls: + continue + attr = o.attribute_map[attr] + dikt[attr] = value + return dikt + return FlaskJSONEncoder.default(self, o) diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/__init__.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/__init__.py new file mode 100644 index 00000000..35a94576 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/__init__.py @@ -0,0 +1,36 @@ +# flake8: noqa +# import models into model package +from openapi_server.models.aef_location import AefLocation +from openapi_server.models.api_status import ApiStatus +from openapi_server.models.civic_address import CivicAddress +from openapi_server.models.communication_type import CommunicationType +from openapi_server.models.custom_operation import CustomOperation +from openapi_server.models.data_format import DataFormat +from openapi_server.models.ellipsoid_arc import EllipsoidArc +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.geographic_area import GeographicArea +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server.models.invalid_param import InvalidParam +from openapi_server.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse +from openapi_server.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid +from openapi_server.models.local_origin import LocalOrigin +from openapi_server.models.open_api_details import OpenAPIDetails +from openapi_server.models.open_aef_profile import OpenAefProfile +from openapi_server.models.open_discovery_resp import OpenDiscoveryResp +from openapi_server.models.operation import Operation +from openapi_server.models.point import Point +from openapi_server.models.point_altitude import PointAltitude +from openapi_server.models.point_altitude_uncertainty import PointAltitudeUncertainty +from openapi_server.models.point_uncertainty_circle import PointUncertaintyCircle +from openapi_server.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from openapi_server.models.polygon import Polygon +from openapi_server.models.problem_details import ProblemDetails +from openapi_server.models.protocol import Protocol +from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation +from openapi_server.models.res_oper_info import ResOperInfo +from openapi_server.models.resource import Resource +from openapi_server.models.service_kpis import ServiceKpis +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse +from openapi_server.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from openapi_server.models.version import Version diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/aef_location.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/aef_location.py new file mode 100644 index 00000000..7e4da31c --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/aef_location.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.civic_address import CivicAddress +from openapi_server.models.geographic_area import GeographicArea +from openapi_server import util + +from openapi_server.models.civic_address import CivicAddress # noqa: E501 +from openapi_server.models.geographic_area import GeographicArea # noqa: E501 + +class AefLocation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, civic_addr=None, geo_area=None, dc_id=None): # noqa: E501 + """AefLocation - a model defined in OpenAPI + + :param civic_addr: The civic_addr of this AefLocation. # noqa: E501 + :type civic_addr: CivicAddress + :param geo_area: The geo_area of this AefLocation. # noqa: E501 + :type geo_area: GeographicArea + :param dc_id: The dc_id of this AefLocation. # noqa: E501 + :type dc_id: str + """ + self.openapi_types = { + 'civic_addr': CivicAddress, + 'geo_area': GeographicArea, + 'dc_id': str + } + + self.attribute_map = { + 'civic_addr': 'civicAddr', + 'geo_area': 'geoArea', + 'dc_id': 'dcId' + } + + self._civic_addr = civic_addr + self._geo_area = geo_area + self._dc_id = dc_id + + @classmethod + def from_dict(cls, dikt) -> 'AefLocation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The AefLocation of this AefLocation. # noqa: E501 + :rtype: AefLocation + """ + return util.deserialize_model(dikt, cls) + + @property + def civic_addr(self) -> CivicAddress: + """Gets the civic_addr of this AefLocation. + + + :return: The civic_addr of this AefLocation. + :rtype: CivicAddress + """ + return self._civic_addr + + @civic_addr.setter + def civic_addr(self, civic_addr: CivicAddress): + """Sets the civic_addr of this AefLocation. + + + :param civic_addr: The civic_addr of this AefLocation. + :type civic_addr: CivicAddress + """ + + self._civic_addr = civic_addr + + @property + def geo_area(self) -> GeographicArea: + """Gets the geo_area of this AefLocation. + + + :return: The geo_area of this AefLocation. + :rtype: GeographicArea + """ + return self._geo_area + + @geo_area.setter + def geo_area(self, geo_area: GeographicArea): + """Sets the geo_area of this AefLocation. + + + :param geo_area: The geo_area of this AefLocation. + :type geo_area: GeographicArea + """ + + self._geo_area = geo_area + + @property + def dc_id(self) -> str: + """Gets the dc_id of this AefLocation. + + Identifies the data center where the AEF providing the service API is located. # noqa: E501 + + :return: The dc_id of this AefLocation. + :rtype: str + """ + return self._dc_id + + @dc_id.setter + def dc_id(self, dc_id: str): + """Sets the dc_id of this AefLocation. + + Identifies the data center where the AEF providing the service API is located. # noqa: E501 + + :param dc_id: The dc_id of this AefLocation. + :type dc_id: str + """ + + self._dc_id = dc_id diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/api_status.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/api_status.py new file mode 100644 index 00000000..8785793c --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/api_status.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class ApiStatus(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, aef_ids=None): # noqa: E501 + """ApiStatus - a model defined in OpenAPI + + :param aef_ids: The aef_ids of this ApiStatus. # noqa: E501 + :type aef_ids: List[str] + """ + self.openapi_types = { + 'aef_ids': List[str] + } + + self.attribute_map = { + 'aef_ids': 'aefIds' + } + + self._aef_ids = aef_ids + + @classmethod + def from_dict(cls, dikt) -> 'ApiStatus': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ApiStatus of this ApiStatus. # noqa: E501 + :rtype: ApiStatus + """ + return util.deserialize_model(dikt, cls) + + @property + def aef_ids(self) -> List[str]: + """Gets the aef_ids of this ApiStatus. + + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 + + :return: The aef_ids of this ApiStatus. + :rtype: List[str] + """ + return self._aef_ids + + @aef_ids.setter + def aef_ids(self, aef_ids: List[str]): + """Sets the aef_ids of this ApiStatus. + + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 + + :param aef_ids: The aef_ids of this ApiStatus. + :type aef_ids: List[str] + """ + if aef_ids is None: + raise ValueError("Invalid value for `aef_ids`, must not be `None`") # noqa: E501 + + self._aef_ids = aef_ids diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/base_model.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/base_model.py new file mode 100644 index 00000000..c01b423a --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/base_model.py @@ -0,0 +1,68 @@ +import pprint + +import typing + +from openapi_server import util + +T = typing.TypeVar('T') + + +class Model: + # openapiTypes: The key is attribute name and the + # value is attribute type. + openapi_types: typing.Dict[str, type] = {} + + # attributeMap: The key is attribute name and the + # value is json key in definition. + attribute_map: typing.Dict[str, str] = {} + + @classmethod + def from_dict(cls: typing.Type[T], dikt) -> T: + """Returns the dict as a model""" + return util.deserialize_model(dikt, cls) + + def to_dict(self): + """Returns the model properties as a dict + + :rtype: dict + """ + result = {} + + for attr in self.openapi_types: + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model + + :rtype: str + """ + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/civic_address.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/civic_address.py new file mode 100644 index 00000000..5f0f6f37 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/civic_address.py @@ -0,0 +1,919 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class CivicAddress(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, country=None, a1=None, a2=None, a3=None, a4=None, a5=None, a6=None, prd=None, pod=None, sts=None, hno=None, hns=None, lmk=None, loc=None, nam=None, pc=None, bld=None, unit=None, flr=None, room=None, plc=None, pcn=None, pobox=None, addcode=None, seat=None, rd=None, rdsec=None, rdbr=None, rdsubbr=None, prm=None, pom=None, usage_rules=None, method=None, provided_by=None): # noqa: E501 + """CivicAddress - a model defined in OpenAPI + + :param country: The country of this CivicAddress. # noqa: E501 + :type country: str + :param a1: The a1 of this CivicAddress. # noqa: E501 + :type a1: str + :param a2: The a2 of this CivicAddress. # noqa: E501 + :type a2: str + :param a3: The a3 of this CivicAddress. # noqa: E501 + :type a3: str + :param a4: The a4 of this CivicAddress. # noqa: E501 + :type a4: str + :param a5: The a5 of this CivicAddress. # noqa: E501 + :type a5: str + :param a6: The a6 of this CivicAddress. # noqa: E501 + :type a6: str + :param prd: The prd of this CivicAddress. # noqa: E501 + :type prd: str + :param pod: The pod of this CivicAddress. # noqa: E501 + :type pod: str + :param sts: The sts of this CivicAddress. # noqa: E501 + :type sts: str + :param hno: The hno of this CivicAddress. # noqa: E501 + :type hno: str + :param hns: The hns of this CivicAddress. # noqa: E501 + :type hns: str + :param lmk: The lmk of this CivicAddress. # noqa: E501 + :type lmk: str + :param loc: The loc of this CivicAddress. # noqa: E501 + :type loc: str + :param nam: The nam of this CivicAddress. # noqa: E501 + :type nam: str + :param pc: The pc of this CivicAddress. # noqa: E501 + :type pc: str + :param bld: The bld of this CivicAddress. # noqa: E501 + :type bld: str + :param unit: The unit of this CivicAddress. # noqa: E501 + :type unit: str + :param flr: The flr of this CivicAddress. # noqa: E501 + :type flr: str + :param room: The room of this CivicAddress. # noqa: E501 + :type room: str + :param plc: The plc of this CivicAddress. # noqa: E501 + :type plc: str + :param pcn: The pcn of this CivicAddress. # noqa: E501 + :type pcn: str + :param pobox: The pobox of this CivicAddress. # noqa: E501 + :type pobox: str + :param addcode: The addcode of this CivicAddress. # noqa: E501 + :type addcode: str + :param seat: The seat of this CivicAddress. # noqa: E501 + :type seat: str + :param rd: The rd of this CivicAddress. # noqa: E501 + :type rd: str + :param rdsec: The rdsec of this CivicAddress. # noqa: E501 + :type rdsec: str + :param rdbr: The rdbr of this CivicAddress. # noqa: E501 + :type rdbr: str + :param rdsubbr: The rdsubbr of this CivicAddress. # noqa: E501 + :type rdsubbr: str + :param prm: The prm of this CivicAddress. # noqa: E501 + :type prm: str + :param pom: The pom of this CivicAddress. # noqa: E501 + :type pom: str + :param usage_rules: The usage_rules of this CivicAddress. # noqa: E501 + :type usage_rules: str + :param method: The method of this CivicAddress. # noqa: E501 + :type method: str + :param provided_by: The provided_by of this CivicAddress. # noqa: E501 + :type provided_by: str + """ + self.openapi_types = { + 'country': str, + 'a1': str, + 'a2': str, + 'a3': str, + 'a4': str, + 'a5': str, + 'a6': str, + 'prd': str, + 'pod': str, + 'sts': str, + 'hno': str, + 'hns': str, + 'lmk': str, + 'loc': str, + 'nam': str, + 'pc': str, + 'bld': str, + 'unit': str, + 'flr': str, + 'room': str, + 'plc': str, + 'pcn': str, + 'pobox': str, + 'addcode': str, + 'seat': str, + 'rd': str, + 'rdsec': str, + 'rdbr': str, + 'rdsubbr': str, + 'prm': str, + 'pom': str, + 'usage_rules': str, + 'method': str, + 'provided_by': str + } + + self.attribute_map = { + 'country': 'country', + 'a1': 'A1', + 'a2': 'A2', + 'a3': 'A3', + 'a4': 'A4', + 'a5': 'A5', + 'a6': 'A6', + 'prd': 'PRD', + 'pod': 'POD', + 'sts': 'STS', + 'hno': 'HNO', + 'hns': 'HNS', + 'lmk': 'LMK', + 'loc': 'LOC', + 'nam': 'NAM', + 'pc': 'PC', + 'bld': 'BLD', + 'unit': 'UNIT', + 'flr': 'FLR', + 'room': 'ROOM', + 'plc': 'PLC', + 'pcn': 'PCN', + 'pobox': 'POBOX', + 'addcode': 'ADDCODE', + 'seat': 'SEAT', + 'rd': 'RD', + 'rdsec': 'RDSEC', + 'rdbr': 'RDBR', + 'rdsubbr': 'RDSUBBR', + 'prm': 'PRM', + 'pom': 'POM', + 'usage_rules': 'usageRules', + 'method': 'method', + 'provided_by': 'providedBy' + } + + self._country = country + self._a1 = a1 + self._a2 = a2 + self._a3 = a3 + self._a4 = a4 + self._a5 = a5 + self._a6 = a6 + self._prd = prd + self._pod = pod + self._sts = sts + self._hno = hno + self._hns = hns + self._lmk = lmk + self._loc = loc + self._nam = nam + self._pc = pc + self._bld = bld + self._unit = unit + self._flr = flr + self._room = room + self._plc = plc + self._pcn = pcn + self._pobox = pobox + self._addcode = addcode + self._seat = seat + self._rd = rd + self._rdsec = rdsec + self._rdbr = rdbr + self._rdsubbr = rdsubbr + self._prm = prm + self._pom = pom + self._usage_rules = usage_rules + self._method = method + self._provided_by = provided_by + + @classmethod + def from_dict(cls, dikt) -> 'CivicAddress': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CivicAddress of this CivicAddress. # noqa: E501 + :rtype: CivicAddress + """ + return util.deserialize_model(dikt, cls) + + @property + def country(self) -> str: + """Gets the country of this CivicAddress. + + + :return: The country of this CivicAddress. + :rtype: str + """ + return self._country + + @country.setter + def country(self, country: str): + """Sets the country of this CivicAddress. + + + :param country: The country of this CivicAddress. + :type country: str + """ + + self._country = country + + @property + def a1(self) -> str: + """Gets the a1 of this CivicAddress. + + + :return: The a1 of this CivicAddress. + :rtype: str + """ + return self._a1 + + @a1.setter + def a1(self, a1: str): + """Sets the a1 of this CivicAddress. + + + :param a1: The a1 of this CivicAddress. + :type a1: str + """ + + self._a1 = a1 + + @property + def a2(self) -> str: + """Gets the a2 of this CivicAddress. + + + :return: The a2 of this CivicAddress. + :rtype: str + """ + return self._a2 + + @a2.setter + def a2(self, a2: str): + """Sets the a2 of this CivicAddress. + + + :param a2: The a2 of this CivicAddress. + :type a2: str + """ + + self._a2 = a2 + + @property + def a3(self) -> str: + """Gets the a3 of this CivicAddress. + + + :return: The a3 of this CivicAddress. + :rtype: str + """ + return self._a3 + + @a3.setter + def a3(self, a3: str): + """Sets the a3 of this CivicAddress. + + + :param a3: The a3 of this CivicAddress. + :type a3: str + """ + + self._a3 = a3 + + @property + def a4(self) -> str: + """Gets the a4 of this CivicAddress. + + + :return: The a4 of this CivicAddress. + :rtype: str + """ + return self._a4 + + @a4.setter + def a4(self, a4: str): + """Sets the a4 of this CivicAddress. + + + :param a4: The a4 of this CivicAddress. + :type a4: str + """ + + self._a4 = a4 + + @property + def a5(self) -> str: + """Gets the a5 of this CivicAddress. + + + :return: The a5 of this CivicAddress. + :rtype: str + """ + return self._a5 + + @a5.setter + def a5(self, a5: str): + """Sets the a5 of this CivicAddress. + + + :param a5: The a5 of this CivicAddress. + :type a5: str + """ + + self._a5 = a5 + + @property + def a6(self) -> str: + """Gets the a6 of this CivicAddress. + + + :return: The a6 of this CivicAddress. + :rtype: str + """ + return self._a6 + + @a6.setter + def a6(self, a6: str): + """Sets the a6 of this CivicAddress. + + + :param a6: The a6 of this CivicAddress. + :type a6: str + """ + + self._a6 = a6 + + @property + def prd(self) -> str: + """Gets the prd of this CivicAddress. + + + :return: The prd of this CivicAddress. + :rtype: str + """ + return self._prd + + @prd.setter + def prd(self, prd: str): + """Sets the prd of this CivicAddress. + + + :param prd: The prd of this CivicAddress. + :type prd: str + """ + + self._prd = prd + + @property + def pod(self) -> str: + """Gets the pod of this CivicAddress. + + + :return: The pod of this CivicAddress. + :rtype: str + """ + return self._pod + + @pod.setter + def pod(self, pod: str): + """Sets the pod of this CivicAddress. + + + :param pod: The pod of this CivicAddress. + :type pod: str + """ + + self._pod = pod + + @property + def sts(self) -> str: + """Gets the sts of this CivicAddress. + + + :return: The sts of this CivicAddress. + :rtype: str + """ + return self._sts + + @sts.setter + def sts(self, sts: str): + """Sets the sts of this CivicAddress. + + + :param sts: The sts of this CivicAddress. + :type sts: str + """ + + self._sts = sts + + @property + def hno(self) -> str: + """Gets the hno of this CivicAddress. + + + :return: The hno of this CivicAddress. + :rtype: str + """ + return self._hno + + @hno.setter + def hno(self, hno: str): + """Sets the hno of this CivicAddress. + + + :param hno: The hno of this CivicAddress. + :type hno: str + """ + + self._hno = hno + + @property + def hns(self) -> str: + """Gets the hns of this CivicAddress. + + + :return: The hns of this CivicAddress. + :rtype: str + """ + return self._hns + + @hns.setter + def hns(self, hns: str): + """Sets the hns of this CivicAddress. + + + :param hns: The hns of this CivicAddress. + :type hns: str + """ + + self._hns = hns + + @property + def lmk(self) -> str: + """Gets the lmk of this CivicAddress. + + + :return: The lmk of this CivicAddress. + :rtype: str + """ + return self._lmk + + @lmk.setter + def lmk(self, lmk: str): + """Sets the lmk of this CivicAddress. + + + :param lmk: The lmk of this CivicAddress. + :type lmk: str + """ + + self._lmk = lmk + + @property + def loc(self) -> str: + """Gets the loc of this CivicAddress. + + + :return: The loc of this CivicAddress. + :rtype: str + """ + return self._loc + + @loc.setter + def loc(self, loc: str): + """Sets the loc of this CivicAddress. + + + :param loc: The loc of this CivicAddress. + :type loc: str + """ + + self._loc = loc + + @property + def nam(self) -> str: + """Gets the nam of this CivicAddress. + + + :return: The nam of this CivicAddress. + :rtype: str + """ + return self._nam + + @nam.setter + def nam(self, nam: str): + """Sets the nam of this CivicAddress. + + + :param nam: The nam of this CivicAddress. + :type nam: str + """ + + self._nam = nam + + @property + def pc(self) -> str: + """Gets the pc of this CivicAddress. + + + :return: The pc of this CivicAddress. + :rtype: str + """ + return self._pc + + @pc.setter + def pc(self, pc: str): + """Sets the pc of this CivicAddress. + + + :param pc: The pc of this CivicAddress. + :type pc: str + """ + + self._pc = pc + + @property + def bld(self) -> str: + """Gets the bld of this CivicAddress. + + + :return: The bld of this CivicAddress. + :rtype: str + """ + return self._bld + + @bld.setter + def bld(self, bld: str): + """Sets the bld of this CivicAddress. + + + :param bld: The bld of this CivicAddress. + :type bld: str + """ + + self._bld = bld + + @property + def unit(self) -> str: + """Gets the unit of this CivicAddress. + + + :return: The unit of this CivicAddress. + :rtype: str + """ + return self._unit + + @unit.setter + def unit(self, unit: str): + """Sets the unit of this CivicAddress. + + + :param unit: The unit of this CivicAddress. + :type unit: str + """ + + self._unit = unit + + @property + def flr(self) -> str: + """Gets the flr of this CivicAddress. + + + :return: The flr of this CivicAddress. + :rtype: str + """ + return self._flr + + @flr.setter + def flr(self, flr: str): + """Sets the flr of this CivicAddress. + + + :param flr: The flr of this CivicAddress. + :type flr: str + """ + + self._flr = flr + + @property + def room(self) -> str: + """Gets the room of this CivicAddress. + + + :return: The room of this CivicAddress. + :rtype: str + """ + return self._room + + @room.setter + def room(self, room: str): + """Sets the room of this CivicAddress. + + + :param room: The room of this CivicAddress. + :type room: str + """ + + self._room = room + + @property + def plc(self) -> str: + """Gets the plc of this CivicAddress. + + + :return: The plc of this CivicAddress. + :rtype: str + """ + return self._plc + + @plc.setter + def plc(self, plc: str): + """Sets the plc of this CivicAddress. + + + :param plc: The plc of this CivicAddress. + :type plc: str + """ + + self._plc = plc + + @property + def pcn(self) -> str: + """Gets the pcn of this CivicAddress. + + + :return: The pcn of this CivicAddress. + :rtype: str + """ + return self._pcn + + @pcn.setter + def pcn(self, pcn: str): + """Sets the pcn of this CivicAddress. + + + :param pcn: The pcn of this CivicAddress. + :type pcn: str + """ + + self._pcn = pcn + + @property + def pobox(self) -> str: + """Gets the pobox of this CivicAddress. + + + :return: The pobox of this CivicAddress. + :rtype: str + """ + return self._pobox + + @pobox.setter + def pobox(self, pobox: str): + """Sets the pobox of this CivicAddress. + + + :param pobox: The pobox of this CivicAddress. + :type pobox: str + """ + + self._pobox = pobox + + @property + def addcode(self) -> str: + """Gets the addcode of this CivicAddress. + + + :return: The addcode of this CivicAddress. + :rtype: str + """ + return self._addcode + + @addcode.setter + def addcode(self, addcode: str): + """Sets the addcode of this CivicAddress. + + + :param addcode: The addcode of this CivicAddress. + :type addcode: str + """ + + self._addcode = addcode + + @property + def seat(self) -> str: + """Gets the seat of this CivicAddress. + + + :return: The seat of this CivicAddress. + :rtype: str + """ + return self._seat + + @seat.setter + def seat(self, seat: str): + """Sets the seat of this CivicAddress. + + + :param seat: The seat of this CivicAddress. + :type seat: str + """ + + self._seat = seat + + @property + def rd(self) -> str: + """Gets the rd of this CivicAddress. + + + :return: The rd of this CivicAddress. + :rtype: str + """ + return self._rd + + @rd.setter + def rd(self, rd: str): + """Sets the rd of this CivicAddress. + + + :param rd: The rd of this CivicAddress. + :type rd: str + """ + + self._rd = rd + + @property + def rdsec(self) -> str: + """Gets the rdsec of this CivicAddress. + + + :return: The rdsec of this CivicAddress. + :rtype: str + """ + return self._rdsec + + @rdsec.setter + def rdsec(self, rdsec: str): + """Sets the rdsec of this CivicAddress. + + + :param rdsec: The rdsec of this CivicAddress. + :type rdsec: str + """ + + self._rdsec = rdsec + + @property + def rdbr(self) -> str: + """Gets the rdbr of this CivicAddress. + + + :return: The rdbr of this CivicAddress. + :rtype: str + """ + return self._rdbr + + @rdbr.setter + def rdbr(self, rdbr: str): + """Sets the rdbr of this CivicAddress. + + + :param rdbr: The rdbr of this CivicAddress. + :type rdbr: str + """ + + self._rdbr = rdbr + + @property + def rdsubbr(self) -> str: + """Gets the rdsubbr of this CivicAddress. + + + :return: The rdsubbr of this CivicAddress. + :rtype: str + """ + return self._rdsubbr + + @rdsubbr.setter + def rdsubbr(self, rdsubbr: str): + """Sets the rdsubbr of this CivicAddress. + + + :param rdsubbr: The rdsubbr of this CivicAddress. + :type rdsubbr: str + """ + + self._rdsubbr = rdsubbr + + @property + def prm(self) -> str: + """Gets the prm of this CivicAddress. + + + :return: The prm of this CivicAddress. + :rtype: str + """ + return self._prm + + @prm.setter + def prm(self, prm: str): + """Sets the prm of this CivicAddress. + + + :param prm: The prm of this CivicAddress. + :type prm: str + """ + + self._prm = prm + + @property + def pom(self) -> str: + """Gets the pom of this CivicAddress. + + + :return: The pom of this CivicAddress. + :rtype: str + """ + return self._pom + + @pom.setter + def pom(self, pom: str): + """Sets the pom of this CivicAddress. + + + :param pom: The pom of this CivicAddress. + :type pom: str + """ + + self._pom = pom + + @property + def usage_rules(self) -> str: + """Gets the usage_rules of this CivicAddress. + + + :return: The usage_rules of this CivicAddress. + :rtype: str + """ + return self._usage_rules + + @usage_rules.setter + def usage_rules(self, usage_rules: str): + """Sets the usage_rules of this CivicAddress. + + + :param usage_rules: The usage_rules of this CivicAddress. + :type usage_rules: str + """ + + self._usage_rules = usage_rules + + @property + def method(self) -> str: + """Gets the method of this CivicAddress. + + + :return: The method of this CivicAddress. + :rtype: str + """ + return self._method + + @method.setter + def method(self, method: str): + """Sets the method of this CivicAddress. + + + :param method: The method of this CivicAddress. + :type method: str + """ + + self._method = method + + @property + def provided_by(self) -> str: + """Gets the provided_by of this CivicAddress. + + + :return: The provided_by of this CivicAddress. + :rtype: str + """ + return self._provided_by + + @provided_by.setter + def provided_by(self, provided_by: str): + """Sets the provided_by of this CivicAddress. + + + :param provided_by: The provided_by of this CivicAddress. + :type provided_by: str + """ + + self._provided_by = provided_by diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/communication_type.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/communication_type.py new file mode 100644 index 00000000..001efa0e --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/communication_type.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class CommunicationType(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """CommunicationType - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'CommunicationType': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CommunicationType of this CommunicationType. # noqa: E501 + :rtype: CommunicationType + """ + return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/custom_operation.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/custom_operation.py new file mode 100644 index 00000000..f258fc74 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/custom_operation.py @@ -0,0 +1,155 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.communication_type import CommunicationType +from openapi_server.models.operation import Operation +from openapi_server import util + +from openapi_server.models.communication_type import CommunicationType # noqa: E501 +from openapi_server.models.operation import Operation # noqa: E501 + +class CustomOperation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, comm_type=None, cust_op_name=None, operations=None, description=None): # noqa: E501 + """CustomOperation - a model defined in OpenAPI + + :param comm_type: The comm_type of this CustomOperation. # noqa: E501 + :type comm_type: CommunicationType + :param cust_op_name: The cust_op_name of this CustomOperation. # noqa: E501 + :type cust_op_name: str + :param operations: The operations of this CustomOperation. # noqa: E501 + :type operations: List[Operation] + :param description: The description of this CustomOperation. # noqa: E501 + :type description: str + """ + self.openapi_types = { + 'comm_type': CommunicationType, + 'cust_op_name': str, + 'operations': List[Operation], + 'description': str + } + + self.attribute_map = { + 'comm_type': 'commType', + 'cust_op_name': 'custOpName', + 'operations': 'operations', + 'description': 'description' + } + + self._comm_type = comm_type + self._cust_op_name = cust_op_name + self._operations = operations + self._description = description + + @classmethod + def from_dict(cls, dikt) -> 'CustomOperation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CustomOperation of this CustomOperation. # noqa: E501 + :rtype: CustomOperation + """ + return util.deserialize_model(dikt, cls) + + @property + def comm_type(self) -> CommunicationType: + """Gets the comm_type of this CustomOperation. + + + :return: The comm_type of this CustomOperation. + :rtype: CommunicationType + """ + return self._comm_type + + @comm_type.setter + def comm_type(self, comm_type: CommunicationType): + """Sets the comm_type of this CustomOperation. + + + :param comm_type: The comm_type of this CustomOperation. + :type comm_type: CommunicationType + """ + if comm_type is None: + raise ValueError("Invalid value for `comm_type`, must not be `None`") # noqa: E501 + + self._comm_type = comm_type + + @property + def cust_op_name(self) -> str: + """Gets the cust_op_name of this CustomOperation. + + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The cust_op_name of this CustomOperation. + :rtype: str + """ + return self._cust_op_name + + @cust_op_name.setter + def cust_op_name(self, cust_op_name: str): + """Sets the cust_op_name of this CustomOperation. + + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param cust_op_name: The cust_op_name of this CustomOperation. + :type cust_op_name: str + """ + if cust_op_name is None: + raise ValueError("Invalid value for `cust_op_name`, must not be `None`") # noqa: E501 + + self._cust_op_name = cust_op_name + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this CustomOperation. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :return: The operations of this CustomOperation. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this CustomOperation. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :param operations: The operations of this CustomOperation. + :type operations: List[Operation] + """ + if operations is not None and len(operations) < 1: + raise ValueError("Invalid value for `operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._operations = operations + + @property + def description(self) -> str: + """Gets the description of this CustomOperation. + + Text description of the custom operation # noqa: E501 + + :return: The description of this CustomOperation. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this CustomOperation. + + Text description of the custom operation # noqa: E501 + + :param description: The description of this CustomOperation. + :type description: str + """ + + self._description = description diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/data_format.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/data_format.py new file mode 100644 index 00000000..701260cf --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/data_format.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class DataFormat(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """DataFormat - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'DataFormat': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DataFormat of this DataFormat. # noqa: E501 + :rtype: DataFormat + """ + return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/ellipsoid_arc.py new file mode 100644 index 00000000..ec6f1205 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/ellipsoid_arc.py @@ -0,0 +1,265 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server import util + +from openapi_server.models.gad_shape import GADShape # noqa: E501 +from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class EllipsoidArc(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, inner_radius=None, uncertainty_radius=None, offset_angle=None, included_angle=None, confidence=None): # noqa: E501 + """EllipsoidArc - a model defined in OpenAPI + + :param shape: The shape of this EllipsoidArc. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this EllipsoidArc. # noqa: E501 + :type point: GeographicalCoordinates + :param inner_radius: The inner_radius of this EllipsoidArc. # noqa: E501 + :type inner_radius: int + :param uncertainty_radius: The uncertainty_radius of this EllipsoidArc. # noqa: E501 + :type uncertainty_radius: float + :param offset_angle: The offset_angle of this EllipsoidArc. # noqa: E501 + :type offset_angle: int + :param included_angle: The included_angle of this EllipsoidArc. # noqa: E501 + :type included_angle: int + :param confidence: The confidence of this EllipsoidArc. # noqa: E501 + :type confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'inner_radius': int, + 'uncertainty_radius': float, + 'offset_angle': int, + 'included_angle': int, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'inner_radius': 'innerRadius', + 'uncertainty_radius': 'uncertaintyRadius', + 'offset_angle': 'offsetAngle', + 'included_angle': 'includedAngle', + 'confidence': 'confidence' + } + + self._shape = shape + self._point = point + self._inner_radius = inner_radius + self._uncertainty_radius = uncertainty_radius + self._offset_angle = offset_angle + self._included_angle = included_angle + self._confidence = confidence + + @classmethod + def from_dict(cls, dikt) -> 'EllipsoidArc': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The EllipsoidArc of this EllipsoidArc. # noqa: E501 + :rtype: EllipsoidArc + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this EllipsoidArc. + + + :return: The shape of this EllipsoidArc. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this EllipsoidArc. + + + :param shape: The shape of this EllipsoidArc. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this EllipsoidArc. + + + :return: The point of this EllipsoidArc. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this EllipsoidArc. + + + :param point: The point of this EllipsoidArc. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def inner_radius(self) -> int: + """Gets the inner_radius of this EllipsoidArc. + + Indicates value of the inner radius. # noqa: E501 + + :return: The inner_radius of this EllipsoidArc. + :rtype: int + """ + return self._inner_radius + + @inner_radius.setter + def inner_radius(self, inner_radius: int): + """Sets the inner_radius of this EllipsoidArc. + + Indicates value of the inner radius. # noqa: E501 + + :param inner_radius: The inner_radius of this EllipsoidArc. + :type inner_radius: int + """ + if inner_radius is None: + raise ValueError("Invalid value for `inner_radius`, must not be `None`") # noqa: E501 + if inner_radius is not None and inner_radius > 327675: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value less than or equal to `327675`") # noqa: E501 + if inner_radius is not None and inner_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._inner_radius = inner_radius + + @property + def uncertainty_radius(self) -> float: + """Gets the uncertainty_radius of this EllipsoidArc. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_radius of this EllipsoidArc. + :rtype: float + """ + return self._uncertainty_radius + + @uncertainty_radius.setter + def uncertainty_radius(self, uncertainty_radius: float): + """Sets the uncertainty_radius of this EllipsoidArc. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_radius: The uncertainty_radius of this EllipsoidArc. + :type uncertainty_radius: float + """ + if uncertainty_radius is None: + raise ValueError("Invalid value for `uncertainty_radius`, must not be `None`") # noqa: E501 + if uncertainty_radius is not None and uncertainty_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_radius = uncertainty_radius + + @property + def offset_angle(self) -> int: + """Gets the offset_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :return: The offset_angle of this EllipsoidArc. + :rtype: int + """ + return self._offset_angle + + @offset_angle.setter + def offset_angle(self, offset_angle: int): + """Sets the offset_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :param offset_angle: The offset_angle of this EllipsoidArc. + :type offset_angle: int + """ + if offset_angle is None: + raise ValueError("Invalid value for `offset_angle`, must not be `None`") # noqa: E501 + if offset_angle is not None and offset_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value less than or equal to `360`") # noqa: E501 + if offset_angle is not None and offset_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._offset_angle = offset_angle + + @property + def included_angle(self) -> int: + """Gets the included_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :return: The included_angle of this EllipsoidArc. + :rtype: int + """ + return self._included_angle + + @included_angle.setter + def included_angle(self, included_angle: int): + """Sets the included_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :param included_angle: The included_angle of this EllipsoidArc. + :type included_angle: int + """ + if included_angle is None: + raise ValueError("Invalid value for `included_angle`, must not be `None`") # noqa: E501 + if included_angle is not None and included_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value less than or equal to `360`") # noqa: E501 + if included_angle is not None and included_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._included_angle = included_angle + + @property + def confidence(self) -> int: + """Gets the confidence of this EllipsoidArc. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this EllipsoidArc. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this EllipsoidArc. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this EllipsoidArc. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/gad_shape.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/gad_shape.py new file mode 100644 index 00000000..69ff529b --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/gad_shape.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server import util + +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class GADShape(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None): # noqa: E501 + """GADShape - a model defined in OpenAPI + + :param shape: The shape of this GADShape. # noqa: E501 + :type shape: SupportedGADShapes + """ + self.openapi_types = { + 'shape': SupportedGADShapes + } + + self.attribute_map = { + 'shape': 'shape' + } + + self._shape = shape + + @classmethod + def from_dict(cls, dikt) -> 'GADShape': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GADShape of this GADShape. # noqa: E501 + :rtype: GADShape + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this GADShape. + + + :return: The shape of this GADShape. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this GADShape. + + + :param shape: The shape of this GADShape. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographic_area.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographic_area.py new file mode 100644 index 00000000..2215abec --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographic_area.py @@ -0,0 +1,471 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.ellipsoid_arc import EllipsoidArc +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server.models.point import Point +from openapi_server.models.point_altitude import PointAltitude +from openapi_server.models.point_altitude_uncertainty import PointAltitudeUncertainty +from openapi_server.models.point_uncertainty_circle import PointUncertaintyCircle +from openapi_server.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from openapi_server.models.polygon import Polygon +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse +from openapi_server import util + +from openapi_server.models.ellipsoid_arc import EllipsoidArc # noqa: E501 +from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.point import Point # noqa: E501 +from openapi_server.models.point_altitude import PointAltitude # noqa: E501 +from openapi_server.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 +from openapi_server.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 +from openapi_server.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from openapi_server.models.polygon import Polygon # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class GeographicArea(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, uncertainty=None, uncertainty_ellipse=None, confidence=None, point_list=None, altitude=None, uncertainty_altitude=None, v_confidence=None, inner_radius=None, uncertainty_radius=None, offset_angle=None, included_angle=None): # noqa: E501 + """GeographicArea - a model defined in OpenAPI + + :param shape: The shape of this GeographicArea. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this GeographicArea. # noqa: E501 + :type point: GeographicalCoordinates + :param uncertainty: The uncertainty of this GeographicArea. # noqa: E501 + :type uncertainty: float + :param uncertainty_ellipse: The uncertainty_ellipse of this GeographicArea. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param confidence: The confidence of this GeographicArea. # noqa: E501 + :type confidence: int + :param point_list: The point_list of this GeographicArea. # noqa: E501 + :type point_list: List[GeographicalCoordinates] + :param altitude: The altitude of this GeographicArea. # noqa: E501 + :type altitude: float + :param uncertainty_altitude: The uncertainty_altitude of this GeographicArea. # noqa: E501 + :type uncertainty_altitude: float + :param v_confidence: The v_confidence of this GeographicArea. # noqa: E501 + :type v_confidence: int + :param inner_radius: The inner_radius of this GeographicArea. # noqa: E501 + :type inner_radius: int + :param uncertainty_radius: The uncertainty_radius of this GeographicArea. # noqa: E501 + :type uncertainty_radius: float + :param offset_angle: The offset_angle of this GeographicArea. # noqa: E501 + :type offset_angle: int + :param included_angle: The included_angle of this GeographicArea. # noqa: E501 + :type included_angle: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'uncertainty': float, + 'uncertainty_ellipse': UncertaintyEllipse, + 'confidence': int, + 'point_list': List[GeographicalCoordinates], + 'altitude': float, + 'uncertainty_altitude': float, + 'v_confidence': int, + 'inner_radius': int, + 'uncertainty_radius': float, + 'offset_angle': int, + 'included_angle': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'uncertainty': 'uncertainty', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'confidence': 'confidence', + 'point_list': 'pointList', + 'altitude': 'altitude', + 'uncertainty_altitude': 'uncertaintyAltitude', + 'v_confidence': 'vConfidence', + 'inner_radius': 'innerRadius', + 'uncertainty_radius': 'uncertaintyRadius', + 'offset_angle': 'offsetAngle', + 'included_angle': 'includedAngle' + } + + self._shape = shape + self._point = point + self._uncertainty = uncertainty + self._uncertainty_ellipse = uncertainty_ellipse + self._confidence = confidence + self._point_list = point_list + self._altitude = altitude + self._uncertainty_altitude = uncertainty_altitude + self._v_confidence = v_confidence + self._inner_radius = inner_radius + self._uncertainty_radius = uncertainty_radius + self._offset_angle = offset_angle + self._included_angle = included_angle + + @classmethod + def from_dict(cls, dikt) -> 'GeographicArea': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GeographicArea of this GeographicArea. # noqa: E501 + :rtype: GeographicArea + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this GeographicArea. + + + :return: The shape of this GeographicArea. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this GeographicArea. + + + :param shape: The shape of this GeographicArea. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this GeographicArea. + + + :return: The point of this GeographicArea. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this GeographicArea. + + + :param point: The point of this GeographicArea. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty(self) -> float: + """Gets the uncertainty of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty of this GeographicArea. + :rtype: float + """ + return self._uncertainty + + @uncertainty.setter + def uncertainty(self, uncertainty: float): + """Sets the uncertainty of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty: The uncertainty of this GeographicArea. + :type uncertainty: float + """ + if uncertainty is None: + raise ValueError("Invalid value for `uncertainty`, must not be `None`") # noqa: E501 + if uncertainty is not None and uncertainty < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty = uncertainty + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this GeographicArea. + + + :return: The uncertainty_ellipse of this GeographicArea. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this GeographicArea. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this GeographicArea. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def confidence(self) -> int: + """Gets the confidence of this GeographicArea. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this GeographicArea. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this GeographicArea. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this GeographicArea. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence + + @property + def point_list(self) -> List[GeographicalCoordinates]: + """Gets the point_list of this GeographicArea. + + List of points. # noqa: E501 + + :return: The point_list of this GeographicArea. + :rtype: List[GeographicalCoordinates] + """ + return self._point_list + + @point_list.setter + def point_list(self, point_list: List[GeographicalCoordinates]): + """Sets the point_list of this GeographicArea. + + List of points. # noqa: E501 + + :param point_list: The point_list of this GeographicArea. + :type point_list: List[GeographicalCoordinates] + """ + if point_list is None: + raise ValueError("Invalid value for `point_list`, must not be `None`") # noqa: E501 + if point_list is not None and len(point_list) > 15: + raise ValueError("Invalid value for `point_list`, number of items must be less than or equal to `15`") # noqa: E501 + if point_list is not None and len(point_list) < 3: + raise ValueError("Invalid value for `point_list`, number of items must be greater than or equal to `3`") # noqa: E501 + + self._point_list = point_list + + @property + def altitude(self) -> float: + """Gets the altitude of this GeographicArea. + + Indicates value of altitude. # noqa: E501 + + :return: The altitude of this GeographicArea. + :rtype: float + """ + return self._altitude + + @altitude.setter + def altitude(self, altitude: float): + """Sets the altitude of this GeographicArea. + + Indicates value of altitude. # noqa: E501 + + :param altitude: The altitude of this GeographicArea. + :type altitude: float + """ + if altitude is None: + raise ValueError("Invalid value for `altitude`, must not be `None`") # noqa: E501 + if altitude is not None and altitude > 32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value less than or equal to `32767`") # noqa: E501 + if altitude is not None and altitude < -32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value greater than or equal to `-32767`") # noqa: E501 + + self._altitude = altitude + + @property + def uncertainty_altitude(self) -> float: + """Gets the uncertainty_altitude of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_altitude of this GeographicArea. + :rtype: float + """ + return self._uncertainty_altitude + + @uncertainty_altitude.setter + def uncertainty_altitude(self, uncertainty_altitude: float): + """Sets the uncertainty_altitude of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_altitude: The uncertainty_altitude of this GeographicArea. + :type uncertainty_altitude: float + """ + if uncertainty_altitude is None: + raise ValueError("Invalid value for `uncertainty_altitude`, must not be `None`") # noqa: E501 + if uncertainty_altitude is not None and uncertainty_altitude < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_altitude`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_altitude = uncertainty_altitude + + @property + def v_confidence(self) -> int: + """Gets the v_confidence of this GeographicArea. + + Indicates value of confidence. # noqa: E501 + + :return: The v_confidence of this GeographicArea. + :rtype: int + """ + return self._v_confidence + + @v_confidence.setter + def v_confidence(self, v_confidence: int): + """Sets the v_confidence of this GeographicArea. + + Indicates value of confidence. # noqa: E501 + + :param v_confidence: The v_confidence of this GeographicArea. + :type v_confidence: int + """ + if v_confidence is not None and v_confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `v_confidence`, must be a value less than or equal to `100`") # noqa: E501 + if v_confidence is not None and v_confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `v_confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._v_confidence = v_confidence + + @property + def inner_radius(self) -> int: + """Gets the inner_radius of this GeographicArea. + + Indicates value of the inner radius. # noqa: E501 + + :return: The inner_radius of this GeographicArea. + :rtype: int + """ + return self._inner_radius + + @inner_radius.setter + def inner_radius(self, inner_radius: int): + """Sets the inner_radius of this GeographicArea. + + Indicates value of the inner radius. # noqa: E501 + + :param inner_radius: The inner_radius of this GeographicArea. + :type inner_radius: int + """ + if inner_radius is None: + raise ValueError("Invalid value for `inner_radius`, must not be `None`") # noqa: E501 + if inner_radius is not None and inner_radius > 327675: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value less than or equal to `327675`") # noqa: E501 + if inner_radius is not None and inner_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._inner_radius = inner_radius + + @property + def uncertainty_radius(self) -> float: + """Gets the uncertainty_radius of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_radius of this GeographicArea. + :rtype: float + """ + return self._uncertainty_radius + + @uncertainty_radius.setter + def uncertainty_radius(self, uncertainty_radius: float): + """Sets the uncertainty_radius of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_radius: The uncertainty_radius of this GeographicArea. + :type uncertainty_radius: float + """ + if uncertainty_radius is None: + raise ValueError("Invalid value for `uncertainty_radius`, must not be `None`") # noqa: E501 + if uncertainty_radius is not None and uncertainty_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_radius = uncertainty_radius + + @property + def offset_angle(self) -> int: + """Gets the offset_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :return: The offset_angle of this GeographicArea. + :rtype: int + """ + return self._offset_angle + + @offset_angle.setter + def offset_angle(self, offset_angle: int): + """Sets the offset_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :param offset_angle: The offset_angle of this GeographicArea. + :type offset_angle: int + """ + if offset_angle is None: + raise ValueError("Invalid value for `offset_angle`, must not be `None`") # noqa: E501 + if offset_angle is not None and offset_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value less than or equal to `360`") # noqa: E501 + if offset_angle is not None and offset_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._offset_angle = offset_angle + + @property + def included_angle(self) -> int: + """Gets the included_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :return: The included_angle of this GeographicArea. + :rtype: int + """ + return self._included_angle + + @included_angle.setter + def included_angle(self, included_angle: int): + """Sets the included_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :param included_angle: The included_angle of this GeographicArea. + :type included_angle: int + """ + if included_angle is None: + raise ValueError("Invalid value for `included_angle`, must not be `None`") # noqa: E501 + if included_angle is not None and included_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value less than or equal to `360`") # noqa: E501 + if included_angle is not None and included_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._included_angle = included_angle diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographical_coordinates.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographical_coordinates.py new file mode 100644 index 00000000..a25d0f8f --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographical_coordinates.py @@ -0,0 +1,99 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class GeographicalCoordinates(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, lon=None, lat=None): # noqa: E501 + """GeographicalCoordinates - a model defined in OpenAPI + + :param lon: The lon of this GeographicalCoordinates. # noqa: E501 + :type lon: float + :param lat: The lat of this GeographicalCoordinates. # noqa: E501 + :type lat: float + """ + self.openapi_types = { + 'lon': float, + 'lat': float + } + + self.attribute_map = { + 'lon': 'lon', + 'lat': 'lat' + } + + self._lon = lon + self._lat = lat + + @classmethod + def from_dict(cls, dikt) -> 'GeographicalCoordinates': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GeographicalCoordinates of this GeographicalCoordinates. # noqa: E501 + :rtype: GeographicalCoordinates + """ + return util.deserialize_model(dikt, cls) + + @property + def lon(self) -> float: + """Gets the lon of this GeographicalCoordinates. + + + :return: The lon of this GeographicalCoordinates. + :rtype: float + """ + return self._lon + + @lon.setter + def lon(self, lon: float): + """Sets the lon of this GeographicalCoordinates. + + + :param lon: The lon of this GeographicalCoordinates. + :type lon: float + """ + if lon is None: + raise ValueError("Invalid value for `lon`, must not be `None`") # noqa: E501 + if lon is not None and lon > 180: # noqa: E501 + raise ValueError("Invalid value for `lon`, must be a value less than or equal to `180`") # noqa: E501 + if lon is not None and lon < -180: # noqa: E501 + raise ValueError("Invalid value for `lon`, must be a value greater than or equal to `-180`") # noqa: E501 + + self._lon = lon + + @property + def lat(self) -> float: + """Gets the lat of this GeographicalCoordinates. + + + :return: The lat of this GeographicalCoordinates. + :rtype: float + """ + return self._lat + + @lat.setter + def lat(self, lat: float): + """Sets the lat of this GeographicalCoordinates. + + + :param lat: The lat of this GeographicalCoordinates. + :type lat: float + """ + if lat is None: + raise ValueError("Invalid value for `lat`, must not be `None`") # noqa: E501 + if lat is not None and lat > 90: # noqa: E501 + raise ValueError("Invalid value for `lat`, must be a value less than or equal to `90`") # noqa: E501 + if lat is not None and lat < -90: # noqa: E501 + raise ValueError("Invalid value for `lat`, must be a value greater than or equal to `-90`") # noqa: E501 + + self._lat = lat diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/invalid_param.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/invalid_param.py new file mode 100644 index 00000000..e8cb5bec --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/invalid_param.py @@ -0,0 +1,93 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class InvalidParam(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, param=None, reason=None): # noqa: E501 + """InvalidParam - a model defined in OpenAPI + + :param param: The param of this InvalidParam. # noqa: E501 + :type param: str + :param reason: The reason of this InvalidParam. # noqa: E501 + :type reason: str + """ + self.openapi_types = { + 'param': str, + 'reason': str + } + + self.attribute_map = { + 'param': 'param', + 'reason': 'reason' + } + + self._param = param + self._reason = reason + + @classmethod + def from_dict(cls, dikt) -> 'InvalidParam': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The InvalidParam of this InvalidParam. # noqa: E501 + :rtype: InvalidParam + """ + return util.deserialize_model(dikt, cls) + + @property + def param(self) -> str: + """Gets the param of this InvalidParam. + + Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 + + :return: The param of this InvalidParam. + :rtype: str + """ + return self._param + + @param.setter + def param(self, param: str): + """Sets the param of this InvalidParam. + + Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 + + :param param: The param of this InvalidParam. + :type param: str + """ + if param is None: + raise ValueError("Invalid value for `param`, must not be `None`") # noqa: E501 + + self._param = param + + @property + def reason(self) -> str: + """Gets the reason of this InvalidParam. + + A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 + + :return: The reason of this InvalidParam. + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason: str): + """Sets the reason of this InvalidParam. + + A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 + + :param reason: The reason of this InvalidParam. + :type reason: str + """ + + self._reason = reason diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local2d_point_uncertainty_ellipse.py new file mode 100644 index 00000000..5a50d8a9 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local2d_point_uncertainty_ellipse.py @@ -0,0 +1,191 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.local_origin import LocalOrigin +from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse +from openapi_server import util + +from openapi_server.models.gad_shape import GADShape # noqa: E501 +from openapi_server.models.local_origin import LocalOrigin # noqa: E501 +from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class Local2dPointUncertaintyEllipse(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, local_origin=None, point=None, uncertainty_ellipse=None, confidence=None): # noqa: E501 + """Local2dPointUncertaintyEllipse - a model defined in OpenAPI + + :param shape: The shape of this Local2dPointUncertaintyEllipse. # noqa: E501 + :type shape: SupportedGADShapes + :param local_origin: The local_origin of this Local2dPointUncertaintyEllipse. # noqa: E501 + :type local_origin: LocalOrigin + :param point: The point of this Local2dPointUncertaintyEllipse. # noqa: E501 + :type point: RelativeCartesianLocation + :param uncertainty_ellipse: The uncertainty_ellipse of this Local2dPointUncertaintyEllipse. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param confidence: The confidence of this Local2dPointUncertaintyEllipse. # noqa: E501 + :type confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'local_origin': LocalOrigin, + 'point': RelativeCartesianLocation, + 'uncertainty_ellipse': UncertaintyEllipse, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'local_origin': 'localOrigin', + 'point': 'point', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'confidence': 'confidence' + } + + self._shape = shape + self._local_origin = local_origin + self._point = point + self._uncertainty_ellipse = uncertainty_ellipse + self._confidence = confidence + + @classmethod + def from_dict(cls, dikt) -> 'Local2dPointUncertaintyEllipse': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Local2dPointUncertaintyEllipse of this Local2dPointUncertaintyEllipse. # noqa: E501 + :rtype: Local2dPointUncertaintyEllipse + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this Local2dPointUncertaintyEllipse. + + + :return: The shape of this Local2dPointUncertaintyEllipse. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this Local2dPointUncertaintyEllipse. + + + :param shape: The shape of this Local2dPointUncertaintyEllipse. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def local_origin(self) -> LocalOrigin: + """Gets the local_origin of this Local2dPointUncertaintyEllipse. + + + :return: The local_origin of this Local2dPointUncertaintyEllipse. + :rtype: LocalOrigin + """ + return self._local_origin + + @local_origin.setter + def local_origin(self, local_origin: LocalOrigin): + """Sets the local_origin of this Local2dPointUncertaintyEllipse. + + + :param local_origin: The local_origin of this Local2dPointUncertaintyEllipse. + :type local_origin: LocalOrigin + """ + if local_origin is None: + raise ValueError("Invalid value for `local_origin`, must not be `None`") # noqa: E501 + + self._local_origin = local_origin + + @property + def point(self) -> RelativeCartesianLocation: + """Gets the point of this Local2dPointUncertaintyEllipse. + + + :return: The point of this Local2dPointUncertaintyEllipse. + :rtype: RelativeCartesianLocation + """ + return self._point + + @point.setter + def point(self, point: RelativeCartesianLocation): + """Sets the point of this Local2dPointUncertaintyEllipse. + + + :param point: The point of this Local2dPointUncertaintyEllipse. + :type point: RelativeCartesianLocation + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this Local2dPointUncertaintyEllipse. + + + :return: The uncertainty_ellipse of this Local2dPointUncertaintyEllipse. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this Local2dPointUncertaintyEllipse. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this Local2dPointUncertaintyEllipse. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def confidence(self) -> int: + """Gets the confidence of this Local2dPointUncertaintyEllipse. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this Local2dPointUncertaintyEllipse. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this Local2dPointUncertaintyEllipse. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this Local2dPointUncertaintyEllipse. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local3d_point_uncertainty_ellipsoid.py new file mode 100644 index 00000000..7b43910f --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local3d_point_uncertainty_ellipsoid.py @@ -0,0 +1,223 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.local_origin import LocalOrigin +from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from openapi_server import util + +from openapi_server.models.gad_shape import GADShape # noqa: E501 +from openapi_server.models.local_origin import LocalOrigin # noqa: E501 +from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 + +class Local3dPointUncertaintyEllipsoid(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, local_origin=None, point=None, uncertainty_ellipsoid=None, confidence=None, v_confidence=None): # noqa: E501 + """Local3dPointUncertaintyEllipsoid - a model defined in OpenAPI + + :param shape: The shape of this Local3dPointUncertaintyEllipsoid. # noqa: E501 + :type shape: SupportedGADShapes + :param local_origin: The local_origin of this Local3dPointUncertaintyEllipsoid. # noqa: E501 + :type local_origin: LocalOrigin + :param point: The point of this Local3dPointUncertaintyEllipsoid. # noqa: E501 + :type point: RelativeCartesianLocation + :param uncertainty_ellipsoid: The uncertainty_ellipsoid of this Local3dPointUncertaintyEllipsoid. # noqa: E501 + :type uncertainty_ellipsoid: UncertaintyEllipsoid + :param confidence: The confidence of this Local3dPointUncertaintyEllipsoid. # noqa: E501 + :type confidence: int + :param v_confidence: The v_confidence of this Local3dPointUncertaintyEllipsoid. # noqa: E501 + :type v_confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'local_origin': LocalOrigin, + 'point': RelativeCartesianLocation, + 'uncertainty_ellipsoid': UncertaintyEllipsoid, + 'confidence': int, + 'v_confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'local_origin': 'localOrigin', + 'point': 'point', + 'uncertainty_ellipsoid': 'uncertaintyEllipsoid', + 'confidence': 'confidence', + 'v_confidence': 'vConfidence' + } + + self._shape = shape + self._local_origin = local_origin + self._point = point + self._uncertainty_ellipsoid = uncertainty_ellipsoid + self._confidence = confidence + self._v_confidence = v_confidence + + @classmethod + def from_dict(cls, dikt) -> 'Local3dPointUncertaintyEllipsoid': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Local3dPointUncertaintyEllipsoid of this Local3dPointUncertaintyEllipsoid. # noqa: E501 + :rtype: Local3dPointUncertaintyEllipsoid + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this Local3dPointUncertaintyEllipsoid. + + + :return: The shape of this Local3dPointUncertaintyEllipsoid. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this Local3dPointUncertaintyEllipsoid. + + + :param shape: The shape of this Local3dPointUncertaintyEllipsoid. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def local_origin(self) -> LocalOrigin: + """Gets the local_origin of this Local3dPointUncertaintyEllipsoid. + + + :return: The local_origin of this Local3dPointUncertaintyEllipsoid. + :rtype: LocalOrigin + """ + return self._local_origin + + @local_origin.setter + def local_origin(self, local_origin: LocalOrigin): + """Sets the local_origin of this Local3dPointUncertaintyEllipsoid. + + + :param local_origin: The local_origin of this Local3dPointUncertaintyEllipsoid. + :type local_origin: LocalOrigin + """ + if local_origin is None: + raise ValueError("Invalid value for `local_origin`, must not be `None`") # noqa: E501 + + self._local_origin = local_origin + + @property + def point(self) -> RelativeCartesianLocation: + """Gets the point of this Local3dPointUncertaintyEllipsoid. + + + :return: The point of this Local3dPointUncertaintyEllipsoid. + :rtype: RelativeCartesianLocation + """ + return self._point + + @point.setter + def point(self, point: RelativeCartesianLocation): + """Sets the point of this Local3dPointUncertaintyEllipsoid. + + + :param point: The point of this Local3dPointUncertaintyEllipsoid. + :type point: RelativeCartesianLocation + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty_ellipsoid(self) -> UncertaintyEllipsoid: + """Gets the uncertainty_ellipsoid of this Local3dPointUncertaintyEllipsoid. + + + :return: The uncertainty_ellipsoid of this Local3dPointUncertaintyEllipsoid. + :rtype: UncertaintyEllipsoid + """ + return self._uncertainty_ellipsoid + + @uncertainty_ellipsoid.setter + def uncertainty_ellipsoid(self, uncertainty_ellipsoid: UncertaintyEllipsoid): + """Sets the uncertainty_ellipsoid of this Local3dPointUncertaintyEllipsoid. + + + :param uncertainty_ellipsoid: The uncertainty_ellipsoid of this Local3dPointUncertaintyEllipsoid. + :type uncertainty_ellipsoid: UncertaintyEllipsoid + """ + if uncertainty_ellipsoid is None: + raise ValueError("Invalid value for `uncertainty_ellipsoid`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipsoid = uncertainty_ellipsoid + + @property + def confidence(self) -> int: + """Gets the confidence of this Local3dPointUncertaintyEllipsoid. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this Local3dPointUncertaintyEllipsoid. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this Local3dPointUncertaintyEllipsoid. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this Local3dPointUncertaintyEllipsoid. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence + + @property + def v_confidence(self) -> int: + """Gets the v_confidence of this Local3dPointUncertaintyEllipsoid. + + Indicates value of confidence. # noqa: E501 + + :return: The v_confidence of this Local3dPointUncertaintyEllipsoid. + :rtype: int + """ + return self._v_confidence + + @v_confidence.setter + def v_confidence(self, v_confidence: int): + """Sets the v_confidence of this Local3dPointUncertaintyEllipsoid. + + Indicates value of confidence. # noqa: E501 + + :param v_confidence: The v_confidence of this Local3dPointUncertaintyEllipsoid. + :type v_confidence: int + """ + if v_confidence is not None and v_confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `v_confidence`, must be a value less than or equal to `100`") # noqa: E501 + if v_confidence is not None and v_confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `v_confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._v_confidence = v_confidence diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local_origin.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local_origin.py new file mode 100644 index 00000000..06aa4d4c --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local_origin.py @@ -0,0 +1,151 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.geographic_area import GeographicArea +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server import util + +from openapi_server.models.geographic_area import GeographicArea # noqa: E501 +from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 + +class LocalOrigin(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, coordinate_id=None, point=None, area=None, horiz_axes_orientation=None): # noqa: E501 + """LocalOrigin - a model defined in OpenAPI + + :param coordinate_id: The coordinate_id of this LocalOrigin. # noqa: E501 + :type coordinate_id: str + :param point: The point of this LocalOrigin. # noqa: E501 + :type point: GeographicalCoordinates + :param area: The area of this LocalOrigin. # noqa: E501 + :type area: GeographicArea + :param horiz_axes_orientation: The horiz_axes_orientation of this LocalOrigin. # noqa: E501 + :type horiz_axes_orientation: int + """ + self.openapi_types = { + 'coordinate_id': str, + 'point': GeographicalCoordinates, + 'area': GeographicArea, + 'horiz_axes_orientation': int + } + + self.attribute_map = { + 'coordinate_id': 'coordinateId', + 'point': 'point', + 'area': 'area', + 'horiz_axes_orientation': 'horizAxesOrientation' + } + + self._coordinate_id = coordinate_id + self._point = point + self._area = area + self._horiz_axes_orientation = horiz_axes_orientation + + @classmethod + def from_dict(cls, dikt) -> 'LocalOrigin': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The LocalOrigin of this LocalOrigin. # noqa: E501 + :rtype: LocalOrigin + """ + return util.deserialize_model(dikt, cls) + + @property + def coordinate_id(self) -> str: + """Gets the coordinate_id of this LocalOrigin. + + + :return: The coordinate_id of this LocalOrigin. + :rtype: str + """ + return self._coordinate_id + + @coordinate_id.setter + def coordinate_id(self, coordinate_id: str): + """Sets the coordinate_id of this LocalOrigin. + + + :param coordinate_id: The coordinate_id of this LocalOrigin. + :type coordinate_id: str + """ + if coordinate_id is None: + raise ValueError("Invalid value for `coordinate_id`, must not be `None`") # noqa: E501 + + self._coordinate_id = coordinate_id + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this LocalOrigin. + + + :return: The point of this LocalOrigin. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this LocalOrigin. + + + :param point: The point of this LocalOrigin. + :type point: GeographicalCoordinates + """ + + self._point = point + + @property + def area(self) -> GeographicArea: + """Gets the area of this LocalOrigin. + + + :return: The area of this LocalOrigin. + :rtype: GeographicArea + """ + return self._area + + @area.setter + def area(self, area: GeographicArea): + """Sets the area of this LocalOrigin. + + + :param area: The area of this LocalOrigin. + :type area: GeographicArea + """ + + self._area = area + + @property + def horiz_axes_orientation(self) -> int: + """Gets the horiz_axes_orientation of this LocalOrigin. + + Horizontal axes orientation angle clockwise from northing in 0.1 degrees. # noqa: E501 + + :return: The horiz_axes_orientation of this LocalOrigin. + :rtype: int + """ + return self._horiz_axes_orientation + + @horiz_axes_orientation.setter + def horiz_axes_orientation(self, horiz_axes_orientation: int): + """Sets the horiz_axes_orientation of this LocalOrigin. + + Horizontal axes orientation angle clockwise from northing in 0.1 degrees. # noqa: E501 + + :param horiz_axes_orientation: The horiz_axes_orientation of this LocalOrigin. + :type horiz_axes_orientation: int + """ + if horiz_axes_orientation is not None and horiz_axes_orientation > 3600: # noqa: E501 + raise ValueError("Invalid value for `horiz_axes_orientation`, must be a value less than or equal to `3600`") # noqa: E501 + if horiz_axes_orientation is not None and horiz_axes_orientation < 0: # noqa: E501 + raise ValueError("Invalid value for `horiz_axes_orientation`, must be a value greater than or equal to `0`") # noqa: E501 + + self._horiz_axes_orientation = horiz_axes_orientation diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_aef_profile.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_aef_profile.py new file mode 100644 index 00000000..0957f3c1 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_aef_profile.py @@ -0,0 +1,203 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.aef_location import AefLocation +from openapi_server.models.data_format import DataFormat +from openapi_server.models.protocol import Protocol +from openapi_server.models.service_kpis import ServiceKpis +from openapi_server.models.version import Version +from openapi_server import util + +from openapi_server.models.aef_location import AefLocation # noqa: E501 +from openapi_server.models.data_format import DataFormat # noqa: E501 +from openapi_server.models.protocol import Protocol # noqa: E501 +from openapi_server.models.service_kpis import ServiceKpis # noqa: E501 +from openapi_server.models.version import Version # noqa: E501 + +class OpenAefProfile(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, aef_id=None, versions=None, protocol=None, data_format=None, aef_location=None, service_kpis=None): # noqa: E501 + """OpenAefProfile - a model defined in OpenAPI + + :param aef_id: The aef_id of this OpenAefProfile. # noqa: E501 + :type aef_id: str + :param versions: The versions of this OpenAefProfile. # noqa: E501 + :type versions: List[Version] + :param protocol: The protocol of this OpenAefProfile. # noqa: E501 + :type protocol: Protocol + :param data_format: The data_format of this OpenAefProfile. # noqa: E501 + :type data_format: DataFormat + :param aef_location: The aef_location of this OpenAefProfile. # noqa: E501 + :type aef_location: AefLocation + :param service_kpis: The service_kpis of this OpenAefProfile. # noqa: E501 + :type service_kpis: ServiceKpis + """ + self.openapi_types = { + 'aef_id': str, + 'versions': List[Version], + 'protocol': Protocol, + 'data_format': DataFormat, + 'aef_location': AefLocation, + 'service_kpis': ServiceKpis + } + + self.attribute_map = { + 'aef_id': 'aefId', + 'versions': 'versions', + 'protocol': 'protocol', + 'data_format': 'dataFormat', + 'aef_location': 'aefLocation', + 'service_kpis': 'serviceKpis' + } + + self._aef_id = aef_id + self._versions = versions + self._protocol = protocol + self._data_format = data_format + self._aef_location = aef_location + self._service_kpis = service_kpis + + @classmethod + def from_dict(cls, dikt) -> 'OpenAefProfile': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The OpenAefProfile of this OpenAefProfile. # noqa: E501 + :rtype: OpenAefProfile + """ + return util.deserialize_model(dikt, cls) + + @property + def aef_id(self) -> str: + """Gets the aef_id of this OpenAefProfile. + + + :return: The aef_id of this OpenAefProfile. + :rtype: str + """ + return self._aef_id + + @aef_id.setter + def aef_id(self, aef_id: str): + """Sets the aef_id of this OpenAefProfile. + + + :param aef_id: The aef_id of this OpenAefProfile. + :type aef_id: str + """ + + self._aef_id = aef_id + + @property + def versions(self) -> List[Version]: + """Gets the versions of this OpenAefProfile. + + + :return: The versions of this OpenAefProfile. + :rtype: List[Version] + """ + return self._versions + + @versions.setter + def versions(self, versions: List[Version]): + """Sets the versions of this OpenAefProfile. + + + :param versions: The versions of this OpenAefProfile. + :type versions: List[Version] + """ + if versions is not None and len(versions) < 1: + raise ValueError("Invalid value for `versions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._versions = versions + + @property + def protocol(self) -> Protocol: + """Gets the protocol of this OpenAefProfile. + + + :return: The protocol of this OpenAefProfile. + :rtype: Protocol + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol: Protocol): + """Sets the protocol of this OpenAefProfile. + + + :param protocol: The protocol of this OpenAefProfile. + :type protocol: Protocol + """ + + self._protocol = protocol + + @property + def data_format(self) -> DataFormat: + """Gets the data_format of this OpenAefProfile. + + + :return: The data_format of this OpenAefProfile. + :rtype: DataFormat + """ + return self._data_format + + @data_format.setter + def data_format(self, data_format: DataFormat): + """Sets the data_format of this OpenAefProfile. + + + :param data_format: The data_format of this OpenAefProfile. + :type data_format: DataFormat + """ + + self._data_format = data_format + + @property + def aef_location(self) -> AefLocation: + """Gets the aef_location of this OpenAefProfile. + + + :return: The aef_location of this OpenAefProfile. + :rtype: AefLocation + """ + return self._aef_location + + @aef_location.setter + def aef_location(self, aef_location: AefLocation): + """Sets the aef_location of this OpenAefProfile. + + + :param aef_location: The aef_location of this OpenAefProfile. + :type aef_location: AefLocation + """ + + self._aef_location = aef_location + + @property + def service_kpis(self) -> ServiceKpis: + """Gets the service_kpis of this OpenAefProfile. + + + :return: The service_kpis of this OpenAefProfile. + :rtype: ServiceKpis + """ + return self._service_kpis + + @service_kpis.setter + def service_kpis(self, service_kpis: ServiceKpis): + """Sets the service_kpis of this OpenAefProfile. + + + :param service_kpis: The service_kpis of this OpenAefProfile. + :type service_kpis: ServiceKpis + """ + + self._service_kpis = service_kpis diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_api_details.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_api_details.py new file mode 100644 index 00000000..f9f5119e --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_api_details.py @@ -0,0 +1,257 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.api_status import ApiStatus +from openapi_server.models.open_aef_profile import OpenAefProfile +import re +from openapi_server import util + +from openapi_server.models.api_status import ApiStatus # noqa: E501 +from openapi_server.models.open_aef_profile import OpenAefProfile # noqa: E501 +import re # noqa: E501 + +class OpenAPIDetails(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_name=None, api_id=None, api_status=None, description=None, service_api_category=None, api_supp_feats=None, api_prov_name=None, aef_profiles=None): # noqa: E501 + """OpenAPIDetails - a model defined in OpenAPI + + :param api_name: The api_name of this OpenAPIDetails. # noqa: E501 + :type api_name: str + :param api_id: The api_id of this OpenAPIDetails. # noqa: E501 + :type api_id: str + :param api_status: The api_status of this OpenAPIDetails. # noqa: E501 + :type api_status: ApiStatus + :param description: The description of this OpenAPIDetails. # noqa: E501 + :type description: str + :param service_api_category: The service_api_category of this OpenAPIDetails. # noqa: E501 + :type service_api_category: str + :param api_supp_feats: The api_supp_feats of this OpenAPIDetails. # noqa: E501 + :type api_supp_feats: str + :param api_prov_name: The api_prov_name of this OpenAPIDetails. # noqa: E501 + :type api_prov_name: str + :param aef_profiles: The aef_profiles of this OpenAPIDetails. # noqa: E501 + :type aef_profiles: List[OpenAefProfile] + """ + self.openapi_types = { + 'api_name': str, + 'api_id': str, + 'api_status': ApiStatus, + 'description': str, + 'service_api_category': str, + 'api_supp_feats': str, + 'api_prov_name': str, + 'aef_profiles': List[OpenAefProfile] + } + + self.attribute_map = { + 'api_name': 'apiName', + 'api_id': 'apiId', + 'api_status': 'apiStatus', + 'description': 'description', + 'service_api_category': 'serviceAPICategory', + 'api_supp_feats': 'apiSuppFeats', + 'api_prov_name': 'apiProvName', + 'aef_profiles': 'aefProfiles' + } + + self._api_name = api_name + self._api_id = api_id + self._api_status = api_status + self._description = description + self._service_api_category = service_api_category + self._api_supp_feats = api_supp_feats + self._api_prov_name = api_prov_name + self._aef_profiles = aef_profiles + + @classmethod + def from_dict(cls, dikt) -> 'OpenAPIDetails': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The OpenAPIDetails of this OpenAPIDetails. # noqa: E501 + :rtype: OpenAPIDetails + """ + return util.deserialize_model(dikt, cls) + + @property + def api_name(self) -> str: + """Gets the api_name of this OpenAPIDetails. + + + :return: The api_name of this OpenAPIDetails. + :rtype: str + """ + return self._api_name + + @api_name.setter + def api_name(self, api_name: str): + """Sets the api_name of this OpenAPIDetails. + + + :param api_name: The api_name of this OpenAPIDetails. + :type api_name: str + """ + if api_name is None: + raise ValueError("Invalid value for `api_name`, must not be `None`") # noqa: E501 + + self._api_name = api_name + + @property + def api_id(self) -> str: + """Gets the api_id of this OpenAPIDetails. + + + :return: The api_id of this OpenAPIDetails. + :rtype: str + """ + return self._api_id + + @api_id.setter + def api_id(self, api_id: str): + """Sets the api_id of this OpenAPIDetails. + + + :param api_id: The api_id of this OpenAPIDetails. + :type api_id: str + """ + + self._api_id = api_id + + @property + def api_status(self) -> ApiStatus: + """Gets the api_status of this OpenAPIDetails. + + + :return: The api_status of this OpenAPIDetails. + :rtype: ApiStatus + """ + return self._api_status + + @api_status.setter + def api_status(self, api_status: ApiStatus): + """Sets the api_status of this OpenAPIDetails. + + + :param api_status: The api_status of this OpenAPIDetails. + :type api_status: ApiStatus + """ + + self._api_status = api_status + + @property + def description(self) -> str: + """Gets the description of this OpenAPIDetails. + + + :return: The description of this OpenAPIDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this OpenAPIDetails. + + + :param description: The description of this OpenAPIDetails. + :type description: str + """ + + self._description = description + + @property + def service_api_category(self) -> str: + """Gets the service_api_category of this OpenAPIDetails. + + + :return: The service_api_category of this OpenAPIDetails. + :rtype: str + """ + return self._service_api_category + + @service_api_category.setter + def service_api_category(self, service_api_category: str): + """Sets the service_api_category of this OpenAPIDetails. + + + :param service_api_category: The service_api_category of this OpenAPIDetails. + :type service_api_category: str + """ + + self._service_api_category = service_api_category + + @property + def api_supp_feats(self) -> str: + """Gets the api_supp_feats of this OpenAPIDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The api_supp_feats of this OpenAPIDetails. + :rtype: str + """ + return self._api_supp_feats + + @api_supp_feats.setter + def api_supp_feats(self, api_supp_feats: str): + """Sets the api_supp_feats of this OpenAPIDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param api_supp_feats: The api_supp_feats of this OpenAPIDetails. + :type api_supp_feats: str + """ + if api_supp_feats is not None and not re.search(r'^[A-Fa-f0-9]*$', api_supp_feats): # noqa: E501 + raise ValueError(r"Invalid value for `api_supp_feats`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._api_supp_feats = api_supp_feats + + @property + def api_prov_name(self) -> str: + """Gets the api_prov_name of this OpenAPIDetails. + + + :return: The api_prov_name of this OpenAPIDetails. + :rtype: str + """ + return self._api_prov_name + + @api_prov_name.setter + def api_prov_name(self, api_prov_name: str): + """Sets the api_prov_name of this OpenAPIDetails. + + + :param api_prov_name: The api_prov_name of this OpenAPIDetails. + :type api_prov_name: str + """ + + self._api_prov_name = api_prov_name + + @property + def aef_profiles(self) -> List[OpenAefProfile]: + """Gets the aef_profiles of this OpenAPIDetails. + + + :return: The aef_profiles of this OpenAPIDetails. + :rtype: List[OpenAefProfile] + """ + return self._aef_profiles + + @aef_profiles.setter + def aef_profiles(self, aef_profiles: List[OpenAefProfile]): + """Sets the aef_profiles of this OpenAPIDetails. + + + :param aef_profiles: The aef_profiles of this OpenAPIDetails. + :type aef_profiles: List[OpenAefProfile] + """ + if aef_profiles is not None and len(aef_profiles) < 1: + raise ValueError("Invalid value for `aef_profiles`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._aef_profiles = aef_profiles diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_discovery_resp.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_discovery_resp.py new file mode 100644 index 00000000..bb20fde1 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_discovery_resp.py @@ -0,0 +1,99 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.open_api_details import OpenAPIDetails +import re +from openapi_server import util + +from openapi_server.models.open_api_details import OpenAPIDetails # noqa: E501 +import re # noqa: E501 + +class OpenDiscoveryResp(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, disc_apis=None, supp_feat=None): # noqa: E501 + """OpenDiscoveryResp - a model defined in OpenAPI + + :param disc_apis: The disc_apis of this OpenDiscoveryResp. # noqa: E501 + :type disc_apis: List[OpenAPIDetails] + :param supp_feat: The supp_feat of this OpenDiscoveryResp. # noqa: E501 + :type supp_feat: str + """ + self.openapi_types = { + 'disc_apis': List[OpenAPIDetails], + 'supp_feat': str + } + + self.attribute_map = { + 'disc_apis': 'discApis', + 'supp_feat': 'suppFeat' + } + + self._disc_apis = disc_apis + self._supp_feat = supp_feat + + @classmethod + def from_dict(cls, dikt) -> 'OpenDiscoveryResp': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The OpenDiscoveryResp of this OpenDiscoveryResp. # noqa: E501 + :rtype: OpenDiscoveryResp + """ + return util.deserialize_model(dikt, cls) + + @property + def disc_apis(self) -> List[OpenAPIDetails]: + """Gets the disc_apis of this OpenDiscoveryResp. + + + :return: The disc_apis of this OpenDiscoveryResp. + :rtype: List[OpenAPIDetails] + """ + return self._disc_apis + + @disc_apis.setter + def disc_apis(self, disc_apis: List[OpenAPIDetails]): + """Sets the disc_apis of this OpenDiscoveryResp. + + + :param disc_apis: The disc_apis of this OpenDiscoveryResp. + :type disc_apis: List[OpenAPIDetails] + """ + if disc_apis is None: + raise ValueError("Invalid value for `disc_apis`, must not be `None`") # noqa: E501 + if disc_apis is not None and len(disc_apis) < 0: + raise ValueError("Invalid value for `disc_apis`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._disc_apis = disc_apis + + @property + def supp_feat(self) -> str: + """Gets the supp_feat of this OpenDiscoveryResp. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supp_feat of this OpenDiscoveryResp. + :rtype: str + """ + return self._supp_feat + + @supp_feat.setter + def supp_feat(self, supp_feat: str): + """Sets the supp_feat of this OpenDiscoveryResp. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supp_feat: The supp_feat of this OpenDiscoveryResp. + :type supp_feat: str + """ + if supp_feat is not None and not re.search(r'^[A-Fa-f0-9]*$', supp_feat): # noqa: E501 + raise ValueError(r"Invalid value for `supp_feat`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supp_feat = supp_feat diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/operation.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/operation.py new file mode 100644 index 00000000..5f3a3b73 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/operation.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class Operation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """Operation - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'Operation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Operation of this Operation. # noqa: E501 + :rtype: Operation + """ + return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point.py new file mode 100644 index 00000000..e9db65b0 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point.py @@ -0,0 +1,97 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server import util + +from openapi_server.models.gad_shape import GADShape # noqa: E501 +from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class Point(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None): # noqa: E501 + """Point - a model defined in OpenAPI + + :param shape: The shape of this Point. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this Point. # noqa: E501 + :type point: GeographicalCoordinates + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point' + } + + self._shape = shape + self._point = point + + @classmethod + def from_dict(cls, dikt) -> 'Point': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Point of this Point. # noqa: E501 + :rtype: Point + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this Point. + + + :return: The shape of this Point. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this Point. + + + :param shape: The shape of this Point. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this Point. + + + :return: The point of this Point. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this Point. + + + :param point: The point of this Point. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude.py new file mode 100644 index 00000000..9aa7cfc4 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude.py @@ -0,0 +1,131 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server import util + +from openapi_server.models.gad_shape import GADShape # noqa: E501 +from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class PointAltitude(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, altitude=None): # noqa: E501 + """PointAltitude - a model defined in OpenAPI + + :param shape: The shape of this PointAltitude. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointAltitude. # noqa: E501 + :type point: GeographicalCoordinates + :param altitude: The altitude of this PointAltitude. # noqa: E501 + :type altitude: float + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'altitude': float + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'altitude': 'altitude' + } + + self._shape = shape + self._point = point + self._altitude = altitude + + @classmethod + def from_dict(cls, dikt) -> 'PointAltitude': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointAltitude of this PointAltitude. # noqa: E501 + :rtype: PointAltitude + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointAltitude. + + + :return: The shape of this PointAltitude. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointAltitude. + + + :param shape: The shape of this PointAltitude. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointAltitude. + + + :return: The point of this PointAltitude. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointAltitude. + + + :param point: The point of this PointAltitude. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def altitude(self) -> float: + """Gets the altitude of this PointAltitude. + + Indicates value of altitude. # noqa: E501 + + :return: The altitude of this PointAltitude. + :rtype: float + """ + return self._altitude + + @altitude.setter + def altitude(self, altitude: float): + """Sets the altitude of this PointAltitude. + + Indicates value of altitude. # noqa: E501 + + :param altitude: The altitude of this PointAltitude. + :type altitude: float + """ + if altitude is None: + raise ValueError("Invalid value for `altitude`, must not be `None`") # noqa: E501 + if altitude is not None and altitude > 32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value less than or equal to `32767`") # noqa: E501 + if altitude is not None and altitude < -32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value greater than or equal to `-32767`") # noqa: E501 + + self._altitude = altitude diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude_uncertainty.py new file mode 100644 index 00000000..b1aee478 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude_uncertainty.py @@ -0,0 +1,259 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse +from openapi_server import util + +from openapi_server.models.gad_shape import GADShape # noqa: E501 +from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class PointAltitudeUncertainty(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, altitude=None, uncertainty_ellipse=None, uncertainty_altitude=None, confidence=None, v_confidence=None): # noqa: E501 + """PointAltitudeUncertainty - a model defined in OpenAPI + + :param shape: The shape of this PointAltitudeUncertainty. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointAltitudeUncertainty. # noqa: E501 + :type point: GeographicalCoordinates + :param altitude: The altitude of this PointAltitudeUncertainty. # noqa: E501 + :type altitude: float + :param uncertainty_ellipse: The uncertainty_ellipse of this PointAltitudeUncertainty. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param uncertainty_altitude: The uncertainty_altitude of this PointAltitudeUncertainty. # noqa: E501 + :type uncertainty_altitude: float + :param confidence: The confidence of this PointAltitudeUncertainty. # noqa: E501 + :type confidence: int + :param v_confidence: The v_confidence of this PointAltitudeUncertainty. # noqa: E501 + :type v_confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'altitude': float, + 'uncertainty_ellipse': UncertaintyEllipse, + 'uncertainty_altitude': float, + 'confidence': int, + 'v_confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'altitude': 'altitude', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'uncertainty_altitude': 'uncertaintyAltitude', + 'confidence': 'confidence', + 'v_confidence': 'vConfidence' + } + + self._shape = shape + self._point = point + self._altitude = altitude + self._uncertainty_ellipse = uncertainty_ellipse + self._uncertainty_altitude = uncertainty_altitude + self._confidence = confidence + self._v_confidence = v_confidence + + @classmethod + def from_dict(cls, dikt) -> 'PointAltitudeUncertainty': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointAltitudeUncertainty of this PointAltitudeUncertainty. # noqa: E501 + :rtype: PointAltitudeUncertainty + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointAltitudeUncertainty. + + + :return: The shape of this PointAltitudeUncertainty. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointAltitudeUncertainty. + + + :param shape: The shape of this PointAltitudeUncertainty. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointAltitudeUncertainty. + + + :return: The point of this PointAltitudeUncertainty. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointAltitudeUncertainty. + + + :param point: The point of this PointAltitudeUncertainty. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def altitude(self) -> float: + """Gets the altitude of this PointAltitudeUncertainty. + + Indicates value of altitude. # noqa: E501 + + :return: The altitude of this PointAltitudeUncertainty. + :rtype: float + """ + return self._altitude + + @altitude.setter + def altitude(self, altitude: float): + """Sets the altitude of this PointAltitudeUncertainty. + + Indicates value of altitude. # noqa: E501 + + :param altitude: The altitude of this PointAltitudeUncertainty. + :type altitude: float + """ + if altitude is None: + raise ValueError("Invalid value for `altitude`, must not be `None`") # noqa: E501 + if altitude is not None and altitude > 32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value less than or equal to `32767`") # noqa: E501 + if altitude is not None and altitude < -32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value greater than or equal to `-32767`") # noqa: E501 + + self._altitude = altitude + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this PointAltitudeUncertainty. + + + :return: The uncertainty_ellipse of this PointAltitudeUncertainty. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this PointAltitudeUncertainty. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this PointAltitudeUncertainty. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def uncertainty_altitude(self) -> float: + """Gets the uncertainty_altitude of this PointAltitudeUncertainty. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_altitude of this PointAltitudeUncertainty. + :rtype: float + """ + return self._uncertainty_altitude + + @uncertainty_altitude.setter + def uncertainty_altitude(self, uncertainty_altitude: float): + """Sets the uncertainty_altitude of this PointAltitudeUncertainty. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_altitude: The uncertainty_altitude of this PointAltitudeUncertainty. + :type uncertainty_altitude: float + """ + if uncertainty_altitude is None: + raise ValueError("Invalid value for `uncertainty_altitude`, must not be `None`") # noqa: E501 + if uncertainty_altitude is not None and uncertainty_altitude < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_altitude`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_altitude = uncertainty_altitude + + @property + def confidence(self) -> int: + """Gets the confidence of this PointAltitudeUncertainty. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this PointAltitudeUncertainty. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this PointAltitudeUncertainty. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this PointAltitudeUncertainty. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence + + @property + def v_confidence(self) -> int: + """Gets the v_confidence of this PointAltitudeUncertainty. + + Indicates value of confidence. # noqa: E501 + + :return: The v_confidence of this PointAltitudeUncertainty. + :rtype: int + """ + return self._v_confidence + + @v_confidence.setter + def v_confidence(self, v_confidence: int): + """Sets the v_confidence of this PointAltitudeUncertainty. + + Indicates value of confidence. # noqa: E501 + + :param v_confidence: The v_confidence of this PointAltitudeUncertainty. + :type v_confidence: int + """ + if v_confidence is not None and v_confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `v_confidence`, must be a value less than or equal to `100`") # noqa: E501 + if v_confidence is not None and v_confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `v_confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._v_confidence = v_confidence diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_circle.py new file mode 100644 index 00000000..ad1bb028 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_circle.py @@ -0,0 +1,129 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server import util + +from openapi_server.models.gad_shape import GADShape # noqa: E501 +from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class PointUncertaintyCircle(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, uncertainty=None): # noqa: E501 + """PointUncertaintyCircle - a model defined in OpenAPI + + :param shape: The shape of this PointUncertaintyCircle. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointUncertaintyCircle. # noqa: E501 + :type point: GeographicalCoordinates + :param uncertainty: The uncertainty of this PointUncertaintyCircle. # noqa: E501 + :type uncertainty: float + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'uncertainty': float + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'uncertainty': 'uncertainty' + } + + self._shape = shape + self._point = point + self._uncertainty = uncertainty + + @classmethod + def from_dict(cls, dikt) -> 'PointUncertaintyCircle': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointUncertaintyCircle of this PointUncertaintyCircle. # noqa: E501 + :rtype: PointUncertaintyCircle + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointUncertaintyCircle. + + + :return: The shape of this PointUncertaintyCircle. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointUncertaintyCircle. + + + :param shape: The shape of this PointUncertaintyCircle. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointUncertaintyCircle. + + + :return: The point of this PointUncertaintyCircle. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointUncertaintyCircle. + + + :param point: The point of this PointUncertaintyCircle. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty(self) -> float: + """Gets the uncertainty of this PointUncertaintyCircle. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty of this PointUncertaintyCircle. + :rtype: float + """ + return self._uncertainty + + @uncertainty.setter + def uncertainty(self, uncertainty: float): + """Sets the uncertainty of this PointUncertaintyCircle. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty: The uncertainty of this PointUncertaintyCircle. + :type uncertainty: float + """ + if uncertainty is None: + raise ValueError("Invalid value for `uncertainty`, must not be `None`") # noqa: E501 + if uncertainty is not None and uncertainty < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty = uncertainty diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_ellipse.py new file mode 100644 index 00000000..ae5ce92d --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_ellipse.py @@ -0,0 +1,161 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse +from openapi_server import util + +from openapi_server.models.gad_shape import GADShape # noqa: E501 +from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class PointUncertaintyEllipse(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, uncertainty_ellipse=None, confidence=None): # noqa: E501 + """PointUncertaintyEllipse - a model defined in OpenAPI + + :param shape: The shape of this PointUncertaintyEllipse. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointUncertaintyEllipse. # noqa: E501 + :type point: GeographicalCoordinates + :param uncertainty_ellipse: The uncertainty_ellipse of this PointUncertaintyEllipse. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param confidence: The confidence of this PointUncertaintyEllipse. # noqa: E501 + :type confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'uncertainty_ellipse': UncertaintyEllipse, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'confidence': 'confidence' + } + + self._shape = shape + self._point = point + self._uncertainty_ellipse = uncertainty_ellipse + self._confidence = confidence + + @classmethod + def from_dict(cls, dikt) -> 'PointUncertaintyEllipse': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointUncertaintyEllipse of this PointUncertaintyEllipse. # noqa: E501 + :rtype: PointUncertaintyEllipse + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointUncertaintyEllipse. + + + :return: The shape of this PointUncertaintyEllipse. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointUncertaintyEllipse. + + + :param shape: The shape of this PointUncertaintyEllipse. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointUncertaintyEllipse. + + + :return: The point of this PointUncertaintyEllipse. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointUncertaintyEllipse. + + + :param point: The point of this PointUncertaintyEllipse. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this PointUncertaintyEllipse. + + + :return: The uncertainty_ellipse of this PointUncertaintyEllipse. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this PointUncertaintyEllipse. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this PointUncertaintyEllipse. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def confidence(self) -> int: + """Gets the confidence of this PointUncertaintyEllipse. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this PointUncertaintyEllipse. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this PointUncertaintyEllipse. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this PointUncertaintyEllipse. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/polygon.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/polygon.py new file mode 100644 index 00000000..9dfe4c29 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/polygon.py @@ -0,0 +1,103 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.gad_shape import GADShape +from openapi_server.models.geographical_coordinates import GeographicalCoordinates +from openapi_server.models.supported_gad_shapes import SupportedGADShapes +from openapi_server import util + +from openapi_server.models.gad_shape import GADShape # noqa: E501 +from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class Polygon(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point_list=None): # noqa: E501 + """Polygon - a model defined in OpenAPI + + :param shape: The shape of this Polygon. # noqa: E501 + :type shape: SupportedGADShapes + :param point_list: The point_list of this Polygon. # noqa: E501 + :type point_list: List[GeographicalCoordinates] + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point_list': List[GeographicalCoordinates] + } + + self.attribute_map = { + 'shape': 'shape', + 'point_list': 'pointList' + } + + self._shape = shape + self._point_list = point_list + + @classmethod + def from_dict(cls, dikt) -> 'Polygon': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Polygon of this Polygon. # noqa: E501 + :rtype: Polygon + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this Polygon. + + + :return: The shape of this Polygon. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this Polygon. + + + :param shape: The shape of this Polygon. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point_list(self) -> List[GeographicalCoordinates]: + """Gets the point_list of this Polygon. + + List of points. # noqa: E501 + + :return: The point_list of this Polygon. + :rtype: List[GeographicalCoordinates] + """ + return self._point_list + + @point_list.setter + def point_list(self, point_list: List[GeographicalCoordinates]): + """Sets the point_list of this Polygon. + + List of points. # noqa: E501 + + :param point_list: The point_list of this Polygon. + :type point_list: List[GeographicalCoordinates] + """ + if point_list is None: + raise ValueError("Invalid value for `point_list`, must not be `None`") # noqa: E501 + if point_list is not None and len(point_list) > 15: + raise ValueError("Invalid value for `point_list`, number of items must be less than or equal to `15`") # noqa: E501 + if point_list is not None and len(point_list) < 3: + raise ValueError("Invalid value for `point_list`, number of items must be greater than or equal to `3`") # noqa: E501 + + self._point_list = point_list diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/problem_details.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/problem_details.py new file mode 100644 index 00000000..2d07f637 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/problem_details.py @@ -0,0 +1,267 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.invalid_param import InvalidParam +import re +from openapi_server import util + +from openapi_server.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 + +class ProblemDetails(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, type=None, title=None, status=None, detail=None, instance=None, cause=None, invalid_params=None, supported_features=None): # noqa: E501 + """ProblemDetails - a model defined in OpenAPI + + :param type: The type of this ProblemDetails. # noqa: E501 + :type type: str + :param title: The title of this ProblemDetails. # noqa: E501 + :type title: str + :param status: The status of this ProblemDetails. # noqa: E501 + :type status: int + :param detail: The detail of this ProblemDetails. # noqa: E501 + :type detail: str + :param instance: The instance of this ProblemDetails. # noqa: E501 + :type instance: str + :param cause: The cause of this ProblemDetails. # noqa: E501 + :type cause: str + :param invalid_params: The invalid_params of this ProblemDetails. # noqa: E501 + :type invalid_params: List[InvalidParam] + :param supported_features: The supported_features of this ProblemDetails. # noqa: E501 + :type supported_features: str + """ + self.openapi_types = { + 'type': str, + 'title': str, + 'status': int, + 'detail': str, + 'instance': str, + 'cause': str, + 'invalid_params': List[InvalidParam], + 'supported_features': str + } + + self.attribute_map = { + 'type': 'type', + 'title': 'title', + 'status': 'status', + 'detail': 'detail', + 'instance': 'instance', + 'cause': 'cause', + 'invalid_params': 'invalidParams', + 'supported_features': 'supportedFeatures' + } + + self._type = type + self._title = title + self._status = status + self._detail = detail + self._instance = instance + self._cause = cause + self._invalid_params = invalid_params + self._supported_features = supported_features + + @classmethod + def from_dict(cls, dikt) -> 'ProblemDetails': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ProblemDetails of this ProblemDetails. # noqa: E501 + :rtype: ProblemDetails + """ + return util.deserialize_model(dikt, cls) + + @property + def type(self) -> str: + """Gets the type of this ProblemDetails. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The type of this ProblemDetails. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type: str): + """Sets the type of this ProblemDetails. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param type: The type of this ProblemDetails. + :type type: str + """ + + self._type = type + + @property + def title(self) -> str: + """Gets the title of this ProblemDetails. + + A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem. # noqa: E501 + + :return: The title of this ProblemDetails. + :rtype: str + """ + return self._title + + @title.setter + def title(self, title: str): + """Sets the title of this ProblemDetails. + + A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem. # noqa: E501 + + :param title: The title of this ProblemDetails. + :type title: str + """ + + self._title = title + + @property + def status(self) -> int: + """Gets the status of this ProblemDetails. + + The HTTP status code for this occurrence of the problem. # noqa: E501 + + :return: The status of this ProblemDetails. + :rtype: int + """ + return self._status + + @status.setter + def status(self, status: int): + """Sets the status of this ProblemDetails. + + The HTTP status code for this occurrence of the problem. # noqa: E501 + + :param status: The status of this ProblemDetails. + :type status: int + """ + + self._status = status + + @property + def detail(self) -> str: + """Gets the detail of this ProblemDetails. + + A human-readable explanation specific to this occurrence of the problem. # noqa: E501 + + :return: The detail of this ProblemDetails. + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail: str): + """Sets the detail of this ProblemDetails. + + A human-readable explanation specific to this occurrence of the problem. # noqa: E501 + + :param detail: The detail of this ProblemDetails. + :type detail: str + """ + + self._detail = detail + + @property + def instance(self) -> str: + """Gets the instance of this ProblemDetails. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The instance of this ProblemDetails. + :rtype: str + """ + return self._instance + + @instance.setter + def instance(self, instance: str): + """Sets the instance of this ProblemDetails. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param instance: The instance of this ProblemDetails. + :type instance: str + """ + + self._instance = instance + + @property + def cause(self) -> str: + """Gets the cause of this ProblemDetails. + + A machine-readable application error cause specific to this occurrence of the problem. This IE should be present and provide application-related error information, if available. # noqa: E501 + + :return: The cause of this ProblemDetails. + :rtype: str + """ + return self._cause + + @cause.setter + def cause(self, cause: str): + """Sets the cause of this ProblemDetails. + + A machine-readable application error cause specific to this occurrence of the problem. This IE should be present and provide application-related error information, if available. # noqa: E501 + + :param cause: The cause of this ProblemDetails. + :type cause: str + """ + + self._cause = cause + + @property + def invalid_params(self) -> List[InvalidParam]: + """Gets the invalid_params of this ProblemDetails. + + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 + + :return: The invalid_params of this ProblemDetails. + :rtype: List[InvalidParam] + """ + return self._invalid_params + + @invalid_params.setter + def invalid_params(self, invalid_params: List[InvalidParam]): + """Sets the invalid_params of this ProblemDetails. + + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 + + :param invalid_params: The invalid_params of this ProblemDetails. + :type invalid_params: List[InvalidParam] + """ + if invalid_params is not None and len(invalid_params) < 1: + raise ValueError("Invalid value for `invalid_params`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._invalid_params = invalid_params + + @property + def supported_features(self) -> str: + """Gets the supported_features of this ProblemDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supported_features of this ProblemDetails. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this ProblemDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supported_features: The supported_features of this ProblemDetails. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/protocol.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/protocol.py new file mode 100644 index 00000000..b705e01c --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/protocol.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class Protocol(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """Protocol - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'Protocol': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Protocol of this Protocol. # noqa: E501 + :rtype: Protocol + """ + return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/relative_cartesian_location.py new file mode 100644 index 00000000..aff00209 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/relative_cartesian_location.py @@ -0,0 +1,123 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class RelativeCartesianLocation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, x=None, y=None, z=None): # noqa: E501 + """RelativeCartesianLocation - a model defined in OpenAPI + + :param x: The x of this RelativeCartesianLocation. # noqa: E501 + :type x: float + :param y: The y of this RelativeCartesianLocation. # noqa: E501 + :type y: float + :param z: The z of this RelativeCartesianLocation. # noqa: E501 + :type z: float + """ + self.openapi_types = { + 'x': float, + 'y': float, + 'z': float + } + + self.attribute_map = { + 'x': 'x', + 'y': 'y', + 'z': 'z' + } + + self._x = x + self._y = y + self._z = z + + @classmethod + def from_dict(cls, dikt) -> 'RelativeCartesianLocation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The RelativeCartesianLocation of this RelativeCartesianLocation. # noqa: E501 + :rtype: RelativeCartesianLocation + """ + return util.deserialize_model(dikt, cls) + + @property + def x(self) -> float: + """Gets the x of this RelativeCartesianLocation. + + string with format 'float' as defined in OpenAPI. # noqa: E501 + + :return: The x of this RelativeCartesianLocation. + :rtype: float + """ + return self._x + + @x.setter + def x(self, x: float): + """Sets the x of this RelativeCartesianLocation. + + string with format 'float' as defined in OpenAPI. # noqa: E501 + + :param x: The x of this RelativeCartesianLocation. + :type x: float + """ + if x is None: + raise ValueError("Invalid value for `x`, must not be `None`") # noqa: E501 + + self._x = x + + @property + def y(self) -> float: + """Gets the y of this RelativeCartesianLocation. + + string with format 'float' as defined in OpenAPI. # noqa: E501 + + :return: The y of this RelativeCartesianLocation. + :rtype: float + """ + return self._y + + @y.setter + def y(self, y: float): + """Sets the y of this RelativeCartesianLocation. + + string with format 'float' as defined in OpenAPI. # noqa: E501 + + :param y: The y of this RelativeCartesianLocation. + :type y: float + """ + if y is None: + raise ValueError("Invalid value for `y`, must not be `None`") # noqa: E501 + + self._y = y + + @property + def z(self) -> float: + """Gets the z of this RelativeCartesianLocation. + + string with format 'float' as defined in OpenAPI. # noqa: E501 + + :return: The z of this RelativeCartesianLocation. + :rtype: float + """ + return self._z + + @z.setter + def z(self, z: float): + """Sets the z of this RelativeCartesianLocation. + + string with format 'float' as defined in OpenAPI. # noqa: E501 + + :param z: The z of this RelativeCartesianLocation. + :type z: float + """ + + self._z = z diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/res_oper_info.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/res_oper_info.py new file mode 100644 index 00000000..7d32e822 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/res_oper_info.py @@ -0,0 +1,121 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.operation import Operation +from openapi_server import util + +from openapi_server.models.operation import Operation # noqa: E501 + +class ResOperInfo(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, resource=None, operations=None, custom_serv_opers=None): # noqa: E501 + """ResOperInfo - a model defined in OpenAPI + + :param resource: The resource of this ResOperInfo. # noqa: E501 + :type resource: str + :param operations: The operations of this ResOperInfo. # noqa: E501 + :type operations: List[Operation] + :param custom_serv_opers: The custom_serv_opers of this ResOperInfo. # noqa: E501 + :type custom_serv_opers: List[str] + """ + self.openapi_types = { + 'resource': str, + 'operations': List[Operation], + 'custom_serv_opers': List[str] + } + + self.attribute_map = { + 'resource': 'resource', + 'operations': 'operations', + 'custom_serv_opers': 'customServOpers' + } + + self._resource = resource + self._operations = operations + self._custom_serv_opers = custom_serv_opers + + @classmethod + def from_dict(cls, dikt) -> 'ResOperInfo': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ResOperInfo of this ResOperInfo. # noqa: E501 + :rtype: ResOperInfo + """ + return util.deserialize_model(dikt, cls) + + @property + def resource(self) -> str: + """Gets the resource of this ResOperInfo. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The resource of this ResOperInfo. + :rtype: str + """ + return self._resource + + @resource.setter + def resource(self, resource: str): + """Sets the resource of this ResOperInfo. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param resource: The resource of this ResOperInfo. + :type resource: str + """ + + self._resource = resource + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this ResOperInfo. + + + :return: The operations of this ResOperInfo. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this ResOperInfo. + + + :param operations: The operations of this ResOperInfo. + :type operations: List[Operation] + """ + if operations is not None and len(operations) < 1: + raise ValueError("Invalid value for `operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._operations = operations + + @property + def custom_serv_opers(self) -> List[str]: + """Gets the custom_serv_opers of this ResOperInfo. + + + :return: The custom_serv_opers of this ResOperInfo. + :rtype: List[str] + """ + return self._custom_serv_opers + + @custom_serv_opers.setter + def custom_serv_opers(self, custom_serv_opers: List[str]): + """Sets the custom_serv_opers of this ResOperInfo. + + + :param custom_serv_opers: The custom_serv_opers of this ResOperInfo. + :type custom_serv_opers: List[str] + """ + if custom_serv_opers is not None and len(custom_serv_opers) < 1: + raise ValueError("Invalid value for `custom_serv_opers`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._custom_serv_opers = custom_serv_opers diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/resource.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/resource.py new file mode 100644 index 00000000..696f10ae --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/resource.py @@ -0,0 +1,245 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.communication_type import CommunicationType +from openapi_server.models.custom_operation import CustomOperation +from openapi_server.models.operation import Operation +from openapi_server import util + +from openapi_server.models.communication_type import CommunicationType # noqa: E501 +from openapi_server.models.custom_operation import CustomOperation # noqa: E501 +from openapi_server.models.operation import Operation # noqa: E501 + +class Resource(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, resource_name=None, comm_type=None, uri=None, cust_op_name=None, cust_operations=None, operations=None, description=None): # noqa: E501 + """Resource - a model defined in OpenAPI + + :param resource_name: The resource_name of this Resource. # noqa: E501 + :type resource_name: str + :param comm_type: The comm_type of this Resource. # noqa: E501 + :type comm_type: CommunicationType + :param uri: The uri of this Resource. # noqa: E501 + :type uri: str + :param cust_op_name: The cust_op_name of this Resource. # noqa: E501 + :type cust_op_name: str + :param cust_operations: The cust_operations of this Resource. # noqa: E501 + :type cust_operations: List[CustomOperation] + :param operations: The operations of this Resource. # noqa: E501 + :type operations: List[Operation] + :param description: The description of this Resource. # noqa: E501 + :type description: str + """ + self.openapi_types = { + 'resource_name': str, + 'comm_type': CommunicationType, + 'uri': str, + 'cust_op_name': str, + 'cust_operations': List[CustomOperation], + 'operations': List[Operation], + 'description': str + } + + self.attribute_map = { + 'resource_name': 'resourceName', + 'comm_type': 'commType', + 'uri': 'uri', + 'cust_op_name': 'custOpName', + 'cust_operations': 'custOperations', + 'operations': 'operations', + 'description': 'description' + } + + self._resource_name = resource_name + self._comm_type = comm_type + self._uri = uri + self._cust_op_name = cust_op_name + self._cust_operations = cust_operations + self._operations = operations + self._description = description + + @classmethod + def from_dict(cls, dikt) -> 'Resource': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Resource of this Resource. # noqa: E501 + :rtype: Resource + """ + return util.deserialize_model(dikt, cls) + + @property + def resource_name(self) -> str: + """Gets the resource_name of this Resource. + + Resource name # noqa: E501 + + :return: The resource_name of this Resource. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name: str): + """Sets the resource_name of this Resource. + + Resource name # noqa: E501 + + :param resource_name: The resource_name of this Resource. + :type resource_name: str + """ + if resource_name is None: + raise ValueError("Invalid value for `resource_name`, must not be `None`") # noqa: E501 + + self._resource_name = resource_name + + @property + def comm_type(self) -> CommunicationType: + """Gets the comm_type of this Resource. + + + :return: The comm_type of this Resource. + :rtype: CommunicationType + """ + return self._comm_type + + @comm_type.setter + def comm_type(self, comm_type: CommunicationType): + """Sets the comm_type of this Resource. + + + :param comm_type: The comm_type of this Resource. + :type comm_type: CommunicationType + """ + if comm_type is None: + raise ValueError("Invalid value for `comm_type`, must not be `None`") # noqa: E501 + + self._comm_type = comm_type + + @property + def uri(self) -> str: + """Gets the uri of this Resource. + + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The uri of this Resource. + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri: str): + """Sets the uri of this Resource. + + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param uri: The uri of this Resource. + :type uri: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def cust_op_name(self) -> str: + """Gets the cust_op_name of this Resource. + + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The cust_op_name of this Resource. + :rtype: str + """ + return self._cust_op_name + + @cust_op_name.setter + def cust_op_name(self, cust_op_name: str): + """Sets the cust_op_name of this Resource. + + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param cust_op_name: The cust_op_name of this Resource. + :type cust_op_name: str + """ + + self._cust_op_name = cust_op_name + + @property + def cust_operations(self) -> List[CustomOperation]: + """Gets the cust_operations of this Resource. + + Custom operations associated with this resource. # noqa: E501 + + :return: The cust_operations of this Resource. + :rtype: List[CustomOperation] + """ + return self._cust_operations + + @cust_operations.setter + def cust_operations(self, cust_operations: List[CustomOperation]): + """Sets the cust_operations of this Resource. + + Custom operations associated with this resource. # noqa: E501 + + :param cust_operations: The cust_operations of this Resource. + :type cust_operations: List[CustomOperation] + """ + if cust_operations is not None and len(cust_operations) < 1: + raise ValueError("Invalid value for `cust_operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._cust_operations = cust_operations + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this Resource. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :return: The operations of this Resource. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this Resource. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :param operations: The operations of this Resource. + :type operations: List[Operation] + """ + if operations is not None and len(operations) < 1: + raise ValueError("Invalid value for `operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._operations = operations + + @property + def description(self) -> str: + """Gets the description of this Resource. + + Text description of the API resource # noqa: E501 + + :return: The description of this Resource. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this Resource. + + Text description of the API resource # noqa: E501 + + :param description: The description of this Resource. + :type description: str + """ + + self._description = description diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/service_kpis.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/service_kpis.py new file mode 100644 index 00000000..727c7ddb --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/service_kpis.py @@ -0,0 +1,277 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +import re +from openapi_server import util + +import re # noqa: E501 + +class ServiceKpis(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, max_req_rate=None, max_restime=None, availability=None, aval_comp=None, aval_gra_comp=None, aval_mem=None, aval_stor=None, con_band=None): # noqa: E501 + """ServiceKpis - a model defined in OpenAPI + + :param max_req_rate: The max_req_rate of this ServiceKpis. # noqa: E501 + :type max_req_rate: int + :param max_restime: The max_restime of this ServiceKpis. # noqa: E501 + :type max_restime: int + :param availability: The availability of this ServiceKpis. # noqa: E501 + :type availability: int + :param aval_comp: The aval_comp of this ServiceKpis. # noqa: E501 + :type aval_comp: str + :param aval_gra_comp: The aval_gra_comp of this ServiceKpis. # noqa: E501 + :type aval_gra_comp: str + :param aval_mem: The aval_mem of this ServiceKpis. # noqa: E501 + :type aval_mem: str + :param aval_stor: The aval_stor of this ServiceKpis. # noqa: E501 + :type aval_stor: str + :param con_band: The con_band of this ServiceKpis. # noqa: E501 + :type con_band: int + """ + self.openapi_types = { + 'max_req_rate': int, + 'max_restime': int, + 'availability': int, + 'aval_comp': str, + 'aval_gra_comp': str, + 'aval_mem': str, + 'aval_stor': str, + 'con_band': int + } + + self.attribute_map = { + 'max_req_rate': 'maxReqRate', + 'max_restime': 'maxRestime', + 'availability': 'availability', + 'aval_comp': 'avalComp', + 'aval_gra_comp': 'avalGraComp', + 'aval_mem': 'avalMem', + 'aval_stor': 'avalStor', + 'con_band': 'conBand' + } + + self._max_req_rate = max_req_rate + self._max_restime = max_restime + self._availability = availability + self._aval_comp = aval_comp + self._aval_gra_comp = aval_gra_comp + self._aval_mem = aval_mem + self._aval_stor = aval_stor + self._con_band = con_band + + @classmethod + def from_dict(cls, dikt) -> 'ServiceKpis': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ServiceKpis of this ServiceKpis. # noqa: E501 + :rtype: ServiceKpis + """ + return util.deserialize_model(dikt, cls) + + @property + def max_req_rate(self) -> int: + """Gets the max_req_rate of this ServiceKpis. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :return: The max_req_rate of this ServiceKpis. + :rtype: int + """ + return self._max_req_rate + + @max_req_rate.setter + def max_req_rate(self, max_req_rate: int): + """Sets the max_req_rate of this ServiceKpis. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :param max_req_rate: The max_req_rate of this ServiceKpis. + :type max_req_rate: int + """ + if max_req_rate is not None and max_req_rate < 0: # noqa: E501 + raise ValueError("Invalid value for `max_req_rate`, must be a value greater than or equal to `0`") # noqa: E501 + + self._max_req_rate = max_req_rate + + @property + def max_restime(self) -> int: + """Gets the max_restime of this ServiceKpis. + + Unsigned integer identifying a period of time in units of seconds. # noqa: E501 + + :return: The max_restime of this ServiceKpis. + :rtype: int + """ + return self._max_restime + + @max_restime.setter + def max_restime(self, max_restime: int): + """Sets the max_restime of this ServiceKpis. + + Unsigned integer identifying a period of time in units of seconds. # noqa: E501 + + :param max_restime: The max_restime of this ServiceKpis. + :type max_restime: int + """ + if max_restime is not None and max_restime < 0: # noqa: E501 + raise ValueError("Invalid value for `max_restime`, must be a value greater than or equal to `0`") # noqa: E501 + + self._max_restime = max_restime + + @property + def availability(self) -> int: + """Gets the availability of this ServiceKpis. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :return: The availability of this ServiceKpis. + :rtype: int + """ + return self._availability + + @availability.setter + def availability(self, availability: int): + """Sets the availability of this ServiceKpis. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :param availability: The availability of this ServiceKpis. + :type availability: int + """ + if availability is not None and availability < 0: # noqa: E501 + raise ValueError("Invalid value for `availability`, must be a value greater than or equal to `0`") # noqa: E501 + + self._availability = availability + + @property + def aval_comp(self) -> str: + """Gets the aval_comp of this ServiceKpis. + + The maximum compute resource available in FLOPS for the API Invoker. # noqa: E501 + + :return: The aval_comp of this ServiceKpis. + :rtype: str + """ + return self._aval_comp + + @aval_comp.setter + def aval_comp(self, aval_comp: str): + """Sets the aval_comp of this ServiceKpis. + + The maximum compute resource available in FLOPS for the API Invoker. # noqa: E501 + + :param aval_comp: The aval_comp of this ServiceKpis. + :type aval_comp: str + """ + if aval_comp is not None and not re.search(r'^\d+(\.\d+)? (kFLOPS|MFLOPS|GFLOPS|TFLOPS|PFLOPS|EFLOPS|ZFLOPS)$', aval_comp): # noqa: E501 + raise ValueError(r"Invalid value for `aval_comp`, must be a follow pattern or equal to `/^\d+(\.\d+)? (kFLOPS|MFLOPS|GFLOPS|TFLOPS|PFLOPS|EFLOPS|ZFLOPS)$/`") # noqa: E501 + + self._aval_comp = aval_comp + + @property + def aval_gra_comp(self) -> str: + """Gets the aval_gra_comp of this ServiceKpis. + + The maximum graphical compute resource in FLOPS available for the API Invoker. # noqa: E501 + + :return: The aval_gra_comp of this ServiceKpis. + :rtype: str + """ + return self._aval_gra_comp + + @aval_gra_comp.setter + def aval_gra_comp(self, aval_gra_comp: str): + """Sets the aval_gra_comp of this ServiceKpis. + + The maximum graphical compute resource in FLOPS available for the API Invoker. # noqa: E501 + + :param aval_gra_comp: The aval_gra_comp of this ServiceKpis. + :type aval_gra_comp: str + """ + if aval_gra_comp is not None and not re.search(r'^\d+(\.\d+)? (kFLOPS|MFLOPS|GFLOPS|TFLOPS|PFLOPS|EFLOPS|ZFLOPS)$', aval_gra_comp): # noqa: E501 + raise ValueError(r"Invalid value for `aval_gra_comp`, must be a follow pattern or equal to `/^\d+(\.\d+)? (kFLOPS|MFLOPS|GFLOPS|TFLOPS|PFLOPS|EFLOPS|ZFLOPS)$/`") # noqa: E501 + + self._aval_gra_comp = aval_gra_comp + + @property + def aval_mem(self) -> str: + """Gets the aval_mem of this ServiceKpis. + + The maximum memory resource available for the API Invoker. # noqa: E501 + + :return: The aval_mem of this ServiceKpis. + :rtype: str + """ + return self._aval_mem + + @aval_mem.setter + def aval_mem(self, aval_mem: str): + """Sets the aval_mem of this ServiceKpis. + + The maximum memory resource available for the API Invoker. # noqa: E501 + + :param aval_mem: The aval_mem of this ServiceKpis. + :type aval_mem: str + """ + if aval_mem is not None and not re.search(r'^\d+(\.\d+)? (KB|MB|GB|TB|PB|EB|ZB|YB)$', aval_mem): # noqa: E501 + raise ValueError(r"Invalid value for `aval_mem`, must be a follow pattern or equal to `/^\d+(\.\d+)? (KB|MB|GB|TB|PB|EB|ZB|YB)$/`") # noqa: E501 + + self._aval_mem = aval_mem + + @property + def aval_stor(self) -> str: + """Gets the aval_stor of this ServiceKpis. + + The maximum storage resource available for the API Invoker. # noqa: E501 + + :return: The aval_stor of this ServiceKpis. + :rtype: str + """ + return self._aval_stor + + @aval_stor.setter + def aval_stor(self, aval_stor: str): + """Sets the aval_stor of this ServiceKpis. + + The maximum storage resource available for the API Invoker. # noqa: E501 + + :param aval_stor: The aval_stor of this ServiceKpis. + :type aval_stor: str + """ + if aval_stor is not None and not re.search(r'^\d+(\.\d+)? (KB|MB|GB|TB|PB|EB|ZB|YB)$', aval_stor): # noqa: E501 + raise ValueError(r"Invalid value for `aval_stor`, must be a follow pattern or equal to `/^\d+(\.\d+)? (KB|MB|GB|TB|PB|EB|ZB|YB)$/`") # noqa: E501 + + self._aval_stor = aval_stor + + @property + def con_band(self) -> int: + """Gets the con_band of this ServiceKpis. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :return: The con_band of this ServiceKpis. + :rtype: int + """ + return self._con_band + + @con_band.setter + def con_band(self, con_band: int): + """Sets the con_band of this ServiceKpis. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :param con_band: The con_band of this ServiceKpis. + :type con_band: int + """ + if con_band is not None and con_band < 0: # noqa: E501 + raise ValueError("Invalid value for `con_band`, must be a value greater than or equal to `0`") # noqa: E501 + + self._con_band = con_band diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/supported_gad_shapes.py new file mode 100644 index 00000000..971a04ca --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/supported_gad_shapes.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class SupportedGADShapes(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """SupportedGADShapes - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'SupportedGADShapes': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The SupportedGADShapes of this SupportedGADShapes. # noqa: E501 + :rtype: SupportedGADShapes + """ + return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipse.py new file mode 100644 index 00000000..ae5d0316 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipse.py @@ -0,0 +1,133 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class UncertaintyEllipse(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, semi_major=None, semi_minor=None, orientation_major=None): # noqa: E501 + """UncertaintyEllipse - a model defined in OpenAPI + + :param semi_major: The semi_major of this UncertaintyEllipse. # noqa: E501 + :type semi_major: float + :param semi_minor: The semi_minor of this UncertaintyEllipse. # noqa: E501 + :type semi_minor: float + :param orientation_major: The orientation_major of this UncertaintyEllipse. # noqa: E501 + :type orientation_major: int + """ + self.openapi_types = { + 'semi_major': float, + 'semi_minor': float, + 'orientation_major': int + } + + self.attribute_map = { + 'semi_major': 'semiMajor', + 'semi_minor': 'semiMinor', + 'orientation_major': 'orientationMajor' + } + + self._semi_major = semi_major + self._semi_minor = semi_minor + self._orientation_major = orientation_major + + @classmethod + def from_dict(cls, dikt) -> 'UncertaintyEllipse': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The UncertaintyEllipse of this UncertaintyEllipse. # noqa: E501 + :rtype: UncertaintyEllipse + """ + return util.deserialize_model(dikt, cls) + + @property + def semi_major(self) -> float: + """Gets the semi_major of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :return: The semi_major of this UncertaintyEllipse. + :rtype: float + """ + return self._semi_major + + @semi_major.setter + def semi_major(self, semi_major: float): + """Sets the semi_major of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :param semi_major: The semi_major of this UncertaintyEllipse. + :type semi_major: float + """ + if semi_major is None: + raise ValueError("Invalid value for `semi_major`, must not be `None`") # noqa: E501 + if semi_major is not None and semi_major < 0: # noqa: E501 + raise ValueError("Invalid value for `semi_major`, must be a value greater than or equal to `0`") # noqa: E501 + + self._semi_major = semi_major + + @property + def semi_minor(self) -> float: + """Gets the semi_minor of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :return: The semi_minor of this UncertaintyEllipse. + :rtype: float + """ + return self._semi_minor + + @semi_minor.setter + def semi_minor(self, semi_minor: float): + """Sets the semi_minor of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :param semi_minor: The semi_minor of this UncertaintyEllipse. + :type semi_minor: float + """ + if semi_minor is None: + raise ValueError("Invalid value for `semi_minor`, must not be `None`") # noqa: E501 + if semi_minor is not None and semi_minor < 0: # noqa: E501 + raise ValueError("Invalid value for `semi_minor`, must be a value greater than or equal to `0`") # noqa: E501 + + self._semi_minor = semi_minor + + @property + def orientation_major(self) -> int: + """Gets the orientation_major of this UncertaintyEllipse. + + Indicates value of orientation angle. # noqa: E501 + + :return: The orientation_major of this UncertaintyEllipse. + :rtype: int + """ + return self._orientation_major + + @orientation_major.setter + def orientation_major(self, orientation_major: int): + """Sets the orientation_major of this UncertaintyEllipse. + + Indicates value of orientation angle. # noqa: E501 + + :param orientation_major: The orientation_major of this UncertaintyEllipse. + :type orientation_major: int + """ + if orientation_major is None: + raise ValueError("Invalid value for `orientation_major`, must not be `None`") # noqa: E501 + if orientation_major is not None and orientation_major > 180: # noqa: E501 + raise ValueError("Invalid value for `orientation_major`, must be a value less than or equal to `180`") # noqa: E501 + if orientation_major is not None and orientation_major < 0: # noqa: E501 + raise ValueError("Invalid value for `orientation_major`, must be a value greater than or equal to `0`") # noqa: E501 + + self._orientation_major = orientation_major diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipsoid.py new file mode 100644 index 00000000..ac84487a --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipsoid.py @@ -0,0 +1,165 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class UncertaintyEllipsoid(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, semi_major=None, semi_minor=None, vertical=None, orientation_major=None): # noqa: E501 + """UncertaintyEllipsoid - a model defined in OpenAPI + + :param semi_major: The semi_major of this UncertaintyEllipsoid. # noqa: E501 + :type semi_major: float + :param semi_minor: The semi_minor of this UncertaintyEllipsoid. # noqa: E501 + :type semi_minor: float + :param vertical: The vertical of this UncertaintyEllipsoid. # noqa: E501 + :type vertical: float + :param orientation_major: The orientation_major of this UncertaintyEllipsoid. # noqa: E501 + :type orientation_major: int + """ + self.openapi_types = { + 'semi_major': float, + 'semi_minor': float, + 'vertical': float, + 'orientation_major': int + } + + self.attribute_map = { + 'semi_major': 'semiMajor', + 'semi_minor': 'semiMinor', + 'vertical': 'vertical', + 'orientation_major': 'orientationMajor' + } + + self._semi_major = semi_major + self._semi_minor = semi_minor + self._vertical = vertical + self._orientation_major = orientation_major + + @classmethod + def from_dict(cls, dikt) -> 'UncertaintyEllipsoid': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The UncertaintyEllipsoid of this UncertaintyEllipsoid. # noqa: E501 + :rtype: UncertaintyEllipsoid + """ + return util.deserialize_model(dikt, cls) + + @property + def semi_major(self) -> float: + """Gets the semi_major of this UncertaintyEllipsoid. + + Indicates value of uncertainty. # noqa: E501 + + :return: The semi_major of this UncertaintyEllipsoid. + :rtype: float + """ + return self._semi_major + + @semi_major.setter + def semi_major(self, semi_major: float): + """Sets the semi_major of this UncertaintyEllipsoid. + + Indicates value of uncertainty. # noqa: E501 + + :param semi_major: The semi_major of this UncertaintyEllipsoid. + :type semi_major: float + """ + if semi_major is None: + raise ValueError("Invalid value for `semi_major`, must not be `None`") # noqa: E501 + if semi_major is not None and semi_major < 0: # noqa: E501 + raise ValueError("Invalid value for `semi_major`, must be a value greater than or equal to `0`") # noqa: E501 + + self._semi_major = semi_major + + @property + def semi_minor(self) -> float: + """Gets the semi_minor of this UncertaintyEllipsoid. + + Indicates value of uncertainty. # noqa: E501 + + :return: The semi_minor of this UncertaintyEllipsoid. + :rtype: float + """ + return self._semi_minor + + @semi_minor.setter + def semi_minor(self, semi_minor: float): + """Sets the semi_minor of this UncertaintyEllipsoid. + + Indicates value of uncertainty. # noqa: E501 + + :param semi_minor: The semi_minor of this UncertaintyEllipsoid. + :type semi_minor: float + """ + if semi_minor is None: + raise ValueError("Invalid value for `semi_minor`, must not be `None`") # noqa: E501 + if semi_minor is not None and semi_minor < 0: # noqa: E501 + raise ValueError("Invalid value for `semi_minor`, must be a value greater than or equal to `0`") # noqa: E501 + + self._semi_minor = semi_minor + + @property + def vertical(self) -> float: + """Gets the vertical of this UncertaintyEllipsoid. + + Indicates value of uncertainty. # noqa: E501 + + :return: The vertical of this UncertaintyEllipsoid. + :rtype: float + """ + return self._vertical + + @vertical.setter + def vertical(self, vertical: float): + """Sets the vertical of this UncertaintyEllipsoid. + + Indicates value of uncertainty. # noqa: E501 + + :param vertical: The vertical of this UncertaintyEllipsoid. + :type vertical: float + """ + if vertical is None: + raise ValueError("Invalid value for `vertical`, must not be `None`") # noqa: E501 + if vertical is not None and vertical < 0: # noqa: E501 + raise ValueError("Invalid value for `vertical`, must be a value greater than or equal to `0`") # noqa: E501 + + self._vertical = vertical + + @property + def orientation_major(self) -> int: + """Gets the orientation_major of this UncertaintyEllipsoid. + + Indicates value of orientation angle. # noqa: E501 + + :return: The orientation_major of this UncertaintyEllipsoid. + :rtype: int + """ + return self._orientation_major + + @orientation_major.setter + def orientation_major(self, orientation_major: int): + """Sets the orientation_major of this UncertaintyEllipsoid. + + Indicates value of orientation angle. # noqa: E501 + + :param orientation_major: The orientation_major of this UncertaintyEllipsoid. + :type orientation_major: int + """ + if orientation_major is None: + raise ValueError("Invalid value for `orientation_major`, must not be `None`") # noqa: E501 + if orientation_major is not None and orientation_major > 180: # noqa: E501 + raise ValueError("Invalid value for `orientation_major`, must be a value less than or equal to `180`") # noqa: E501 + if orientation_major is not None and orientation_major < 0: # noqa: E501 + raise ValueError("Invalid value for `orientation_major`, must be a value greater than or equal to `0`") # noqa: E501 + + self._orientation_major = orientation_major diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/version.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/version.py new file mode 100644 index 00000000..eb18ce31 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/version.py @@ -0,0 +1,157 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server.models.custom_operation import CustomOperation +from openapi_server.models.resource import Resource +from openapi_server import util + +from openapi_server.models.custom_operation import CustomOperation # noqa: E501 +from openapi_server.models.resource import Resource # noqa: E501 + +class Version(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_version=None, expiry=None, resources=None, cust_operations=None): # noqa: E501 + """Version - a model defined in OpenAPI + + :param api_version: The api_version of this Version. # noqa: E501 + :type api_version: str + :param expiry: The expiry of this Version. # noqa: E501 + :type expiry: datetime + :param resources: The resources of this Version. # noqa: E501 + :type resources: List[Resource] + :param cust_operations: The cust_operations of this Version. # noqa: E501 + :type cust_operations: List[CustomOperation] + """ + self.openapi_types = { + 'api_version': str, + 'expiry': datetime, + 'resources': List[Resource], + 'cust_operations': List[CustomOperation] + } + + self.attribute_map = { + 'api_version': 'apiVersion', + 'expiry': 'expiry', + 'resources': 'resources', + 'cust_operations': 'custOperations' + } + + self._api_version = api_version + self._expiry = expiry + self._resources = resources + self._cust_operations = cust_operations + + @classmethod + def from_dict(cls, dikt) -> 'Version': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Version of this Version. # noqa: E501 + :rtype: Version + """ + return util.deserialize_model(dikt, cls) + + @property + def api_version(self) -> str: + """Gets the api_version of this Version. + + API major version in URI (e.g. v1) # noqa: E501 + + :return: The api_version of this Version. + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version: str): + """Sets the api_version of this Version. + + API major version in URI (e.g. v1) # noqa: E501 + + :param api_version: The api_version of this Version. + :type api_version: str + """ + if api_version is None: + raise ValueError("Invalid value for `api_version`, must not be `None`") # noqa: E501 + + self._api_version = api_version + + @property + def expiry(self) -> datetime: + """Gets the expiry of this Version. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :return: The expiry of this Version. + :rtype: datetime + """ + return self._expiry + + @expiry.setter + def expiry(self, expiry: datetime): + """Sets the expiry of this Version. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :param expiry: The expiry of this Version. + :type expiry: datetime + """ + + self._expiry = expiry + + @property + def resources(self) -> List[Resource]: + """Gets the resources of this Version. + + Resources supported by the API. # noqa: E501 + + :return: The resources of this Version. + :rtype: List[Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources: List[Resource]): + """Sets the resources of this Version. + + Resources supported by the API. # noqa: E501 + + :param resources: The resources of this Version. + :type resources: List[Resource] + """ + if resources is not None and len(resources) < 1: + raise ValueError("Invalid value for `resources`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._resources = resources + + @property + def cust_operations(self) -> List[CustomOperation]: + """Gets the cust_operations of this Version. + + Custom operations without resource association. # noqa: E501 + + :return: The cust_operations of this Version. + :rtype: List[CustomOperation] + """ + return self._cust_operations + + @cust_operations.setter + def cust_operations(self, cust_operations: List[CustomOperation]): + """Sets the cust_operations of this Version. + + Custom operations without resource association. # noqa: E501 + + :param cust_operations: The cust_operations of this Version. + :type cust_operations: List[CustomOperation] + """ + if cust_operations is not None and len(cust_operations) < 1: + raise ValueError("Invalid value for `cust_operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._cust_operations = cust_operations diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/openapi/openapi.yaml b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/openapi/openapi.yaml new file mode 100644 index 00000000..fba66de5 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/openapi/openapi.yaml @@ -0,0 +1,2675 @@ +openapi: 3.0.0 +info: + description: "API for Routing information. \n© 2025, 3GPP Organizational Partners\ + \ (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" + title: CAPIF_Open_Discover_Service_API + version: 1.0.0-alpha.1 +externalDocs: + description: 3GPP TS 29.222 V19.4.0 Common API Framework for 3GPP Northbound APIs + url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ +servers: +- url: "{apiRoot}/open-api-disc/v1" + variables: + apiRoot: + default: https://example.com + description: apiRoot as defined in clause 7.5 of 3GPP TS 29.222. +paths: + /service-apis: + get: + description: | + Enables Open discovery of the currently registered at the CCF and satisfying a number of filter criteria. + operationId: service_apis_get + parameters: + - description: | + Contains the name(s) of the target Service API(s). + explode: false + in: query + name: api-names + required: false + schema: + items: + type: string + minItems: 1 + type: array + style: form + - description: | + Contains the major version(s) (e.g., v1) of the target Service API(s). + explode: true + in: query + name: api-versions + required: false + schema: + additionalProperties: + items: + type: string + minItems: 1 + type: array + minProperties: 1 + type: object + style: form + - description: | + Contains the communication type supported by the target Service API(s). + explode: true + in: query + name: comm-type + required: false + schema: + $ref: '#/components/schemas/CommunicationType' + style: form + - description: "Contains the protocol(s) supported by the target Service API(s).\ + \ \n" + explode: false + in: query + name: protocols + required: false + schema: + items: + $ref: '#/components/schemas/Protocol' + minItems: 1 + type: array + style: form + - description: "Contains data format(s) supported by the target Service API(s).\ + \ \n" + explode: true + in: query + name: data-format + required: false + schema: + $ref: '#/components/schemas/DataFormat' + style: form + - description: | + Contains the category(ies) of the target Service API(s). + explode: false + in: query + name: api-cats + required: false + schema: + items: + type: string + minItems: 1 + type: array + style: form + - content: + application/json: + schema: + $ref: '#/components/schemas/AefLocation' + description: | + Contains the preferred location information for AEF(s) exposing the target Service API(s). This query parameter is ignored by the CCF if there are no matching records at the CCF. + in: query + name: preferred-aef-loc + required: false + - description: | + Contains the name(s) of the provider(s) of the target Service API(s). + explode: false + in: query + name: api-prov-names + required: false + schema: + items: + type: string + minItems: 1 + type: array + style: form + - description: | + Contains the features supported by the discovered service API indicated by api-name parameter. This may only be present if api-name query parameter is present. + explode: true + in: query + name: api-supported-features + required: false + schema: + additionalProperties: + $ref: '#/components/schemas/SupportedFeatures' + minProperties: 1 + type: object + style: form + - description: | + Contains the identifier(s) of the targeted service APIs. + explode: false + in: query + name: api-ids + required: false + schema: + items: + type: string + minItems: 1 + type: array + style: form + - description: "Contains iInformation about service characteristics provided\ + \ by the targeted service API(s). \n" + explode: true + in: query + name: service-kpis + required: false + schema: + $ref: '#/components/schemas/ServiceKpis' + style: form + - description: | + Contains the list of supported API resource(s) and service operation(s). + explode: false + in: query + name: res-ops + required: false + schema: + items: + $ref: '#/components/schemas/ResOperInfo' + minItems: 1 + type: array + style: form + - description: | + Contains a list of supported features among the ones defined in clause 8.1.6. This attributed shall be present only when feature negotiation needs to take place. + explode: true + in: query + name: supported-features + required: false + schema: + $ref: '#/components/schemas/SupportedFeatures' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OpenDiscoveryResp' + description: | + The response body contains the result of the search over the list of the registered APIs. + "307": + description: Temporary Redirect + headers: + Location: + description: An alternative URI of the resource. + required: true + schema: + type: string + "308": + description: Permanent Redirect + headers: + Location: + description: An alternative URI of the resource. + required: true + schema: + type: string + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "414": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: URI Too Long + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + default: + description: Generic Error + x-openapi-router-controller: openapi_server.controllers.default_controller +components: + responses: + "307": + description: Temporary Redirect + headers: + Location: + description: An alternative URI of the resource. + required: true + schema: + type: string + "308": + description: Permanent Redirect + headers: + Location: + description: An alternative URI of the resource. + required: true + schema: + type: string + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Bad request + "401": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Unauthorized + "403": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Forbidden + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Found + "406": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Not Acceptable + "414": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: URI Too Long + "429": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Too Many Requests + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Internal Server Error + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + description: Service Unavailable + default: + description: Generic Error + schemas: + OpenDiscoveryResp: + description: | + Represents the Open Service API Discovery response.. + example: + discApis: + - serviceAPICategory: serviceAPICategory + apiName: apiName + apiProvName: apiProvName + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds + aefProfiles: + - protocol: HTTP_1_1 + versions: + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: -151.1701851434036 + lat: 18.494211295267263 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + versions: + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: -151.1701851434036 + lat: 18.494211295267263 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - serviceAPICategory: serviceAPICategory + apiName: apiName + apiProvName: apiProvName + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds + aefProfiles: + - protocol: HTTP_1_1 + versions: + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: -151.1701851434036 + lat: 18.494211295267263 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + versions: + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: -151.1701851434036 + lat: 18.494211295267263 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + suppFeat: suppFeat + properties: + discApis: + items: + $ref: '#/components/schemas/OpenAPIDetails' + minItems: 0 + title: discApis + type: array + suppFeat: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + required: + - discApis + title: OpenDiscoveryResp + type: object + OpenAPIDetails: + description: | + Represents the Service API details provided within an Open Service API Discovery response. + example: + serviceAPICategory: serviceAPICategory + apiName: apiName + apiProvName: apiProvName + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds + aefProfiles: + - protocol: HTTP_1_1 + versions: + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: -151.1701851434036 + lat: 18.494211295267263 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + versions: + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: -151.1701851434036 + lat: 18.494211295267263 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + properties: + apiName: + title: apiName + type: string + apiId: + title: apiId + type: string + apiStatus: + $ref: '#/components/schemas/ApiStatus' + description: + title: description + type: string + serviceAPICategory: + title: serviceAPICategory + type: string + apiSuppFeats: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + apiProvName: + title: apiProvName + type: string + aefProfiles: + items: + $ref: '#/components/schemas/OpenAefProfile' + minItems: 1 + title: aefProfiles + type: array + required: + - apiName + title: OpenAPIDetails + type: object + OpenAefProfile: + description: Represents the AEF Profile details provided within an Open Service + API Discovery response. + example: + protocol: HTTP_1_1 + versions: + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: -151.1701851434036 + lat: 18.494211295267263 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + properties: + aefId: + title: aefId + type: string + versions: + items: + $ref: '#/components/schemas/Version' + minItems: 1 + title: versions + type: array + protocol: + $ref: '#/components/schemas/Protocol' + dataFormat: + $ref: '#/components/schemas/DataFormat' + aefLocation: + $ref: '#/components/schemas/AefLocation' + serviceKpis: + $ref: '#/components/schemas/ServiceKpis' + title: OpenAefProfile + type: object + CommunicationType: + anyOf: + - enum: + - REQUEST_RESPONSE + - SUBSCRIBE_NOTIFY + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: "Indicates a communication type of the resource or the custom operation.\ + \ \nPossible values are:\n- REQUEST_RESPONSE: The communication is of the\ + \ type request-response.\n- SUBSCRIBE_NOTIFY: The communication is of the\ + \ type subscribe-notify.\n" + title: CommunicationType + Protocol: + anyOf: + - enum: + - HTTP_1_1 + - HTTP_2 + - MQTT + - WEBSOCKET + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: "Indicates a protocol and protocol version used by the API. \n\ + Possible values are:\n- HTTP_1_1: Indicates that the protocol is HTTP version\ + \ 1.1.\n- HTTP_2: Indicates that the protocol is HTTP version 2.\n- MQTT:\ + \ Indicates that the protocol is Message Queuing Telemetry Transport.\n- WEBSOCKET:\ + \ Indicates that the protocol is Websocket.\n" + title: Protocol + DataFormat: + anyOf: + - enum: + - JSON + - XML + - PROTOBUF3 + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: "Indicates a data format. \nPossible values are:\n- JSON: Indicates\ + \ that the data format is JSON.\n- XML: Indicates that the data format is\ + \ Extensible Markup Language.\n- PROTOBUF3: Indicates that the data format\ + \ is Protocol buffers version 3.\n" + title: DataFormat + AefLocation: + description: | + Represents the location information (e.g. civic address, GPS coordinates, data center ID) where the AEF providing the service API is located. + example: + dcId: dcId + geoArea: + shape: POINT + point: + lon: -151.1701851434036 + lat: 18.494211295267263 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + properties: + civicAddr: + $ref: '#/components/schemas/CivicAddress' + geoArea: + $ref: '#/components/schemas/GeographicArea' + dcId: + description: | + Identifies the data center where the AEF providing the service API is located. + title: dcId + type: string + title: AefLocation + type: object + SupportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + ServiceKpis: + description: | + Represents information about the service characteristics provided by a service API. + example: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + properties: + maxReqRate: + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are\ + \ permissible." + minimum: 0 + title: Uinteger + type: integer + maxRestime: + description: Unsigned integer identifying a period of time in units of seconds. + minimum: 0 + title: DurationSec + type: integer + availability: + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are\ + \ permissible." + minimum: 0 + title: Uinteger + type: integer + avalComp: + description: | + The maximum compute resource available in FLOPS for the API Invoker. + pattern: ^\d+(\.\d+)? (kFLOPS|MFLOPS|GFLOPS|TFLOPS|PFLOPS|EFLOPS|ZFLOPS)$ + title: avalComp + type: string + avalGraComp: + description: | + The maximum graphical compute resource in FLOPS available for the API Invoker. + pattern: ^\d+(\.\d+)? (kFLOPS|MFLOPS|GFLOPS|TFLOPS|PFLOPS|EFLOPS|ZFLOPS)$ + title: avalGraComp + type: string + avalMem: + description: | + The maximum memory resource available for the API Invoker. + pattern: ^\d+(\.\d+)? (KB|MB|GB|TB|PB|EB|ZB|YB)$ + title: avalMem + type: string + avalStor: + description: | + The maximum storage resource available for the API Invoker. + pattern: ^\d+(\.\d+)? (KB|MB|GB|TB|PB|EB|ZB|YB)$ + title: avalStor + type: string + conBand: + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are\ + \ permissible." + minimum: 0 + title: Uinteger + type: integer + title: ServiceKpis + type: object + ResOperInfo: + description: | + Represents the resourse and/or service operation. + properties: + resource: + description: string providing an URI formatted according to IETF RFC 3986. + title: type + type: string + operations: + items: + $ref: '#/components/schemas/Operation' + minItems: 1 + title: operations + type: array + customServOpers: + items: + type: string + minItems: 1 + title: customServOpers + type: array + title: ResOperInfo + type: object + ProblemDetails: + description: Represents additional information and details on an error response. + properties: + type: + description: string providing an URI formatted according to IETF RFC 3986. + title: type + type: string + title: + description: "A short, human-readable summary of the problem type. It should\ + \ not change from occurrence to occurrence of the problem. \n" + title: title + type: string + status: + description: The HTTP status code for this occurrence of the problem. + title: status + type: integer + detail: + description: A human-readable explanation specific to this occurrence of + the problem. + title: detail + type: string + instance: + description: string providing an URI formatted according to IETF RFC 3986. + title: type + type: string + cause: + description: | + A machine-readable application error cause specific to this occurrence of the problem. This IE should be present and provide application-related error information, if available. + title: cause + type: string + invalidParams: + description: | + Description of invalid parameters, for a request rejected due to invalid parameters. + items: + $ref: '#/components/schemas/InvalidParam' + minItems: 1 + title: invalidParams + type: array + supportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + title: ProblemDetails + type: object + Uri: + description: string providing an URI formatted according to IETF RFC 3986. + title: type + type: string + InvalidParam: + description: | + Represents the description of invalid parameters, for a request rejected due to invalid parameters. + properties: + param: + description: "Attribute's name encoded as a JSON Pointer, or header's name." + title: param + type: string + reason: + description: "A human-readable reason, e.g. \"must be a positive integer\"\ + ." + title: reason + type: string + required: + - param + title: InvalidParam + type: object + ApiStatus: + description: | + Represents the API status. + example: + aefIds: + - aefIds + - aefIds + properties: + aefIds: + description: "Indicates the list of AEF ID(s) where the API is active. If\ + \ an empty array is provided, it indicates that the API is inactive in\ + \ all AEF(s). \n" + items: + type: string + title: aefIds + type: array + required: + - aefIds + title: ApiStatus + type: object + Version: + description: Represents the API version information. + example: + apiVersion: apiVersion + resources: + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + properties: + apiVersion: + description: API major version in URI (e.g. v1) + title: apiVersion + type: string + expiry: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime + type: string + resources: + description: Resources supported by the API. + items: + $ref: '#/components/schemas/Resource' + minItems: 1 + title: resources + type: array + custOperations: + description: Custom operations without resource association. + items: + $ref: '#/components/schemas/CustomOperation' + minItems: 1 + title: custOperations + type: array + required: + - apiVersion + title: Version + type: object + Resource: + description: Represents the API resource data. + example: + operations: + - null + - null + commType: REQUEST_RESPONSE + custOperations: + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + properties: + resourceName: + description: Resource name + title: resourceName + type: string + commType: + $ref: '#/components/schemas/CommunicationType' + uri: + description: | + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + title: uri + type: string + custOpName: + description: | + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. + title: custOpName + type: string + custOperations: + description: | + Custom operations associated with this resource. + items: + $ref: '#/components/schemas/CustomOperation' + minItems: 1 + title: custOperations + type: array + operations: + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + minItems: 1 + title: operations + type: array + description: + description: Text description of the API resource + title: description + type: string + required: + - commType + - resourceName + - uri + title: Resource + type: object + CustomOperation: + description: Represents the description of a custom operation. + example: + operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName + properties: + commType: + $ref: '#/components/schemas/CommunicationType' + custOpName: + description: | + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. + title: custOpName + type: string + operations: + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + minItems: 1 + title: operations + type: array + description: + description: Text description of the custom operation + title: description + type: string + required: + - commType + - custOpName + title: CustomOperation + type: object + Operation: + anyOf: + - enum: + - GET + - POST + - PUT + - PATCH + - DELETE + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: "Indicates an HTTP method. \nPossible values are:\n- GET: HTTP\ + \ GET method.\n- POST: HTTP POST method.\n- PUT: HTTP PUT method.\n- PATCH:\ + \ HTTP PATCH method.\n- DELETE: HTTP DELETE method.\n" + title: Operation + CivicAddress: + description: Indicates a Civic address. + example: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + properties: + country: + title: country + type: string + A1: + title: A1 + type: string + A2: + title: A2 + type: string + A3: + title: A3 + type: string + A4: + title: A4 + type: string + A5: + title: A5 + type: string + A6: + title: A6 + type: string + PRD: + title: PRD + type: string + POD: + title: POD + type: string + STS: + title: STS + type: string + HNO: + title: HNO + type: string + HNS: + title: HNS + type: string + LMK: + title: LMK + type: string + LOC: + title: LOC + type: string + NAM: + title: NAM + type: string + PC: + title: PC + type: string + BLD: + title: BLD + type: string + UNIT: + title: UNIT + type: string + FLR: + title: FLR + type: string + ROOM: + title: ROOM + type: string + PLC: + title: PLC + type: string + PCN: + title: PCN + type: string + POBOX: + title: POBOX + type: string + ADDCODE: + title: ADDCODE + type: string + SEAT: + title: SEAT + type: string + RD: + title: RD + type: string + RDSEC: + title: RDSEC + type: string + RDBR: + title: RDBR + type: string + RDSUBBR: + title: RDSUBBR + type: string + PRM: + title: PRM + type: string + POM: + title: POM + type: string + usageRules: + title: usageRules + type: string + method: + title: method + type: string + providedBy: + title: providedBy + type: string + title: CivicAddress + type: object + GeographicArea: + anyOf: + - $ref: '#/components/schemas/Point' + - $ref: '#/components/schemas/PointUncertaintyCircle' + - $ref: '#/components/schemas/PointUncertaintyEllipse' + - $ref: '#/components/schemas/Polygon' + - $ref: '#/components/schemas/PointAltitude' + - $ref: '#/components/schemas/PointAltitudeUncertainty' + - $ref: '#/components/schemas/EllipsoidArc' + description: Geographic area specified by different shape. + title: GeographicArea + Point: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + required: + - point + type: object + description: Ellipsoid Point. + example: + shape: POINT + point: + lon: -151.1701851434036 + lat: 18.494211295267263 + title: Point + GADShape: + description: Common base type for GAD shapes. + discriminator: + mapping: + POINT: '#/components/schemas/Point' + POINT_UNCERTAINTY_CIRCLE: '#/components/schemas/PointUncertaintyCircle' + POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/PointUncertaintyEllipse' + POLYGON: '#/components/schemas/Polygon' + POINT_ALTITUDE: '#/components/schemas/PointAltitude' + POINT_ALTITUDE_UNCERTAINTY: '#/components/schemas/PointAltitudeUncertainty' + ELLIPSOID_ARC: '#/components/schemas/EllipsoidArc' + LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/Local2dPointUncertaintyEllipse' + LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID: '#/components/schemas/Local3dPointUncertaintyEllipsoid' + propertyName: shape + properties: + shape: + $ref: '#/components/schemas/SupportedGADShapes' + required: + - shape + title: GADShape + type: object + SupportedGADShapes: + anyOf: + - enum: + - POINT + - POINT_UNCERTAINTY_CIRCLE + - POINT_UNCERTAINTY_ELLIPSE + - POLYGON + - POINT_ALTITUDE + - POINT_ALTITUDE_UNCERTAINTY + - ELLIPSOID_ARC + - LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE + - LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID + - DISTANCE_DIRECTION + - RELATIVE_2D_LOCATION_UNCERTAINTY_ELLIPSE + - RELATIVE_3D_LOCATION_UNCERTAINTY_ELLIPSOID + type: string + - type: string + description: Indicates supported GAD shapes. + title: SupportedGADShapes + PointUncertaintyCircle: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertainty: + $ref: '#/components/schemas/Uncertainty' + required: + - point + - uncertainty + type: object + description: Ellipsoid point with uncertainty circle. + title: PointUncertaintyCircle + GeographicalCoordinates: + description: Geographical coordinates. + example: + lon: -151.1701851434036 + lat: 18.494211295267263 + properties: + lon: + format: double + maximum: 180 + minimum: -180 + title: lon + type: number + lat: + format: double + maximum: 90 + minimum: -90 + title: lat + type: number + required: + - lat + - lon + title: GeographicalCoordinates + type: object + Uncertainty: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + PointUncertaintyEllipse: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + confidence: + $ref: '#/components/schemas/Confidence' + required: + - confidence + - point + - uncertaintyEllipse + type: object + description: Ellipsoid point with uncertainty ellipse. + title: PointUncertaintyEllipse + UncertaintyEllipse: + description: Ellipse with uncertainty. + properties: + semiMajor: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + semiMinor: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + orientationMajor: + description: Indicates value of orientation angle. + maximum: 180 + minimum: 0 + title: Orientation + type: integer + required: + - orientationMajor + - semiMajor + - semiMinor + title: UncertaintyEllipse + type: object + Orientation: + description: Indicates value of orientation angle. + maximum: 180 + minimum: 0 + title: Orientation + type: integer + Confidence: + description: Indicates value of confidence. + maximum: 100 + minimum: 0 + type: integer + Polygon: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + pointList: + $ref: '#/components/schemas/PointList' + required: + - pointList + type: object + description: Polygon. + title: Polygon + PointList: + description: List of points. + items: + $ref: '#/components/schemas/GeographicalCoordinates' + maxItems: 15 + minItems: 3 + type: array + PointAltitude: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + required: + - altitude + - point + type: object + description: Ellipsoid point with altitude. + title: PointAltitude + Altitude: + description: Indicates value of altitude. + format: double + maximum: 32767 + minimum: -32767 + type: number + PointAltitudeUncertainty: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + uncertaintyAltitude: + $ref: '#/components/schemas/Uncertainty' + confidence: + $ref: '#/components/schemas/Confidence' + vConfidence: + $ref: '#/components/schemas/Confidence' + required: + - altitude + - confidence + - point + - uncertaintyAltitude + - uncertaintyEllipse + type: object + description: Ellipsoid point with altitude and uncertainty ellipsoid. + title: PointAltitudeUncertainty + EllipsoidArc: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + innerRadius: + $ref: '#/components/schemas/InnerRadius' + uncertaintyRadius: + $ref: '#/components/schemas/Uncertainty' + offsetAngle: + $ref: '#/components/schemas/Angle' + includedAngle: + $ref: '#/components/schemas/Angle' + confidence: + $ref: '#/components/schemas/Confidence' + required: + - confidence + - includedAngle + - innerRadius + - offsetAngle + - point + - uncertaintyRadius + type: object + description: Ellipsoid Arc. + title: EllipsoidArc + InnerRadius: + description: Indicates value of the inner radius. + format: int32 + maximum: 327675 + minimum: 0 + type: integer + Angle: + description: Indicates value of angle. + maximum: 360 + minimum: 0 + type: integer + Local2dPointUncertaintyEllipse: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + localOrigin: + $ref: '#/components/schemas/LocalOrigin' + point: + $ref: '#/components/schemas/RelativeCartesianLocation' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + confidence: + $ref: '#/components/schemas/Confidence' + required: + - confidence + - localOrigin + - point + - uncertaintyEllipse + type: object + description: Local 2D point with uncertainty ellipse + LocalOrigin: + description: Indicates a Local origin in a reference system + properties: + coordinateId: + title: coordinateId + type: string + point: + $ref: '#/components/schemas/GeographicalCoordinates' + area: + $ref: '#/components/schemas/GeographicArea' + horizAxesOrientation: + description: Horizontal axes orientation angle clockwise from northing in + 0.1 degrees. + maximum: 3600 + minimum: 0 + title: HorizAxesOrientation + type: integer + required: + - coordinateId + title: LocalOrigin + type: object + HorizAxesOrientation: + description: Horizontal axes orientation angle clockwise from northing in 0.1 + degrees. + maximum: 3600 + minimum: 0 + title: HorizAxesOrientation + type: integer + RelativeCartesianLocation: + description: Relative Cartesian Location + properties: + x: + description: string with format 'float' as defined in OpenAPI. + format: float + title: Float + type: number + "y": + description: string with format 'float' as defined in OpenAPI. + format: float + title: Float + type: number + z: + description: string with format 'float' as defined in OpenAPI. + format: float + title: Float + type: number + required: + - x + - "y" + title: RelativeCartesianLocation + type: object + Local3dPointUncertaintyEllipsoid: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + localOrigin: + $ref: '#/components/schemas/LocalOrigin' + point: + $ref: '#/components/schemas/RelativeCartesianLocation' + uncertaintyEllipsoid: + $ref: '#/components/schemas/UncertaintyEllipsoid' + confidence: + $ref: '#/components/schemas/Confidence' + vConfidence: + $ref: '#/components/schemas/Confidence' + required: + - confidence + - localOrigin + - point + - uncertaintyEllipsoid + type: object + description: Local 3D point with uncertainty ellipsoid + UncertaintyEllipsoid: + description: Ellipsoid with uncertainty + properties: + semiMajor: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + semiMinor: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + vertical: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + orientationMajor: + description: Indicates value of orientation angle. + maximum: 180 + minimum: 0 + title: Orientation + type: integer + required: + - orientationMajor + - semiMajor + - semiMinor + - vertical + title: UncertaintyEllipsoid + type: object + Uinteger: + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are permissible." + minimum: 0 + title: Uinteger + type: integer + DurationSec: + description: Unsigned integer identifying a period of time in units of seconds. + minimum: 0 + title: DurationSec + type: integer + DateTime: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime + type: string + Float: + description: string with format 'float' as defined in OpenAPI. + format: float + title: Float + type: number diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/__init__.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/__init__.py new file mode 100644 index 00000000..364aba9f --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/__init__.py @@ -0,0 +1,16 @@ +import logging + +import connexion +from flask_testing import TestCase + +from openapi_server.encoder import JSONEncoder + + +class BaseTestCase(TestCase): + + def create_app(self): + logging.getLogger('connexion.operation').setLevel('ERROR') + app = connexion.App(__name__, specification_dir='../openapi/') + app.app.json_encoder = JSONEncoder + app.add_api('openapi.yaml', pythonic_params=True) + return app.app diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/test_default_controller.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/test_default_controller.py new file mode 100644 index 00000000..7c97e901 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/test_default_controller.py @@ -0,0 +1,50 @@ +import unittest + +from flask import json + +from openapi_server.models.aef_location import AefLocation # noqa: E501 +from openapi_server.models.communication_type import CommunicationType # noqa: E501 +from openapi_server.models.data_format import DataFormat # noqa: E501 +from openapi_server.models.open_discovery_resp import OpenDiscoveryResp # noqa: E501 +from openapi_server.models.problem_details import ProblemDetails # noqa: E501 +from openapi_server.models.protocol import Protocol # noqa: E501 +from openapi_server.models.res_oper_info import ResOperInfo # noqa: E501 +from openapi_server.models.service_kpis import ServiceKpis # noqa: E501 +from openapi_server.test import BaseTestCase + + +class TestDefaultController(BaseTestCase): + """DefaultController integration test stubs""" + + def test_service_apis_get(self): + """Test case for service_apis_get + + + """ + query_string = [('api-names', ['api_names_example']), + ('api-versions', {'key': openapi_server.List[str]()}), + ('comm-type', openapi_server.CommunicationType()), + ('protocols', [openapi_server.Protocol()]), + ('data-format', openapi_server.DataFormat()), + ('api-cats', ['api_cats_example']), + ('preferred-aef-loc', openapi_server.AefLocation()), + ('api-prov-names', ['api_prov_names_example']), + ('api-supported-features', {'key': 'api_supported_features_example'}), + ('api-ids', ['api_ids_example']), + ('service-kpis', openapi_server.ServiceKpis()), + ('res-ops', [openapi_server.ResOperInfo()]), + ('supported-features', 'supported_features_example')] + headers = { + 'Accept': 'application/json', + } + response = self.client.open( + '/open-api-disc/v1/service-apis', + method='GET', + headers=headers, + query_string=query_string) + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + +if __name__ == '__main__': + unittest.main() diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/typing_utils.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/typing_utils.py new file mode 100644 index 00000000..74e3c913 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/typing_utils.py @@ -0,0 +1,30 @@ +import sys + +if sys.version_info < (3, 7): + import typing + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return type(klass) == typing.GenericMeta + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__extra__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__extra__ == list + +else: + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return hasattr(klass, '__origin__') + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__origin__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__origin__ == list diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/util.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/util.py new file mode 100644 index 00000000..bd83c5b3 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/util.py @@ -0,0 +1,147 @@ +import datetime + +import typing +from openapi_server import typing_utils + + +def _deserialize(data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if klass in (int, float, str, bool, bytearray): + return _deserialize_primitive(data, klass) + elif klass == object: + return _deserialize_object(data) + elif klass == datetime.date: + return deserialize_date(data) + elif klass == datetime.datetime: + return deserialize_datetime(data) + elif typing_utils.is_generic(klass): + if typing_utils.is_list(klass): + return _deserialize_list(data, klass.__args__[0]) + if typing_utils.is_dict(klass): + return _deserialize_dict(data, klass.__args__[1]) + else: + return deserialize_model(data, klass) + + +def _deserialize_primitive(data, klass): + """Deserializes to primitive type. + + :param data: data to deserialize. + :param klass: class literal. + + :return: int, long, float, str, bool. + :rtype: int | long | float | str | bool + """ + try: + value = klass(data) + except UnicodeEncodeError: + value = data + except TypeError: + value = data + return value + + +def _deserialize_object(value): + """Return an original value. + + :return: object. + """ + return value + + +def deserialize_date(string): + """Deserializes string to date. + + :param string: str. + :type string: str + :return: date. + :rtype: date + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + + +def deserialize_datetime(string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :type string: str + :return: datetime. + :rtype: datetime + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + + +def deserialize_model(data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :type data: dict | list + :param klass: class literal. + :return: model object. + """ + instance = klass() + + if not instance.openapi_types: + return data + + for attr, attr_type in instance.openapi_types.items(): + if data is not None \ + and instance.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): + value = data[instance.attribute_map[attr]] + setattr(instance, attr, _deserialize(value, attr_type)) + + return instance + + +def _deserialize_list(data, boxed_type): + """Deserializes a list and its elements. + + :param data: list to deserialize. + :type data: list + :param boxed_type: class literal. + + :return: deserialized list. + :rtype: list + """ + return [_deserialize(sub_data, boxed_type) + for sub_data in data] + + +def _deserialize_dict(data, boxed_type): + """Deserializes a dict and its elements. + + :param data: dict to deserialize. + :type data: dict + :param boxed_type: class literal. + + :return: deserialized dict. + :rtype: dict + """ + return {k: _deserialize(v, boxed_type) + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/requirements.txt b/services/TS29222_CAPIF_Open_Discover_Service_API/requirements.txt new file mode 100644 index 00000000..2cb06891 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/requirements.txt @@ -0,0 +1,13 @@ +connexion[swagger-ui] >= 2.6.0; python_version>="3.6" +# 2.3 is the last version that supports python 3.4-3.5 +connexion[swagger-ui] <= 2.3.0; python_version=="3.5" or python_version=="3.4" +# prevent breaking dependencies from advent of connexion>=3.0 +connexion[swagger-ui] <= 2.14.2; python_version>"3.4" +# connexion requires werkzeug but connexion < 2.4.0 does not install werkzeug +# we must peg werkzeug versions below to fix connexion +# https://github.com/zalando/connexion/pull/1044 +werkzeug == 0.16.1; python_version=="3.5" or python_version=="3.4" +swagger-ui-bundle >= 0.0.2 +python_dateutil >= 2.6.0 +setuptools >= 21.0.0 +Flask == 2.1.1 diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/setup.py b/services/TS29222_CAPIF_Open_Discover_Service_API/setup.py new file mode 100644 index 00000000..1c8cdaf5 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/setup.py @@ -0,0 +1,37 @@ +import sys +from setuptools import setup, find_packages + +NAME = "openapi_server" +VERSION = "1.0.0" + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "connexion>=2.0.2", + "swagger-ui-bundle>=0.0.2", + "python_dateutil>=2.6.0" +] + +setup( + name=NAME, + version=VERSION, + description="CAPIF_Open_Discover_Service_API", + author_email="", + url="", + keywords=["OpenAPI", "CAPIF_Open_Discover_Service_API"], + install_requires=REQUIRES, + packages=find_packages(), + package_data={'': ['openapi/openapi.yaml']}, + include_package_data=True, + entry_points={ + 'console_scripts': ['openapi_server=openapi_server.__main__:main']}, + long_description="""\ + API for Routing information. © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + """ +) + diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/test-requirements.txt b/services/TS29222_CAPIF_Open_Discover_Service_API/test-requirements.txt new file mode 100644 index 00000000..58f51d6a --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/test-requirements.txt @@ -0,0 +1,4 @@ +pytest~=7.1.0 +pytest-cov>=2.8.1 +pytest-randomly>=1.2.3 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/tox.ini b/services/TS29222_CAPIF_Open_Discover_Service_API/tox.ini new file mode 100644 index 00000000..7663dfb6 --- /dev/null +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/tox.ini @@ -0,0 +1,11 @@ +[tox] +envlist = py3 +skipsdist=True + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + {toxinidir} + +commands= + pytest --cov=openapi_server -- GitLab From 556e13ce58a7bda55d3ef64a6dfa701cc3b8f9fe Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Tue, 2 Dec 2025 12:29:14 +0100 Subject: [PATCH 048/101] REL 19 New Publish_Service_API --- .../.openapi-generator/FILES | 2 + .../controllers/default_controller.py | 8 ++ .../controllers/security_controller.py | 1 + .../published_apis/encoder.py | 1 + .../published_apis/models/__init__.py | 44 ++++++ .../published_apis/models/aef_location.py | 9 +- .../published_apis/models/aef_profile.py | 16 ++- .../published_apis/models/api_status.py | 9 +- .../published_apis/models/base_model.py | 1 + .../published_apis/models/civic_address.py | 5 +- .../models/communication_type.py | 5 +- .../published_apis/models/custom_operation.py | 9 +- .../published_apis/models/data_format.py | 5 +- .../published_apis/models/ellipsoid_arc.py | 10 +- .../published_apis/models/gad_shape.py | 8 +- .../published_apis/models/geographic_area.py | 17 ++- .../models/geographical_coordinates.py | 5 +- .../models/interface_description.py | 12 +- .../published_apis/models/invalid_param.py | 5 +- .../published_apis/models/ip_addr_range.py | 9 +- .../models/ipv4_address_range.py | 8 +- .../published_apis/models/ipv6_addr1.py | 5 +- .../models/ipv6_address_range.py | 8 +- .../local2d_point_uncertainty_ellipse.py | 12 +- .../local3d_point_uncertainty_ellipsoid.py | 12 +- .../published_apis/models/local_origin.py | 9 +- .../published_apis/models/net_slice_id.py | 119 ++++++++++++++++ .../models/o_auth_grant_type.py | 5 +- .../published_apis/models/operation.py | 5 +- .../published_apis/models/point.py | 10 +- .../published_apis/models/point_altitude.py | 10 +- .../models/point_altitude_uncertainty.py | 11 +- .../models/point_uncertainty_circle.py | 10 +- .../models/point_uncertainty_ellipse.py | 11 +- .../published_apis/models/polygon.py | 10 +- .../published_apis/models/problem_details.py | 11 +- .../published_apis/models/protocol.py | 5 +- .../models/published_api_path.py | 5 +- .../models/relative_cartesian_location.py | 5 +- .../published_apis/models/resource.py | 10 +- .../published_apis/models/security_method.py | 5 +- .../models/service_api_description.py | 57 ++++++-- .../models/service_api_description_patch.py | 14 +- .../published_apis/models/service_kpis.py | 8 +- .../models/shareable_information.py | 9 +- .../published_apis/models/snssai.py | 101 +++++++++++++ .../models/supported_gad_shapes.py | 5 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../published_apis/models/version.py | 9 +- .../published_apis/openapi/openapi.yaml | 133 ++++++++++++++---- .../published_apis/test/__init__.py | 1 + .../test/test_default_controller.py | 5 +- ...individual_apf_published_api_controller.py | 1 + .../published_apis/util.py | 2 +- .../setup.py | 6 +- 56 files changed, 674 insertions(+), 154 deletions(-) create mode 100644 services/TS29222_CAPIF_Publish_Service_API/published_apis/models/net_slice_id.py create mode 100644 services/TS29222_CAPIF_Publish_Service_API/published_apis/models/snssai.py diff --git a/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/FILES index 44333b51..796ae4ed 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/FILES @@ -34,6 +34,7 @@ published_apis/models/ipv6_address_range.py published_apis/models/local2d_point_uncertainty_ellipse.py published_apis/models/local3d_point_uncertainty_ellipsoid.py published_apis/models/local_origin.py +published_apis/models/net_slice_id.py published_apis/models/o_auth_grant_type.py published_apis/models/operation.py published_apis/models/point.py @@ -52,6 +53,7 @@ published_apis/models/service_api_description.py published_apis/models/service_api_description_patch.py published_apis/models/service_kpis.py published_apis/models/shareable_information.py +published_apis/models/snssai.py published_apis/models/supported_gad_shapes.py published_apis/models/uncertainty_ellipse.py published_apis/models/uncertainty_ellipsoid.py diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py index 29839084..1e223b04 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py @@ -1,3 +1,11 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from published_apis.models.problem_details import ProblemDetails # noqa: E501 +from published_apis import util + from functools import wraps from cryptography import x509 diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller.py index 8b137891..6d294ffd 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller.py @@ -1 +1,2 @@ +from typing import List diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py index 6f24878a..4d957655 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py @@ -1,4 +1,5 @@ from connexion.jsonifier import JSONEncoder + from published_apis.models.base_model import Model diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/__init__.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/__init__.py index d036df69..57cff052 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/__init__.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/__init__.py @@ -1,2 +1,46 @@ # flake8: noqa # import models into model package +from published_apis.models.aef_location import AefLocation +from published_apis.models.aef_profile import AefProfile +from published_apis.models.api_status import ApiStatus +from published_apis.models.civic_address import CivicAddress +from published_apis.models.communication_type import CommunicationType +from published_apis.models.custom_operation import CustomOperation +from published_apis.models.data_format import DataFormat +from published_apis.models.ellipsoid_arc import EllipsoidArc +from published_apis.models.gad_shape import GADShape +from published_apis.models.geographic_area import GeographicArea +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis.models.interface_description import InterfaceDescription +from published_apis.models.invalid_param import InvalidParam +from published_apis.models.ip_addr_range import IpAddrRange +from published_apis.models.ipv4_address_range import Ipv4AddressRange +from published_apis.models.ipv6_addr1 import Ipv6Addr1 +from published_apis.models.ipv6_address_range import Ipv6AddressRange +from published_apis.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse +from published_apis.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid +from published_apis.models.local_origin import LocalOrigin +from published_apis.models.net_slice_id import NetSliceId +from published_apis.models.o_auth_grant_type import OAuthGrantType +from published_apis.models.operation import Operation +from published_apis.models.point import Point +from published_apis.models.point_altitude import PointAltitude +from published_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty +from published_apis.models.point_uncertainty_circle import PointUncertaintyCircle +from published_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from published_apis.models.polygon import Polygon +from published_apis.models.problem_details import ProblemDetails +from published_apis.models.protocol import Protocol +from published_apis.models.published_api_path import PublishedApiPath +from published_apis.models.relative_cartesian_location import RelativeCartesianLocation +from published_apis.models.resource import Resource +from published_apis.models.security_method import SecurityMethod +from published_apis.models.service_api_description import ServiceAPIDescription +from published_apis.models.service_api_description_patch import ServiceAPIDescriptionPatch +from published_apis.models.service_kpis import ServiceKpis +from published_apis.models.shareable_information import ShareableInformation +from published_apis.models.snssai import Snssai +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis.models.uncertainty_ellipse import UncertaintyEllipse +from published_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from published_apis.models.version import Version diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_location.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_location.py index ca2cc22e..ccc48596 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_location.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_location.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.civic_address import CivicAddress +from published_apis.models.geographic_area import GeographicArea +from published_apis import util + from published_apis.models.civic_address import CivicAddress # noqa: E501 from published_apis.models.geographic_area import GeographicArea # noqa: E501 - class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_profile.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_profile.py index b50b23b7..249c595e 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_profile.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_profile.py @@ -1,9 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis.models.base_model import Model +from published_apis.models.aef_location import AefLocation +from published_apis.models.data_format import DataFormat +from published_apis.models.interface_description import InterfaceDescription +from published_apis.models.ip_addr_range import IpAddrRange +from published_apis.models.o_auth_grant_type import OAuthGrantType +from published_apis.models.protocol import Protocol +from published_apis.models.security_method import SecurityMethod +from published_apis.models.service_kpis import ServiceKpis +from published_apis.models.version import Version from published_apis import util + from published_apis.models.aef_location import AefLocation # noqa: E501 -from published_apis.models.base_model import Model from published_apis.models.data_format import DataFormat # noqa: E501 from published_apis.models.interface_description import InterfaceDescription # noqa: E501 from published_apis.models.ip_addr_range import IpAddrRange # noqa: E501 @@ -13,7 +24,6 @@ from published_apis.models.security_method import SecurityMethod # noqa: E501 from published_apis.models.service_kpis import ServiceKpis # noqa: E501 from published_apis.models.version import Version # noqa: E501 - class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py index 4fcf0817..99c705c3 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class ApiStatus(Model): @@ -42,7 +43,7 @@ class ApiStatus(Model): def aef_ids(self) -> List[str]: """Gets the aef_ids of this ApiStatus. - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # noqa: E501 + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 :return: The aef_ids of this ApiStatus. :rtype: List[str] @@ -53,7 +54,7 @@ class ApiStatus(Model): def aef_ids(self, aef_ids: List[str]): """Sets the aef_ids of this ApiStatus. - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # noqa: E501 + Indicates the list of AEF ID(s) where the API is active. If an empty array is provided, it indicates that the API is inactive in all AEF(s). # noqa: E501 :param aef_ids: The aef_ids of this ApiStatus. :type aef_ids: List[str] diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py index d4fac36d..ae24c559 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from published_apis import util diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/civic_address.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/civic_address.py index 2985c188..b4fa7c06 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/civic_address.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/civic_address.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type.py index 34963f38..a91645f4 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/custom_operation.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/custom_operation.py index 2900d43e..1f4a66a6 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/custom_operation.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/custom_operation.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.communication_type import CommunicationType +from published_apis.models.operation import Operation +from published_apis import util + from published_apis.models.communication_type import CommunicationType # noqa: E501 from published_apis.models.operation import Operation # noqa: E501 - class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format.py index 0f79d52e..5c6c9072 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class DataFormat(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py index 9b065e53..ca81b714 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.gad_shape import GADShape +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis import util + from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py index 370e1da4..f4754606 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis import util +from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py index 226225be..0fa074cd 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py @@ -1,8 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.ellipsoid_arc import EllipsoidArc +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis.models.point import Point +from published_apis.models.point_altitude import PointAltitude +from published_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty +from published_apis.models.point_uncertainty_circle import PointUncertaintyCircle +from published_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from published_apis.models.polygon import Polygon +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis.models.uncertainty_ellipse import UncertaintyEllipse +from published_apis import util + from published_apis.models.ellipsoid_arc import EllipsoidArc # noqa: E501 from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from published_apis.models.point import Point # noqa: E501 @@ -14,7 +26,6 @@ from published_apis.models.polygon import Polygon # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from published_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py index 253a9089..49c59769 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/interface_description.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/interface_description.py index 7c8707c4..9dc53d39 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/interface_description.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/interface_description.py @@ -1,12 +1,16 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.o_auth_grant_type import OAuthGrantType +from published_apis.models.security_method import SecurityMethod +import re +from published_apis import util + from published_apis.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from published_apis.models.security_method import SecurityMethod # noqa: E501 - +import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/invalid_param.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/invalid_param.py index b7b4d5ce..16472ecc 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/invalid_param.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ip_addr_range.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ip_addr_range.py index 48c4ede0..7934c226 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ip_addr_range.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.ipv4_address_range import Ipv4AddressRange +from published_apis.models.ipv6_address_range import Ipv6AddressRange +from published_apis import util + from published_apis.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 from published_apis.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 - class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv4_address_range.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv4_address_range.py index 2547d74c..f72ef00e 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv4_address_range.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +import re +from published_apis import util +import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py index 354ce469..268ec666 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_address_range.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_address_range.py index a28eff1f..37f319c8 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_address_range.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model -from published_apis.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 +from published_apis.models.ipv6_addr1 import Ipv6Addr1 +from published_apis import util +from published_apis.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 class Ipv6AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local2d_point_uncertainty_ellipse.py index 2b13ab8c..2c575408 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local2d_point_uncertainty_ellipse.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.gad_shape import GADShape +from published_apis.models.local_origin import LocalOrigin +from published_apis.models.relative_cartesian_location import RelativeCartesianLocation +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis.models.uncertainty_ellipse import UncertaintyEllipse +from published_apis import util + from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.local_origin import LocalOrigin # noqa: E501 from published_apis.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from published_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local3d_point_uncertainty_ellipsoid.py index ca17643d..2dfe87ae 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local3d_point_uncertainty_ellipsoid.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.gad_shape import GADShape +from published_apis.models.local_origin import LocalOrigin +from published_apis.models.relative_cartesian_location import RelativeCartesianLocation +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from published_apis import util + from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.local_origin import LocalOrigin # noqa: E501 from published_apis.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from published_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 - class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local_origin.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local_origin.py index d86b7142..6686d14d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local_origin.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local_origin.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.geographic_area import GeographicArea +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis import util + from published_apis.models.geographic_area import GeographicArea # noqa: E501 from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 - class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/net_slice_id.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/net_slice_id.py new file mode 100644 index 00000000..55fbea33 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/net_slice_id.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from published_apis.models.base_model import Model +from published_apis.models.snssai import Snssai +from published_apis import util + +from published_apis.models.snssai import Snssai # noqa: E501 + +class NetSliceId(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, snssai=None, nsi_id=None, ensi=None): # noqa: E501 + """NetSliceId - a model defined in OpenAPI + + :param snssai: The snssai of this NetSliceId. # noqa: E501 + :type snssai: Snssai + :param nsi_id: The nsi_id of this NetSliceId. # noqa: E501 + :type nsi_id: str + :param ensi: The ensi of this NetSliceId. # noqa: E501 + :type ensi: str + """ + self.openapi_types = { + 'snssai': Snssai, + 'nsi_id': str, + 'ensi': str + } + + self.attribute_map = { + 'snssai': 'snssai', + 'nsi_id': 'nsiId', + 'ensi': 'ensi' + } + + self._snssai = snssai + self._nsi_id = nsi_id + self._ensi = ensi + + @classmethod + def from_dict(cls, dikt) -> 'NetSliceId': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NetSliceId of this NetSliceId. # noqa: E501 + :rtype: NetSliceId + """ + return util.deserialize_model(dikt, cls) + + @property + def snssai(self) -> Snssai: + """Gets the snssai of this NetSliceId. + + + :return: The snssai of this NetSliceId. + :rtype: Snssai + """ + return self._snssai + + @snssai.setter + def snssai(self, snssai: Snssai): + """Sets the snssai of this NetSliceId. + + + :param snssai: The snssai of this NetSliceId. + :type snssai: Snssai + """ + + self._snssai = snssai + + @property + def nsi_id(self) -> str: + """Gets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :return: The nsi_id of this NetSliceId. + :rtype: str + """ + return self._nsi_id + + @nsi_id.setter + def nsi_id(self, nsi_id: str): + """Sets the nsi_id of this NetSliceId. + + Contains the Identifier of the selected Network Slice instance # noqa: E501 + + :param nsi_id: The nsi_id of this NetSliceId. + :type nsi_id: str + """ + + self._nsi_id = nsi_id + + @property + def ensi(self) -> str: + """Gets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :return: The ensi of this NetSliceId. + :rtype: str + """ + return self._ensi + + @ensi.setter + def ensi(self, ensi: str): + """Sets the ensi of this NetSliceId. + + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. # noqa: E501 + + :param ensi: The ensi of this NetSliceId. + :type ensi: str + """ + + self._ensi = ensi diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/o_auth_grant_type.py index a61d636f..d957daf8 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/o_auth_grant_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation.py index abfa0c22..0923ce76 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class Operation(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point.py index b0d7a764..d16cbaaa 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.gad_shape import GADShape +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis import util + from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py index 7fd826c1..0fb374f7 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.gad_shape import GADShape +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis import util + from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py index 98b36ca7..cf96f55d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.gad_shape import GADShape +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis.models.uncertainty_ellipse import UncertaintyEllipse +from published_apis import util + from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from published_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py index 477dfae0..3b773f51 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.gad_shape import GADShape +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis import util + from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py index 1e328c07..ea57f68d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.gad_shape import GADShape +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis.models.uncertainty_ellipse import UncertaintyEllipse +from published_apis import util + from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from published_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py index d021ee3b..8a3f6baa 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.gad_shape import GADShape +from published_apis.models.geographical_coordinates import GeographicalCoordinates +from published_apis.models.supported_gad_shapes import SupportedGADShapes +from published_apis import util + from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/problem_details.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/problem_details.py index 39abad6a..41b69ae8 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/problem_details.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model -from published_apis.models.invalid_param import InvalidParam # noqa: E501 +from published_apis.models.invalid_param import InvalidParam +import re +from published_apis import util +from published_apis.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol.py index 011e1942..9eb3203e 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class Protocol(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/published_api_path.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/published_api_path.py index 8e02d485..4d3538df 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/published_api_path.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/published_api_path.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class PublishedApiPath(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/relative_cartesian_location.py index 0d1e9116..2f17cb84 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/relative_cartesian_location.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/resource.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/resource.py index d00e3ee8..fe7445df 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/resource.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/resource.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.communication_type import CommunicationType +from published_apis.models.custom_operation import CustomOperation +from published_apis.models.operation import Operation +from published_apis import util + from published_apis.models.communication_type import CommunicationType # noqa: E501 from published_apis.models.custom_operation import CustomOperation # noqa: E501 from published_apis.models.operation import Operation # noqa: E501 - class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method.py index 97c264ab..59142370 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description.py index 3f97250d..4b8fdc83 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description.py @@ -1,14 +1,22 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis.models.base_model import Model +from published_apis.models.aef_profile import AefProfile +from published_apis.models.api_status import ApiStatus +from published_apis.models.net_slice_id import NetSliceId +from published_apis.models.published_api_path import PublishedApiPath +from published_apis.models.shareable_information import ShareableInformation +import re from published_apis import util + from published_apis.models.aef_profile import AefProfile # noqa: E501 from published_apis.models.api_status import ApiStatus # noqa: E501 -from published_apis.models.base_model import Model +from published_apis.models.net_slice_id import NetSliceId # noqa: E501 from published_apis.models.published_api_path import PublishedApiPath # noqa: E501 from published_apis.models.shareable_information import ShareableInformation # noqa: E501 - +import re # noqa: E501 class ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +24,7 @@ class ServiceAPIDescription(Model): Do not edit the class manually. """ - def __init__(self, api_name=None, api_id=None, api_status=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None, api_prov_name=None): # noqa: E501 + def __init__(self, api_name=None, api_id=None, api_status=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None, api_prov_name=None, net_slice_info=None): # noqa: E501 """ServiceAPIDescription - a model defined in OpenAPI :param api_name: The api_name of this ServiceAPIDescription. # noqa: E501 @@ -43,6 +51,8 @@ class ServiceAPIDescription(Model): :type ccf_id: str :param api_prov_name: The api_prov_name of this ServiceAPIDescription. # noqa: E501 :type api_prov_name: str + :param net_slice_info: The net_slice_info of this ServiceAPIDescription. # noqa: E501 + :type net_slice_info: List[NetSliceId] """ self.openapi_types = { 'api_name': str, @@ -56,7 +66,8 @@ class ServiceAPIDescription(Model): 'api_supp_feats': str, 'pub_api_path': PublishedApiPath, 'ccf_id': str, - 'api_prov_name': str + 'api_prov_name': str, + 'net_slice_info': List[NetSliceId] } self.attribute_map = { @@ -71,7 +82,8 @@ class ServiceAPIDescription(Model): 'api_supp_feats': 'apiSuppFeats', 'pub_api_path': 'pubApiPath', 'ccf_id': 'ccfId', - 'api_prov_name': 'apiProvName' + 'api_prov_name': 'apiProvName', + 'net_slice_info': 'netSliceInfo' } self._api_name = api_name @@ -86,7 +98,7 @@ class ServiceAPIDescription(Model): self._pub_api_path = pub_api_path self._ccf_id = ccf_id self._api_prov_name = api_prov_name - + self._net_slice_info = net_slice_info @classmethod def from_dict(cls, dikt) -> 'ServiceAPIDescription': @@ -103,7 +115,7 @@ class ServiceAPIDescription(Model): def api_name(self) -> str: """Gets the api_name of this ServiceAPIDescription. - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :return: The api_name of this ServiceAPIDescription. :rtype: str @@ -114,7 +126,7 @@ class ServiceAPIDescription(Model): def api_name(self, api_name: str): """Sets the api_name of this ServiceAPIDescription. - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + Contains the API name set to the value of the \"\" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. # noqa: E501 :param api_name: The api_name of this ServiceAPIDescription. :type api_name: str @@ -376,3 +388,28 @@ class ServiceAPIDescription(Model): """ self._api_prov_name = api_prov_name + + @property + def net_slice_info(self) -> List[NetSliceId]: + """Gets the net_slice_info of this ServiceAPIDescription. + + Represents the applicable network slice identifiers. # noqa: E501 + + :return: The net_slice_info of this ServiceAPIDescription. + :rtype: List[NetSliceId] + """ + return self._net_slice_info + + @net_slice_info.setter + def net_slice_info(self, net_slice_info: List[NetSliceId]): + """Sets the net_slice_info of this ServiceAPIDescription. + + Represents the applicable network slice identifiers. # noqa: E501 + + :param net_slice_info: The net_slice_info of this ServiceAPIDescription. + :type net_slice_info: List[NetSliceId] + """ + if net_slice_info is not None and len(net_slice_info) < 1: + raise ValueError("Invalid value for `net_slice_info`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._net_slice_info = net_slice_info diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description_patch.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description_patch.py index 283a1a07..71dd39c9 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description_patch.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description_patch.py @@ -1,14 +1,20 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis.models.base_model import Model +from published_apis.models.aef_profile import AefProfile +from published_apis.models.api_status import ApiStatus +from published_apis.models.published_api_path import PublishedApiPath +from published_apis.models.shareable_information import ShareableInformation +import re from published_apis import util + from published_apis.models.aef_profile import AefProfile # noqa: E501 from published_apis.models.api_status import ApiStatus # noqa: E501 -from published_apis.models.base_model import Model from published_apis.models.published_api_path import PublishedApiPath # noqa: E501 from published_apis.models.shareable_information import ShareableInformation # noqa: E501 - +import re # noqa: E501 class ServiceAPIDescriptionPatch(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_kpis.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_kpis.py index ac1a773e..f4b8ae12 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_kpis.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_kpis.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +import re +from published_apis import util +import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/shareable_information.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/shareable_information.py index a2dfbeaf..d608566d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/shareable_information.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/shareable_information.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class ShareableInformation(Model): @@ -47,7 +48,7 @@ class ShareableInformation(Model): def is_shareable(self) -> bool: """Gets the is_shareable of this ShareableInformation. - Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. # noqa: E501 :return: The is_shareable of this ShareableInformation. :rtype: bool @@ -58,7 +59,7 @@ class ShareableInformation(Model): def is_shareable(self, is_shareable: bool): """Sets the is_shareable of this ShareableInformation. - Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. # noqa: E501 :param is_shareable: The is_shareable of this ShareableInformation. :type is_shareable: bool diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/snssai.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/snssai.py new file mode 100644 index 00000000..f9b86fc0 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/snssai.py @@ -0,0 +1,101 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from published_apis.models.base_model import Model +import re +from published_apis import util + +import re # noqa: E501 + +class Snssai(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, sst=None, sd=None): # noqa: E501 + """Snssai - a model defined in OpenAPI + + :param sst: The sst of this Snssai. # noqa: E501 + :type sst: int + :param sd: The sd of this Snssai. # noqa: E501 + :type sd: str + """ + self.openapi_types = { + 'sst': int, + 'sd': str + } + + self.attribute_map = { + 'sst': 'sst', + 'sd': 'sd' + } + + self._sst = sst + self._sd = sd + + @classmethod + def from_dict(cls, dikt) -> 'Snssai': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Snssai of this Snssai. # noqa: E501 + :rtype: Snssai + """ + return util.deserialize_model(dikt, cls) + + @property + def sst(self) -> int: + """Gets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :return: The sst of this Snssai. + :rtype: int + """ + return self._sst + + @sst.setter + def sst(self, sst: int): + """Sets the sst of this Snssai. + + Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501. # noqa: E501 + + :param sst: The sst of this Snssai. + :type sst: int + """ + if sst is None: + raise ValueError("Invalid value for `sst`, must not be `None`") # noqa: E501 + if sst is not None and sst > 255: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value less than or equal to `255`") # noqa: E501 + if sst is not None and sst < 0: # noqa: E501 + raise ValueError("Invalid value for `sst`, must be a value greater than or equal to `0`") # noqa: E501 + + self._sst = sst + + @property + def sd(self) -> str: + """Gets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :return: The sd of this Snssai. + :rtype: str + """ + return self._sd + + @sd.setter + def sd(self, sd: str): + """Sets the sd of this Snssai. + + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. # noqa: E501 + + :param sd: The sd of this Snssai. + :type sd: str + """ + if sd is not None and not re.search(r'^[A-Fa-f0-9]{6}$', sd): # noqa: E501 + raise ValueError(r"Invalid value for `sd`, must be a follow pattern or equal to `/^[A-Fa-f0-9]{6}$/`") # noqa: E501 + + self._sd = sd diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py index 095abd0a..50d7db72 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipse.py index 44957aa6..2aef9633 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipse.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py index 0a341783..88a428d4 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis import util class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/version.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/version.py index 4188ad79..4126d65a 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/version.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/version.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from published_apis import util +from typing import List, Dict # noqa: F401 + from published_apis.models.base_model import Model +from published_apis.models.custom_operation import CustomOperation +from published_apis.models.resource import Resource +from published_apis import util + from published_apis.models.custom_operation import CustomOperation # noqa: E501 from published_apis.models.resource import Resource # noqa: E501 - class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/openapi/openapi.yaml b/services/TS29222_CAPIF_Publish_Service_API/published_apis/openapi/openapi.yaml index 6fd9b486..1b0c694a 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/openapi/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.0 info: - description: "API for publishing service APIs. \n© 2024, 3GPP Organizational Partners\ + description: "API for publishing service APIs. \n© 2025, 3GPP Organizational Partners\ \ (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Publish_Service_API - version: 1.3.1 + version: 1.4.0-alpha.4 externalDocs: - description: 3GPP TS 29.222 V18.7.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V19.3.0 Common API Framework for 3GPP Northbound APIs url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: - url: "{apiRoot}/published-apis/v1" @@ -35,8 +35,8 @@ paths: $ref: '#/components/schemas/ServiceAPIDescription' minItems: 0 type: array - description: Definition of all service API(s) published by the API publishing - function. + description: | + Definition of all service API(s) published by the API publishing function. If an empty array is provided, it indicates that there is no active published API at the CCF. "307": description: Temporary Redirect headers: @@ -309,8 +309,8 @@ paths: application/json: schema: $ref: '#/components/schemas/ServiceAPIDescription' - description: | - Definition of individual service API published by the API publishing function. + description: Definition of all service API(s) published by the API publishing + function. "307": description: Temporary Redirect headers: @@ -699,20 +699,9 @@ components: serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true apiProvName: apiProvName supportedFeatures: supportedFeatures description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - apiStatus: - aefIds: - - aefIds - - aefIds aefProfiles: - protocol: HTTP_1_1 grantTypes: @@ -1138,6 +1127,28 @@ components: availability: 0 maxReqRate: 0 avalGraComp: avalGraComp + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + netSliceInfo: + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + - ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds pubApiPath: ccfIds: - ccfIds @@ -1145,7 +1156,7 @@ components: properties: apiName: description: | - API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + Contains the API name set to the value of the "" placeholder of the API URI as defined in clause 5.2.4 of 3GPP TS 29.122 [14]. title: apiName type: string apiId: @@ -1195,6 +1206,13 @@ components: description: Represents the API provider name. title: apiProvName type: string + netSliceInfo: + description: Represents the applicable network slice identifiers. + items: + $ref: '#/components/schemas/NetSliceId' + minItems: 1 + title: netSliceInfo + type: array required: - apiName title: ServiceAPIDescription @@ -1215,9 +1233,9 @@ components: ipv4Addr: ipv4Addr nullable: true oneOf: - - required: ["fqdn"] - required: ["ipv4Addr"] - required: ["ipv6Addr"] + - required: ["fqdn"] properties: ipv4Addr: description: | @@ -1735,7 +1753,7 @@ components: properties: isShareable: description: | - Set to "true" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to "false". + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domain information. true indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. false indicates that the service API and/or the service API category can not be shared to the list of CAPIF provider domain information. title: isShareable type: boolean capifProvDoms: @@ -1871,8 +1889,9 @@ components: - aefIds properties: aefIds: - description: | - Indicates the list of AEF ID(s) where the API is active. If this attribute is omitted, the API is inactive at all AEF(s) defined in the "aefProfiles" attribute within the ServiceAPIDescription data structure. + description: "Indicates the list of AEF ID(s) where the API is active. If\ + \ an empty array is provided, it indicates that the API is inactive in\ + \ all AEF(s). \n" items: type: string title: aefIds @@ -1944,7 +1963,7 @@ components: title: ServiceKpis type: object IpAddrRange: - anyOf: + anyOf: - required: ["ueIpv4AddrRanges"] - required: ["ueIpv6AddrRanges"] description: Represents the list of public IP ranges @@ -2107,6 +2126,39 @@ components: pattern: "^[A-Fa-f0-9]*$" title: supportedFeatures type: string + NetSliceId: + description: | + Represents the network slice identification information. + example: + ensi: ensi + snssai: + sd: sd + sst: 237 + nsiId: nsiId + nullable: true + oneOf: + - required: ["snssai"] + - required: ["nsiId"] + - required: ["ensi"] + properties: + snssai: + $ref: '#/components/schemas/Snssai' + nsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string + ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string + title: NetSliceId + type: object + Ensi: + description: | + Represents the External Network Slice Information that is used to identify a network slice, as specified in 3GPP TS 33.501. + title: Ensi + type: string Ipv4Addr: description: | string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166. @@ -2353,7 +2405,6 @@ components: - DISTANCE_DIRECTION - RELATIVE_2D_LOCATION_UNCERTAINTY_ELLIPSE - RELATIVE_3D_LOCATION_UNCERTAINTY_ELLIPSOID - type: string description: Indicates supported GAD shapes. title: SupportedGADShapes @@ -2743,6 +2794,38 @@ components: example: 2001:db8:85a3::8a2e:370:7334 title: Ipv6Addr_1 type: string + Snssai: + description: | + When Snssai needs to be converted to string (e.g. when used in maps as key), the string shall be composed of one to three digits "sst" optionally followed by "-" and 6 hexadecimal digits "sd". + example: + sd: sd + sst: 237 + properties: + sst: + description: "Unsigned integer, within the range 0 to 255, representing\ + \ the Slice/Service Type. It indicates the expected Network Slice behaviour\ + \ in terms of features and services. Values 0 to 127 correspond to the\ + \ standardized SST range. Values 128 to 255 correspond to the Operator-specific\ + \ range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are\ + \ defined in clause 5.15.2.2 of 3GPP TS 23.501. \n" + maximum: 255 + minimum: 0 + title: sst + type: integer + sd: + description: | + 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST. + pattern: "^[A-Fa-f0-9]{6}$" + title: sd + type: string + required: + - sst + title: Snssai + type: object + NsiId: + description: Contains the Identifier of the selected Network Slice instance + title: NsiId + type: string Float: description: string with format 'float' as defined in OpenAPI. format: float diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/__init__.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/__init__.py index 07e31c34..108a343a 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/__init__.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/__init__.py @@ -2,6 +2,7 @@ import logging import connexion from flask_testing import TestCase + from published_apis.encoder import JSONEncoder diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py index aa3a20d4..1de71e7b 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py @@ -1,6 +1,7 @@ import unittest from flask import json + from published_apis.models.problem_details import ProblemDetails # noqa: E501 from published_apis.models.service_api_description import ServiceAPIDescription # noqa: E501 from published_apis.test import BaseTestCase @@ -29,7 +30,7 @@ class TestDefaultController(BaseTestCase): """ - service_api_description = {"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}} + service_api_description = {"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"netSliceInfo":[{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"},{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"}],"apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}} headers = { 'Accept': 'application/json', 'Content-Type': 'application/json', @@ -78,7 +79,7 @@ class TestDefaultController(BaseTestCase): """ - service_api_description = {"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}} + service_api_description = {"serviceAPICategory":"serviceAPICategory","ccfId":"ccfId","apiName":"apiName","apiProvName":"apiProvName","supportedFeatures":"supportedFeatures","description":"description","aefProfiles":[{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}},{"protocol":"HTTP_1_1","grantTypes":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"ueIpRange":{"ueIpv4AddrRanges":[{"start":"198.51.100.1","end":"198.51.100.1"},{"start":"198.51.100.1","end":"198.51.100.1"}],"ueIpv6AddrRanges":[{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"},{"start":"2001:db8:85a3::8a2e:370:7334","end":"2001:db8:85a3::8a2e:370:7334"}]},"securityMethods":["PSK","PSK"],"versions":[{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"},{"apiVersion":"apiVersion","resources":[{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"},{"operations":[null,null],"commType":"REQUEST_RESPONSE","custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"description":"description","resourceName":"resourceName","custOpName":"custOpName","uri":"uri"}],"custOperations":[{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"},{"operations":["GET","GET"],"description":"description","custOpName":"custOpName"}],"expiry":"2000-01-23T04:56:07.000+00:00"}],"dataFormat":"JSON","domainName":"domainName","aefLocation":{"dcId":"dcId","geoArea":{"shape":"POINT","point":{"lon":36.988422590534526,"lat":-63.615366350946985}},"civicAddr":{"POBOX":"POBOX","usageRules":"usageRules","country":"country","PRD":"PRD","PLC":"PLC","HNO":"HNO","PRM":"PRM","HNS":"HNS","FLR":"FLR","A1":"A1","A2":"A2","A3":"A3","A4":"A4","STS":"STS","A5":"A5","A6":"A6","RDSEC":"RDSEC","providedBy":"providedBy","LOC":"LOC","UNIT":"UNIT","SEAT":"SEAT","POD":"POD","RDBR":"RDBR","method":"method","LMK":"LMK","POM":"POM","ADDCODE":"ADDCODE","RD":"RD","PC":"PC","PCN":"PCN","NAM":"NAM","BLD":"BLD","ROOM":"ROOM","RDSUBBR":"RDSUBBR"}},"aefId":"aefId","interfaceDescriptions":[{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","grantTypes":[null,null],"securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"}],"serviceKpis":{"avalMem":"avalMem","avalStor":"avalStor","avalComp":"avalComp","conBand":0,"maxRestime":0,"availability":0,"maxReqRate":0,"avalGraComp":"avalGraComp"}}],"shareableInfo":{"capifProvDoms":["capifProvDoms","capifProvDoms"],"isShareable":True},"netSliceInfo":[{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"},{"ensi":"ensi","snssai":{"sd":"sd","sst":237},"nsiId":"nsiId"}],"apiSuppFeats":"apiSuppFeats","apiId":"apiId","apiStatus":{"aefIds":["aefIds","aefIds"]},"pubApiPath":{"ccfIds":["ccfIds","ccfIds"]}} headers = { 'Accept': 'application/json', 'Content-Type': 'application/json', diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_individual_apf_published_api_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_individual_apf_published_api_controller.py index c9664f15..c9978525 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_individual_apf_published_api_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_individual_apf_published_api_controller.py @@ -1,6 +1,7 @@ import unittest from flask import json + from published_apis.models.problem_details import ProblemDetails # noqa: E501 from published_apis.models.service_api_description import ServiceAPIDescription # noqa: E501 from published_apis.models.service_api_description_patch import ServiceAPIDescriptionPatch # noqa: E501 diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py index 1b195665..57a3e59f 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py @@ -1,8 +1,8 @@ import datetime +import typing from published_apis import typing_utils - def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_Publish_Service_API/setup.py b/services/TS29222_CAPIF_Publish_Service_API/setup.py index 9cd039a1..031861d9 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/setup.py +++ b/services/TS29222_CAPIF_Publish_Service_API/setup.py @@ -1,5 +1,5 @@ - -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "published_apis" VERSION = "1.0.0" @@ -31,7 +31,7 @@ setup( entry_points={ 'console_scripts': ['published_apis=published_apis.__main__:main']}, long_description="""\ - API for publishing service APIs. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for publishing service APIs. © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) -- GitLab From deb66b51b5883fbf1cf1bfb3bc3ec471a911aa7e Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Tue, 2 Dec 2025 15:26:06 +0100 Subject: [PATCH 049/101] REL 19 New Routing_Info_API --- .../.openapi-generator/FILES | 2 - .../TS29222_CAPIF_Routing_Info_API/README.md | 6 +-- .../controllers/default_controller.py | 5 +++ .../controllers/security_controller.py | 1 + .../capif_routing_info/encoder.py | 3 +- .../capif_routing_info/models/__init__.py | 41 +++++++++++++++++++ .../capif_routing_info/models/aef_location.py | 9 ++-- .../capif_routing_info/models/aef_profile.py | 16 ++++++-- .../capif_routing_info/models/base_model.py | 1 + .../models/civic_address.py | 5 ++- .../models/communication_type.py | 5 ++- .../models/custom_operation.py | 9 ++-- .../capif_routing_info/models/data_format.py | 5 ++- .../models/ellipsoid_arc.py | 10 +++-- .../capif_routing_info/models/gad_shape.py | 8 ++-- .../models/geographic_area.py | 17 ++++++-- .../models/geographical_coordinates.py | 5 ++- .../models/interface_description.py | 12 ++++-- .../models/invalid_param.py | 5 ++- .../models/ip_addr_range.py | 9 ++-- .../models/ipv4_address_range.py | 8 ++-- .../models/ipv4_address_range1.py | 8 ++-- .../capif_routing_info/models/ipv6_addr1.py | 5 ++- .../models/ipv6_address_range.py | 5 ++- .../models/ipv6_address_range1.py | 8 ++-- .../local2d_point_uncertainty_ellipse.py | 12 ++++-- .../local3d_point_uncertainty_ellipsoid.py | 12 ++++-- .../capif_routing_info/models/local_origin.py | 9 ++-- .../models/o_auth_grant_type.py | 5 ++- .../capif_routing_info/models/operation.py | 5 ++- .../capif_routing_info/models/point.py | 10 +++-- .../models/point_altitude.py | 10 +++-- .../models/point_altitude_uncertainty.py | 11 +++-- .../models/point_uncertainty_circle.py | 10 +++-- .../models/point_uncertainty_ellipse.py | 11 +++-- .../capif_routing_info/models/polygon.py | 10 +++-- .../models/problem_details.py | 11 +++-- .../capif_routing_info/models/protocol.py | 5 ++- .../models/relative_cartesian_location.py | 5 ++- .../capif_routing_info/models/resource.py | 10 +++-- .../capif_routing_info/models/routing_info.py | 8 ++-- .../capif_routing_info/models/routing_rule.py | 10 +++-- .../models/security_method.py | 5 ++- .../capif_routing_info/models/service_kpis.py | 8 ++-- .../models/supported_gad_shapes.py | 5 ++- .../models/uncertainty_ellipse.py | 5 ++- .../models/uncertainty_ellipsoid.py | 5 ++- .../capif_routing_info/models/version.py | 9 ++-- .../capif_routing_info/openapi/openapi.yaml | 2 +- .../capif_routing_info/test/__init__.py | 3 +- .../test/test_default_controller.py | 2 + .../capif_routing_info/util.py | 1 + .../TS29222_CAPIF_Routing_Info_API/setup.py | 4 +- 53 files changed, 291 insertions(+), 120 deletions(-) diff --git a/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/FILES index 850cbed4..d977414f 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/FILES @@ -1,6 +1,5 @@ .dockerignore .gitignore -.openapi-generator-ignore .travis.yml Dockerfile README.md @@ -56,7 +55,6 @@ capif_routing_info/models/uncertainty_ellipsoid.py capif_routing_info/models/version.py capif_routing_info/openapi/openapi.yaml capif_routing_info/test/__init__.py -capif_routing_info/test/test_default_controller.py capif_routing_info/typing_utils.py capif_routing_info/util.py requirements.txt diff --git a/services/TS29222_CAPIF_Routing_Info_API/README.md b/services/TS29222_CAPIF_Routing_Info_API/README.md index b239418e..bd17fcfc 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/README.md +++ b/services/TS29222_CAPIF_Routing_Info_API/README.md @@ -15,7 +15,7 @@ To run the server, please execute the following from the root directory: ``` pip3 install -r requirements.txt -python3 -m capif_routing_info +python3 -m openapi_server ``` and open your browser to here: @@ -42,8 +42,8 @@ To run the server on a Docker container, please execute the following from the r ```bash # building the image -docker build -t capif_routing_info . +docker build -t openapi_server . # starting up a container -docker run -p 8080:8080 capif_routing_info +docker run -p 8080:8080 openapi_server ``` \ No newline at end of file diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/default_controller.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/default_controller.py index 575fc245..9dafc055 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/default_controller.py @@ -1,6 +1,11 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union from capif_routing_info.models.problem_details import ProblemDetails # noqa: E501 from capif_routing_info.models.routing_info import RoutingInfo # noqa: E501 +from capif_routing_info import util def service_apis_service_api_id_get(service_api_id, aef_id, supp_feat=None): # noqa: E501 diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py index 8b137891..6d294ffd 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py @@ -1 +1,2 @@ +from typing import List diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/encoder.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/encoder.py index 61d252c5..106c8209 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/encoder.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/encoder.py @@ -1,6 +1,7 @@ -from capif_routing_info.models.base_model import Model from connexion.jsonifier import JSONEncoder +from capif_routing_info.models.base_model import Model + class CustomJSONEncoder(JSONEncoder): include_nulls = False diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/__init__.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/__init__.py index d036df69..04378bc9 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/__init__.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/__init__.py @@ -1,2 +1,43 @@ # flake8: noqa # import models into model package +from capif_routing_info.models.aef_location import AefLocation +from capif_routing_info.models.aef_profile import AefProfile +from capif_routing_info.models.civic_address import CivicAddress +from capif_routing_info.models.communication_type import CommunicationType +from capif_routing_info.models.custom_operation import CustomOperation +from capif_routing_info.models.data_format import DataFormat +from capif_routing_info.models.ellipsoid_arc import EllipsoidArc +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.geographic_area import GeographicArea +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info.models.interface_description import InterfaceDescription +from capif_routing_info.models.invalid_param import InvalidParam +from capif_routing_info.models.ip_addr_range import IpAddrRange +from capif_routing_info.models.ipv4_address_range import Ipv4AddressRange +from capif_routing_info.models.ipv4_address_range1 import Ipv4AddressRange1 +from capif_routing_info.models.ipv6_addr1 import Ipv6Addr1 +from capif_routing_info.models.ipv6_address_range import Ipv6AddressRange +from capif_routing_info.models.ipv6_address_range1 import Ipv6AddressRange1 +from capif_routing_info.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse +from capif_routing_info.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid +from capif_routing_info.models.local_origin import LocalOrigin +from capif_routing_info.models.o_auth_grant_type import OAuthGrantType +from capif_routing_info.models.operation import Operation +from capif_routing_info.models.point import Point +from capif_routing_info.models.point_altitude import PointAltitude +from capif_routing_info.models.point_altitude_uncertainty import PointAltitudeUncertainty +from capif_routing_info.models.point_uncertainty_circle import PointUncertaintyCircle +from capif_routing_info.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from capif_routing_info.models.polygon import Polygon +from capif_routing_info.models.problem_details import ProblemDetails +from capif_routing_info.models.protocol import Protocol +from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation +from capif_routing_info.models.resource import Resource +from capif_routing_info.models.routing_info import RoutingInfo +from capif_routing_info.models.routing_rule import RoutingRule +from capif_routing_info.models.security_method import SecurityMethod +from capif_routing_info.models.service_kpis import ServiceKpis +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse +from capif_routing_info.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from capif_routing_info.models.version import Version diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_location.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_location.py index aede9133..e60b523e 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_location.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_location.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.civic_address import CivicAddress +from capif_routing_info.models.geographic_area import GeographicArea +from capif_routing_info import util + from capif_routing_info.models.civic_address import CivicAddress # noqa: E501 from capif_routing_info.models.geographic_area import GeographicArea # noqa: E501 - class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_profile.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_profile.py index 62efcf19..2cb26e13 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_profile.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_profile.py @@ -1,9 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.aef_location import AefLocation +from capif_routing_info.models.data_format import DataFormat +from capif_routing_info.models.interface_description import InterfaceDescription +from capif_routing_info.models.ip_addr_range import IpAddrRange +from capif_routing_info.models.o_auth_grant_type import OAuthGrantType +from capif_routing_info.models.protocol import Protocol +from capif_routing_info.models.security_method import SecurityMethod +from capif_routing_info.models.service_kpis import ServiceKpis +from capif_routing_info.models.version import Version from capif_routing_info import util + from capif_routing_info.models.aef_location import AefLocation # noqa: E501 -from capif_routing_info.models.base_model import Model from capif_routing_info.models.data_format import DataFormat # noqa: E501 from capif_routing_info.models.interface_description import InterfaceDescription # noqa: E501 from capif_routing_info.models.ip_addr_range import IpAddrRange # noqa: E501 @@ -13,7 +24,6 @@ from capif_routing_info.models.security_method import SecurityMethod # noqa: E5 from capif_routing_info.models.service_kpis import ServiceKpis # noqa: E501 from capif_routing_info.models.version import Version # noqa: E501 - class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model.py index 57cac681..48496362 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from capif_routing_info import util diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/civic_address.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/civic_address.py index 46b947c1..fd306ef3 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/civic_address.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/civic_address.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type.py index 84355f1b..c355c6de 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/custom_operation.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/custom_operation.py index d6a2f42a..0e0995b2 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/custom_operation.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/custom_operation.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.communication_type import CommunicationType +from capif_routing_info.models.operation import Operation +from capif_routing_info import util + from capif_routing_info.models.communication_type import CommunicationType # noqa: E501 from capif_routing_info.models.operation import Operation # noqa: E501 - class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format.py index 8c400e5e..83f31a21 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class DataFormat(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py index 246c731e..345698c2 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info import util + from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py index c4606e3a..d956d8d2 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info import util +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py index 83b2f60a..5c159825 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py @@ -1,8 +1,20 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.ellipsoid_arc import EllipsoidArc +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info.models.point import Point +from capif_routing_info.models.point_altitude import PointAltitude +from capif_routing_info.models.point_altitude_uncertainty import PointAltitudeUncertainty +from capif_routing_info.models.point_uncertainty_circle import PointUncertaintyCircle +from capif_routing_info.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from capif_routing_info.models.polygon import Polygon +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse +from capif_routing_info import util + from capif_routing_info.models.ellipsoid_arc import EllipsoidArc # noqa: E501 from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_routing_info.models.point import Point # noqa: E501 @@ -14,7 +26,6 @@ from capif_routing_info.models.polygon import Polygon # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py index e33c892b..8b0e51f2 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/interface_description.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/interface_description.py index e895f9db..f9b79570 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/interface_description.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/interface_description.py @@ -1,12 +1,16 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.o_auth_grant_type import OAuthGrantType +from capif_routing_info.models.security_method import SecurityMethod +import re +from capif_routing_info import util + from capif_routing_info.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from capif_routing_info.models.security_method import SecurityMethod # noqa: E501 - +import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/invalid_param.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/invalid_param.py index b42e24b5..e6d4edec 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/invalid_param.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ip_addr_range.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ip_addr_range.py index b9869baf..d470760f 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ip_addr_range.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.ipv4_address_range1 import Ipv4AddressRange1 +from capif_routing_info.models.ipv6_address_range1 import Ipv6AddressRange1 +from capif_routing_info import util + from capif_routing_info.models.ipv4_address_range1 import Ipv4AddressRange1 # noqa: E501 from capif_routing_info.models.ipv6_address_range1 import Ipv6AddressRange1 # noqa: E501 - class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range.py index cdde631b..e4a0b763 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +import re +from capif_routing_info import util +import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range1.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range1.py index beae3e04..ca5d5f4a 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range1.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range1.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +import re +from capif_routing_info import util +import re # noqa: E501 class Ipv4AddressRange1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py index bfe95315..f4248ba8 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range.py index c419f267..aeaff9c1 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class Ipv6AddressRange(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range1.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range1.py index 2efedbc2..a1060d8a 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range1.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range1.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model -from capif_routing_info.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 +from capif_routing_info.models.ipv6_addr1 import Ipv6Addr1 +from capif_routing_info import util +from capif_routing_info.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 class Ipv6AddressRange1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local2d_point_uncertainty_ellipse.py index e1f2f11d..c9b258b1 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local2d_point_uncertainty_ellipse.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.local_origin import LocalOrigin +from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse +from capif_routing_info import util + from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.local_origin import LocalOrigin # noqa: E501 from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py index f494ead2..076c7f49 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py @@ -1,15 +1,21 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.local_origin import LocalOrigin +from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info.models.uncertainty_ellipsoid import UncertaintyEllipsoid +from capif_routing_info import util + from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.local_origin import LocalOrigin # noqa: E501 from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_routing_info.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 - class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local_origin.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local_origin.py index a301c3ac..0b89a0dc 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local_origin.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local_origin.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.geographic_area import GeographicArea +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info import util + from capif_routing_info.models.geographic_area import GeographicArea # noqa: E501 from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 - class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/o_auth_grant_type.py index eabc37f6..420b4513 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/o_auth_grant_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation.py index b72c36a0..856dc775 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class Operation(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point.py index a6f38782..88b0a922 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info import util + from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py index 72156c95..ff5cab9e 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info import util + from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude_uncertainty.py index 63f0459a..fdcea5e2 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude_uncertainty.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse +from capif_routing_info import util + from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_circle.py index 7a7e2cd8..80faac43 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_circle.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info import util + from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_ellipse.py index df271216..03c55bf7 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_ellipse.py @@ -1,14 +1,19 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse +from capif_routing_info import util + from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 - class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py index c4e0ed43..3af36a1e 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.gad_shape import GADShape +from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates +from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes +from capif_routing_info import util + from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 - class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/problem_details.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/problem_details.py index d095ab5a..096c04eb 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/problem_details.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model -from capif_routing_info.models.invalid_param import InvalidParam # noqa: E501 +from capif_routing_info.models.invalid_param import InvalidParam +import re +from capif_routing_info import util +from capif_routing_info.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol.py index 59c0a37d..fe4b2bf3 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class Protocol(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py index b71e9ce1..592f4bc6 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/resource.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/resource.py index ee34d66f..c6540878 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/resource.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/resource.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.communication_type import CommunicationType +from capif_routing_info.models.custom_operation import CustomOperation +from capif_routing_info.models.operation import Operation +from capif_routing_info import util + from capif_routing_info.models.communication_type import CommunicationType # noqa: E501 from capif_routing_info.models.custom_operation import CustomOperation # noqa: E501 from capif_routing_info.models.operation import Operation # noqa: E501 - class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_info.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_info.py index 9615bb65..8d086045 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_info.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_info.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model -from capif_routing_info.models.routing_rule import RoutingRule # noqa: E501 +from capif_routing_info.models.routing_rule import RoutingRule +from capif_routing_info import util +from capif_routing_info.models.routing_rule import RoutingRule # noqa: E501 class RoutingInfo(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_rule.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_rule.py index f5072e73..88cb2c7a 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_rule.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_rule.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.aef_profile import AefProfile +from capif_routing_info.models.ipv4_address_range import Ipv4AddressRange +from capif_routing_info.models.ipv6_address_range import Ipv6AddressRange from capif_routing_info import util + from capif_routing_info.models.aef_profile import AefProfile # noqa: E501 -from capif_routing_info.models.base_model import Model from capif_routing_info.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 from capif_routing_info.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 - class RoutingRule(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method.py index 948a0e08..0ef293df 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/service_kpis.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/service_kpis.py index b06404f7..869dc5a3 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/service_kpis.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/service_kpis.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +import re +from capif_routing_info import util +import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py index ef3f27ba..e238c97b 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipse.py index 00d8acb9..27a6acd1 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipse.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py index c1307ee3..45538ba7 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info import util class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/version.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/version.py index 990be9ce..1be123dc 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/version.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/version.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_routing_info import util +from typing import List, Dict # noqa: F401 + from capif_routing_info.models.base_model import Model +from capif_routing_info.models.custom_operation import CustomOperation +from capif_routing_info.models.resource import Resource +from capif_routing_info import util + from capif_routing_info.models.custom_operation import CustomOperation # noqa: E501 from capif_routing_info.models.resource import Resource # noqa: E501 - class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/openapi/openapi.yaml b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/openapi/openapi.yaml index 21846368..99dbdbfb 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/openapi/openapi.yaml @@ -1236,7 +1236,7 @@ components: maxReqRate: 0 avalGraComp: avalGraComp nullable: true - oneOf: + oneOf: - required: ["domainName"] - required: ["interfaceDescriptions"] properties: diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/__init__.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/__init__.py index fe016ad6..e95f59cf 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/__init__.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/__init__.py @@ -1,9 +1,10 @@ import logging import connexion -from capif_routing_info.encoder import JSONEncoder from flask_testing import TestCase +from capif_routing_info.encoder import JSONEncoder + class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/test_default_controller.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/test_default_controller.py index cf2e7c38..7241b494 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/test_default_controller.py @@ -1,5 +1,7 @@ import unittest +from flask import json + from capif_routing_info.models.problem_details import ProblemDetails # noqa: E501 from capif_routing_info.models.routing_info import RoutingInfo # noqa: E501 from capif_routing_info.test import BaseTestCase diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/util.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/util.py index fc17a1ca..6f369d51 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/util.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/util.py @@ -1,5 +1,6 @@ import datetime +import typing from capif_routing_info import typing_utils diff --git a/services/TS29222_CAPIF_Routing_Info_API/setup.py b/services/TS29222_CAPIF_Routing_Info_API/setup.py index 327037e0..f3e2e6ad 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/setup.py +++ b/services/TS29222_CAPIF_Routing_Info_API/setup.py @@ -1,5 +1,5 @@ - -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "capif_routing_info" VERSION = "1.0.0" -- GitLab From 46cf81f16e0cdc0d3c1f5ba1df659003a5d4a307 Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Wed, 3 Dec 2025 09:05:47 +0100 Subject: [PATCH 050/101] REL 19 New Security_API --- .../.openapi-generator/FILES | 2 - .../controllers/default_controller.py | 2 +- .../controllers/security_controller.py | 1 + .../capif_security/encoder.py | 2 +- .../capif_security/models/__init__.py | 28 +++++++++ .../models/access_token_claims.py | 8 ++- .../capif_security/models/access_token_err.py | 5 +- .../models/access_token_err1.py | 5 +- .../models/access_token_req1.py | 60 +++++++++++++++---- .../capif_security/models/access_token_rsp.py | 5 +- .../capif_security/models/base_model.py | 1 + .../capif_security/models/cause.py | 5 +- .../models/interface_description.py | 12 ++-- .../capif_security/models/invalid_param.py | 5 +- .../capif_security/models/invalid_param1.py | 5 +- .../models/ml_model_inter_ind.py | 8 ++- .../capif_security/models/nf_type.py | 5 +- .../models/no_profile_match_info.py | 9 ++- .../models/no_profile_match_reason.py | 5 +- .../capif_security/models/nwdaf_event.py | 5 +- .../models/o_auth_grant_type.py | 5 +- .../capif_security/models/plmn_id.py | 8 ++- .../capif_security/models/plmn_id_nid.py | 8 ++- .../capif_security/models/problem_details.py | 11 ++-- .../capif_security/models/problem_details1.py | 14 +++-- .../models/query_param_combination.py | 8 ++- .../capif_security/models/query_parameter.py | 5 +- .../capif_security/models/res_owner_id.py | 8 ++- .../models/security_information.py | 10 +++- .../capif_security/models/security_method.py | 5 +- .../models/security_notification.py | 38 ++++++++++-- .../capif_security/models/service_security.py | 12 ++-- .../capif_security/models/snssai.py | 8 ++- .../models/websock_notif_config.py | 5 +- .../capif_security/openapi/openapi.yaml | 38 ++++++++---- .../capif_security/test/__init__.py | 3 +- .../test/test_default_controller.py | 5 +- .../capif_security/util.py | 3 +- services/TS29222_CAPIF_Security_API/setup.py | 6 +- 39 files changed, 270 insertions(+), 108 deletions(-) diff --git a/services/TS29222_CAPIF_Security_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Security_API/.openapi-generator/FILES index a3947acd..76919adc 100644 --- a/services/TS29222_CAPIF_Security_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Security_API/.openapi-generator/FILES @@ -1,6 +1,5 @@ .dockerignore .gitignore -.openapi-generator-ignore .travis.yml Dockerfile README.md @@ -43,7 +42,6 @@ capif_security/models/snssai.py capif_security/models/websock_notif_config.py capif_security/openapi/openapi.yaml capif_security/test/__init__.py -capif_security/test/test_default_controller.py capif_security/typing_utils.py capif_security/util.py requirements.txt diff --git a/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py b/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py index 385d3cfd..9df39a0a 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py @@ -94,7 +94,6 @@ def securities_security_id_token_post(security_id, body): # noqa: E501 return res - @cert_validation() def trusted_invokers_api_invoker_id_delete(api_invoker_id): # noqa: E501 """trusted_invokers_api_invoker_id_delete @@ -109,6 +108,7 @@ def trusted_invokers_api_invoker_id_delete(api_invoker_id): # noqa: E501 current_app.logger.info("Removing security context") return service_security_ops.delete_servicesecurity(api_invoker_id) + @cert_validation() def trusted_invokers_api_invoker_id_delete_post(api_invoker_id, body): # noqa: E501 """trusted_invokers_api_invoker_id_delete_post diff --git a/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller.py b/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller.py index 8b137891..6d294ffd 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller.py @@ -1 +1,2 @@ +from typing import List diff --git a/services/TS29222_CAPIF_Security_API/capif_security/encoder.py b/services/TS29222_CAPIF_Security_API/capif_security/encoder.py index 099bd1f8..ca3326a5 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/encoder.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/encoder.py @@ -1,5 +1,5 @@ -from capif_security.models.base_model import Model from connexion.jsonifier import JSONEncoder +from capif_security.models.base_model import Model class CustomJSONEncoder(JSONEncoder): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py b/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py index d036df69..f4510143 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py @@ -1,2 +1,30 @@ # flake8: noqa # import models into model package +from capif_security.models.access_token_claims import AccessTokenClaims +from capif_security.models.access_token_err import AccessTokenErr +from capif_security.models.access_token_err1 import AccessTokenErr1 +from capif_security.models.access_token_req1 import AccessTokenReq1 +from capif_security.models.access_token_rsp import AccessTokenRsp +from capif_security.models.cause import Cause +from capif_security.models.interface_description import InterfaceDescription +from capif_security.models.invalid_param import InvalidParam +from capif_security.models.invalid_param1 import InvalidParam1 +from capif_security.models.ml_model_inter_ind import MlModelInterInd +from capif_security.models.nf_type import NFType +from capif_security.models.no_profile_match_info import NoProfileMatchInfo +from capif_security.models.no_profile_match_reason import NoProfileMatchReason +from capif_security.models.nwdaf_event import NwdafEvent +from capif_security.models.o_auth_grant_type import OAuthGrantType +from capif_security.models.plmn_id import PlmnId +from capif_security.models.plmn_id_nid import PlmnIdNid +from capif_security.models.problem_details import ProblemDetails +from capif_security.models.problem_details1 import ProblemDetails1 +from capif_security.models.query_param_combination import QueryParamCombination +from capif_security.models.query_parameter import QueryParameter +from capif_security.models.res_owner_id import ResOwnerId +from capif_security.models.security_information import SecurityInformation +from capif_security.models.security_method import SecurityMethod +from capif_security.models.security_notification import SecurityNotification +from capif_security.models.service_security import ServiceSecurity +from capif_security.models.snssai import Snssai +from capif_security.models.websock_notif_config import WebsockNotifConfig diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_claims.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_claims.py index 61a482b6..46593ae6 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_claims.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_claims.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model -from capif_security.models.res_owner_id import ResOwnerId # noqa: E501 +from capif_security.models.res_owner_id import ResOwnerId +from capif_security import util +from capif_security.models.res_owner_id import ResOwnerId # noqa: E501 class AccessTokenClaims(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err.py index 3e7629b5..c6002302 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class AccessTokenErr(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err1.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err1.py index efd3e8f4..23007798 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err1.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err1.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class AccessTokenErr1(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req1.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req1.py index 0530651a..b119ea5c 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req1.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req1.py @@ -1,16 +1,24 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security.models.ml_model_inter_ind import MlModelInterInd +from capif_security.models.nf_type import NFType +from capif_security.models.nwdaf_event import NwdafEvent +from capif_security.models.plmn_id import PlmnId +from capif_security.models.plmn_id_nid import PlmnIdNid +from capif_security.models.snssai import Snssai +import re +from capif_security import util + from capif_security.models.ml_model_inter_ind import MlModelInterInd # noqa: E501 from capif_security.models.nf_type import NFType # noqa: E501 from capif_security.models.nwdaf_event import NwdafEvent # noqa: E501 from capif_security.models.plmn_id import PlmnId # noqa: E501 from capif_security.models.plmn_id_nid import PlmnIdNid # noqa: E501 from capif_security.models.snssai import Snssai # noqa: E501 - +import re # noqa: E501 class AccessTokenReq1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,7 +26,7 @@ class AccessTokenReq1(Model): Do not edit the class manually. """ - def __init__(self, grant_type=None, nf_instance_id=None, nf_type=None, target_nf_type=None, scope=None, target_nf_instance_id=None, requester_plmn=None, requester_plmn_list=None, requester_snssai_list=None, requester_fqdn=None, requester_snpn_list=None, target_plmn=None, target_snpn=None, target_snssai_list=None, target_nsi_list=None, target_nf_set_id=None, target_nf_service_set_id=None, hnrf_access_token_uri=None, source_nf_instance_id=None, vendor_id=None, analytics_ids=None, requester_inter_ind_list=None, source_vendor_id=None): # noqa: E501 + def __init__(self, grant_type=None, nf_instance_id=None, nf_type=None, target_nf_type=None, scope=None, target_nf_instance_id=None, requester_plmn=None, requester_plmn_list=None, requester_snssai_list=None, requester_fqdn=None, requester_snpn_list=None, target_plmn=None, target_snpn=None, target_snssai_list=None, target_nsi_list=None, target_nf_set_id=None, target_nf_service_set_id=None, hnrf_access_token_uri=None, source_nf_instance_id=None, vendor_id=None, analytics_ids=None, requester_inter_ind_list=None, source_vendor_id=None, af_id=None): # noqa: E501 """AccessTokenReq1 - a model defined in OpenAPI :param grant_type: The grant_type of this AccessTokenReq1. # noqa: E501 @@ -67,6 +75,8 @@ class AccessTokenReq1(Model): :type requester_inter_ind_list: List[MlModelInterInd] :param source_vendor_id: The source_vendor_id of this AccessTokenReq1. # noqa: E501 :type source_vendor_id: str + :param af_id: The af_id of this AccessTokenReq1. # noqa: E501 + :type af_id: str """ self.openapi_types = { 'grant_type': str, @@ -91,7 +101,8 @@ class AccessTokenReq1(Model): 'vendor_id': str, 'analytics_ids': List[NwdafEvent], 'requester_inter_ind_list': List[MlModelInterInd], - 'source_vendor_id': str + 'source_vendor_id': str, + 'af_id': str } self.attribute_map = { @@ -117,7 +128,8 @@ class AccessTokenReq1(Model): 'vendor_id': 'vendorId', 'analytics_ids': 'analyticsIds', 'requester_inter_ind_list': 'requesterInterIndList', - 'source_vendor_id': 'sourceVendorId' + 'source_vendor_id': 'sourceVendorId', + 'af_id': 'afId' } self._grant_type = grant_type @@ -143,6 +155,7 @@ class AccessTokenReq1(Model): self._analytics_ids = analytics_ids self._requester_inter_ind_list = requester_inter_ind_list self._source_vendor_id = source_vendor_id + self._af_id = af_id @classmethod def from_dict(cls, dikt) -> 'AccessTokenReq1': @@ -186,7 +199,7 @@ class AccessTokenReq1(Model): def nf_instance_id(self) -> str: """Gets the nf_instance_id of this AccessTokenReq1. - String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122. # noqa: E501 + String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4. # noqa: E501 :return: The nf_instance_id of this AccessTokenReq1. :rtype: str @@ -197,7 +210,7 @@ class AccessTokenReq1(Model): def nf_instance_id(self, nf_instance_id: str): """Sets the nf_instance_id of this AccessTokenReq1. - String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122. # noqa: E501 + String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4. # noqa: E501 :param nf_instance_id: The nf_instance_id of this AccessTokenReq1. :type nf_instance_id: str @@ -278,7 +291,7 @@ class AccessTokenReq1(Model): def target_nf_instance_id(self) -> str: """Gets the target_nf_instance_id of this AccessTokenReq1. - String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122. # noqa: E501 + String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4. # noqa: E501 :return: The target_nf_instance_id of this AccessTokenReq1. :rtype: str @@ -289,7 +302,7 @@ class AccessTokenReq1(Model): def target_nf_instance_id(self, target_nf_instance_id: str): """Sets the target_nf_instance_id of this AccessTokenReq1. - String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122. # noqa: E501 + String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4. # noqa: E501 :param target_nf_instance_id: The target_nf_instance_id of this AccessTokenReq1. :type target_nf_instance_id: str @@ -577,7 +590,7 @@ class AccessTokenReq1(Model): def source_nf_instance_id(self) -> str: """Gets the source_nf_instance_id of this AccessTokenReq1. - String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122. # noqa: E501 + String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4. # noqa: E501 :return: The source_nf_instance_id of this AccessTokenReq1. :rtype: str @@ -588,7 +601,7 @@ class AccessTokenReq1(Model): def source_nf_instance_id(self, source_nf_instance_id: str): """Sets the source_nf_instance_id of this AccessTokenReq1. - String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4, as described in IETF RFC 4122. # noqa: E501 + String uniquely identifying a NF instance. The format of the NF Instance ID shall be a Universally Unique Identifier (UUID) version 4. # noqa: E501 :param source_nf_instance_id: The source_nf_instance_id of this AccessTokenReq1. :type source_nf_instance_id: str @@ -691,3 +704,24 @@ class AccessTokenReq1(Model): raise ValueError(r"Invalid value for `source_vendor_id`, must be a follow pattern or equal to `/^[0-9]{6}$/`") # noqa: E501 self._source_vendor_id = source_vendor_id + + @property + def af_id(self) -> str: + """Gets the af_id of this AccessTokenReq1. + + + :return: The af_id of this AccessTokenReq1. + :rtype: str + """ + return self._af_id + + @af_id.setter + def af_id(self, af_id: str): + """Sets the af_id of this AccessTokenReq1. + + + :param af_id: The af_id of this AccessTokenReq1. + :type af_id: str + """ + + self._af_id = af_id diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_rsp.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_rsp.py index 477f3a63..f8e524db 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_rsp.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_rsp.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class AccessTokenRsp(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/base_model.py b/services/TS29222_CAPIF_Security_API/capif_security/models/base_model.py index 32a1219f..4bf93155 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/base_model.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/base_model.py @@ -1,4 +1,5 @@ import pprint + import typing from capif_security import util diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py b/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py index b4fbd86e..227ba107 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class Cause(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/interface_description.py b/services/TS29222_CAPIF_Security_API/capif_security/models/interface_description.py index b414ef8b..ade7fc69 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/interface_description.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/interface_description.py @@ -1,12 +1,16 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security.models.o_auth_grant_type import OAuthGrantType +from capif_security.models.security_method import SecurityMethod +import re +from capif_security import util + from capif_security.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from capif_security.models.security_method import SecurityMethod # noqa: E501 - +import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param.py b/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param.py index 57a65695..f86b2086 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param1.py b/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param1.py index e7abd4e9..77919000 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param1.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param1.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class InvalidParam1(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/ml_model_inter_ind.py b/services/TS29222_CAPIF_Security_API/capif_security/models/ml_model_inter_ind.py index c1ab27a7..3e87273d 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/ml_model_inter_ind.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/ml_model_inter_ind.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model -from capif_security.models.nwdaf_event import NwdafEvent # noqa: E501 +from capif_security.models.nwdaf_event import NwdafEvent +from capif_security import util +from capif_security.models.nwdaf_event import NwdafEvent # noqa: E501 class MlModelInterInd(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type.py b/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type.py index 017f0384..184a7c0d 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class NFType(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_info.py b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_info.py index c7b85407..4d8885b5 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_info.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_info.py @@ -1,12 +1,15 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security.models.no_profile_match_reason import NoProfileMatchReason +from capif_security.models.query_param_combination import QueryParamCombination +from capif_security import util + from capif_security.models.no_profile_match_reason import NoProfileMatchReason # noqa: E501 from capif_security.models.query_param_combination import QueryParamCombination # noqa: E501 - class NoProfileMatchInfo(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py index 5fe37d57..ccec0b37 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class NoProfileMatchReason(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/nwdaf_event.py b/services/TS29222_CAPIF_Security_API/capif_security/models/nwdaf_event.py index d1701a39..f07de0c3 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/nwdaf_event.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/nwdaf_event.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class NwdafEvent(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Security_API/capif_security/models/o_auth_grant_type.py index 3813c056..8bace2b9 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/o_auth_grant_type.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py b/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py index c86104bb..74dd8bf0 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +import re +from capif_security import util +import re # noqa: E501 class PlmnId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id_nid.py b/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id_nid.py index 9e414876..02bfde85 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id_nid.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id_nid.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +import re +from capif_security import util +import re # noqa: E501 class PlmnIdNid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details.py b/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details.py index 47dd078a..f24710e4 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details.py @@ -1,11 +1,14 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model -from capif_security.models.invalid_param import InvalidParam # noqa: E501 +from capif_security.models.invalid_param import InvalidParam +import re +from capif_security import util +from capif_security.models.invalid_param import InvalidParam # noqa: E501 +import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details1.py b/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details1.py index e0fbf4c1..27b782fc 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details1.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details1.py @@ -1,14 +1,20 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_security.models.base_model import Model +from capif_security.models.access_token_err1 import AccessTokenErr1 +from capif_security.models.access_token_req1 import AccessTokenReq1 +from capif_security.models.invalid_param1 import InvalidParam1 +from capif_security.models.no_profile_match_info import NoProfileMatchInfo +import re from capif_security import util + from capif_security.models.access_token_err1 import AccessTokenErr1 # noqa: E501 from capif_security.models.access_token_req1 import AccessTokenReq1 # noqa: E501 -from capif_security.models.base_model import Model from capif_security.models.invalid_param1 import InvalidParam1 # noqa: E501 from capif_security.models.no_profile_match_info import NoProfileMatchInfo # noqa: E501 - +import re # noqa: E501 class ProblemDetails1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/query_param_combination.py b/services/TS29222_CAPIF_Security_API/capif_security/models/query_param_combination.py index 430eab7c..a28fb4ad 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/query_param_combination.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/query_param_combination.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model -from capif_security.models.query_parameter import QueryParameter # noqa: E501 +from capif_security.models.query_parameter import QueryParameter +from capif_security import util +from capif_security.models.query_parameter import QueryParameter # noqa: E501 class QueryParamCombination(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/query_parameter.py b/services/TS29222_CAPIF_Security_API/capif_security/models/query_parameter.py index 39302f5b..183bb325 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/query_parameter.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/query_parameter.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class QueryParameter(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/res_owner_id.py b/services/TS29222_CAPIF_Security_API/capif_security/models/res_owner_id.py index 7ad71592..0229dd1f 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/res_owner_id.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/res_owner_id.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +import re +from capif_security import util +import re # noqa: E501 class ResOwnerId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/security_information.py b/services/TS29222_CAPIF_Security_API/capif_security/models/security_information.py index ab650a4a..10e85193 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/security_information.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/security_information.py @@ -1,13 +1,17 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security.models.interface_description import InterfaceDescription +from capif_security.models.o_auth_grant_type import OAuthGrantType +from capif_security.models.security_method import SecurityMethod +from capif_security import util + from capif_security.models.interface_description import InterfaceDescription # noqa: E501 from capif_security.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from capif_security.models.security_method import SecurityMethod # noqa: E501 - class SecurityInformation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/security_method.py b/services/TS29222_CAPIF_Security_API/capif_security/models/security_method.py index c3deabe5..c319a38a 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/security_method.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/security_method.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/security_notification.py b/services/TS29222_CAPIF_Security_API/capif_security/models/security_notification.py index fbf39b6d..f3bf0604 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/security_notification.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/security_notification.py @@ -1,10 +1,12 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model -from capif_security.models.cause import Cause # noqa: E501 +from capif_security.models.cause import Cause +from capif_security import util +from capif_security.models.cause import Cause # noqa: E501 class SecurityNotification(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,7 +14,7 @@ class SecurityNotification(Model): Do not edit the class manually. """ - def __init__(self, api_invoker_id=None, aef_id=None, api_ids=None, cause=None): # noqa: E501 + def __init__(self, api_invoker_id=None, aef_id=None, api_ids=None, access_token=None, cause=None): # noqa: E501 """SecurityNotification - a model defined in OpenAPI :param api_invoker_id: The api_invoker_id of this SecurityNotification. # noqa: E501 @@ -21,6 +23,8 @@ class SecurityNotification(Model): :type aef_id: str :param api_ids: The api_ids of this SecurityNotification. # noqa: E501 :type api_ids: List[str] + :param access_token: The access_token of this SecurityNotification. # noqa: E501 + :type access_token: str :param cause: The cause of this SecurityNotification. # noqa: E501 :type cause: Cause """ @@ -28,6 +32,7 @@ class SecurityNotification(Model): 'api_invoker_id': str, 'aef_id': str, 'api_ids': List[str], + 'access_token': str, 'cause': Cause } @@ -35,12 +40,14 @@ class SecurityNotification(Model): 'api_invoker_id': 'apiInvokerId', 'aef_id': 'aefId', 'api_ids': 'apiIds', + 'access_token': 'access_token', 'cause': 'cause' } self._api_invoker_id = api_invoker_id self._aef_id = aef_id self._api_ids = api_ids + self._access_token = access_token self._cause = cause @classmethod @@ -129,6 +136,29 @@ class SecurityNotification(Model): self._api_ids = api_ids + @property + def access_token(self) -> str: + """Gets the access_token of this SecurityNotification. + + JWS Compact Serialized representation of JWS signed JSON object (AccessTokenClaims). # noqa: E501 + + :return: The access_token of this SecurityNotification. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token: str): + """Sets the access_token of this SecurityNotification. + + JWS Compact Serialized representation of JWS signed JSON object (AccessTokenClaims). # noqa: E501 + + :param access_token: The access_token of this SecurityNotification. + :type access_token: str + """ + + self._access_token = access_token + @property def cause(self) -> Cause: """Gets the cause of this SecurityNotification. diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/service_security.py b/services/TS29222_CAPIF_Security_API/capif_security/models/service_security.py index 10d26438..c0bae73e 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/service_security.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/service_security.py @@ -1,12 +1,16 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security.models.security_information import SecurityInformation +from capif_security.models.websock_notif_config import WebsockNotifConfig +import re +from capif_security import util + from capif_security.models.security_information import SecurityInformation # noqa: E501 from capif_security.models.websock_notif_config import WebsockNotifConfig # noqa: E501 - +import re # noqa: E501 class ServiceSecurity(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py b/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py index 90cde98e..1d00dd90 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py @@ -1,10 +1,12 @@ -import re # noqa: E501 from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +import re +from capif_security import util +import re # noqa: E501 class Snssai(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/websock_notif_config.py b/services/TS29222_CAPIF_Security_API/capif_security/models/websock_notif_config.py index 13109aa1..1482ee7d 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/websock_notif_config.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/websock_notif_config.py @@ -1,8 +1,9 @@ from datetime import date, datetime # noqa: F401 -from typing import Dict, List # noqa: F401 -from capif_security import util +from typing import List, Dict # noqa: F401 + from capif_security.models.base_model import Model +from capif_security import util class WebsockNotifConfig(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/openapi/openapi.yaml b/services/TS29222_CAPIF_Security_API/capif_security/openapi/openapi.yaml index 71929d3d..08f06ba5 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_Security_API/capif_security/openapi/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.0 info: - description: "API for CAPIF security management. \n© 2024, 3GPP Organizational\ + description: "API for CAPIF security management. \n© 2025, 3GPP Organizational\ \ Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Security_API - version: 1.3.0 + version: 1.4.0-alpha.2 externalDocs: - description: 3GPP TS 29.222 V18.6.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V19.4.0 Common API Framework for 3GPP Northbound APIs url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: - url: "{apiRoot}/capif-security/v1" @@ -950,6 +950,7 @@ components: SecurityNotification: description: Represents the revoked authorization notification details. example: + access_token: access_token apiInvokerId: apiInvokerId cause: OVERLIMIT_USAGE aefId: aefId @@ -973,6 +974,11 @@ components: minItems: 1 title: apiIds type: array + access_token: + description: | + JWS Compact Serialized representation of JWS signed JSON object (AccessTokenClaims). + title: access_token + type: string cause: $ref: '#/components/schemas/Cause' required: @@ -1057,7 +1063,8 @@ components: - scope type: object ResOwnerId: - anyOf: [] + anyOf: + - required: ["gpsi"] description: | Represents the identifier of the resource owner. nullable: true @@ -1432,7 +1439,7 @@ components: nfInstanceId: description: "String uniquely identifying a NF instance. The format of the\ \ NF Instance ID shall be a Universally Unique Identifier (UUID) version\ - \ 4, as described in IETF RFC 4122. \n" + \ 4. \n" format: uuid title: NfInstanceId type: string @@ -1447,13 +1454,14 @@ components: targetNfInstanceId: description: "String uniquely identifying a NF instance. The format of the\ \ NF Instance ID shall be a Universally Unique Identifier (UUID) version\ - \ 4, as described in IETF RFC 4122. \n" + \ 4. \n" format: uuid title: NfInstanceId type: string requesterPlmn: $ref: '#/components/schemas/PlmnId' requesterPlmnList: + deprecated: true items: $ref: '#/components/schemas/PlmnId' minItems: 2 @@ -1533,7 +1541,7 @@ components: sourceNfInstanceId: description: "String uniquely identifying a NF instance. The format of the\ \ NF Instance ID shall be a Universally Unique Identifier (UUID) version\ - \ 4, as described in IETF RFC 4122. \n" + \ 4. \n" format: uuid title: NfInstanceId type: string @@ -1561,6 +1569,9 @@ components: pattern: "^[0-9]{6}$" title: VendorId type: string + afId: + title: afId + type: string required: - grant_type - nfInstanceId @@ -1654,8 +1665,8 @@ components: type: integer NfInstanceId: description: "String uniquely identifying a NF instance. The format of the NF\ - \ Instance ID shall be a Universally Unique Identifier (UUID) version 4,\ - \ as described in IETF RFC 4122. \n" + \ Instance ID shall be a Universally Unique Identifier (UUID) version 4.\ + \ \n" format: uuid title: NfInstanceId type: string @@ -1725,6 +1736,9 @@ components: - MF - SLPKMF - RH + - EIF + - AIOTF + - ADM type: string description: NF types known to NRF title: NFType @@ -1881,6 +1895,8 @@ components: - MOVEMENT_BEHAVIOUR - LOC_ACCURACY - RELATIVE_PROXIMITY + - SIGNALLING_STORM + - QOS_POLICY_ASSIST type: string description: "Describes the NWDAF Events. \nPossible values are:\n- SLICE_LOAD_LEVEL:\ \ Indicates that the event subscribed is load level information of Network\n\ @@ -1909,5 +1925,7 @@ components: \ Indicates that the event subscribed is the Movement Behaviour\n information.\n\ - LOC_ACCURACY: Indicates that the event subscribed is of location accuracy.\n\ - RELATIVE_PROXIMITY: Indicates that the event subscribed is the Relative\ - \ Proximity\n information.\n" + \ Proximity\n information.\n- SIGNALLING_STORM: Indicates that the event\ + \ subscribed is the Signalling Storm information.\n- QOS_POLICY_ASSIST: Indicates\ + \ that the event subscribed is the QoS and Policy\n Assistance information.\n" title: NwdafEvent diff --git a/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py b/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py index aa37efef..d3c5dca1 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py @@ -1,9 +1,10 @@ import logging import connexion -from capif_security.encoder import JSONEncoder from flask_testing import TestCase +from capif_security.encoder import JSONEncoder + class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py b/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py index da26a6d6..586c4530 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py @@ -1,5 +1,7 @@ import unittest +from flask import json + from capif_security.models.access_token_err import AccessTokenErr # noqa: E501 from capif_security.models.access_token_rsp import AccessTokenRsp # noqa: E501 from capif_security.models.problem_details import ProblemDetails # noqa: E501 @@ -7,7 +9,6 @@ from capif_security.models.res_owner_id import ResOwnerId # noqa: E501 from capif_security.models.security_notification import SecurityNotification # noqa: E501 from capif_security.models.service_security import ServiceSecurity # noqa: E501 from capif_security.test import BaseTestCase -from flask import json class TestDefaultController(BaseTestCase): @@ -59,7 +60,7 @@ class TestDefaultController(BaseTestCase): """ - security_notification = {"apiInvokerId":"apiInvokerId","cause":"OVERLIMIT_USAGE","aefId":"aefId","apiIds":["apiIds","apiIds"]} + security_notification = {"access_token":"access_token","apiInvokerId":"apiInvokerId","cause":"OVERLIMIT_USAGE","aefId":"aefId","apiIds":["apiIds","apiIds"]} headers = { 'Accept': 'application/problem+json', 'Content-Type': 'application/json', diff --git a/services/TS29222_CAPIF_Security_API/capif_security/util.py b/services/TS29222_CAPIF_Security_API/capif_security/util.py index 8c4d6068..1f117235 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/util.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/util.py @@ -1,8 +1,8 @@ import datetime +import typing from capif_security import typing_utils - def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) @@ -51,7 +51,6 @@ def dict_to_camel_case(my_dict): return result - def _deserialize(data, klass): """Deserializes dict, list, str into an object. diff --git a/services/TS29222_CAPIF_Security_API/setup.py b/services/TS29222_CAPIF_Security_API/setup.py index f291508a..655e2690 100644 --- a/services/TS29222_CAPIF_Security_API/setup.py +++ b/services/TS29222_CAPIF_Security_API/setup.py @@ -1,5 +1,5 @@ - -from setuptools import find_packages, setup +import sys +from setuptools import setup, find_packages NAME = "capif_security" VERSION = "1.0.0" @@ -31,7 +31,7 @@ setup( entry_points={ 'console_scripts': ['capif_security=capif_security.__main__:main']}, long_description="""\ - API for CAPIF security management. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for CAPIF security management. © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) -- GitLab From 8ea15caff6ccf64c759c1f094a3240e6c14fec1a Mon Sep 17 00:00:00 2001 From: Pelayo Torres Date: Wed, 3 Dec 2025 09:58:55 +0100 Subject: [PATCH 051/101] removed unused imports --- .../api_invoker_management/app.py | 6 +- ...boarded_api_invoker_document_controller.py | 12 +-- ...rded_api_invokers_collection_controller.py | 16 ++-- .../controllers/security_controller.py | 1 - .../core/apiinvokerenrolmentdetails.py | 9 ++- .../api_invoker_management/encoder.py | 3 +- .../api_invoker_management/models/__init__.py | 55 -------------- .../models/aef_location.py | 13 ++-- .../models/aef_profile.py | 34 ++++----- .../api_invoker_management/models/api_info.py | 5 +- .../models/api_invoker_enrolment_details.py | 23 +++--- .../api_invoker_enrolment_details_patch.py | 12 ++- .../api_invoker_management/models/api_list.py | 9 +-- .../models/api_status.py | 5 +- .../models/base_model.py | 1 - .../models/civic_address.py | 5 +- .../models/communication_type.py | 5 +- .../models/custom_operation.py | 12 ++- .../models/data_format.py | 5 +- .../models/ellipsoid_arc.py | 16 ++-- .../models/enrol_fail_cause.py | 5 +- .../models/enrol_fail_reason.py | 9 +-- .../models/gad_shape.py | 9 +-- .../models/geographic_area.py | 41 +++++------ .../models/geographical_coordinates.py | 5 +- .../models/interface_description.py | 16 ++-- .../models/invalid_param.py | 5 +- .../models/ip_addr_range.py | 13 ++-- .../models/ipv4_address_range.py | 8 +- .../models/ipv6_addr1.py | 5 +- .../models/ipv6_address_range.py | 8 +- .../local2d_point_uncertainty_ellipse.py | 24 +++--- .../local3d_point_uncertainty_ellipsoid.py | 24 +++--- .../models/local_origin.py | 13 ++-- .../models/net_slice_id.py | 8 +- .../models/o_auth_grant_type.py | 5 +- .../models/onboarding_criteria.py | 13 ++-- .../models/onboarding_fail_reason.py | 5 +- .../models/onboarding_information.py | 9 +-- .../models/onboarding_notification.py | 12 ++- .../models/operation.py | 5 +- .../api_invoker_management/models/point.py | 16 ++-- .../models/point_altitude.py | 16 ++-- .../models/point_altitude_uncertainty.py | 20 +++-- .../models/point_uncertainty_circle.py | 16 ++-- .../models/point_uncertainty_ellipse.py | 20 +++-- .../api_invoker_management/models/polygon.py | 16 ++-- .../models/problem_details.py | 12 ++- .../api_invoker_management/models/protocol.py | 5 +- .../models/published_api_path.py | 5 +- .../models/related_criteria.py | 8 +- .../models/relative_cartesian_location.py | 5 +- .../api_invoker_management/models/resource.py | 16 ++-- .../models/security_method.py | 5 +- .../models/service_api_description.py | 21 ++---- .../models/service_kpis.py | 8 +- .../models/shareable_information.py | 5 +- .../api_invoker_management/models/snssai.py | 8 +- .../models/supported_gad_shapes.py | 5 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../api_invoker_management/models/version.py | 12 ++- .../models/websock_notif_config.py | 5 +- .../api_invoker_management/test/__init__.py | 3 +- ...boarded_api_invoker_document_controller.py | 12 +-- ...rded_api_invokers_collection_controller.py | 9 ++- .../api_invoker_management/util.py | 2 +- .../setup.py | 4 +- .../api_provider_management/app.py | 6 +- .../controllers/default_controller.py | 14 +--- ...i_provider_enrolment_details_controller.py | 18 ++--- .../controllers/security_controller.py | 1 - .../core/provider_enrolment_details_api.py | 6 +- .../api_provider_management/encoder.py | 3 +- .../models/__init__.py | 7 -- .../models/api_provider_enrolment_details.py | 12 ++- .../api_provider_enrolment_details_patch.py | 9 +-- .../models/api_provider_func_role.py | 5 +- .../models/api_provider_function_details.py | 13 ++-- .../models/base_model.py | 1 - .../models/invalid_param.py | 5 +- .../models/problem_details.py | 12 ++- .../models/registration_information.py | 5 +- .../api_provider_management/test/__init__.py | 3 +- .../test/test_default_controller.py | 9 ++- ...i_provider_enrolment_details_controller.py | 12 +-- .../api_provider_management/util.py | 1 - .../setup.py | 4 +- .../capif_acl/app.py | 6 +- .../controllers/default_controller.py | 12 +-- .../controllers/security_controller.py | 1 - .../capif_acl/encoder.py | 3 +- .../capif_acl/models/__init__.py | 7 -- .../models/access_control_policy_list.py | 8 +- .../capif_acl/models/api_invoker_policy.py | 9 +-- .../capif_acl/models/base_model.py | 1 - .../capif_acl/models/invalid_param.py | 5 +- .../capif_acl/models/net_slice_id.py | 8 +- .../capif_acl/models/problem_details.py | 11 +-- .../capif_acl/models/snssai.py | 8 +- .../capif_acl/models/time_range_list.py | 5 +- .../capif_acl/test/__init__.py | 3 +- .../capif_acl/test/test_default_controller.py | 5 +- .../capif_acl/util.py | 2 +- .../setup.py | 4 +- .../TS29222_CAPIF_Auditing_API/logs/app.py | 6 +- .../logs/controllers/default_controller.py | 25 +++---- .../logs/controllers/security_controller.py | 1 - .../logs/core/auditoperations.py | 4 +- .../logs/encoder.py | 1 - .../logs/models/__init__.py | 13 ---- .../logs/models/base_model.py | 1 - .../logs/models/interface_description.py | 12 +-- .../logs/models/invalid_param.py | 5 +- .../logs/models/invocation_log.py | 11 +-- .../logs/models/invocation_logs.py | 11 +-- .../models/invocation_logs_retrieve_res.py | 13 +--- .../logs/models/log.py | 14 ++-- .../logs/models/net_slice_id.py | 8 +- .../logs/models/o_auth_grant_type.py | 5 +- .../logs/models/operation.py | 5 +- .../logs/models/problem_details.py | 11 +-- .../logs/models/protocol.py | 5 +- .../logs/models/security_method.py | 5 +- .../logs/models/snssai.py | 8 +- .../logs/test/__init__.py | 1 - .../logs/test/test_default_controller.py | 8 +- .../TS29222_CAPIF_Auditing_API/logs/util.py | 1 - services/TS29222_CAPIF_Auditing_API/setup.py | 4 +- .../service_apis/app.py | 6 +- .../controllers/default_controller.py | 25 +++---- .../controllers/security_controller.py | 1 - .../service_apis/core/discoveredapis.py | 11 ++- .../service_apis/encoder.py | 1 - .../service_apis/models/__init__.py | 46 ------------ .../service_apis/models/aef_location.py | 9 +-- .../service_apis/models/aef_profile.py | 19 ++--- .../service_apis/models/api_status.py | 5 +- .../service_apis/models/base_model.py | 1 - .../service_apis/models/civic_address.py | 5 +- .../service_apis/models/communication_type.py | 5 +- .../service_apis/models/custom_operation.py | 12 ++- .../service_apis/models/data_format.py | 5 +- .../service_apis/models/discovered_apis.py | 12 ++- .../service_apis/models/ellipsoid_arc.py | 16 ++-- .../service_apis/models/gad_shape.py | 9 +-- .../service_apis/models/geographic_area.py | 35 ++++----- .../models/geographical_coordinates.py | 5 +- .../models/interface_description.py | 12 +-- .../service_apis/models/invalid_param.py | 5 +- .../service_apis/models/ip_addr_info.py | 5 +- .../service_apis/models/ip_addr_range.py | 13 ++-- .../service_apis/models/ipv4_address_range.py | 8 +- .../service_apis/models/ipv6_addr1.py | 5 +- .../service_apis/models/ipv6_address_range.py | 8 +- .../local2d_point_uncertainty_ellipse.py | 21 +++--- .../local3d_point_uncertainty_ellipsoid.py | 21 +++--- .../service_apis/models/local_origin.py | 12 ++- .../service_apis/models/net_slice_id.py | 8 +- .../service_apis/models/o_auth_grant_type.py | 5 +- .../service_apis/models/operation.py | 5 +- .../service_apis/models/point.py | 16 ++-- .../service_apis/models/point_altitude.py | 16 ++-- .../models/point_altitude_uncertainty.py | 20 +++-- .../models/point_uncertainty_circle.py | 16 ++-- .../models/point_uncertainty_ellipse.py | 20 +++-- .../service_apis/models/polygon.py | 16 ++-- .../service_apis/models/problem_details.py | 11 +-- .../service_apis/models/protocol.py | 5 +- .../service_apis/models/published_api_path.py | 5 +- .../models/relative_cartesian_location.py | 5 +- .../service_apis/models/res_oper_info.py | 8 +- .../service_apis/models/resource.py | 13 ++-- .../service_apis/models/security_method.py | 5 +- .../models/service_api_description.py | 21 ++---- .../service_apis/models/service_kpis.py | 8 +- .../models/shareable_information.py | 5 +- .../service_apis/models/snssai.py | 8 +- .../models/supported_gad_shapes.py | 5 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../service_apis/models/version.py | 9 +-- .../service_apis/test/__init__.py | 1 - .../test/test_default_controller.py | 5 +- .../service_apis/util.py | 1 - .../setup.py | 4 +- .../capif_events/app.py | 6 +- ...nts_subscriptions_collection_controller.py | 12 +-- ...events_subscription_document_controller.py | 17 ++--- .../controllers/security_controller.py | 1 - .../capif_events/core/events_apis.py | 15 ++-- .../capif_events/core/notifications.py | 2 +- .../capif_events/encoder.py | 3 +- .../capif_events/models/__init__.py | 73 ------------------- .../models/access_control_policy_list.py | 9 +-- .../models/access_control_policy_list_ext.py | 9 +-- .../capif_events/models/aef_location.py | 9 +-- .../capif_events/models/aef_profile.py | 19 ++--- .../capif_events/models/api_info.py | 5 +- .../capif_events/models/api_invoker_count.py | 5 +- .../capif_events/models/api_invoker_policy.py | 9 +-- .../capif_events/models/api_status.py | 5 +- .../capif_events/models/base_model.py | 1 - .../models/buffered_notifications_action.py | 5 +- .../capif_events/models/capif_event.py | 5 +- .../capif_events/models/capif_event_detail.py | 23 +++--- .../capif_events/models/capif_event_filter.py | 5 +- .../capif_events/models/civic_address.py | 5 +- .../capif_events/models/communication_type.py | 5 +- .../capif_events/models/custom_operation.py | 12 ++- .../capif_events/models/data_format.py | 5 +- .../capif_events/models/discovery_count.py | 5 +- .../capif_events/models/ellipsoid_arc.py | 16 ++-- .../capif_events/models/event_notification.py | 12 ++- .../capif_events/models/event_subscription.py | 23 +++--- .../models/event_subscription_patch.py | 16 ++-- .../capif_events/models/gad_shape.py | 9 +-- .../capif_events/models/geographic_area.py | 35 ++++----- .../models/geographical_coordinates.py | 5 +- .../models/interface_description.py | 12 +-- .../capif_events/models/invalid_param.py | 5 +- .../capif_events/models/invocation_log.py | 11 +-- .../capif_events/models/ip_addr_range.py | 13 ++-- .../capif_events/models/ipv4_address_range.py | 8 +- .../models/ipv4_address_range1.py | 8 +- .../capif_events/models/ipv6_addr1.py | 5 +- .../capif_events/models/ipv6_address_range.py | 5 +- .../models/ipv6_address_range1.py | 8 +- .../local2d_point_uncertainty_ellipse.py | 21 +++--- .../local3d_point_uncertainty_ellipsoid.py | 21 +++--- .../capif_events/models/local_origin.py | 12 ++- .../capif_events/models/log.py | 14 ++-- .../models/muting_exception_instructions.py | 13 ++-- .../models/muting_notifications_settings.py | 5 +- .../capif_events/models/net_slice_id.py | 8 +- .../capif_events/models/notification_flag.py | 5 +- .../models/notification_method.py | 5 +- .../capif_events/models/o_auth_grant_type.py | 5 +- .../models/onboarding_criteria.py | 9 +-- .../capif_events/models/operation.py | 5 +- .../models/partitioning_criteria.py | 5 +- .../capif_events/models/point.py | 16 ++-- .../capif_events/models/point_altitude.py | 16 ++-- .../models/point_altitude_uncertainty.py | 20 +++-- .../models/point_uncertainty_circle.py | 16 ++-- .../models/point_uncertainty_ellipse.py | 20 +++-- .../capif_events/models/polygon.py | 16 ++-- .../capif_events/models/problem_details.py | 11 +-- .../capif_events/models/protocol.py | 5 +- .../capif_events/models/published_api_path.py | 5 +- .../capif_events/models/related_criteria.py | 8 +- .../models/relative_cartesian_location.py | 5 +- .../models/reporting_information.py | 25 +++---- .../capif_events/models/resource.py | 13 ++-- .../capif_events/models/routing_rule.py | 16 ++-- .../capif_events/models/security_method.py | 5 +- .../models/service_api_description.py | 21 ++---- .../capif_events/models/service_kpis.py | 8 +- .../models/shareable_information.py | 5 +- .../capif_events/models/snssai.py | 8 +- .../models/subscription_action.py | 5 +- .../models/supported_gad_shapes.py | 5 +- .../capif_events/models/time_range_list.py | 5 +- .../capif_events/models/topology_hiding.py | 8 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../capif_events/models/version.py | 9 +-- .../models/websock_notif_config.py | 5 +- .../capif_events/test/__init__.py | 3 +- ...nts_subscriptions_collection_controller.py | 6 +- ...events_subscription_document_controller.py | 9 ++- .../capif_events/util.py | 2 +- services/TS29222_CAPIF_Events_API/setup.py | 4 +- .../api_invocation_logs/app.py | 6 +- .../controllers/default_controller.py | 15 ++-- .../controllers/security_controller.py | 1 - .../core/invocationlogs.py | 3 +- .../api_invocation_logs/encoder.py | 3 +- .../api_invocation_logs/models/__init__.py | 11 --- .../api_invocation_logs/models/base_model.py | 1 - .../models/interface_description.py | 16 ++-- .../models/invalid_param.py | 5 +- .../models/invocation_log.py | 11 +-- .../api_invocation_logs/models/log.py | 14 ++-- .../models/net_slice_id.py | 8 +- .../models/o_auth_grant_type.py | 5 +- .../api_invocation_logs/models/operation.py | 5 +- .../models/problem_details.py | 11 +-- .../api_invocation_logs/models/protocol.py | 5 +- .../models/security_method.py | 5 +- .../api_invocation_logs/models/snssai.py | 8 +- .../api_invocation_logs/test/__init__.py | 3 +- .../test/test_default_controller.py | 9 ++- .../api_invocation_logs/util.py | 2 +- .../setup.py | 4 +- .../openapi_server/__main__.py | 1 - .../controllers/default_controller.py | 12 ++- .../controllers/security_controller.py | 1 - .../openapi_server/encoder.py | 1 - .../openapi_server/models/__init__.py | 34 --------- .../openapi_server/models/aef_location.py | 9 +-- .../openapi_server/models/api_status.py | 5 +- .../openapi_server/models/base_model.py | 1 - .../openapi_server/models/civic_address.py | 5 +- .../models/communication_type.py | 5 +- .../openapi_server/models/custom_operation.py | 12 ++- .../openapi_server/models/data_format.py | 5 +- .../openapi_server/models/ellipsoid_arc.py | 16 ++-- .../openapi_server/models/gad_shape.py | 9 +-- .../openapi_server/models/geographic_area.py | 35 ++++----- .../models/geographical_coordinates.py | 5 +- .../openapi_server/models/invalid_param.py | 5 +- .../local2d_point_uncertainty_ellipse.py | 21 +++--- .../local3d_point_uncertainty_ellipsoid.py | 21 +++--- .../openapi_server/models/local_origin.py | 12 ++- .../openapi_server/models/open_aef_profile.py | 12 +-- .../openapi_server/models/open_api_details.py | 12 +-- .../models/open_discovery_resp.py | 11 +-- .../openapi_server/models/operation.py | 5 +- .../openapi_server/models/point.py | 16 ++-- .../openapi_server/models/point_altitude.py | 16 ++-- .../models/point_altitude_uncertainty.py | 20 +++-- .../models/point_uncertainty_circle.py | 16 ++-- .../models/point_uncertainty_ellipse.py | 20 +++-- .../openapi_server/models/polygon.py | 16 ++-- .../openapi_server/models/problem_details.py | 11 +-- .../openapi_server/models/protocol.py | 5 +- .../models/relative_cartesian_location.py | 5 +- .../openapi_server/models/res_oper_info.py | 8 +- .../openapi_server/models/resource.py | 16 ++-- .../openapi_server/models/service_kpis.py | 8 +- .../models/supported_gad_shapes.py | 5 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../openapi_server/models/version.py | 12 ++- .../openapi_server/test/__init__.py | 1 - .../test/test_default_controller.py | 8 +- .../openapi_server/util.py | 1 - .../setup.py | 4 +- .../published_apis/app.py | 6 +- .../controllers/default_controller.py | 19 ++--- ...individual_apf_published_api_controller.py | 3 +- .../controllers/security_controller.py | 1 - .../core/serviceapidescriptions.py | 12 +-- .../published_apis/encoder.py | 1 - .../published_apis/models/__init__.py | 44 ----------- .../published_apis/models/aef_location.py | 9 +-- .../published_apis/models/aef_profile.py | 22 ++---- .../published_apis/models/api_status.py | 5 +- .../published_apis/models/base_model.py | 1 - .../published_apis/models/civic_address.py | 5 +- .../models/communication_type.py | 5 +- .../published_apis/models/custom_operation.py | 12 ++- .../published_apis/models/data_format.py | 5 +- .../published_apis/models/ellipsoid_arc.py | 16 ++-- .../published_apis/models/gad_shape.py | 9 +-- .../published_apis/models/geographic_area.py | 35 ++++----- .../models/geographical_coordinates.py | 5 +- .../models/interface_description.py | 15 ++-- .../published_apis/models/invalid_param.py | 5 +- .../published_apis/models/ip_addr_range.py | 13 ++-- .../models/ipv4_address_range.py | 8 +- .../published_apis/models/ipv6_addr1.py | 5 +- .../models/ipv6_address_range.py | 8 +- .../local2d_point_uncertainty_ellipse.py | 21 +++--- .../local3d_point_uncertainty_ellipsoid.py | 21 +++--- .../published_apis/models/local_origin.py | 12 ++- .../published_apis/models/net_slice_id.py | 8 +- .../models/o_auth_grant_type.py | 5 +- .../published_apis/models/operation.py | 5 +- .../published_apis/models/point.py | 16 ++-- .../published_apis/models/point_altitude.py | 16 ++-- .../models/point_altitude_uncertainty.py | 20 +++-- .../models/point_uncertainty_circle.py | 16 ++-- .../models/point_uncertainty_ellipse.py | 20 +++-- .../published_apis/models/polygon.py | 16 ++-- .../published_apis/models/problem_details.py | 11 +-- .../published_apis/models/protocol.py | 5 +- .../models/published_api_path.py | 5 +- .../models/relative_cartesian_location.py | 5 +- .../published_apis/models/resource.py | 16 ++-- .../published_apis/models/security_method.py | 5 +- .../models/service_api_description.py | 21 ++---- .../models/service_api_description_patch.py | 20 ++--- .../published_apis/models/service_kpis.py | 8 +- .../models/shareable_information.py | 5 +- .../published_apis/models/snssai.py | 8 +- .../models/supported_gad_shapes.py | 5 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../published_apis/models/version.py | 12 ++- .../published_apis/test/__init__.py | 1 - .../test/test_default_controller.py | 4 +- ...individual_apf_published_api_controller.py | 7 +- .../published_apis/util.py | 2 +- .../setup.py | 4 +- .../controllers/default_controller.py | 8 +- .../controllers/security_controller.py | 1 - .../capif_routing_info/encoder.py | 3 +- .../capif_routing_info/models/__init__.py | 41 ----------- .../capif_routing_info/models/aef_location.py | 12 ++- .../capif_routing_info/models/aef_profile.py | 25 +++---- .../capif_routing_info/models/base_model.py | 1 - .../models/civic_address.py | 5 +- .../models/communication_type.py | 5 +- .../models/custom_operation.py | 12 ++- .../capif_routing_info/models/data_format.py | 5 +- .../models/ellipsoid_arc.py | 16 ++-- .../capif_routing_info/models/gad_shape.py | 9 +-- .../models/geographic_area.py | 38 +++++----- .../models/geographical_coordinates.py | 5 +- .../models/interface_description.py | 16 ++-- .../models/invalid_param.py | 5 +- .../models/ip_addr_range.py | 13 ++-- .../models/ipv4_address_range.py | 8 +- .../models/ipv4_address_range1.py | 8 +- .../capif_routing_info/models/ipv6_addr1.py | 5 +- .../models/ipv6_address_range.py | 5 +- .../models/ipv6_address_range1.py | 8 +- .../local2d_point_uncertainty_ellipse.py | 21 +++--- .../local3d_point_uncertainty_ellipsoid.py | 21 +++--- .../capif_routing_info/models/local_origin.py | 13 ++-- .../models/o_auth_grant_type.py | 5 +- .../capif_routing_info/models/operation.py | 5 +- .../capif_routing_info/models/point.py | 16 ++-- .../models/point_altitude.py | 16 ++-- .../models/point_altitude_uncertainty.py | 20 +++-- .../models/point_uncertainty_circle.py | 16 ++-- .../models/point_uncertainty_ellipse.py | 20 +++-- .../capif_routing_info/models/polygon.py | 16 ++-- .../models/problem_details.py | 11 +-- .../capif_routing_info/models/protocol.py | 5 +- .../models/relative_cartesian_location.py | 5 +- .../capif_routing_info/models/resource.py | 16 ++-- .../capif_routing_info/models/routing_info.py | 8 +- .../capif_routing_info/models/routing_rule.py | 16 ++-- .../models/security_method.py | 5 +- .../capif_routing_info/models/service_kpis.py | 8 +- .../models/supported_gad_shapes.py | 5 +- .../models/uncertainty_ellipse.py | 5 +- .../models/uncertainty_ellipsoid.py | 5 +- .../capif_routing_info/models/version.py | 12 ++- .../capif_routing_info/test/__init__.py | 3 +- .../test/test_default_controller.py | 5 +- .../capif_routing_info/util.py | 1 - .../TS29222_CAPIF_Routing_Info_API/setup.py | 4 +- .../capif_security/app.py | 6 +- .../controllers/default_controller.py | 6 +- .../controllers/security_controller.py | 1 - .../capif_security/core/servicesecurity.py | 10 +-- .../capif_security/encoder.py | 2 +- .../capif_security/models/__init__.py | 28 ------- .../models/access_token_claims.py | 8 +- .../capif_security/models/access_token_err.py | 5 +- .../models/access_token_err1.py | 5 +- .../models/access_token_req1.py | 19 ++--- .../capif_security/models/access_token_rsp.py | 5 +- .../capif_security/models/base_model.py | 1 - .../capif_security/models/cause.py | 5 +- .../models/interface_description.py | 15 ++-- .../capif_security/models/invalid_param.py | 5 +- .../capif_security/models/invalid_param1.py | 5 +- .../models/ml_model_inter_ind.py | 8 +- .../capif_security/models/nf_type.py | 5 +- .../models/no_profile_match_info.py | 13 ++-- .../models/no_profile_match_reason.py | 5 +- .../capif_security/models/nwdaf_event.py | 5 +- .../models/o_auth_grant_type.py | 5 +- .../capif_security/models/plmn_id.py | 8 +- .../capif_security/models/plmn_id_nid.py | 8 +- .../capif_security/models/problem_details.py | 11 +-- .../capif_security/models/problem_details1.py | 23 +++--- .../models/query_param_combination.py | 8 +- .../capif_security/models/query_parameter.py | 5 +- .../capif_security/models/res_owner_id.py | 8 +- .../models/security_information.py | 16 ++-- .../capif_security/models/security_method.py | 5 +- .../models/security_notification.py | 8 +- .../capif_security/models/service_security.py | 16 ++-- .../capif_security/models/snssai.py | 8 +- .../models/websock_notif_config.py | 5 +- .../capif_security/test/__init__.py | 3 +- .../test/test_default_controller.py | 9 ++- .../capif_security/util.py | 2 +- services/TS29222_CAPIF_Security_API/setup.py | 4 +- services/celery/tasks.py | 13 ++-- services/helper/helper_service/app.py | 12 +-- services/helper/helper_service/db/db.py | 2 +- .../helper_service/services/api/__main__.py | 1 - .../api/controllers/default_controller.py | 21 +++--- .../api/controllers/security_controller.py | 1 - .../services/api/core/helper_operations.py | 1 + .../helper_service/services/api/encoder.py | 3 +- .../services/api/models/__init__.py | 51 ------------- .../services/api/models/aef_location.py | 9 +-- .../services/api/models/aef_profile.py | 13 +--- .../models/api_invoker_enrolment_details.py | 16 ++-- .../services/api/models/api_list.py | 9 +-- .../models/api_provider_enrolment_details.py | 12 ++- .../api/models/api_provider_func_role.py | 5 +- .../models/api_provider_function_details.py | 12 ++- .../services/api/models/base_model.py | 1 - .../services/api/models/capif_event.py | 5 +- .../services/api/models/capif_event_filter.py | 5 +- .../services/api/models/civic_address.py | 5 +- .../services/api/models/communication_type.py | 5 +- .../services/api/models/custom_operation.py | 9 +-- .../services/api/models/data_format.py | 5 +- .../services/api/models/ellipsoid_arc.py | 13 ++-- .../services/api/models/error_response.py | 5 +- .../services/api/models/event_subscription.py | 14 +--- .../services/api/models/gad_shape.py | 8 +- .../services/api/models/geographic_area.py | 29 +++----- .../api/models/geographical_coordinates.py | 5 +- .../api/models/interface_description.py | 8 +- .../services/api/models/notification_flag.py | 5 +- .../api/models/notification_method.py | 5 +- .../api/models/onboarding_information.py | 5 +- .../services/api/models/operation.py | 5 +- .../api/models/paginated_response_base.py | 5 +- .../api/models/paginated_response_event.py | 8 +- .../api/models/paginated_response_invoker.py | 9 +-- .../api/models/paginated_response_provider.py | 9 +-- .../api/models/paginated_response_security.py | 8 +- .../api/models/paginated_response_service.py | 9 +-- .../api/models/partitioning_criteria.py | 5 +- .../services/api/models/point.py | 13 ++-- .../services/api/models/point_altitude.py | 13 ++-- .../api/models/point_altitude_uncertainty.py | 14 ++-- .../api/models/point_uncertainty_circle.py | 13 ++-- .../api/models/point_uncertainty_ellipse.py | 14 ++-- .../services/api/models/polygon.py | 13 ++-- .../services/api/models/protocol.py | 5 +- .../services/api/models/published_api_path.py | 5 +- .../api/models/registration_information.py | 5 +- .../api/models/reporting_information.py | 10 +-- .../services/api/models/resource.py | 9 +-- .../api/models/security_information.py | 9 +-- .../services/api/models/security_method.py | 5 +- .../api/models/service_api_description.py | 13 +--- .../services/api/models/service_security.py | 12 +-- .../api/models/shareable_information.py | 5 +- .../api/models/supported_gad_shapes.py | 5 +- .../api/models/uncertainty_ellipse.py | 5 +- .../services/api/models/version.py | 9 +-- .../api/models/websock_notif_config.py | 5 +- .../helper_service/services/api/util.py | 1 - .../services/configuration/__main__.py | 1 - .../controllers/default_controller.py | 15 ++-- .../controllers/security_controller.py | 1 - .../core/configuration_operations.py | 16 ++-- .../services/configuration/encoder.py | 3 +- .../services/configuration/models/__init__.py | 8 -- .../configuration/models/base_model.py | 1 - .../models/capif_configuration.py | 8 +- .../models/config_category_create_request.py | 5 +- .../models/config_param_update_request.py | 5 +- .../configuration/models/generic_error.py | 5 +- .../services/configuration/models/settings.py | 17 ++--- .../models/settings_acl_policy_settings.py | 5 +- .../models/settings_certificates_expiry.py | 5 +- .../settings_security_method_priority.py | 5 +- .../services/configuration/util.py | 1 - services/register/register_service/app.py | 3 +- .../core/register_operations.py | 3 +- 565 files changed, 2034 insertions(+), 3344 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py index abe58596..23aa9c0e 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py @@ -14,13 +14,15 @@ from flask_executor import Executor from flask_jwt_extended import JWTManager from fluent import sender from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \ + OTLPSpanExporter from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry.instrumentation.redis import RedisInstrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.trace.propagation.tracecontext import \ + TraceContextTextMapPropagator NAME = "Invoker-Service" diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py index a3a9e746..69c78c3d 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py @@ -1,19 +1,15 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union - from functools import wraps +from api_invoker_management.models.api_invoker_enrolment_details_patch import \ + APIInvokerEnrolmentDetailsPatch # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request from ..core.apiinvokerenrolmentdetails import InvokerManagementOperations from ..core.validate_user import ControlAccess -from ..models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 -from api_invoker_management.models.api_invoker_enrolment_details_patch import \ - APIInvokerEnrolmentDetailsPatch # noqa: E501 +from ..models.api_invoker_enrolment_details import \ + APIInvokerEnrolmentDetails # noqa: E501 invoker_operations = InvokerManagementOperations() valid_user = ControlAccess() diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/on_boarded_api_invokers_collection_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/on_boarded_api_invokers_collection_controller.py index 0dd83f9f..240dc26e 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/on_boarded_api_invokers_collection_controller.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/on_boarded_api_invokers_collection_controller.py @@ -1,17 +1,13 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union - -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 -from api_invoker_management.models.problem_details import ProblemDetails # noqa: E501 -from api_invoker_management import util - -from ..core.apiinvokerenrolmentdetails import InvokerManagementOperations +from api_invoker_management.models.api_invoker_enrolment_details import \ + APIInvokerEnrolmentDetails # noqa: E501 +from api_invoker_management.models.problem_details import \ + ProblemDetails # noqa: E501 from flask import current_app, request from flask_jwt_extended import get_jwt_identity, jwt_required +from ..core.apiinvokerenrolmentdetails import InvokerManagementOperations + invoker_operations = InvokerManagementOperations() @jwt_required() diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller.py index 84b3c466..82c94978 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller.py @@ -1,4 +1,3 @@ -from typing import List def info_from_oAuth2ClientCredentials(token): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/apiinvokerenrolmentdetails.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/apiinvokerenrolmentdetails.py index 7c5f74e0..70e35b85 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/apiinvokerenrolmentdetails.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/apiinvokerenrolmentdetails.py @@ -6,19 +6,20 @@ from datetime import datetime import requests import rfc3987 from api_invoker_management.db.db import MongoDatabse -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails +from api_invoker_management.models.api_invoker_enrolment_details import \ + APIInvokerEnrolmentDetails from flask import Response, current_app from pymongo import ReturnDocument from ..config import Config -from ..util import dict_to_camel_case, serialize_clean_camel_case, clean_empty +from ..util import clean_empty, dict_to_camel_case, serialize_clean_camel_case from .auth_manager import AuthManager from .publisher import Publisher from .redis_event import RedisEvent from .redis_internal_event import RedisInternalEvent from .resources import Resource -from .responses import bad_request_error, forbidden_error, internal_server_error, make_response, not_found_error - +from .responses import (bad_request_error, forbidden_error, + internal_server_error, make_response, not_found_error) TOTAL_FEATURES = 4 SUPPORTED_FEATURES_HEX = "0" diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/encoder.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/encoder.py index 7dd3039e..9c06b11b 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/encoder.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/encoder.py @@ -1,6 +1,5 @@ -from connexion.jsonifier import JSONEncoder - from api_invoker_management.models.base_model import Model +from connexion.jsonifier import JSONEncoder class CustomJSONEncoder(JSONEncoder): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/__init__.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/__init__.py index b6bf8cc3..d036df69 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/__init__.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/__init__.py @@ -1,57 +1,2 @@ # flake8: noqa # import models into model package -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails -from api_invoker_management.models.api_invoker_enrolment_details_patch import APIInvokerEnrolmentDetailsPatch -from api_invoker_management.models.api_list import APIList -from api_invoker_management.models.aef_location import AefLocation -from api_invoker_management.models.aef_profile import AefProfile -from api_invoker_management.models.api_info import ApiInfo -from api_invoker_management.models.api_status import ApiStatus -from api_invoker_management.models.civic_address import CivicAddress -from api_invoker_management.models.communication_type import CommunicationType -from api_invoker_management.models.custom_operation import CustomOperation -from api_invoker_management.models.data_format import DataFormat -from api_invoker_management.models.ellipsoid_arc import EllipsoidArc -from api_invoker_management.models.enrol_fail_cause import EnrolFailCause -from api_invoker_management.models.enrol_fail_reason import EnrolFailReason -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.geographic_area import GeographicArea -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates -from api_invoker_management.models.interface_description import InterfaceDescription -from api_invoker_management.models.invalid_param import InvalidParam -from api_invoker_management.models.ip_addr_range import IpAddrRange -from api_invoker_management.models.ipv4_address_range import Ipv4AddressRange -from api_invoker_management.models.ipv6_addr1 import Ipv6Addr1 -from api_invoker_management.models.ipv6_address_range import Ipv6AddressRange -from api_invoker_management.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse -from api_invoker_management.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid -from api_invoker_management.models.local_origin import LocalOrigin -from api_invoker_management.models.net_slice_id import NetSliceId -from api_invoker_management.models.o_auth_grant_type import OAuthGrantType -from api_invoker_management.models.onboarding_criteria import OnboardingCriteria -from api_invoker_management.models.onboarding_fail_reason import OnboardingFailReason -from api_invoker_management.models.onboarding_information import OnboardingInformation -from api_invoker_management.models.onboarding_notification import OnboardingNotification -from api_invoker_management.models.operation import Operation -from api_invoker_management.models.point import Point -from api_invoker_management.models.point_altitude import PointAltitude -from api_invoker_management.models.point_altitude_uncertainty import PointAltitudeUncertainty -from api_invoker_management.models.point_uncertainty_circle import PointUncertaintyCircle -from api_invoker_management.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from api_invoker_management.models.polygon import Polygon -from api_invoker_management.models.problem_details import ProblemDetails -from api_invoker_management.models.protocol import Protocol -from api_invoker_management.models.published_api_path import PublishedApiPath -from api_invoker_management.models.related_criteria import RelatedCriteria -from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation -from api_invoker_management.models.resource import Resource -from api_invoker_management.models.security_method import SecurityMethod -from api_invoker_management.models.service_api_description import ServiceAPIDescription -from api_invoker_management.models.service_kpis import ServiceKpis -from api_invoker_management.models.shareable_information import ShareableInformation -from api_invoker_management.models.snssai import Snssai -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes -from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse -from api_invoker_management.models.uncertainty_ellipsoid import UncertaintyEllipsoid -from api_invoker_management.models.version import Version -from api_invoker_management.models.websock_notif_config import WebsockNotifConfig diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_location.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_location.py index 226cef2c..5ef2b971 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_location.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_location.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.civic_address import CivicAddress -from api_invoker_management.models.geographic_area import GeographicArea from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.civic_address import \ + CivicAddress # noqa: E501 +from api_invoker_management.models.geographic_area import \ + GeographicArea # noqa: E501 -from api_invoker_management.models.civic_address import CivicAddress # noqa: E501 -from api_invoker_management.models.geographic_area import GeographicArea # noqa: E501 class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_profile.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_profile.py index d650c30b..c2dc56f5 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_profile.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_profile.py @@ -1,29 +1,25 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.aef_location import AefLocation -from api_invoker_management.models.data_format import DataFormat -from api_invoker_management.models.interface_description import InterfaceDescription -from api_invoker_management.models.ip_addr_range import IpAddrRange -from api_invoker_management.models.o_auth_grant_type import OAuthGrantType -from api_invoker_management.models.protocol import Protocol -from api_invoker_management.models.security_method import SecurityMethod -from api_invoker_management.models.service_kpis import ServiceKpis -from api_invoker_management.models.version import Version from api_invoker_management import util - -from api_invoker_management.models.aef_location import AefLocation # noqa: E501 +from api_invoker_management.models.aef_location import \ + AefLocation # noqa: E501 +from api_invoker_management.models.base_model import Model from api_invoker_management.models.data_format import DataFormat # noqa: E501 -from api_invoker_management.models.interface_description import InterfaceDescription # noqa: E501 -from api_invoker_management.models.ip_addr_range import IpAddrRange # noqa: E501 -from api_invoker_management.models.o_auth_grant_type import OAuthGrantType # noqa: E501 +from api_invoker_management.models.interface_description import \ + InterfaceDescription # noqa: E501 +from api_invoker_management.models.ip_addr_range import \ + IpAddrRange # noqa: E501 +from api_invoker_management.models.o_auth_grant_type import \ + OAuthGrantType # noqa: E501 from api_invoker_management.models.protocol import Protocol # noqa: E501 -from api_invoker_management.models.security_method import SecurityMethod # noqa: E501 -from api_invoker_management.models.service_kpis import ServiceKpis # noqa: E501 +from api_invoker_management.models.security_method import \ + SecurityMethod # noqa: E501 +from api_invoker_management.models.service_kpis import \ + ServiceKpis # noqa: E501 from api_invoker_management.models.version import Version # noqa: E501 + class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_info.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_info.py index d22c7d91..ff9729a4 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_info.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_info.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class ApiInfo(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details.py index e80fb47d..0a79b7d6 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details.py @@ -1,20 +1,17 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.api_list import APIList -from api_invoker_management.models.enrol_fail_reason import EnrolFailReason -from api_invoker_management.models.onboarding_information import OnboardingInformation -from api_invoker_management.models.websock_notif_config import WebsockNotifConfig -import re from api_invoker_management import util - from api_invoker_management.models.api_list import APIList # noqa: E501 -from api_invoker_management.models.enrol_fail_reason import EnrolFailReason # noqa: E501 -from api_invoker_management.models.onboarding_information import OnboardingInformation # noqa: E501 -from api_invoker_management.models.websock_notif_config import WebsockNotifConfig # noqa: E501 -import re # noqa: E501 +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.enrol_fail_reason import \ + EnrolFailReason # noqa: E501 +from api_invoker_management.models.onboarding_information import \ + OnboardingInformation # noqa: E501 +from api_invoker_management.models.websock_notif_config import \ + WebsockNotifConfig # noqa: E501 + class APIInvokerEnrolmentDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details_patch.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details_patch.py index 0ac660c7..d1e9ff90 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details_patch.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details_patch.py @@ -1,14 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.api_list import APIList -from api_invoker_management.models.onboarding_information import OnboardingInformation from api_invoker_management import util - from api_invoker_management.models.api_list import APIList # noqa: E501 -from api_invoker_management.models.onboarding_information import OnboardingInformation # noqa: E501 +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.onboarding_information import \ + OnboardingInformation # noqa: E501 + class APIInvokerEnrolmentDetailsPatch(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_list.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_list.py index e071cbb8..d273297b 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_list.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_list.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.service_api_description import ServiceAPIDescription from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.service_api_description import \ + ServiceAPIDescription # noqa: E501 -from api_invoker_management.models.service_api_description import ServiceAPIDescription # noqa: E501 class APIList(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_status.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_status.py index 88a87c78..65e48d05 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_status.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_status.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class ApiStatus(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model.py index 9975e6c9..19dfa2af 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from api_invoker_management import util diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/civic_address.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/civic_address.py index a70b83c3..640aff79 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/civic_address.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/civic_address.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type.py index a09339c5..0f199361 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/custom_operation.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/custom_operation.py index c39874de..d94b6eef 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/custom_operation.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/custom_operation.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.communication_type import CommunicationType -from api_invoker_management.models.operation import Operation from api_invoker_management import util - -from api_invoker_management.models.communication_type import CommunicationType # noqa: E501 +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.communication_type import \ + CommunicationType # noqa: E501 from api_invoker_management.models.operation import Operation # noqa: E501 + class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format.py index 3b5ef198..f6ba60af 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class DataFormat(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py index 48576865..357b57e9 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.gad_shape import GADShape # noqa: E501 -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api_invoker_management.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_cause.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_cause.py index 612a847c..022a61e4 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_cause.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_cause.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class EnrolFailCause(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_reason.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_reason.py index 6acbaab3..5c03f2c9 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_reason.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/enrol_fail_reason.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.enrol_fail_cause import EnrolFailCause from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.enrol_fail_cause import \ + EnrolFailCause # noqa: E501 -from api_invoker_management.models.enrol_fail_cause import EnrolFailCause # noqa: E501 class EnrolFailReason(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/gad_shape.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/gad_shape.py index fdbb7ff5..7be25d45 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/gad_shape.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/gad_shape.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographic_area.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographic_area.py index 11758707..7e69d8f0 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographic_area.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographic_area.py @@ -1,30 +1,27 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.ellipsoid_arc import EllipsoidArc -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates -from api_invoker_management.models.point import Point -from api_invoker_management.models.point_altitude import PointAltitude -from api_invoker_management.models.point_altitude_uncertainty import PointAltitudeUncertainty -from api_invoker_management.models.point_uncertainty_circle import PointUncertaintyCircle -from api_invoker_management.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from api_invoker_management.models.polygon import Polygon -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes -from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse from api_invoker_management import util - -from api_invoker_management.models.ellipsoid_arc import EllipsoidArc # noqa: E501 -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.ellipsoid_arc import \ + EllipsoidArc # noqa: E501 +from api_invoker_management.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from api_invoker_management.models.point import Point # noqa: E501 -from api_invoker_management.models.point_altitude import PointAltitude # noqa: E501 -from api_invoker_management.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 -from api_invoker_management.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 -from api_invoker_management.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from api_invoker_management.models.point_altitude import \ + PointAltitude # noqa: E501 +from api_invoker_management.models.point_altitude_uncertainty import \ + PointAltitudeUncertainty # noqa: E501 +from api_invoker_management.models.point_uncertainty_circle import \ + PointUncertaintyCircle # noqa: E501 +from api_invoker_management.models.point_uncertainty_ellipse import \ + PointUncertaintyEllipse # noqa: E501 from api_invoker_management.models.polygon import Polygon # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from api_invoker_management.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographical_coordinates.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographical_coordinates.py index 1e82fce5..8c660935 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographical_coordinates.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/interface_description.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/interface_description.py index 86301d32..41a4ecc3 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/interface_description.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/interface_description.py @@ -1,16 +1,14 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.o_auth_grant_type import OAuthGrantType -from api_invoker_management.models.security_method import SecurityMethod -import re from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.o_auth_grant_type import \ + OAuthGrantType # noqa: E501 +from api_invoker_management.models.security_method import \ + SecurityMethod # noqa: E501 -from api_invoker_management.models.o_auth_grant_type import OAuthGrantType # noqa: E501 -from api_invoker_management.models.security_method import SecurityMethod # noqa: E501 -import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/invalid_param.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/invalid_param.py index 9fd06e46..20270842 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/invalid_param.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ip_addr_range.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ip_addr_range.py index f831d595..acf63a03 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ip_addr_range.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.ipv4_address_range import Ipv4AddressRange -from api_invoker_management.models.ipv6_address_range import Ipv6AddressRange from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.ipv4_address_range import \ + Ipv4AddressRange # noqa: E501 +from api_invoker_management.models.ipv6_address_range import \ + Ipv6AddressRange # noqa: E501 -from api_invoker_management.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 -from api_invoker_management.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv4_address_range.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv4_address_range.py index bddd1688..822aaa85 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv4_address_range.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -import re from api_invoker_management import util +from api_invoker_management.models.base_model import Model -import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py index ac8e6e66..0d7d43f4 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_address_range.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_address_range.py index 0b461670..9dc04924 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_address_range.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.ipv6_addr1 import Ipv6Addr1 from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 + class Ipv6AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local2d_point_uncertainty_ellipse.py index b68d5903..70a15f8d 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local2d_point_uncertainty_ellipse.py @@ -1,20 +1,18 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.local_origin import LocalOrigin -from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes -from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.gad_shape import GADShape # noqa: E501 -from api_invoker_management.models.local_origin import LocalOrigin # noqa: E501 -from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from api_invoker_management.models.local_origin import \ + LocalOrigin # noqa: E501 +from api_invoker_management.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from api_invoker_management.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py index 1ea64800..83a652b7 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py @@ -1,20 +1,18 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.local_origin import LocalOrigin -from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes -from api_invoker_management.models.uncertainty_ellipsoid import UncertaintyEllipsoid from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.gad_shape import GADShape # noqa: E501 -from api_invoker_management.models.local_origin import LocalOrigin # noqa: E501 -from api_invoker_management.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from api_invoker_management.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 +from api_invoker_management.models.local_origin import \ + LocalOrigin # noqa: E501 +from api_invoker_management.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from api_invoker_management.models.uncertainty_ellipsoid import \ + UncertaintyEllipsoid # noqa: E501 + class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local_origin.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local_origin.py index 1f5eb93a..a1b30e2b 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local_origin.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local_origin.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.geographic_area import GeographicArea -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.geographic_area import \ + GeographicArea # noqa: E501 +from api_invoker_management.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 -from api_invoker_management.models.geographic_area import GeographicArea # noqa: E501 -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/net_slice_id.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/net_slice_id.py index 70691a8e..b385e09b 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/net_slice_id.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/net_slice_id.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.snssai import Snssai from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.snssai import Snssai # noqa: E501 + class NetSliceId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/o_auth_grant_type.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/o_auth_grant_type.py index 3bc3a6f8..a688eb0c 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/o_auth_grant_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_criteria.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_criteria.py index c1a4ff9a..ac56f5fc 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_criteria.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_criteria.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.related_criteria import RelatedCriteria -from api_invoker_management.models.security_method import SecurityMethod from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.related_criteria import \ + RelatedCriteria # noqa: E501 +from api_invoker_management.models.security_method import \ + SecurityMethod # noqa: E501 -from api_invoker_management.models.related_criteria import RelatedCriteria # noqa: E501 -from api_invoker_management.models.security_method import SecurityMethod # noqa: E501 class OnboardingCriteria(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_fail_reason.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_fail_reason.py index b884aba6..72f51607 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_fail_reason.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_fail_reason.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class OnboardingFailReason(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_information.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_information.py index e5b4f50e..596f0471 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_information.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_information.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.onboarding_criteria import OnboardingCriteria from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.onboarding_criteria import \ + OnboardingCriteria # noqa: E501 -from api_invoker_management.models.onboarding_criteria import OnboardingCriteria # noqa: E501 class OnboardingInformation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_notification.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_notification.py index 3b1d06dd..8f5bc502 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_notification.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/onboarding_notification.py @@ -1,14 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails -from api_invoker_management.models.api_list import APIList from api_invoker_management import util - -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 +from api_invoker_management.models.api_invoker_enrolment_details import \ + APIInvokerEnrolmentDetails # noqa: E501 from api_invoker_management.models.api_list import APIList # noqa: E501 +from api_invoker_management.models.base_model import Model + class OnboardingNotification(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation.py index 846011b5..330be5f0 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class Operation(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point.py index 82fa8c78..4169294a 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.gad_shape import GADShape # noqa: E501 -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api_invoker_management.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude.py index 514bfe78..3604bf3f 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.gad_shape import GADShape # noqa: E501 -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api_invoker_management.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude_uncertainty.py index 71170148..7efb07d4 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude_uncertainty.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes -from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.gad_shape import GADShape # noqa: E501 -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from api_invoker_management.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from api_invoker_management.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_circle.py index 2b28dd8f..a6948feb 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_circle.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.gad_shape import GADShape # noqa: E501 -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api_invoker_management.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_ellipse.py index 09c55edb..e69993d8 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_ellipse.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes -from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.gad_shape import GADShape # noqa: E501 -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from api_invoker_management.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from api_invoker_management.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from api_invoker_management.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py index 4b939caf..4ab4dec5 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.gad_shape import GADShape -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.models.gad_shape import GADShape # noqa: E501 -from api_invoker_management.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from api_invoker_management.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api_invoker_management.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from api_invoker_management.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/problem_details.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/problem_details.py index 420db0c1..a520bf77 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/problem_details.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/problem_details.py @@ -1,14 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.invalid_param import InvalidParam -import re from api_invoker_management import util +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.invalid_param import \ + InvalidParam # noqa: E501 -from api_invoker_management.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol.py index efdaa084..9fefc9c7 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class Protocol(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/published_api_path.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/published_api_path.py index 64da80c7..158dca12 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/published_api_path.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/published_api_path.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class PublishedApiPath(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/related_criteria.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/related_criteria.py index 988eb870..2624bc3c 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/related_criteria.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/related_criteria.py @@ -1,12 +1,10 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.api_info import ApiInfo from api_invoker_management import util - from api_invoker_management.models.api_info import ApiInfo # noqa: E501 +from api_invoker_management.models.base_model import Model + class RelatedCriteria(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/relative_cartesian_location.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/relative_cartesian_location.py index 5bdb56a9..82963b5f 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/relative_cartesian_location.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/resource.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/resource.py index b9b047b0..0c970f9f 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/resource.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/resource.py @@ -1,17 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.communication_type import CommunicationType -from api_invoker_management.models.custom_operation import CustomOperation -from api_invoker_management.models.operation import Operation from api_invoker_management import util - -from api_invoker_management.models.communication_type import CommunicationType # noqa: E501 -from api_invoker_management.models.custom_operation import CustomOperation # noqa: E501 +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.communication_type import \ + CommunicationType # noqa: E501 +from api_invoker_management.models.custom_operation import \ + CustomOperation # noqa: E501 from api_invoker_management.models.operation import Operation # noqa: E501 + class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method.py index 0a9e7394..a5937300 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_api_description.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_api_description.py index 185b6270..5c6976bf 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_api_description.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_api_description.py @@ -1,22 +1,17 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.aef_profile import AefProfile -from api_invoker_management.models.api_status import ApiStatus -from api_invoker_management.models.net_slice_id import NetSliceId -from api_invoker_management.models.published_api_path import PublishedApiPath -from api_invoker_management.models.shareable_information import ShareableInformation -import re from api_invoker_management import util - from api_invoker_management.models.aef_profile import AefProfile # noqa: E501 from api_invoker_management.models.api_status import ApiStatus # noqa: E501 +from api_invoker_management.models.base_model import Model from api_invoker_management.models.net_slice_id import NetSliceId # noqa: E501 -from api_invoker_management.models.published_api_path import PublishedApiPath # noqa: E501 -from api_invoker_management.models.shareable_information import ShareableInformation # noqa: E501 -import re # noqa: E501 +from api_invoker_management.models.published_api_path import \ + PublishedApiPath # noqa: E501 +from api_invoker_management.models.shareable_information import \ + ShareableInformation # noqa: E501 + class ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_kpis.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_kpis.py index e17f70fe..9314fcd6 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_kpis.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_kpis.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -import re from api_invoker_management import util +from api_invoker_management.models.base_model import Model -import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/shareable_information.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/shareable_information.py index d5641f6a..042c3fdd 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/shareable_information.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/shareable_information.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class ShareableInformation(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/snssai.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/snssai.py index 595c1c16..d7392ffa 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/snssai.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/snssai.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -import re from api_invoker_management import util +from api_invoker_management.models.base_model import Model -import re # noqa: E501 class Snssai(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py index 5a361e90..1242387f 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipse.py index 6db89075..b5a594eb 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipse.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipsoid.py index 613c6cc8..496846f8 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipsoid.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/version.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/version.py index 46329299..0bbd20f4 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/version.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/version.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model -from api_invoker_management.models.custom_operation import CustomOperation -from api_invoker_management.models.resource import Resource from api_invoker_management import util - -from api_invoker_management.models.custom_operation import CustomOperation # noqa: E501 +from api_invoker_management.models.base_model import Model +from api_invoker_management.models.custom_operation import \ + CustomOperation # noqa: E501 from api_invoker_management.models.resource import Resource # noqa: E501 + class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/websock_notif_config.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/websock_notif_config.py index 4d3f5d7d..1a300a31 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/websock_notif_config.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/websock_notif_config.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invoker_management.models.base_model import Model from api_invoker_management import util +from api_invoker_management.models.base_model import Model class WebsockNotifConfig(Model): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/__init__.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/__init__.py index 6f062ad6..df1dcccb 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/__init__.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/__init__.py @@ -1,9 +1,8 @@ import logging import connexion -from flask_testing import TestCase - from api_invoker_management.encoder import JSONEncoder +from flask_testing import TestCase class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_on_boarded_api_invoker_document_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_on_boarded_api_invoker_document_controller.py index 33ae9397..c116f028 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_on_boarded_api_invoker_document_controller.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_on_boarded_api_invoker_document_controller.py @@ -1,11 +1,13 @@ import unittest -from flask import json - -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 -from api_invoker_management.models.api_invoker_enrolment_details_patch import APIInvokerEnrolmentDetailsPatch # noqa: E501 -from api_invoker_management.models.problem_details import ProblemDetails # noqa: E501 +from api_invoker_management.models.api_invoker_enrolment_details import \ + APIInvokerEnrolmentDetails # noqa: E501 +from api_invoker_management.models.api_invoker_enrolment_details_patch import \ + APIInvokerEnrolmentDetailsPatch # noqa: E501 +from api_invoker_management.models.problem_details import \ + ProblemDetails # noqa: E501 from api_invoker_management.test import BaseTestCase +from flask import json class TestIndividualOnBoardedAPIInvokerDocumentController(BaseTestCase): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_on_boarded_api_invokers_collection_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_on_boarded_api_invokers_collection_controller.py index cb2bdf1b..e08acb37 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_on_boarded_api_invokers_collection_controller.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_on_boarded_api_invokers_collection_controller.py @@ -1,10 +1,11 @@ import unittest -from flask import json - -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 -from api_invoker_management.models.problem_details import ProblemDetails # noqa: E501 +from api_invoker_management.models.api_invoker_enrolment_details import \ + APIInvokerEnrolmentDetails # noqa: E501 +from api_invoker_management.models.problem_details import \ + ProblemDetails # noqa: E501 from api_invoker_management.test import BaseTestCase +from flask import json class TestOnBoardedAPIInvokersCollectionController(BaseTestCase): diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/util.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/util.py index 2b6fca6c..cf911e58 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/util.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/util.py @@ -1,8 +1,8 @@ import datetime -import typing from api_invoker_management import typing_utils + def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py b/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py index 192325be..338aabe7 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "api_invoker_management" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py index c4b33c57..82081f83 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py @@ -9,13 +9,15 @@ import connexion from flask_jwt_extended import JWTManager from fluent import sender from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \ + OTLPSpanExporter from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry.instrumentation.redis import RedisInstrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.trace.propagation.tracecontext import \ + TraceContextTextMapPropagator from .config import Config diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py index 08a0ba7c..4a58db7f 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py @@ -1,14 +1,9 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union - -from api_provider_management.models.problem_details import ProblemDetails # noqa: E501 -from api_provider_management import util - from functools import wraps -from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 +from api_provider_management.models.api_provider_enrolment_details import \ + APIProviderEnrolmentDetails # noqa: E501 +from api_provider_management.models.problem_details import \ + ProblemDetails # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request @@ -17,7 +12,6 @@ from flask_jwt_extended import get_jwt_identity, jwt_required from ..core.provider_enrolment_details_api import ProviderManagementOperations from ..core.validate_user import ControlAccess - provider_management_ops = ProviderManagementOperations() valid_user = ControlAccess() diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py index 10a716a2..cc23f5ed 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py @@ -1,17 +1,15 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union - -from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 -from api_provider_management.models.api_provider_enrolment_details_patch import APIProviderEnrolmentDetailsPatch # noqa: E501 -from api_provider_management.models.problem_details import ProblemDetails # noqa: E501 -from api_provider_management import util +from api_provider_management.models.api_provider_enrolment_details import \ + APIProviderEnrolmentDetails # noqa: E501 +from api_provider_management.models.api_provider_enrolment_details_patch import \ + APIProviderEnrolmentDetailsPatch # noqa: E501 +from api_provider_management.models.problem_details import \ + ProblemDetails # noqa: E501 from flask import current_app, request from ..core.provider_enrolment_details_api import ProviderManagementOperations -from ..models.api_provider_enrolment_details_patch import APIProviderEnrolmentDetailsPatch # noqa: E501 +from ..models.api_provider_enrolment_details_patch import \ + APIProviderEnrolmentDetailsPatch # noqa: E501 provider_management_ops = ProviderManagementOperations() diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/provider_enrolment_details_api.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/provider_enrolment_details_api.py index ac19a496..f6db1b7b 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/provider_enrolment_details_api.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/provider_enrolment_details_api.py @@ -3,7 +3,8 @@ import os import secrets from datetime import datetime -from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 +from api_provider_management.models.api_provider_enrolment_details import \ + APIProviderEnrolmentDetails # noqa: E501 from flask import Response, current_app from pymongo import ReturnDocument @@ -12,7 +13,8 @@ from ..util import clean_empty, dict_to_camel_case, serialize_clean_camel_case from .auth_manager import AuthManager from .redis_internal_event import RedisInternalEvent from .resources import Resource -from .responses import bad_request_error, forbidden_error, internal_server_error, make_response, not_found_error +from .responses import (bad_request_error, forbidden_error, + internal_server_error, make_response, not_found_error) TOTAL_FEATURES = 2 SUPPORTED_FEATURES_HEX = "0" diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py index 5b73b33b..c277ef44 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/encoder.py @@ -1,6 +1,5 @@ -from connexion.jsonifier import JSONEncoder - from api_provider_management.models.base_model import Model +from connexion.jsonifier import JSONEncoder class CustomJSONEncoder(JSONEncoder): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/__init__.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/__init__.py index 5ad7c47a..d036df69 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/__init__.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/__init__.py @@ -1,9 +1,2 @@ # flake8: noqa # import models into model package -from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails -from api_provider_management.models.api_provider_enrolment_details_patch import APIProviderEnrolmentDetailsPatch -from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails -from api_provider_management.models.api_provider_func_role import ApiProviderFuncRole -from api_provider_management.models.invalid_param import InvalidParam -from api_provider_management.models.problem_details import ProblemDetails -from api_provider_management.models.registration_information import RegistrationInformation diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details.py index da7fb6da..8985bcb4 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details.py @@ -1,14 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_provider_management.models.base_model import Model -from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails -import re from api_provider_management import util +from api_provider_management.models.api_provider_function_details import \ + APIProviderFunctionDetails # noqa: E501 +from api_provider_management.models.base_model import Model -from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails # noqa: E501 -import re # noqa: E501 class APIProviderEnrolmentDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details_patch.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details_patch.py index e16230b9..e72d2387 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details_patch.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_enrolment_details_patch.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_provider_management.models.base_model import Model -from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails from api_provider_management import util +from api_provider_management.models.api_provider_function_details import \ + APIProviderFunctionDetails # noqa: E501 +from api_provider_management.models.base_model import Model -from api_provider_management.models.api_provider_function_details import APIProviderFunctionDetails # noqa: E501 class APIProviderEnrolmentDetailsPatch(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role.py index 7f3bb0f7..78d95461 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_provider_management.models.base_model import Model from api_provider_management import util +from api_provider_management.models.base_model import Model class ApiProviderFuncRole(Model): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_function_details.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_function_details.py index d6989b1a..deab5105 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_function_details.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_function_details.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_provider_management.models.base_model import Model -from api_provider_management.models.api_provider_func_role import ApiProviderFuncRole -from api_provider_management.models.registration_information import RegistrationInformation from api_provider_management import util +from api_provider_management.models.api_provider_func_role import \ + ApiProviderFuncRole # noqa: E501 +from api_provider_management.models.base_model import Model +from api_provider_management.models.registration_information import \ + RegistrationInformation # noqa: E501 -from api_provider_management.models.api_provider_func_role import ApiProviderFuncRole # noqa: E501 -from api_provider_management.models.registration_information import RegistrationInformation # noqa: E501 class APIProviderFunctionDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model.py index 4fd1d5c7..621b8c7d 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from api_provider_management import util diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/invalid_param.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/invalid_param.py index 003aa181..cb682f81 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/invalid_param.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_provider_management.models.base_model import Model from api_provider_management import util +from api_provider_management.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/problem_details.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/problem_details.py index 7b4a267d..c02158a1 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/problem_details.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/problem_details.py @@ -1,14 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_provider_management.models.base_model import Model -from api_provider_management.models.invalid_param import InvalidParam -import re from api_provider_management import util +from api_provider_management.models.base_model import Model +from api_provider_management.models.invalid_param import \ + InvalidParam # noqa: E501 -from api_provider_management.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/registration_information.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/registration_information.py index 3e4d440c..737b0994 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/registration_information.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/registration_information.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_provider_management.models.base_model import Model from api_provider_management import util +from api_provider_management.models.base_model import Model class RegistrationInformation(Model): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/__init__.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/__init__.py index 9853918d..7be5050e 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/__init__.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/__init__.py @@ -1,9 +1,8 @@ import logging import connexion -from flask_testing import TestCase - from api_provider_management.encoder import JSONEncoder +from flask_testing import TestCase class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_default_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_default_controller.py index 2b12ff85..8d2246ad 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_default_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_default_controller.py @@ -1,10 +1,11 @@ import unittest -from flask import json - -from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 -from api_provider_management.models.problem_details import ProblemDetails # noqa: E501 +from api_provider_management.models.api_provider_enrolment_details import \ + APIProviderEnrolmentDetails # noqa: E501 +from api_provider_management.models.problem_details import \ + ProblemDetails # noqa: E501 from api_provider_management.test import BaseTestCase +from flask import json class TestDefaultController(BaseTestCase): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py index 463aa435..b985f99b 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py @@ -1,11 +1,13 @@ import unittest -from flask import json - -from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 -from api_provider_management.models.api_provider_enrolment_details_patch import APIProviderEnrolmentDetailsPatch # noqa: E501 -from api_provider_management.models.problem_details import ProblemDetails # noqa: E501 +from api_provider_management.models.api_provider_enrolment_details import \ + APIProviderEnrolmentDetails # noqa: E501 +from api_provider_management.models.api_provider_enrolment_details_patch import \ + APIProviderEnrolmentDetailsPatch # noqa: E501 +from api_provider_management.models.problem_details import \ + ProblemDetails # noqa: E501 from api_provider_management.test import BaseTestCase +from flask import json class TestIndividualAPIProviderEnrolmentDetailsController(BaseTestCase): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/util.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/util.py index cddcd374..f4f15bc5 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/util.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/util.py @@ -1,6 +1,5 @@ import datetime -import typing from api_provider_management import typing_utils diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/setup.py b/services/TS29222_CAPIF_API_Provider_Management_API/setup.py index 9eba8bdd..0a27afc7 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/setup.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "api_provider_management" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/app.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/app.py index 0841c2d2..bb3dc3f3 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/app.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/app.py @@ -14,13 +14,15 @@ from flask_executor import Executor from flask_jwt_extended import JWTManager from fluent import sender from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \ + OTLPSpanExporter from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry.instrumentation.redis import RedisInstrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.trace.propagation.tracecontext import \ + TraceContextTextMapPropagator NAME = "Acl-Service" diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py index 0dda71fa..256c17d8 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py @@ -1,14 +1,8 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union - -from capif_acl.models.access_control_policy_list import AccessControlPolicyList # noqa: E501 -from capif_acl.models.problem_details import ProblemDetails # noqa: E501 -from capif_acl import util - from functools import wraps +from capif_acl.models.access_control_policy_list import \ + AccessControlPolicyList # noqa: E501 +from capif_acl.models.problem_details import ProblemDetails # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/encoder.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/encoder.py index ac47112c..9afbbe1d 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/encoder.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/encoder.py @@ -1,6 +1,5 @@ -from connexion.jsonifier import JSONEncoder - from capif_acl.models.base_model import Model +from connexion.jsonifier import JSONEncoder class CustomJSONEncoder(JSONEncoder): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/__init__.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/__init__.py index 42d3cf58..d036df69 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/__init__.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/__init__.py @@ -1,9 +1,2 @@ # flake8: noqa # import models into model package -from capif_acl.models.access_control_policy_list import AccessControlPolicyList -from capif_acl.models.api_invoker_policy import ApiInvokerPolicy -from capif_acl.models.invalid_param import InvalidParam -from capif_acl.models.net_slice_id import NetSliceId -from capif_acl.models.problem_details import ProblemDetails -from capif_acl.models.snssai import Snssai -from capif_acl.models.time_range_list import TimeRangeList diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/access_control_policy_list.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/access_control_policy_list.py index a851ac32..19dea5dc 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/access_control_policy_list.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/access_control_policy_list.py @@ -1,12 +1,10 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_acl.models.base_model import Model -from capif_acl.models.api_invoker_policy import ApiInvokerPolicy from capif_acl import util - from capif_acl.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 +from capif_acl.models.base_model import Model + class AccessControlPolicyList(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/api_invoker_policy.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/api_invoker_policy.py index b7172cc4..456a6925 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/api_invoker_policy.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/api_invoker_policy.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_acl.models.base_model import Model -from capif_acl.models.net_slice_id import NetSliceId -from capif_acl.models.time_range_list import TimeRangeList from capif_acl import util - +from capif_acl.models.base_model import Model from capif_acl.models.net_slice_id import NetSliceId # noqa: E501 from capif_acl.models.time_range_list import TimeRangeList # noqa: E501 + class ApiInvokerPolicy(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model.py index fed13c90..2e2e14aa 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from capif_acl import util diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/invalid_param.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/invalid_param.py index a6789dc2..b94db8da 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/invalid_param.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_acl.models.base_model import Model from capif_acl import util +from capif_acl.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/net_slice_id.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/net_slice_id.py index ceb03573..47db47d3 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/net_slice_id.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/net_slice_id.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_acl.models.base_model import Model -from capif_acl.models.snssai import Snssai from capif_acl import util - +from capif_acl.models.base_model import Model from capif_acl.models.snssai import Snssai # noqa: E501 + class NetSliceId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/problem_details.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/problem_details.py index 8473fc2b..bf02e50e 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/problem_details.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/problem_details.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_acl.models.base_model import Model -from capif_acl.models.invalid_param import InvalidParam -import re from capif_acl import util - +from capif_acl.models.base_model import Model from capif_acl.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/snssai.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/snssai.py index 07efac3b..357adbbd 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/snssai.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/snssai.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_acl.models.base_model import Model -import re from capif_acl import util +from capif_acl.models.base_model import Model -import re # noqa: E501 class Snssai(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/time_range_list.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/time_range_list.py index b9c47240..71f38cfc 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/time_range_list.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/time_range_list.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_acl.models.base_model import Model from capif_acl import util +from capif_acl.models.base_model import Model class TimeRangeList(Model): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/__init__.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/__init__.py index 5d664f82..f70a615e 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/__init__.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/__init__.py @@ -1,9 +1,8 @@ import logging import connexion -from flask_testing import TestCase - from capif_acl.encoder import JSONEncoder +from flask_testing import TestCase class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/test_default_controller.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/test_default_controller.py index d2f9a54a..c4d64195 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/test/test_default_controller.py @@ -1,8 +1,7 @@ import unittest -from flask import json - -from capif_acl.models.access_control_policy_list import AccessControlPolicyList # noqa: E501 +from capif_acl.models.access_control_policy_list import \ + AccessControlPolicyList # noqa: E501 from capif_acl.models.problem_details import ProblemDetails # noqa: E501 from capif_acl.test import BaseTestCase diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/util.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/util.py index 4cbc3489..9fc4382f 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/util.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/util.py @@ -1,8 +1,8 @@ import datetime -import typing from capif_acl import typing_utils + def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py b/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py index 53e0880a..77f4fffb 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "capif_acl" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_Auditing_API/logs/app.py b/services/TS29222_CAPIF_Auditing_API/logs/app.py index 83fd706e..803b3cb3 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/app.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/app.py @@ -9,12 +9,14 @@ import encoder from config import Config from fluent import sender from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \ + OTLPSpanExporter from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.trace.propagation.tracecontext import \ + TraceContextTextMapPropagator NAME = "Logs-Service" diff --git a/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py b/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py index fa039fba..acf154aa 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py @@ -1,22 +1,17 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union - -from logs.models.invocation_logs_retrieve_res import InvocationLogsRetrieveRes # noqa: E501 -from logs.models.net_slice_id import NetSliceId # noqa: E501 -from logs.models.operation import Operation # noqa: E501 -from logs.models.problem_details import ProblemDetails # noqa: E501 -from logs import util +from functools import wraps +from cryptography import x509 +from cryptography.hazmat.backends import default_backend from flask import current_app, request from logs import util -from logs.models.interface_description import InterfaceDescription # noqa: E501 +from logs.models.interface_description import \ + InterfaceDescription # noqa: E501 +from logs.models.invocation_logs_retrieve_res import \ + InvocationLogsRetrieveRes # noqa: E501 +from logs.models.net_slice_id import NetSliceId # noqa: E501 from logs.models.operation import Operation # noqa: E501 +from logs.models.problem_details import ProblemDetails # noqa: E501 from logs.models.protocol import Protocol # noqa: E501 -from functools import wraps -from cryptography import x509 -from cryptography.hazmat.backends import default_backend from ..core.auditoperations import AuditOperations from ..core.responses import bad_request_error @@ -31,7 +26,7 @@ def cert_validation(): @wraps(f) def __cert_validation(*args, **kwargs): - args = request.view_args + request.view_args cert_tmp = request.headers['X-Ssl-Client-Cert'] cert_raw = cert_tmp.replace('\t', '') diff --git a/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py b/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_Auditing_API/logs/core/auditoperations.py b/services/TS29222_CAPIF_Auditing_API/logs/core/auditoperations.py index 6d41cf70..101cbb6a 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/core/auditoperations.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/core/auditoperations.py @@ -6,8 +6,8 @@ from flask import current_app from ..models.invocation_log import InvocationLog from ..util import serialize_clean_camel_case from .resources import Resource -from .responses import bad_request_error, internal_server_error, make_response, not_found_error - +from .responses import (bad_request_error, internal_server_error, + make_response, not_found_error) TOTAL_FEATURES = 2 SUPPORTED_FEATURES_HEX = "1" diff --git a/services/TS29222_CAPIF_Auditing_API/logs/encoder.py b/services/TS29222_CAPIF_Auditing_API/logs/encoder.py index a6803052..763c2b5c 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/encoder.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/encoder.py @@ -1,5 +1,4 @@ from connexion.jsonifier import JSONEncoder - from logs.models.base_model import Model diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py b/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py index c1fbd00c..d036df69 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py @@ -1,15 +1,2 @@ # flake8: noqa # import models into model package -from logs.models.interface_description import InterfaceDescription -from logs.models.invalid_param import InvalidParam -from logs.models.invocation_log import InvocationLog -from logs.models.invocation_logs import InvocationLogs -from logs.models.invocation_logs_retrieve_res import InvocationLogsRetrieveRes -from logs.models.log import Log -from logs.models.net_slice_id import NetSliceId -from logs.models.o_auth_grant_type import OAuthGrantType -from logs.models.operation import Operation -from logs.models.problem_details import ProblemDetails -from logs.models.protocol import Protocol -from logs.models.security_method import SecurityMethod -from logs.models.snssai import Snssai diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py b/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py index 56493bbf..16381a1d 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from logs import util diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py b/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py index b2302306..2a92e75c 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py @@ -1,16 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model -from logs.models.o_auth_grant_type import OAuthGrantType -from logs.models.security_method import SecurityMethod -import re from logs import util - +from logs.models.base_model import Model from logs.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from logs.models.security_method import SecurityMethod # noqa: E501 -import re # noqa: E501 + class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py index 7da75a55..bafe0905 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model from logs import util +from logs.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py index 26d42ad5..bf5c2ee2 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model -from logs.models.log import Log -import re from logs import util - +from logs.models.base_model import Model from logs.models.log import Log # noqa: E501 -import re # noqa: E501 + class InvocationLog(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py index f1ed39c0..55c37648 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model -from logs.models.invocation_log import InvocationLog -import re from logs import util - +from logs.models.base_model import Model from logs.models.invocation_log import InvocationLog # noqa: E501 -import re # noqa: E501 + class InvocationLogs(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py index 4ebdec7c..07455f47 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py @@ -1,18 +1,13 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model -from logs.models.invocation_log import InvocationLog -from logs.models.invocation_logs import InvocationLogs -from logs.models.log import Log -import re from logs import util - +from logs.models.base_model import Model from logs.models.invocation_log import InvocationLog # noqa: E501 from logs.models.invocation_logs import InvocationLogs # noqa: E501 from logs.models.log import Log # noqa: E501 -import re # noqa: E501 + class InvocationLogsRetrieveRes(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/log.py b/services/TS29222_CAPIF_Auditing_API/logs/models/log.py index f6096ffe..719cbb5a 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/log.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/log.py @@ -1,19 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model -from logs.models.interface_description import InterfaceDescription -from logs.models.net_slice_id import NetSliceId -from logs.models.operation import Operation -from logs.models.protocol import Protocol from logs import util - -from logs.models.interface_description import InterfaceDescription # noqa: E501 +from logs.models.base_model import Model +from logs.models.interface_description import \ + InterfaceDescription # noqa: E501 from logs.models.net_slice_id import NetSliceId # noqa: E501 from logs.models.operation import Operation # noqa: E501 from logs.models.protocol import Protocol # noqa: E501 + class Log(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/net_slice_id.py b/services/TS29222_CAPIF_Auditing_API/logs/models/net_slice_id.py index 110e4cca..2db6ba6c 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/net_slice_id.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/net_slice_id.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model -from logs.models.snssai import Snssai from logs import util - +from logs.models.base_model import Model from logs.models.snssai import Snssai # noqa: E501 + class NetSliceId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Auditing_API/logs/models/o_auth_grant_type.py index 280b8ef7..57b4bf4e 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/o_auth_grant_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model from logs import util +from logs.models.base_model import Model class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py b/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py index a8efafdc..cf35e30e 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model from logs import util +from logs.models.base_model import Model class Operation(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py b/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py index 2a77eb97..c074f0e5 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model -from logs.models.invalid_param import InvalidParam -import re from logs import util - +from logs.models.base_model import Model from logs.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py b/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py index 989d9e4c..e2b23e6b 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model from logs import util +from logs.models.base_model import Model class Protocol(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py b/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py index b32bbf5b..9091c514 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model from logs import util +from logs.models.base_model import Model class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/snssai.py b/services/TS29222_CAPIF_Auditing_API/logs/models/snssai.py index d2a6f644..9fa77af6 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/snssai.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/snssai.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from logs.models.base_model import Model -import re from logs import util +from logs.models.base_model import Model -import re # noqa: E501 class Snssai(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py b/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py index a3e8ced6..9209767d 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py @@ -2,7 +2,6 @@ import logging import connexion from flask_testing import TestCase - from logs.encoder import JSONEncoder diff --git a/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py b/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py index 54565a14..03d06435 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py @@ -1,9 +1,9 @@ import unittest -from flask import json - -from logs.models.interface_description import InterfaceDescription # noqa: E501 -from logs.models.invocation_logs_retrieve_res import InvocationLogsRetrieveRes # noqa: E501 +from logs.models.interface_description import \ + InterfaceDescription # noqa: E501 +from logs.models.invocation_logs_retrieve_res import \ + InvocationLogsRetrieveRes # noqa: E501 from logs.models.net_slice_id import NetSliceId # noqa: E501 from logs.models.operation import Operation # noqa: E501 from logs.models.problem_details import ProblemDetails # noqa: E501 diff --git a/services/TS29222_CAPIF_Auditing_API/logs/util.py b/services/TS29222_CAPIF_Auditing_API/logs/util.py index f6331d11..47a58118 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/util.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/util.py @@ -1,6 +1,5 @@ import datetime -import typing from logs import typing_utils diff --git a/services/TS29222_CAPIF_Auditing_API/setup.py b/services/TS29222_CAPIF_Auditing_API/setup.py index 1e3093b2..ec28305f 100644 --- a/services/TS29222_CAPIF_Auditing_API/setup.py +++ b/services/TS29222_CAPIF_Auditing_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "logs" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/app.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/app.py index f84d1844..cf7e6098 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/app.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/app.py @@ -10,13 +10,15 @@ from config import Config from flask_jwt_extended import JWTManager from fluent import sender from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \ + OTLPSpanExporter from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry.instrumentation.redis import RedisInstrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.trace.propagation.tracecontext import \ + TraceContextTextMapPropagator NAME = "Discover-Service" diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py index 3fa70732..a9c52362 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py @@ -1,10 +1,12 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union +import json +from functools import wraps +from cryptography import x509 +from cryptography.hazmat.backends import default_backend +from flask import current_app, request from service_apis.models.aef_location import AefLocation # noqa: E501 -from service_apis.models.communication_type import CommunicationType # noqa: E501 +from service_apis.models.communication_type import \ + CommunicationType # noqa: E501 from service_apis.models.data_format import DataFormat # noqa: E501 from service_apis.models.discovered_apis import DiscoveredAPIs # noqa: E501 from service_apis.models.ip_addr_info import IpAddrInfo # noqa: E501 @@ -14,16 +16,9 @@ from service_apis.models.problem_details import ProblemDetails # noqa: E501 from service_apis.models.protocol import Protocol # noqa: E501 from service_apis.models.res_oper_info import ResOperInfo # noqa: E501 from service_apis.models.service_kpis import ServiceKpis # noqa: E501 -from service_apis import util - -import json -from functools import wraps -from cryptography import x509 -from cryptography.hazmat.backends import default_backend -from flask import current_app, request -from service_apis.models.discovered_apis import DiscoveredAPIs # noqa: E501 -from ..core.discoveredapis import DiscoverApisOperations, return_negotiated_supp_feat_dict +from ..core.discoveredapis import (DiscoverApisOperations, + return_negotiated_supp_feat_dict) from ..core.validate_user import ControlAccess discover_apis = DiscoverApisOperations() @@ -34,7 +29,7 @@ def cert_validation(): @wraps(f) def __cert_validation(*args, **kwargs): - args = request.view_args + request.view_args cert_tmp = request.headers['X-Ssl-Client-Cert'] cert_raw = cert_tmp.replace('\t', '') diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/discoveredapis.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/discoveredapis.py index 394bad68..6f9b0651 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/discoveredapis.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/discoveredapis.py @@ -4,14 +4,13 @@ import json from flask import current_app from ..core.resources import Resource -from ..core.responses import internal_server_error, make_response, not_found_error +from ..core.responses import (internal_server_error, make_response, + not_found_error) from ..models.discovered_apis import DiscoveredAPIs from ..util import serialize_clean_camel_case -from ..vendor_specific import ( - filter_apis_with_vendor_specific_params, - find_attribute_in_body, - remove_vendor_specific_fields -) +from ..vendor_specific import (filter_apis_with_vendor_specific_params, + find_attribute_in_body, + remove_vendor_specific_fields) TOTAL_FEATURES = 4 SUPPORTED_FEATURES_HEX = "2" diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py index c741e68b..26d33408 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py @@ -1,5 +1,4 @@ from connexion.jsonifier import JSONEncoder - from service_apis.models.base_model import Model diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/__init__.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/__init__.py index c9dd75e1..d036df69 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/__init__.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/__init__.py @@ -1,48 +1,2 @@ # flake8: noqa # import models into model package -from service_apis.models.aef_location import AefLocation -from service_apis.models.aef_profile import AefProfile -from service_apis.models.api_status import ApiStatus -from service_apis.models.civic_address import CivicAddress -from service_apis.models.communication_type import CommunicationType -from service_apis.models.custom_operation import CustomOperation -from service_apis.models.data_format import DataFormat -from service_apis.models.discovered_apis import DiscoveredAPIs -from service_apis.models.ellipsoid_arc import EllipsoidArc -from service_apis.models.gad_shape import GADShape -from service_apis.models.geographic_area import GeographicArea -from service_apis.models.geographical_coordinates import GeographicalCoordinates -from service_apis.models.interface_description import InterfaceDescription -from service_apis.models.invalid_param import InvalidParam -from service_apis.models.ip_addr_info import IpAddrInfo -from service_apis.models.ip_addr_range import IpAddrRange -from service_apis.models.ipv4_address_range import Ipv4AddressRange -from service_apis.models.ipv6_addr1 import Ipv6Addr1 -from service_apis.models.ipv6_address_range import Ipv6AddressRange -from service_apis.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse -from service_apis.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid -from service_apis.models.local_origin import LocalOrigin -from service_apis.models.net_slice_id import NetSliceId -from service_apis.models.o_auth_grant_type import OAuthGrantType -from service_apis.models.operation import Operation -from service_apis.models.point import Point -from service_apis.models.point_altitude import PointAltitude -from service_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty -from service_apis.models.point_uncertainty_circle import PointUncertaintyCircle -from service_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from service_apis.models.polygon import Polygon -from service_apis.models.problem_details import ProblemDetails -from service_apis.models.protocol import Protocol -from service_apis.models.published_api_path import PublishedApiPath -from service_apis.models.relative_cartesian_location import RelativeCartesianLocation -from service_apis.models.res_oper_info import ResOperInfo -from service_apis.models.resource import Resource -from service_apis.models.security_method import SecurityMethod -from service_apis.models.service_api_description import ServiceAPIDescription -from service_apis.models.service_kpis import ServiceKpis -from service_apis.models.shareable_information import ShareableInformation -from service_apis.models.snssai import Snssai -from service_apis.models.supported_gad_shapes import SupportedGADShapes -from service_apis.models.uncertainty_ellipse import UncertaintyEllipse -from service_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid -from service_apis.models.version import Version diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_location.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_location.py index 25fe56a3..bbceaa45 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_location.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_location.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.civic_address import CivicAddress -from service_apis.models.geographic_area import GeographicArea from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.civic_address import CivicAddress # noqa: E501 from service_apis.models.geographic_area import GeographicArea # noqa: E501 + class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_profile.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_profile.py index 78ff868a..ce8f77fc 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_profile.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_profile.py @@ -1,22 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.aef_location import AefLocation -from service_apis.models.data_format import DataFormat -from service_apis.models.interface_description import InterfaceDescription -from service_apis.models.ip_addr_range import IpAddrRange -from service_apis.models.o_auth_grant_type import OAuthGrantType -from service_apis.models.protocol import Protocol -from service_apis.models.security_method import SecurityMethod -from service_apis.models.service_kpis import ServiceKpis -from service_apis.models.version import Version from service_apis import util - from service_apis.models.aef_location import AefLocation # noqa: E501 +from service_apis.models.base_model import Model from service_apis.models.data_format import DataFormat # noqa: E501 -from service_apis.models.interface_description import InterfaceDescription # noqa: E501 +from service_apis.models.interface_description import \ + InterfaceDescription # noqa: E501 from service_apis.models.ip_addr_range import IpAddrRange # noqa: E501 from service_apis.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from service_apis.models.protocol import Protocol # noqa: E501 @@ -24,6 +14,7 @@ from service_apis.models.security_method import SecurityMethod # noqa: E501 from service_apis.models.service_kpis import ServiceKpis # noqa: E501 from service_apis.models.version import Version # noqa: E501 + class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py index 2478315c..35dcbf45 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class ApiStatus(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py index 7951efc4..a083ea94 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from service_apis import util diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/civic_address.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/civic_address.py index 67c1a70f..7314bca7 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/civic_address.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/civic_address.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type.py index 04b99a70..ea17cb87 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/custom_operation.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/custom_operation.py index b98c3dc9..0b02df25 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/custom_operation.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/custom_operation.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.communication_type import CommunicationType -from service_apis.models.operation import Operation from service_apis import util - -from service_apis.models.communication_type import CommunicationType # noqa: E501 +from service_apis.models.base_model import Model +from service_apis.models.communication_type import \ + CommunicationType # noqa: E501 from service_apis.models.operation import Operation # noqa: E501 + class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format.py index 875a9539..7575f306 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class DataFormat(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/discovered_apis.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/discovered_apis.py index 36a7889a..3930043c 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/discovered_apis.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/discovered_apis.py @@ -1,14 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.service_api_description import ServiceAPIDescription -import re from service_apis import util +from service_apis.models.base_model import Model +from service_apis.models.service_api_description import \ + ServiceAPIDescription # noqa: E501 -from service_apis.models.service_api_description import ServiceAPIDescription # noqa: E501 -import re # noqa: E501 class DiscoveredAPIs(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ellipsoid_arc.py index 9f6206bc..f939dce4 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ellipsoid_arc.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.gad_shape import GADShape -from service_apis.models.geographical_coordinates import GeographicalCoordinates -from service_apis.models.supported_gad_shapes import SupportedGADShapes from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.gad_shape import GADShape # noqa: E501 -from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from service_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py index 21e0ee19..a7054432 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.supported_gad_shapes import SupportedGADShapes from service_apis import util +from service_apis.models.base_model import Model +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py index dafc9960..48e1523e 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py @@ -1,30 +1,25 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.ellipsoid_arc import EllipsoidArc -from service_apis.models.geographical_coordinates import GeographicalCoordinates -from service_apis.models.point import Point -from service_apis.models.point_altitude import PointAltitude -from service_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty -from service_apis.models.point_uncertainty_circle import PointUncertaintyCircle -from service_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from service_apis.models.polygon import Polygon -from service_apis.models.supported_gad_shapes import SupportedGADShapes -from service_apis.models.uncertainty_ellipse import UncertaintyEllipse from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.ellipsoid_arc import EllipsoidArc # noqa: E501 -from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from service_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from service_apis.models.point import Point # noqa: E501 from service_apis.models.point_altitude import PointAltitude # noqa: E501 -from service_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 -from service_apis.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 -from service_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from service_apis.models.point_altitude_uncertainty import \ + PointAltitudeUncertainty # noqa: E501 +from service_apis.models.point_uncertainty_circle import \ + PointUncertaintyCircle # noqa: E501 +from service_apis.models.point_uncertainty_ellipse import \ + PointUncertaintyEllipse # noqa: E501 from service_apis.models.polygon import Polygon # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from service_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from service_apis.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py index 4eae80d3..755e077a 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/interface_description.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/interface_description.py index da6cd574..7c44ba11 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/interface_description.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/interface_description.py @@ -1,16 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.o_auth_grant_type import OAuthGrantType -from service_apis.models.security_method import SecurityMethod -import re from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from service_apis.models.security_method import SecurityMethod # noqa: E501 -import re # noqa: E501 + class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/invalid_param.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/invalid_param.py index 67c79e30..74464bd1 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/invalid_param.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_info.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_info.py index 3cb739c6..1791b5a3 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_info.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_info.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class IpAddrInfo(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_range.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_range.py index 4b86f968..f743f4fa 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_range.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.ipv4_address_range import Ipv4AddressRange -from service_apis.models.ipv6_address_range import Ipv6AddressRange from service_apis import util +from service_apis.models.base_model import Model +from service_apis.models.ipv4_address_range import \ + Ipv4AddressRange # noqa: E501 +from service_apis.models.ipv6_address_range import \ + Ipv6AddressRange # noqa: E501 -from service_apis.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 -from service_apis.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv4_address_range.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv4_address_range.py index 9d500949..e2e91ad7 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv4_address_range.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -import re from service_apis import util +from service_apis.models.base_model import Model -import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py index d8164b5f..7c01304e 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_address_range.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_address_range.py index e9fc81ec..b8e1c5e0 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_address_range.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.ipv6_addr1 import Ipv6Addr1 from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 + class Ipv6AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local2d_point_uncertainty_ellipse.py index 23464399..ff528c7c 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local2d_point_uncertainty_ellipse.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.gad_shape import GADShape -from service_apis.models.local_origin import LocalOrigin -from service_apis.models.relative_cartesian_location import RelativeCartesianLocation -from service_apis.models.supported_gad_shapes import SupportedGADShapes -from service_apis.models.uncertainty_ellipse import UncertaintyEllipse from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.local_origin import LocalOrigin # noqa: E501 -from service_apis.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from service_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from service_apis.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from service_apis.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local3d_point_uncertainty_ellipsoid.py index 4d9cb7bb..27d01531 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local3d_point_uncertainty_ellipsoid.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.gad_shape import GADShape -from service_apis.models.local_origin import LocalOrigin -from service_apis.models.relative_cartesian_location import RelativeCartesianLocation -from service_apis.models.supported_gad_shapes import SupportedGADShapes -from service_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.gad_shape import GADShape # noqa: E501 from service_apis.models.local_origin import LocalOrigin # noqa: E501 -from service_apis.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from service_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 +from service_apis.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from service_apis.models.uncertainty_ellipsoid import \ + UncertaintyEllipsoid # noqa: E501 + class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local_origin.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local_origin.py index bf20a6d3..20153e31 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local_origin.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local_origin.py @@ -1,14 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.geographic_area import GeographicArea -from service_apis.models.geographical_coordinates import GeographicalCoordinates from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.geographic_area import GeographicArea # noqa: E501 -from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from service_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 + class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/net_slice_id.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/net_slice_id.py index b015bbaf..98ea2db9 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/net_slice_id.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/net_slice_id.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.snssai import Snssai from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.snssai import Snssai # noqa: E501 + class NetSliceId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/o_auth_grant_type.py index fc93ba2e..b5020552 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/o_auth_grant_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation.py index 6e0b387e..a43fd60d 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class Operation(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point.py index a258d339..d4aeee09 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.gad_shape import GADShape -from service_apis.models.geographical_coordinates import GeographicalCoordinates -from service_apis.models.supported_gad_shapes import SupportedGADShapes from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.gad_shape import GADShape # noqa: E501 -from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from service_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py index 3245960e..a0ef2ace 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.gad_shape import GADShape -from service_apis.models.geographical_coordinates import GeographicalCoordinates -from service_apis.models.supported_gad_shapes import SupportedGADShapes from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.gad_shape import GADShape # noqa: E501 -from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from service_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py index aadbd510..ac5b783a 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.gad_shape import GADShape -from service_apis.models.geographical_coordinates import GeographicalCoordinates -from service_apis.models.supported_gad_shapes import SupportedGADShapes -from service_apis.models.uncertainty_ellipse import UncertaintyEllipse from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.gad_shape import GADShape # noqa: E501 -from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from service_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from service_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from service_apis.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py index 271b19bf..659b16ae 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.gad_shape import GADShape -from service_apis.models.geographical_coordinates import GeographicalCoordinates -from service_apis.models.supported_gad_shapes import SupportedGADShapes from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.gad_shape import GADShape # noqa: E501 -from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from service_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py index 7e7499cf..15c3d124 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.gad_shape import GADShape -from service_apis.models.geographical_coordinates import GeographicalCoordinates -from service_apis.models.supported_gad_shapes import SupportedGADShapes -from service_apis.models.uncertainty_ellipse import UncertaintyEllipse from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.gad_shape import GADShape # noqa: E501 -from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from service_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from service_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from service_apis.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py index 421b7c36..bf12245d 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.gad_shape import GADShape -from service_apis.models.geographical_coordinates import GeographicalCoordinates -from service_apis.models.supported_gad_shapes import SupportedGADShapes from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.gad_shape import GADShape # noqa: E501 -from service_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from service_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from service_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from service_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/problem_details.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/problem_details.py index f1e1241d..ac177318 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/problem_details.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/problem_details.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.invalid_param import InvalidParam -import re from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol.py index 6cc058a0..d88a4100 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class Protocol(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/published_api_path.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/published_api_path.py index a8210648..5736c473 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/published_api_path.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/published_api_path.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class PublishedApiPath(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/relative_cartesian_location.py index ee5b860a..f2f1a689 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/relative_cartesian_location.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/res_oper_info.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/res_oper_info.py index 9b1d5b95..ed963f04 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/res_oper_info.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/res_oper_info.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.operation import Operation from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.operation import Operation # noqa: E501 + class ResOperInfo(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/resource.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/resource.py index f530875d..1c21606c 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/resource.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/resource.py @@ -1,17 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.communication_type import CommunicationType -from service_apis.models.custom_operation import CustomOperation -from service_apis.models.operation import Operation from service_apis import util - -from service_apis.models.communication_type import CommunicationType # noqa: E501 +from service_apis.models.base_model import Model +from service_apis.models.communication_type import \ + CommunicationType # noqa: E501 from service_apis.models.custom_operation import CustomOperation # noqa: E501 from service_apis.models.operation import Operation # noqa: E501 + class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method.py index 3215ddaa..23372e62 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_api_description.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_api_description.py index b856ab66..62e05928 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_api_description.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_api_description.py @@ -1,22 +1,17 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.aef_profile import AefProfile -from service_apis.models.api_status import ApiStatus -from service_apis.models.net_slice_id import NetSliceId -from service_apis.models.published_api_path import PublishedApiPath -from service_apis.models.shareable_information import ShareableInformation -import re from service_apis import util - from service_apis.models.aef_profile import AefProfile # noqa: E501 from service_apis.models.api_status import ApiStatus # noqa: E501 +from service_apis.models.base_model import Model from service_apis.models.net_slice_id import NetSliceId # noqa: E501 -from service_apis.models.published_api_path import PublishedApiPath # noqa: E501 -from service_apis.models.shareable_information import ShareableInformation # noqa: E501 -import re # noqa: E501 +from service_apis.models.published_api_path import \ + PublishedApiPath # noqa: E501 +from service_apis.models.shareable_information import \ + ShareableInformation # noqa: E501 + class ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py index de72ad5b..66dd9e35 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -import re from service_apis import util +from service_apis.models.base_model import Model -import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/shareable_information.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/shareable_information.py index ffd69928..31dc2a02 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/shareable_information.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/shareable_information.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class ShareableInformation(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/snssai.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/snssai.py index 60f2b8f7..5cef8fc1 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/snssai.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/snssai.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -import re from service_apis import util +from service_apis.models.base_model import Model -import re # noqa: E501 class Snssai(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py index 0f035470..d5e17a12 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipse.py index 03672693..53e6a3ad 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipse.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py index 6e598a1a..bac421f2 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model from service_apis import util +from service_apis.models.base_model import Model class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/version.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/version.py index e0a21cc0..7efbc3f7 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/version.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/version.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from service_apis.models.base_model import Model -from service_apis.models.custom_operation import CustomOperation -from service_apis.models.resource import Resource from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.custom_operation import CustomOperation # noqa: E501 from service_apis.models.resource import Resource # noqa: E501 + class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/__init__.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/__init__.py index b0510f7c..8b9b70a8 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/__init__.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/__init__.py @@ -2,7 +2,6 @@ import logging import connexion from flask_testing import TestCase - from service_apis.encoder import JSONEncoder diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py index 45bac9f4..3aaecdd0 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py @@ -1,9 +1,8 @@ import unittest -from flask import json - from service_apis.models.aef_location import AefLocation # noqa: E501 -from service_apis.models.communication_type import CommunicationType # noqa: E501 +from service_apis.models.communication_type import \ + CommunicationType # noqa: E501 from service_apis.models.data_format import DataFormat # noqa: E501 from service_apis.models.discovered_apis import DiscoveredAPIs # noqa: E501 from service_apis.models.ip_addr_info import IpAddrInfo # noqa: E501 diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py index dae6c0e3..9800793f 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py @@ -1,6 +1,5 @@ import datetime -import typing from service_apis import typing_utils diff --git a/services/TS29222_CAPIF_Discover_Service_API/setup.py b/services/TS29222_CAPIF_Discover_Service_API/setup.py index 28040819..64e0688f 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/setup.py +++ b/services/TS29222_CAPIF_Discover_Service_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "service_apis" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_Events_API/capif_events/app.py b/services/TS29222_CAPIF_Events_API/capif_events/app.py index b9f0bd9b..30bcccb4 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/app.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/app.py @@ -15,13 +15,15 @@ from flask_executor import Executor from flask_jwt_extended import JWTManager from fluent import sender from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \ + OTLPSpanExporter from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry.instrumentation.redis import RedisInstrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.trace.propagation.tracecontext import \ + TraceContextTextMapPropagator NAME = "Events-Service" diff --git a/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py index 688b2584..59d82a7b 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py @@ -1,14 +1,8 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union - -from capif_events.models.problem_details import ProblemDetails # noqa: E501 -from capif_events import util - from functools import wraps -from capif_events.models.event_subscription import EventSubscription # noqa: E501 +from capif_events.models.event_subscription import \ + EventSubscription # noqa: E501 +from capif_events.models.problem_details import ProblemDetails # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request diff --git a/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py index 72a0b42f..cac833f9 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py @@ -1,17 +1,10 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union - -from capif_events.models.event_subscription import EventSubscription # noqa: E501 -from capif_events.models.event_subscription_patch import EventSubscriptionPatch # noqa: E501 -from capif_events.models.problem_details import ProblemDetails # noqa: E501 -from capif_events import util - from functools import wraps -from capif_events.models.event_subscription import EventSubscription # noqa: E501 -from capif_events.models.event_subscription_patch import EventSubscriptionPatch # noqa: E501 +from capif_events.models.event_subscription import \ + EventSubscription # noqa: E501 +from capif_events.models.event_subscription_patch import \ + EventSubscriptionPatch # noqa: E501 +from capif_events.models.problem_details import ProblemDetails # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request diff --git a/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py b/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py index 1f9acaf3..ae4674e7 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/events_apis.py @@ -1,18 +1,19 @@ +import asyncio import os import secrets +from datetime import datetime, timezone import rfc3987 -from capif_events.models.event_subscription import EventSubscription # noqa: E501 -from flask import current_app, Response -from datetime import datetime, timezone -import asyncio +from capif_events.models.event_subscription import \ + EventSubscription # noqa: E501 +from flask import Response, current_app from ..util import clean_empty, dict_to_camel_case, serialize_clean_camel_case from .auth_manager import AuthManager -from .resources import Resource -from .responses import internal_server_error, not_found_error, make_response, bad_request_error -from ..util import serialize_clean_camel_case, clean_empty, dict_to_camel_case from .notifications import Notifications +from .resources import Resource +from .responses import (bad_request_error, internal_server_error, + make_response, not_found_error) TOTAL_FEATURES = 4 SUPPORTED_FEATURES_HEX = "c" diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py b/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py index 0bd89557..ab1aafbd 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py @@ -2,6 +2,7 @@ import asyncio import json import os +from datetime import datetime, timedelta, timezone import aiohttp import requests @@ -9,7 +10,6 @@ from encoder import CustomJSONEncoder from flask import current_app from models.event_notification import EventNotification from util import serialize_clean_camel_case -from datetime import datetime, timedelta, timezone from .internal_event_ops import InternalEventOperations diff --git a/services/TS29222_CAPIF_Events_API/capif_events/encoder.py b/services/TS29222_CAPIF_Events_API/capif_events/encoder.py index b67f09c2..66b0c8c5 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/encoder.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/encoder.py @@ -1,6 +1,5 @@ -from connexion.jsonifier import JSONEncoder - from capif_events.models.base_model import Model +from connexion.jsonifier import JSONEncoder class CustomJSONEncoder(JSONEncoder): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py b/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py index 8430a152..d036df69 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py @@ -1,75 +1,2 @@ # flake8: noqa # import models into model package -from capif_events.models.access_control_policy_list import AccessControlPolicyList -from capif_events.models.access_control_policy_list_ext import AccessControlPolicyListExt -from capif_events.models.aef_location import AefLocation -from capif_events.models.aef_profile import AefProfile -from capif_events.models.api_info import ApiInfo -from capif_events.models.api_invoker_count import ApiInvokerCount -from capif_events.models.api_invoker_policy import ApiInvokerPolicy -from capif_events.models.api_status import ApiStatus -from capif_events.models.buffered_notifications_action import BufferedNotificationsAction -from capif_events.models.capif_event import CAPIFEvent -from capif_events.models.capif_event_detail import CAPIFEventDetail -from capif_events.models.capif_event_filter import CAPIFEventFilter -from capif_events.models.civic_address import CivicAddress -from capif_events.models.communication_type import CommunicationType -from capif_events.models.custom_operation import CustomOperation -from capif_events.models.data_format import DataFormat -from capif_events.models.discovery_count import DiscoveryCount -from capif_events.models.ellipsoid_arc import EllipsoidArc -from capif_events.models.event_notification import EventNotification -from capif_events.models.event_subscription import EventSubscription -from capif_events.models.event_subscription_patch import EventSubscriptionPatch -from capif_events.models.gad_shape import GADShape -from capif_events.models.geographic_area import GeographicArea -from capif_events.models.geographical_coordinates import GeographicalCoordinates -from capif_events.models.interface_description import InterfaceDescription -from capif_events.models.invalid_param import InvalidParam -from capif_events.models.invocation_log import InvocationLog -from capif_events.models.ip_addr_range import IpAddrRange -from capif_events.models.ipv4_address_range import Ipv4AddressRange -from capif_events.models.ipv4_address_range1 import Ipv4AddressRange1 -from capif_events.models.ipv6_addr1 import Ipv6Addr1 -from capif_events.models.ipv6_address_range import Ipv6AddressRange -from capif_events.models.ipv6_address_range1 import Ipv6AddressRange1 -from capif_events.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse -from capif_events.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid -from capif_events.models.local_origin import LocalOrigin -from capif_events.models.log import Log -from capif_events.models.muting_exception_instructions import MutingExceptionInstructions -from capif_events.models.muting_notifications_settings import MutingNotificationsSettings -from capif_events.models.net_slice_id import NetSliceId -from capif_events.models.notification_flag import NotificationFlag -from capif_events.models.notification_method import NotificationMethod -from capif_events.models.o_auth_grant_type import OAuthGrantType -from capif_events.models.onboarding_criteria import OnboardingCriteria -from capif_events.models.operation import Operation -from capif_events.models.partitioning_criteria import PartitioningCriteria -from capif_events.models.point import Point -from capif_events.models.point_altitude import PointAltitude -from capif_events.models.point_altitude_uncertainty import PointAltitudeUncertainty -from capif_events.models.point_uncertainty_circle import PointUncertaintyCircle -from capif_events.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from capif_events.models.polygon import Polygon -from capif_events.models.problem_details import ProblemDetails -from capif_events.models.protocol import Protocol -from capif_events.models.published_api_path import PublishedApiPath -from capif_events.models.related_criteria import RelatedCriteria -from capif_events.models.relative_cartesian_location import RelativeCartesianLocation -from capif_events.models.reporting_information import ReportingInformation -from capif_events.models.resource import Resource -from capif_events.models.routing_rule import RoutingRule -from capif_events.models.security_method import SecurityMethod -from capif_events.models.service_api_description import ServiceAPIDescription -from capif_events.models.service_kpis import ServiceKpis -from capif_events.models.shareable_information import ShareableInformation -from capif_events.models.snssai import Snssai -from capif_events.models.subscription_action import SubscriptionAction -from capif_events.models.supported_gad_shapes import SupportedGADShapes -from capif_events.models.time_range_list import TimeRangeList -from capif_events.models.topology_hiding import TopologyHiding -from capif_events.models.uncertainty_ellipse import UncertaintyEllipse -from capif_events.models.uncertainty_ellipsoid import UncertaintyEllipsoid -from capif_events.models.version import Version -from capif_events.models.websock_notif_config import WebsockNotifConfig diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list.py b/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list.py index a64c3841..b7f6ef08 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.api_invoker_policy import ApiInvokerPolicy from capif_events import util +from capif_events.models.api_invoker_policy import \ + ApiInvokerPolicy # noqa: E501 +from capif_events.models.base_model import Model -from capif_events.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 class AccessControlPolicyList(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext.py b/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext.py index e99c495c..302bece0 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.api_invoker_policy import ApiInvokerPolicy from capif_events import util +from capif_events.models.api_invoker_policy import \ + ApiInvokerPolicy # noqa: E501 +from capif_events.models.base_model import Model -from capif_events.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 class AccessControlPolicyListExt(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/aef_location.py b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_location.py index 1f85dba5..5c51a242 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/aef_location.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_location.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.civic_address import CivicAddress -from capif_events.models.geographic_area import GeographicArea from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.civic_address import CivicAddress # noqa: E501 from capif_events.models.geographic_area import GeographicArea # noqa: E501 + class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/aef_profile.py b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_profile.py index 02ae4b48..b448336b 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/aef_profile.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_profile.py @@ -1,22 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.aef_location import AefLocation -from capif_events.models.data_format import DataFormat -from capif_events.models.interface_description import InterfaceDescription -from capif_events.models.ip_addr_range import IpAddrRange -from capif_events.models.o_auth_grant_type import OAuthGrantType -from capif_events.models.protocol import Protocol -from capif_events.models.security_method import SecurityMethod -from capif_events.models.service_kpis import ServiceKpis -from capif_events.models.version import Version from capif_events import util - from capif_events.models.aef_location import AefLocation # noqa: E501 +from capif_events.models.base_model import Model from capif_events.models.data_format import DataFormat # noqa: E501 -from capif_events.models.interface_description import InterfaceDescription # noqa: E501 +from capif_events.models.interface_description import \ + InterfaceDescription # noqa: E501 from capif_events.models.ip_addr_range import IpAddrRange # noqa: E501 from capif_events.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from capif_events.models.protocol import Protocol # noqa: E501 @@ -24,6 +14,7 @@ from capif_events.models.security_method import SecurityMethod # noqa: E501 from capif_events.models.service_kpis import ServiceKpis # noqa: E501 from capif_events.models.version import Version # noqa: E501 + class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/api_info.py b/services/TS29222_CAPIF_Events_API/capif_events/models/api_info.py index 6bc07b05..b4d74320 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/api_info.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/api_info.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class ApiInfo(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_count.py b/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_count.py index 9387b2ca..4d958202 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_count.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_count.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class ApiInvokerCount(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_policy.py b/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_policy.py index 869d8253..a73c2b9a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_policy.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/api_invoker_policy.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.net_slice_id import NetSliceId -from capif_events.models.time_range_list import TimeRangeList from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.net_slice_id import NetSliceId # noqa: E501 from capif_events.models.time_range_list import TimeRangeList # noqa: E501 + class ApiInvokerPolicy(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/api_status.py b/services/TS29222_CAPIF_Events_API/capif_events/models/api_status.py index ca3916f9..52251b96 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/api_status.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/api_status.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class ApiStatus(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py b/services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py index 41797264..336bc44c 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from capif_events import util diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py b/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py index eca65477..b53e72cf 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class BufferedNotificationsAction(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event.py b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event.py index fa3a9828..2d55c4ef 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class CAPIFEvent(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_detail.py b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_detail.py index a0b033a5..69d13e3b 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_detail.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_detail.py @@ -1,25 +1,20 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.access_control_policy_list_ext import AccessControlPolicyListExt -from capif_events.models.api_invoker_count import ApiInvokerCount -from capif_events.models.discovery_count import DiscoveryCount -from capif_events.models.invocation_log import InvocationLog -from capif_events.models.onboarding_criteria import OnboardingCriteria -from capif_events.models.service_api_description import ServiceAPIDescription -from capif_events.models.topology_hiding import TopologyHiding from capif_events import util - -from capif_events.models.access_control_policy_list_ext import AccessControlPolicyListExt # noqa: E501 +from capif_events.models.access_control_policy_list_ext import \ + AccessControlPolicyListExt # noqa: E501 from capif_events.models.api_invoker_count import ApiInvokerCount # noqa: E501 +from capif_events.models.base_model import Model from capif_events.models.discovery_count import DiscoveryCount # noqa: E501 from capif_events.models.invocation_log import InvocationLog # noqa: E501 -from capif_events.models.onboarding_criteria import OnboardingCriteria # noqa: E501 -from capif_events.models.service_api_description import ServiceAPIDescription # noqa: E501 +from capif_events.models.onboarding_criteria import \ + OnboardingCriteria # noqa: E501 +from capif_events.models.service_api_description import \ + ServiceAPIDescription # noqa: E501 from capif_events.models.topology_hiding import TopologyHiding # noqa: E501 + class CAPIFEventDetail(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_filter.py b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_filter.py index c976f754..bb04cc83 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_filter.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_filter.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class CAPIFEventFilter(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/civic_address.py b/services/TS29222_CAPIF_Events_API/capif_events/models/civic_address.py index 5819d5f2..379ebe0a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/civic_address.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/civic_address.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type.py b/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type.py index e5203eb6..3beb1ab1 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/custom_operation.py b/services/TS29222_CAPIF_Events_API/capif_events/models/custom_operation.py index 5676f216..c3f39de6 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/custom_operation.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/custom_operation.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.communication_type import CommunicationType -from capif_events.models.operation import Operation from capif_events import util - -from capif_events.models.communication_type import CommunicationType # noqa: E501 +from capif_events.models.base_model import Model +from capif_events.models.communication_type import \ + CommunicationType # noqa: E501 from capif_events.models.operation import Operation # noqa: E501 + class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/data_format.py b/services/TS29222_CAPIF_Events_API/capif_events/models/data_format.py index adec690a..c668244c 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/data_format.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/data_format.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class DataFormat(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/discovery_count.py b/services/TS29222_CAPIF_Events_API/capif_events/models/discovery_count.py index 0cdb4a03..e279ab8e 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/discovery_count.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/discovery_count.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class DiscoveryCount(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py index b5be85b2..200bb7ad 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.gad_shape import GADShape -from capif_events.models.geographical_coordinates import GeographicalCoordinates -from capif_events.models.supported_gad_shapes import SupportedGADShapes from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.gad_shape import GADShape # noqa: E501 -from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_events.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/event_notification.py b/services/TS29222_CAPIF_Events_API/capif_events/models/event_notification.py index 1e09adbd..a15182a1 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/event_notification.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/event_notification.py @@ -1,14 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.capif_event import CAPIFEvent -from capif_events.models.capif_event_detail import CAPIFEventDetail from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.capif_event import CAPIFEvent # noqa: E501 -from capif_events.models.capif_event_detail import CAPIFEventDetail # noqa: E501 +from capif_events.models.capif_event_detail import \ + CAPIFEventDetail # noqa: E501 + class EventNotification(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription.py b/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription.py index 77f2940d..c07245d7 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription.py @@ -1,20 +1,17 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.capif_event import CAPIFEvent -from capif_events.models.capif_event_filter import CAPIFEventFilter -from capif_events.models.reporting_information import ReportingInformation -from capif_events.models.websock_notif_config import WebsockNotifConfig -import re from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.capif_event import CAPIFEvent # noqa: E501 -from capif_events.models.capif_event_filter import CAPIFEventFilter # noqa: E501 -from capif_events.models.reporting_information import ReportingInformation # noqa: E501 -from capif_events.models.websock_notif_config import WebsockNotifConfig # noqa: E501 -import re # noqa: E501 +from capif_events.models.capif_event_filter import \ + CAPIFEventFilter # noqa: E501 +from capif_events.models.reporting_information import \ + ReportingInformation # noqa: E501 +from capif_events.models.websock_notif_config import \ + WebsockNotifConfig # noqa: E501 + class EventSubscription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription_patch.py b/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription_patch.py index cac569a7..09d0a556 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription_patch.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription_patch.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.capif_event import CAPIFEvent -from capif_events.models.capif_event_filter import CAPIFEventFilter -from capif_events.models.reporting_information import ReportingInformation from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.capif_event import CAPIFEvent # noqa: E501 -from capif_events.models.capif_event_filter import CAPIFEventFilter # noqa: E501 -from capif_events.models.reporting_information import ReportingInformation # noqa: E501 +from capif_events.models.capif_event_filter import \ + CAPIFEventFilter # noqa: E501 +from capif_events.models.reporting_information import \ + ReportingInformation # noqa: E501 + class EventSubscriptionPatch(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/gad_shape.py b/services/TS29222_CAPIF_Events_API/capif_events/models/gad_shape.py index f669a853..35eb2267 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/gad_shape.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/gad_shape.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.supported_gad_shapes import SupportedGADShapes from capif_events import util +from capif_events.models.base_model import Model +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py b/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py index 45c7018d..f8887e8d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py @@ -1,30 +1,25 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.ellipsoid_arc import EllipsoidArc -from capif_events.models.geographical_coordinates import GeographicalCoordinates -from capif_events.models.point import Point -from capif_events.models.point_altitude import PointAltitude -from capif_events.models.point_altitude_uncertainty import PointAltitudeUncertainty -from capif_events.models.point_uncertainty_circle import PointUncertaintyCircle -from capif_events.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from capif_events.models.polygon import Polygon -from capif_events.models.supported_gad_shapes import SupportedGADShapes -from capif_events.models.uncertainty_ellipse import UncertaintyEllipse from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.ellipsoid_arc import EllipsoidArc # noqa: E501 -from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from capif_events.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from capif_events.models.point import Point # noqa: E501 from capif_events.models.point_altitude import PointAltitude # noqa: E501 -from capif_events.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 -from capif_events.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 -from capif_events.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from capif_events.models.point_altitude_uncertainty import \ + PointAltitudeUncertainty # noqa: E501 +from capif_events.models.point_uncertainty_circle import \ + PointUncertaintyCircle # noqa: E501 +from capif_events.models.point_uncertainty_ellipse import \ + PointUncertaintyEllipse # noqa: E501 from capif_events.models.polygon import Polygon # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_events.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_events.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py b/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py index 38210506..c0cc15c6 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/interface_description.py b/services/TS29222_CAPIF_Events_API/capif_events/models/interface_description.py index e31b30d2..69bf2441 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/interface_description.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/interface_description.py @@ -1,16 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.o_auth_grant_type import OAuthGrantType -from capif_events.models.security_method import SecurityMethod -import re from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from capif_events.models.security_method import SecurityMethod # noqa: E501 -import re # noqa: E501 + class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/invalid_param.py b/services/TS29222_CAPIF_Events_API/capif_events/models/invalid_param.py index 9f3557f5..ce023bf2 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/invalid_param.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/invocation_log.py b/services/TS29222_CAPIF_Events_API/capif_events/models/invocation_log.py index b67a3978..450c08bb 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/invocation_log.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/invocation_log.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.log import Log -import re from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.log import Log # noqa: E501 -import re # noqa: E501 + class InvocationLog(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ip_addr_range.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ip_addr_range.py index f633723b..1cabfe96 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ip_addr_range.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.ipv4_address_range import Ipv4AddressRange -from capif_events.models.ipv6_address_range1 import Ipv6AddressRange1 from capif_events import util +from capif_events.models.base_model import Model +from capif_events.models.ipv4_address_range import \ + Ipv4AddressRange # noqa: E501 +from capif_events.models.ipv6_address_range1 import \ + Ipv6AddressRange1 # noqa: E501 -from capif_events.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 -from capif_events.models.ipv6_address_range1 import Ipv6AddressRange1 # noqa: E501 class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range.py index 10e51773..2f1dc1f9 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -import re from capif_events import util +from capif_events.models.base_model import Model -import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range1.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range1.py index c0291053..8c0d6664 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range1.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range1.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -import re from capif_events import util +from capif_events.models.base_model import Model -import re # noqa: E501 class Ipv4AddressRange1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py index d07d4876..0dd4716a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range.py index 17f20cdd..b7a59aff 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class Ipv6AddressRange(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range1.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range1.py index 4d678058..1f992719 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range1.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range1.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.ipv6_addr1 import Ipv6Addr1 from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 + class Ipv6AddressRange1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Events_API/capif_events/models/local2d_point_uncertainty_ellipse.py index 694b07d0..2090ae88 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/local2d_point_uncertainty_ellipse.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.gad_shape import GADShape -from capif_events.models.local_origin import LocalOrigin -from capif_events.models.relative_cartesian_location import RelativeCartesianLocation -from capif_events.models.supported_gad_shapes import SupportedGADShapes -from capif_events.models.uncertainty_ellipse import UncertaintyEllipse from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.local_origin import LocalOrigin # noqa: E501 -from capif_events.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_events.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from capif_events.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_events.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py index 7f164c4d..87172335 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.gad_shape import GADShape -from capif_events.models.local_origin import LocalOrigin -from capif_events.models.relative_cartesian_location import RelativeCartesianLocation -from capif_events.models.supported_gad_shapes import SupportedGADShapes -from capif_events.models.uncertainty_ellipsoid import UncertaintyEllipsoid from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.gad_shape import GADShape # noqa: E501 from capif_events.models.local_origin import LocalOrigin # noqa: E501 -from capif_events.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_events.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 +from capif_events.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_events.models.uncertainty_ellipsoid import \ + UncertaintyEllipsoid # noqa: E501 + class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/local_origin.py b/services/TS29222_CAPIF_Events_API/capif_events/models/local_origin.py index f5b69773..d45844cc 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/local_origin.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/local_origin.py @@ -1,14 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.geographic_area import GeographicArea -from capif_events.models.geographical_coordinates import GeographicalCoordinates from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.geographic_area import GeographicArea # noqa: E501 -from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from capif_events.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 + class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/log.py b/services/TS29222_CAPIF_Events_API/capif_events/models/log.py index 5328da3b..e4b28257 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/log.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/log.py @@ -1,19 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.interface_description import InterfaceDescription -from capif_events.models.net_slice_id import NetSliceId -from capif_events.models.operation import Operation -from capif_events.models.protocol import Protocol from capif_events import util - -from capif_events.models.interface_description import InterfaceDescription # noqa: E501 +from capif_events.models.base_model import Model +from capif_events.models.interface_description import \ + InterfaceDescription # noqa: E501 from capif_events.models.net_slice_id import NetSliceId # noqa: E501 from capif_events.models.operation import Operation # noqa: E501 from capif_events.models.protocol import Protocol # noqa: E501 + class Log(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/muting_exception_instructions.py b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_exception_instructions.py index 00839244..083886c1 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/muting_exception_instructions.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_exception_instructions.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.buffered_notifications_action import BufferedNotificationsAction -from capif_events.models.subscription_action import SubscriptionAction from capif_events import util +from capif_events.models.base_model import Model +from capif_events.models.buffered_notifications_action import \ + BufferedNotificationsAction # noqa: E501 +from capif_events.models.subscription_action import \ + SubscriptionAction # noqa: E501 -from capif_events.models.buffered_notifications_action import BufferedNotificationsAction # noqa: E501 -from capif_events.models.subscription_action import SubscriptionAction # noqa: E501 class MutingExceptionInstructions(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/muting_notifications_settings.py b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_notifications_settings.py index ac4ea3d6..a1de5ef7 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/muting_notifications_settings.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_notifications_settings.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class MutingNotificationsSettings(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/net_slice_id.py b/services/TS29222_CAPIF_Events_API/capif_events/models/net_slice_id.py index 89362ddc..de23e7b5 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/net_slice_id.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/net_slice_id.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.snssai import Snssai from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.snssai import Snssai # noqa: E501 + class NetSliceId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag.py b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag.py index fa4d5259..85bf9cde 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class NotificationFlag(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method.py b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method.py index b87ce0b5..b6832cd0 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class NotificationMethod(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Events_API/capif_events/models/o_auth_grant_type.py index 5d4c4ba6..42bce003 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/o_auth_grant_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/onboarding_criteria.py b/services/TS29222_CAPIF_Events_API/capif_events/models/onboarding_criteria.py index 5bc1336c..3b969cad 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/onboarding_criteria.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/onboarding_criteria.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.related_criteria import RelatedCriteria -from capif_events.models.security_method import SecurityMethod from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.related_criteria import RelatedCriteria # noqa: E501 from capif_events.models.security_method import SecurityMethod # noqa: E501 + class OnboardingCriteria(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py b/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py index 01c08428..ae36b029 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class Operation(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria.py b/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria.py index 1fed743c..e744de1a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class PartitioningCriteria(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point.py index 25e5dcef..c8f57a86 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.gad_shape import GADShape -from capif_events.models.geographical_coordinates import GeographicalCoordinates -from capif_events.models.supported_gad_shapes import SupportedGADShapes from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.gad_shape import GADShape # noqa: E501 -from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_events.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py index e1fbee8d..d5e995f0 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.gad_shape import GADShape -from capif_events.models.geographical_coordinates import GeographicalCoordinates -from capif_events.models.supported_gad_shapes import SupportedGADShapes from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.gad_shape import GADShape # noqa: E501 -from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_events.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py index 965fd431..f3ba7745 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.gad_shape import GADShape -from capif_events.models.geographical_coordinates import GeographicalCoordinates -from capif_events.models.supported_gad_shapes import SupportedGADShapes -from capif_events.models.uncertainty_ellipse import UncertaintyEllipse from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.gad_shape import GADShape # noqa: E501 -from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_events.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from capif_events.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_events.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py index 8ea7284c..8b5e6824 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.gad_shape import GADShape -from capif_events.models.geographical_coordinates import GeographicalCoordinates -from capif_events.models.supported_gad_shapes import SupportedGADShapes from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.gad_shape import GADShape # noqa: E501 -from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_events.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py index 07f77277..9e7439c0 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.gad_shape import GADShape -from capif_events.models.geographical_coordinates import GeographicalCoordinates -from capif_events.models.supported_gad_shapes import SupportedGADShapes -from capif_events.models.uncertainty_ellipse import UncertaintyEllipse from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.gad_shape import GADShape # noqa: E501 -from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_events.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from capif_events.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_events.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py b/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py index 8804de2c..da34119d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.gad_shape import GADShape -from capif_events.models.geographical_coordinates import GeographicalCoordinates -from capif_events.models.supported_gad_shapes import SupportedGADShapes from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.gad_shape import GADShape # noqa: E501 -from capif_events.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_events.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_events.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_events.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/problem_details.py b/services/TS29222_CAPIF_Events_API/capif_events/models/problem_details.py index 4cd85b68..225739b5 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/problem_details.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/problem_details.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.invalid_param import InvalidParam -import re from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py b/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py index 437f5b2a..3fb57d95 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class Protocol(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/published_api_path.py b/services/TS29222_CAPIF_Events_API/capif_events/models/published_api_path.py index f341f1c9..f66c1853 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/published_api_path.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/published_api_path.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class PublishedApiPath(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/related_criteria.py b/services/TS29222_CAPIF_Events_API/capif_events/models/related_criteria.py index 60368b9e..b0183fa2 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/related_criteria.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/related_criteria.py @@ -1,12 +1,10 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.api_info import ApiInfo from capif_events import util - from capif_events.models.api_info import ApiInfo # noqa: E501 +from capif_events.models.base_model import Model + class RelatedCriteria(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Events_API/capif_events/models/relative_cartesian_location.py index 5a994928..eeeb3d31 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/relative_cartesian_location.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/reporting_information.py b/services/TS29222_CAPIF_Events_API/capif_events/models/reporting_information.py index 08e387b0..dda85665 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/reporting_information.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/reporting_information.py @@ -1,20 +1,19 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.muting_exception_instructions import MutingExceptionInstructions -from capif_events.models.muting_notifications_settings import MutingNotificationsSettings -from capif_events.models.notification_flag import NotificationFlag -from capif_events.models.notification_method import NotificationMethod -from capif_events.models.partitioning_criteria import PartitioningCriteria from capif_events import util +from capif_events.models.base_model import Model +from capif_events.models.muting_exception_instructions import \ + MutingExceptionInstructions # noqa: E501 +from capif_events.models.muting_notifications_settings import \ + MutingNotificationsSettings # noqa: E501 +from capif_events.models.notification_flag import \ + NotificationFlag # noqa: E501 +from capif_events.models.notification_method import \ + NotificationMethod # noqa: E501 +from capif_events.models.partitioning_criteria import \ + PartitioningCriteria # noqa: E501 -from capif_events.models.muting_exception_instructions import MutingExceptionInstructions # noqa: E501 -from capif_events.models.muting_notifications_settings import MutingNotificationsSettings # noqa: E501 -from capif_events.models.notification_flag import NotificationFlag # noqa: E501 -from capif_events.models.notification_method import NotificationMethod # noqa: E501 -from capif_events.models.partitioning_criteria import PartitioningCriteria # noqa: E501 class ReportingInformation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py b/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py index 8493f59d..5707778f 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py @@ -1,17 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.communication_type import CommunicationType -from capif_events.models.custom_operation import CustomOperation -from capif_events.models.operation import Operation from capif_events import util - -from capif_events.models.communication_type import CommunicationType # noqa: E501 +from capif_events.models.base_model import Model +from capif_events.models.communication_type import \ + CommunicationType # noqa: E501 from capif_events.models.custom_operation import CustomOperation # noqa: E501 from capif_events.models.operation import Operation # noqa: E501 + class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/routing_rule.py b/services/TS29222_CAPIF_Events_API/capif_events/models/routing_rule.py index b59d1dd7..f3d604f5 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/routing_rule.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/routing_rule.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.aef_profile import AefProfile -from capif_events.models.ipv4_address_range1 import Ipv4AddressRange1 -from capif_events.models.ipv6_address_range import Ipv6AddressRange from capif_events import util - from capif_events.models.aef_profile import AefProfile # noqa: E501 -from capif_events.models.ipv4_address_range1 import Ipv4AddressRange1 # noqa: E501 -from capif_events.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 +from capif_events.models.base_model import Model +from capif_events.models.ipv4_address_range1 import \ + Ipv4AddressRange1 # noqa: E501 +from capif_events.models.ipv6_address_range import \ + Ipv6AddressRange # noqa: E501 + class RoutingRule(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/security_method.py b/services/TS29222_CAPIF_Events_API/capif_events/models/security_method.py index ff87e785..cf8caff4 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/security_method.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/security_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/service_api_description.py b/services/TS29222_CAPIF_Events_API/capif_events/models/service_api_description.py index 69b8d74e..cdb71d55 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/service_api_description.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/service_api_description.py @@ -1,22 +1,17 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.aef_profile import AefProfile -from capif_events.models.api_status import ApiStatus -from capif_events.models.net_slice_id import NetSliceId -from capif_events.models.published_api_path import PublishedApiPath -from capif_events.models.shareable_information import ShareableInformation -import re from capif_events import util - from capif_events.models.aef_profile import AefProfile # noqa: E501 from capif_events.models.api_status import ApiStatus # noqa: E501 +from capif_events.models.base_model import Model from capif_events.models.net_slice_id import NetSliceId # noqa: E501 -from capif_events.models.published_api_path import PublishedApiPath # noqa: E501 -from capif_events.models.shareable_information import ShareableInformation # noqa: E501 -import re # noqa: E501 +from capif_events.models.published_api_path import \ + PublishedApiPath # noqa: E501 +from capif_events.models.shareable_information import \ + ShareableInformation # noqa: E501 + class ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py b/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py index 7a4789dd..5a536e99 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -import re from capif_events import util +from capif_events.models.base_model import Model -import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/shareable_information.py b/services/TS29222_CAPIF_Events_API/capif_events/models/shareable_information.py index 87f74315..5f4f42dd 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/shareable_information.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/shareable_information.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class ShareableInformation(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/snssai.py b/services/TS29222_CAPIF_Events_API/capif_events/models/snssai.py index d27756c9..4cf7eb35 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/snssai.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/snssai.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -import re from capif_events import util +from capif_events.models.base_model import Model -import re # noqa: E501 class Snssai(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py b/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py index 99ae834d..c0ada57a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class SubscriptionAction(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Events_API/capif_events/models/supported_gad_shapes.py index 38ff4d53..919cd5ad 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/supported_gad_shapes.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/time_range_list.py b/services/TS29222_CAPIF_Events_API/capif_events/models/time_range_list.py index 9a6b6267..0adae28c 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/time_range_list.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/time_range_list.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class TimeRangeList(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/topology_hiding.py b/services/TS29222_CAPIF_Events_API/capif_events/models/topology_hiding.py index 0a028785..5cb44ed0 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/topology_hiding.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/topology_hiding.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.routing_rule import RoutingRule from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.routing_rule import RoutingRule # noqa: E501 + class TopologyHiding(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipse.py index 627eb52b..88c3675d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipse.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py index f10fac8f..5e7e36ad 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/version.py b/services/TS29222_CAPIF_Events_API/capif_events/models/version.py index 709e34ce..8185274b 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/version.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/version.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model -from capif_events.models.custom_operation import CustomOperation -from capif_events.models.resource import Resource from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.custom_operation import CustomOperation # noqa: E501 from capif_events.models.resource import Resource # noqa: E501 + class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/websock_notif_config.py b/services/TS29222_CAPIF_Events_API/capif_events/models/websock_notif_config.py index 0077354d..de4a84b0 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/websock_notif_config.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/websock_notif_config.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_events.models.base_model import Model from capif_events import util +from capif_events.models.base_model import Model class WebsockNotifConfig(Model): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py b/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py index c55e721a..8da9951b 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py @@ -1,9 +1,8 @@ import logging import connexion -from flask_testing import TestCase - from capif_events.encoder import JSONEncoder +from flask_testing import TestCase class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/test/test_capifs_events_subscriptions_collection_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/test/test_capifs_events_subscriptions_collection_controller.py index e5b8b742..d2b6952b 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/test/test_capifs_events_subscriptions_collection_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/test/test_capifs_events_subscriptions_collection_controller.py @@ -1,10 +1,10 @@ import unittest -from flask import json - -from capif_events.models.event_subscription import EventSubscription # noqa: E501 +from capif_events.models.event_subscription import \ + EventSubscription # noqa: E501 from capif_events.models.problem_details import ProblemDetails # noqa: E501 from capif_events.test import BaseTestCase +from flask import json class TestCAPIFsEventsSubscriptionsCollectionController(BaseTestCase): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/test/test_individual_capifs_events_subscription_document_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/test/test_individual_capifs_events_subscription_document_controller.py index 902736ac..a991bc07 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/test/test_individual_capifs_events_subscription_document_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/test/test_individual_capifs_events_subscription_document_controller.py @@ -1,11 +1,12 @@ import unittest -from flask import json - -from capif_events.models.event_subscription import EventSubscription # noqa: E501 -from capif_events.models.event_subscription_patch import EventSubscriptionPatch # noqa: E501 +from capif_events.models.event_subscription import \ + EventSubscription # noqa: E501 +from capif_events.models.event_subscription_patch import \ + EventSubscriptionPatch # noqa: E501 from capif_events.models.problem_details import ProblemDetails # noqa: E501 from capif_events.test import BaseTestCase +from flask import json class TestIndividualCAPIFsEventsSubscriptionDocumentController(BaseTestCase): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/util.py b/services/TS29222_CAPIF_Events_API/capif_events/util.py index eb23ccea..128889d9 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/util.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/util.py @@ -1,8 +1,8 @@ import datetime -import typing from capif_events import typing_utils + def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_Events_API/setup.py b/services/TS29222_CAPIF_Events_API/setup.py index 59aa0763..ce8b1eab 100644 --- a/services/TS29222_CAPIF_Events_API/setup.py +++ b/services/TS29222_CAPIF_Events_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "capif_events" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/app.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/app.py index 56c94af9..ad0b6d3b 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/app.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/app.py @@ -9,12 +9,14 @@ import encoder from config import Config from fluent import sender from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \ + OTLPSpanExporter from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.trace.propagation.tracecontext import \ + TraceContextTextMapPropagator NAME = "Logging-Service" diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py index 9fb8f9b3..dc120879 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py @@ -1,15 +1,12 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union -from api_invocation_logs.models.problem_details import ProblemDetails # noqa: E501 -from api_invocation_logs import util - -from api_invocation_logs.models.invocation_log import InvocationLog # noqa: E501 +from functools import wraps + +from api_invocation_logs.models.invocation_log import \ + InvocationLog # noqa: E501 +from api_invocation_logs.models.problem_details import \ + ProblemDetails # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request -from functools import wraps from ..core.invocationlogs import LoggingInvocationOperations from ..core.validate_user import ControlAccess diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/invocationlogs.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/invocationlogs.py index 614181d9..df2e3121 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/invocationlogs.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/invocationlogs.py @@ -10,7 +10,8 @@ from ..encoder import CustomJSONEncoder from ..util import serialize_clean_camel_case from .redis_event import RedisEvent from .resources import Resource -from .responses import internal_server_error, make_response, not_found_error, unauthorized_error +from .responses import (internal_server_error, make_response, not_found_error, + unauthorized_error) TOTAL_FEATURES = 1 SUPPORTED_FEATURES_HEX = "0" diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/encoder.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/encoder.py index e072c7d6..28d87693 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/encoder.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/encoder.py @@ -1,6 +1,5 @@ -from connexion.jsonifier import JSONEncoder - from api_invocation_logs.models.base_model import Model +from connexion.jsonifier import JSONEncoder class CustomJSONEncoder(JSONEncoder): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/__init__.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/__init__.py index 78235692..d036df69 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/__init__.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/__init__.py @@ -1,13 +1,2 @@ # flake8: noqa # import models into model package -from api_invocation_logs.models.interface_description import InterfaceDescription -from api_invocation_logs.models.invalid_param import InvalidParam -from api_invocation_logs.models.invocation_log import InvocationLog -from api_invocation_logs.models.log import Log -from api_invocation_logs.models.net_slice_id import NetSliceId -from api_invocation_logs.models.o_auth_grant_type import OAuthGrantType -from api_invocation_logs.models.operation import Operation -from api_invocation_logs.models.problem_details import ProblemDetails -from api_invocation_logs.models.protocol import Protocol -from api_invocation_logs.models.security_method import SecurityMethod -from api_invocation_logs.models.snssai import Snssai diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model.py index 642d94a3..d7f252ca 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from api_invocation_logs import util diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/interface_description.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/interface_description.py index 10e8ad15..be37ab27 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/interface_description.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/interface_description.py @@ -1,16 +1,14 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.o_auth_grant_type import OAuthGrantType -from api_invocation_logs.models.security_method import SecurityMethod -import re from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model +from api_invocation_logs.models.o_auth_grant_type import \ + OAuthGrantType # noqa: E501 +from api_invocation_logs.models.security_method import \ + SecurityMethod # noqa: E501 -from api_invocation_logs.models.o_auth_grant_type import OAuthGrantType # noqa: E501 -from api_invocation_logs.models.security_method import SecurityMethod # noqa: E501 -import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invalid_param.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invalid_param.py index d7ec5735..18d055db 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invalid_param.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invocation_log.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invocation_log.py index 6110fce8..e7464b7f 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invocation_log.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/invocation_log.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.log import Log -import re from api_invocation_logs import util - +from api_invocation_logs.models.base_model import Model from api_invocation_logs.models.log import Log # noqa: E501 -import re # noqa: E501 + class InvocationLog(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/log.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/log.py index 6ec94e12..8a912ad1 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/log.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/log.py @@ -1,19 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.interface_description import InterfaceDescription -from api_invocation_logs.models.net_slice_id import NetSliceId -from api_invocation_logs.models.operation import Operation -from api_invocation_logs.models.protocol import Protocol from api_invocation_logs import util - -from api_invocation_logs.models.interface_description import InterfaceDescription # noqa: E501 +from api_invocation_logs.models.base_model import Model +from api_invocation_logs.models.interface_description import \ + InterfaceDescription # noqa: E501 from api_invocation_logs.models.net_slice_id import NetSliceId # noqa: E501 from api_invocation_logs.models.operation import Operation # noqa: E501 from api_invocation_logs.models.protocol import Protocol # noqa: E501 + class Log(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/net_slice_id.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/net_slice_id.py index 66e7c4d3..3f37e1dd 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/net_slice_id.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/net_slice_id.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.snssai import Snssai from api_invocation_logs import util - +from api_invocation_logs.models.base_model import Model from api_invocation_logs.models.snssai import Snssai # noqa: E501 + class NetSliceId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/o_auth_grant_type.py index 1165483f..9c8fcf7d 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/o_auth_grant_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation.py index 513f6d00..a4bea825 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model class Operation(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/problem_details.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/problem_details.py index 1ab0e54c..0f87859c 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/problem_details.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/problem_details.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.invalid_param import InvalidParam -import re from api_invocation_logs import util - +from api_invocation_logs.models.base_model import Model from api_invocation_logs.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol.py index ec4bf3b2..fe449f01 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model class Protocol(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method.py index b47fd3ef..3f0ff15b 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/snssai.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/snssai.py index b5d91b0a..a278c191 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/snssai.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/snssai.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api_invocation_logs.models.base_model import Model -import re from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model -import re # noqa: E501 class Snssai(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/__init__.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/__init__.py index 52299ec8..5282c992 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/__init__.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/__init__.py @@ -1,9 +1,8 @@ import logging import connexion -from flask_testing import TestCase - from api_invocation_logs.encoder import JSONEncoder +from flask_testing import TestCase class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/test_default_controller.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/test_default_controller.py index 534b5d2c..da4ebd65 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/test_default_controller.py @@ -1,10 +1,11 @@ import unittest -from flask import json - -from api_invocation_logs.models.invocation_log import InvocationLog # noqa: E501 -from api_invocation_logs.models.problem_details import ProblemDetails # noqa: E501 +from api_invocation_logs.models.invocation_log import \ + InvocationLog # noqa: E501 +from api_invocation_logs.models.problem_details import \ + ProblemDetails # noqa: E501 from api_invocation_logs.test import BaseTestCase +from flask import json class TestDefaultController(BaseTestCase): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/util.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/util.py index a253e469..598868c3 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/util.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/util.py @@ -1,8 +1,8 @@ import datetime -import typing from api_invocation_logs import typing_utils + def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py index e96a0db8..bb5ba1bb 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "api_invocation_logs" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__main__.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__main__.py index 4ebe8e90..1b2cdd80 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__main__.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/__main__.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import connexion - from openapi_server import encoder diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/default_controller.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/default_controller.py index 44177942..74f5e841 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/default_controller.py @@ -1,17 +1,15 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union +import connexion from openapi_server.models.aef_location import AefLocation # noqa: E501 -from openapi_server.models.communication_type import CommunicationType # noqa: E501 +from openapi_server.models.communication_type import \ + CommunicationType # noqa: E501 from openapi_server.models.data_format import DataFormat # noqa: E501 -from openapi_server.models.open_discovery_resp import OpenDiscoveryResp # noqa: E501 +from openapi_server.models.open_discovery_resp import \ + OpenDiscoveryResp # noqa: E501 from openapi_server.models.problem_details import ProblemDetails # noqa: E501 from openapi_server.models.protocol import Protocol # noqa: E501 from openapi_server.models.res_oper_info import ResOperInfo # noqa: E501 from openapi_server.models.service_kpis import ServiceKpis # noqa: E501 -from openapi_server import util def service_apis_get(api_names=None, api_versions=None, comm_type=None, protocols=None, data_format=None, api_cats=None, preferred_aef_loc=None, api_prov_names=None, api_supported_features=None, api_ids=None, service_kpis=None, res_ops=None, supported_features=None): # noqa: E501 diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/security_controller.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/encoder.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/encoder.py index 60f4fa67..8eac4f36 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/encoder.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/encoder.py @@ -1,5 +1,4 @@ from connexion.apps.flask_app import FlaskJSONEncoder - from openapi_server.models.base_model import Model diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/__init__.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/__init__.py index 35a94576..d036df69 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/__init__.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/__init__.py @@ -1,36 +1,2 @@ # flake8: noqa # import models into model package -from openapi_server.models.aef_location import AefLocation -from openapi_server.models.api_status import ApiStatus -from openapi_server.models.civic_address import CivicAddress -from openapi_server.models.communication_type import CommunicationType -from openapi_server.models.custom_operation import CustomOperation -from openapi_server.models.data_format import DataFormat -from openapi_server.models.ellipsoid_arc import EllipsoidArc -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.geographic_area import GeographicArea -from openapi_server.models.geographical_coordinates import GeographicalCoordinates -from openapi_server.models.invalid_param import InvalidParam -from openapi_server.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse -from openapi_server.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid -from openapi_server.models.local_origin import LocalOrigin -from openapi_server.models.open_api_details import OpenAPIDetails -from openapi_server.models.open_aef_profile import OpenAefProfile -from openapi_server.models.open_discovery_resp import OpenDiscoveryResp -from openapi_server.models.operation import Operation -from openapi_server.models.point import Point -from openapi_server.models.point_altitude import PointAltitude -from openapi_server.models.point_altitude_uncertainty import PointAltitudeUncertainty -from openapi_server.models.point_uncertainty_circle import PointUncertaintyCircle -from openapi_server.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from openapi_server.models.polygon import Polygon -from openapi_server.models.problem_details import ProblemDetails -from openapi_server.models.protocol import Protocol -from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation -from openapi_server.models.res_oper_info import ResOperInfo -from openapi_server.models.resource import Resource -from openapi_server.models.service_kpis import ServiceKpis -from openapi_server.models.supported_gad_shapes import SupportedGADShapes -from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse -from openapi_server.models.uncertainty_ellipsoid import UncertaintyEllipsoid -from openapi_server.models.version import Version diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/aef_location.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/aef_location.py index 7e4da31c..665502a3 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/aef_location.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/aef_location.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.civic_address import CivicAddress -from openapi_server.models.geographic_area import GeographicArea from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.civic_address import CivicAddress # noqa: E501 from openapi_server.models.geographic_area import GeographicArea # noqa: E501 + class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/api_status.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/api_status.py index 8785793c..e13cbf69 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/api_status.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/api_status.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class ApiStatus(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/base_model.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/base_model.py index c01b423a..8b699027 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/base_model.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from openapi_server import util diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/civic_address.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/civic_address.py index 5f0f6f37..973c3040 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/civic_address.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/civic_address.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/communication_type.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/communication_type.py index 001efa0e..76e66900 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/communication_type.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/communication_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/custom_operation.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/custom_operation.py index f258fc74..3e8f2a2e 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/custom_operation.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/custom_operation.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.communication_type import CommunicationType -from openapi_server.models.operation import Operation from openapi_server import util - -from openapi_server.models.communication_type import CommunicationType # noqa: E501 +from openapi_server.models.base_model import Model +from openapi_server.models.communication_type import \ + CommunicationType # noqa: E501 from openapi_server.models.operation import Operation # noqa: E501 + class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/data_format.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/data_format.py index 701260cf..31356c75 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/data_format.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/data_format.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class DataFormat(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/ellipsoid_arc.py index ec6f1205..6bf50cfb 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/ellipsoid_arc.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.geographical_coordinates import GeographicalCoordinates -from openapi_server.models.supported_gad_shapes import SupportedGADShapes from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.gad_shape import GADShape # noqa: E501 -from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/gad_shape.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/gad_shape.py index 69ff529b..9ac0d197 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/gad_shape.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/gad_shape.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.supported_gad_shapes import SupportedGADShapes from openapi_server import util +from openapi_server.models.base_model import Model +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographic_area.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographic_area.py index 2215abec..ea775a1f 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographic_area.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographic_area.py @@ -1,30 +1,25 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.ellipsoid_arc import EllipsoidArc -from openapi_server.models.geographical_coordinates import GeographicalCoordinates -from openapi_server.models.point import Point -from openapi_server.models.point_altitude import PointAltitude -from openapi_server.models.point_altitude_uncertainty import PointAltitudeUncertainty -from openapi_server.models.point_uncertainty_circle import PointUncertaintyCircle -from openapi_server.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from openapi_server.models.polygon import Polygon -from openapi_server.models.supported_gad_shapes import SupportedGADShapes -from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.ellipsoid_arc import EllipsoidArc # noqa: E501 -from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from openapi_server.models.point import Point # noqa: E501 from openapi_server.models.point_altitude import PointAltitude # noqa: E501 -from openapi_server.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 -from openapi_server.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 -from openapi_server.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from openapi_server.models.point_altitude_uncertainty import \ + PointAltitudeUncertainty # noqa: E501 +from openapi_server.models.point_uncertainty_circle import \ + PointUncertaintyCircle # noqa: E501 +from openapi_server.models.point_uncertainty_ellipse import \ + PointUncertaintyEllipse # noqa: E501 from openapi_server.models.polygon import Polygon # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographical_coordinates.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographical_coordinates.py index a25d0f8f..06b7275f 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/geographical_coordinates.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/invalid_param.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/invalid_param.py index e8cb5bec..16085367 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/invalid_param.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local2d_point_uncertainty_ellipse.py index 5a50d8a9..0d040baf 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local2d_point_uncertainty_ellipse.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.local_origin import LocalOrigin -from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation -from openapi_server.models.supported_gad_shapes import SupportedGADShapes -from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.gad_shape import GADShape # noqa: E501 from openapi_server.models.local_origin import LocalOrigin # noqa: E501 -from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from openapi_server.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local3d_point_uncertainty_ellipsoid.py index 7b43910f..28cbd1e8 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local3d_point_uncertainty_ellipsoid.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.local_origin import LocalOrigin -from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation -from openapi_server.models.supported_gad_shapes import SupportedGADShapes -from openapi_server.models.uncertainty_ellipsoid import UncertaintyEllipsoid from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.gad_shape import GADShape # noqa: E501 from openapi_server.models.local_origin import LocalOrigin # noqa: E501 -from openapi_server.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from openapi_server.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 +from openapi_server.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipsoid import \ + UncertaintyEllipsoid # noqa: E501 + class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local_origin.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local_origin.py index 06aa4d4c..75df97d1 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local_origin.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/local_origin.py @@ -1,14 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.geographic_area import GeographicArea -from openapi_server.models.geographical_coordinates import GeographicalCoordinates from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.geographic_area import GeographicArea # noqa: E501 -from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from openapi_server.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 + class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_aef_profile.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_aef_profile.py index 0957f3c1..24bcc454 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_aef_profile.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_aef_profile.py @@ -1,21 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.aef_location import AefLocation -from openapi_server.models.data_format import DataFormat -from openapi_server.models.protocol import Protocol -from openapi_server.models.service_kpis import ServiceKpis -from openapi_server.models.version import Version from openapi_server import util - from openapi_server.models.aef_location import AefLocation # noqa: E501 +from openapi_server.models.base_model import Model from openapi_server.models.data_format import DataFormat # noqa: E501 from openapi_server.models.protocol import Protocol # noqa: E501 from openapi_server.models.service_kpis import ServiceKpis # noqa: E501 from openapi_server.models.version import Version # noqa: E501 + class OpenAefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_api_details.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_api_details.py index f9f5119e..a01eb66f 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_api_details.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_api_details.py @@ -1,16 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.api_status import ApiStatus -from openapi_server.models.open_aef_profile import OpenAefProfile -import re from openapi_server import util - from openapi_server.models.api_status import ApiStatus # noqa: E501 +from openapi_server.models.base_model import Model from openapi_server.models.open_aef_profile import OpenAefProfile # noqa: E501 -import re # noqa: E501 + class OpenAPIDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_discovery_resp.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_discovery_resp.py index bb20fde1..cf16e8c8 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_discovery_resp.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/open_discovery_resp.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.open_api_details import OpenAPIDetails -import re from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.open_api_details import OpenAPIDetails # noqa: E501 -import re # noqa: E501 + class OpenDiscoveryResp(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/operation.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/operation.py index 5f3a3b73..0b44da15 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/operation.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/operation.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class Operation(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point.py index e9db65b0..4d45a0c1 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.geographical_coordinates import GeographicalCoordinates -from openapi_server.models.supported_gad_shapes import SupportedGADShapes from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.gad_shape import GADShape # noqa: E501 -from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude.py index 9aa7cfc4..13acf21e 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.geographical_coordinates import GeographicalCoordinates -from openapi_server.models.supported_gad_shapes import SupportedGADShapes from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.gad_shape import GADShape # noqa: E501 -from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude_uncertainty.py index b1aee478..b3cbd4e8 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_altitude_uncertainty.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.geographical_coordinates import GeographicalCoordinates -from openapi_server.models.supported_gad_shapes import SupportedGADShapes -from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.gad_shape import GADShape # noqa: E501 -from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from openapi_server.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_circle.py index ad1bb028..9f1330eb 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_circle.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.geographical_coordinates import GeographicalCoordinates -from openapi_server.models.supported_gad_shapes import SupportedGADShapes from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.gad_shape import GADShape # noqa: E501 -from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_ellipse.py index ae5ce92d..a0149b29 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/point_uncertainty_ellipse.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.geographical_coordinates import GeographicalCoordinates -from openapi_server.models.supported_gad_shapes import SupportedGADShapes -from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.gad_shape import GADShape # noqa: E501 -from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from openapi_server.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from openapi_server.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from openapi_server.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/polygon.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/polygon.py index 9dfe4c29..34e16e8e 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/polygon.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/polygon.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.gad_shape import GADShape -from openapi_server.models.geographical_coordinates import GeographicalCoordinates -from openapi_server.models.supported_gad_shapes import SupportedGADShapes from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.gad_shape import GADShape # noqa: E501 -from openapi_server.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from openapi_server.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from openapi_server.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from openapi_server.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/problem_details.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/problem_details.py index 2d07f637..d1f6447e 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/problem_details.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/problem_details.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.invalid_param import InvalidParam -import re from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/protocol.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/protocol.py index b705e01c..6ee3233b 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/protocol.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/protocol.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class Protocol(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/relative_cartesian_location.py index aff00209..672c6817 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/relative_cartesian_location.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/res_oper_info.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/res_oper_info.py index 7d32e822..c90e86ed 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/res_oper_info.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/res_oper_info.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.operation import Operation from openapi_server import util - +from openapi_server.models.base_model import Model from openapi_server.models.operation import Operation # noqa: E501 + class ResOperInfo(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/resource.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/resource.py index 696f10ae..34afd1b6 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/resource.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/resource.py @@ -1,17 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.communication_type import CommunicationType -from openapi_server.models.custom_operation import CustomOperation -from openapi_server.models.operation import Operation from openapi_server import util - -from openapi_server.models.communication_type import CommunicationType # noqa: E501 -from openapi_server.models.custom_operation import CustomOperation # noqa: E501 +from openapi_server.models.base_model import Model +from openapi_server.models.communication_type import \ + CommunicationType # noqa: E501 +from openapi_server.models.custom_operation import \ + CustomOperation # noqa: E501 from openapi_server.models.operation import Operation # noqa: E501 + class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/service_kpis.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/service_kpis.py index 727c7ddb..3b80d30a 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/service_kpis.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/service_kpis.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -import re from openapi_server import util +from openapi_server.models.base_model import Model -import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/supported_gad_shapes.py index 971a04ca..971f35ed 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/supported_gad_shapes.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipse.py index ae5d0316..20dbc8e8 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipse.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipsoid.py index ac84487a..5b1466d4 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/uncertainty_ellipsoid.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model from openapi_server import util +from openapi_server.models.base_model import Model class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/version.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/version.py index eb18ce31..b35e4246 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/version.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/models/version.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from openapi_server.models.base_model import Model -from openapi_server.models.custom_operation import CustomOperation -from openapi_server.models.resource import Resource from openapi_server import util - -from openapi_server.models.custom_operation import CustomOperation # noqa: E501 +from openapi_server.models.base_model import Model +from openapi_server.models.custom_operation import \ + CustomOperation # noqa: E501 from openapi_server.models.resource import Resource # noqa: E501 + class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/__init__.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/__init__.py index 364aba9f..1ff862fd 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/__init__.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/__init__.py @@ -2,7 +2,6 @@ import logging import connexion from flask_testing import TestCase - from openapi_server.encoder import JSONEncoder diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/test_default_controller.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/test_default_controller.py index 7c97e901..96e22b12 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/test/test_default_controller.py @@ -1,11 +1,11 @@ import unittest -from flask import json - from openapi_server.models.aef_location import AefLocation # noqa: E501 -from openapi_server.models.communication_type import CommunicationType # noqa: E501 +from openapi_server.models.communication_type import \ + CommunicationType # noqa: E501 from openapi_server.models.data_format import DataFormat # noqa: E501 -from openapi_server.models.open_discovery_resp import OpenDiscoveryResp # noqa: E501 +from openapi_server.models.open_discovery_resp import \ + OpenDiscoveryResp # noqa: E501 from openapi_server.models.problem_details import ProblemDetails # noqa: E501 from openapi_server.models.protocol import Protocol # noqa: E501 from openapi_server.models.res_oper_info import ResOperInfo # noqa: E501 diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/util.py b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/util.py index bd83c5b3..eed61878 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/util.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/openapi_server/util.py @@ -1,6 +1,5 @@ import datetime -import typing from openapi_server import typing_utils diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/setup.py b/services/TS29222_CAPIF_Open_Discover_Service_API/setup.py index 1c8cdaf5..a83307af 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/setup.py +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "openapi_server" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/app.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/app.py index 46e0941c..a0f866ad 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/app.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/app.py @@ -15,13 +15,15 @@ from flask_executor import Executor from flask_jwt_extended import JWTManager from fluent import sender from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \ + OTLPSpanExporter from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry.instrumentation.redis import RedisInstrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.trace.propagation.tracecontext import \ + TraceContextTextMapPropagator NAME = "Publish-Service" diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py index 1e223b04..a7c06cdd 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py @@ -1,23 +1,18 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union - -from published_apis.models.problem_details import ProblemDetails # noqa: E501 -from published_apis import util - from functools import wraps from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request -from published_apis.vendor_specific import find_attribute_in_body, vendor_specific_key_n_value +from published_apis.models.problem_details import ProblemDetails # noqa: E501 +from published_apis.vendor_specific import (find_attribute_in_body, + vendor_specific_key_n_value) from ..core.responses import bad_request_error -from ..core.serviceapidescriptions import PublishServiceOperations -from ..core.serviceapidescriptions import return_negotiated_supp_feat_dict +from ..core.serviceapidescriptions import (PublishServiceOperations, + return_negotiated_supp_feat_dict) from ..core.validate_user import ControlAccess -from ..models.service_api_description import ServiceAPIDescription # noqa: E501 +from ..models.service_api_description import \ + ServiceAPIDescription # noqa: E501 service_operations = PublishServiceOperations() diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/individual_apf_published_api_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/individual_apf_published_api_controller.py index 78336ca4..d8098277 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/individual_apf_published_api_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/individual_apf_published_api_controller.py @@ -3,7 +3,8 @@ from functools import wraps from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request -from published_apis.models.service_api_description_patch import ServiceAPIDescriptionPatch # noqa: E501 +from published_apis.models.service_api_description_patch import \ + ServiceAPIDescriptionPatch # noqa: E501 from ..core.serviceapidescriptions import PublishServiceOperations from ..core.validate_user import ControlAccess diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/serviceapidescriptions.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/serviceapidescriptions.py index 658957ef..c2ff0506 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/serviceapidescriptions.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/serviceapidescriptions.py @@ -12,15 +12,9 @@ from .auth_manager import AuthManager from .publisher import Publisher from .redis_event import RedisEvent from .resources import Resource -from .responses import ( - bad_request_error, - forbidden_error, - internal_server_error, - make_response, - not_found_error, - unauthorized_error -) - +from .responses import (bad_request_error, forbidden_error, + internal_server_error, make_response, not_found_error, + unauthorized_error) TOTAL_FEATURES = 10 SUPPORTED_FEATURES_HEX = "120" diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py index 4d957655..6f24878a 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py @@ -1,5 +1,4 @@ from connexion.jsonifier import JSONEncoder - from published_apis.models.base_model import Model diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/__init__.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/__init__.py index 57cff052..d036df69 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/__init__.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/__init__.py @@ -1,46 +1,2 @@ # flake8: noqa # import models into model package -from published_apis.models.aef_location import AefLocation -from published_apis.models.aef_profile import AefProfile -from published_apis.models.api_status import ApiStatus -from published_apis.models.civic_address import CivicAddress -from published_apis.models.communication_type import CommunicationType -from published_apis.models.custom_operation import CustomOperation -from published_apis.models.data_format import DataFormat -from published_apis.models.ellipsoid_arc import EllipsoidArc -from published_apis.models.gad_shape import GADShape -from published_apis.models.geographic_area import GeographicArea -from published_apis.models.geographical_coordinates import GeographicalCoordinates -from published_apis.models.interface_description import InterfaceDescription -from published_apis.models.invalid_param import InvalidParam -from published_apis.models.ip_addr_range import IpAddrRange -from published_apis.models.ipv4_address_range import Ipv4AddressRange -from published_apis.models.ipv6_addr1 import Ipv6Addr1 -from published_apis.models.ipv6_address_range import Ipv6AddressRange -from published_apis.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse -from published_apis.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid -from published_apis.models.local_origin import LocalOrigin -from published_apis.models.net_slice_id import NetSliceId -from published_apis.models.o_auth_grant_type import OAuthGrantType -from published_apis.models.operation import Operation -from published_apis.models.point import Point -from published_apis.models.point_altitude import PointAltitude -from published_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty -from published_apis.models.point_uncertainty_circle import PointUncertaintyCircle -from published_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from published_apis.models.polygon import Polygon -from published_apis.models.problem_details import ProblemDetails -from published_apis.models.protocol import Protocol -from published_apis.models.published_api_path import PublishedApiPath -from published_apis.models.relative_cartesian_location import RelativeCartesianLocation -from published_apis.models.resource import Resource -from published_apis.models.security_method import SecurityMethod -from published_apis.models.service_api_description import ServiceAPIDescription -from published_apis.models.service_api_description_patch import ServiceAPIDescriptionPatch -from published_apis.models.service_kpis import ServiceKpis -from published_apis.models.shareable_information import ShareableInformation -from published_apis.models.snssai import Snssai -from published_apis.models.supported_gad_shapes import SupportedGADShapes -from published_apis.models.uncertainty_ellipse import UncertaintyEllipse -from published_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid -from published_apis.models.version import Version diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_location.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_location.py index ccc48596..ca2cc22e 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_location.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_location.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.civic_address import CivicAddress -from published_apis.models.geographic_area import GeographicArea from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.civic_address import CivicAddress # noqa: E501 from published_apis.models.geographic_area import GeographicArea # noqa: E501 + class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_profile.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_profile.py index 249c595e..d91a4c6e 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_profile.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_profile.py @@ -1,29 +1,21 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.aef_location import AefLocation -from published_apis.models.data_format import DataFormat -from published_apis.models.interface_description import InterfaceDescription -from published_apis.models.ip_addr_range import IpAddrRange -from published_apis.models.o_auth_grant_type import OAuthGrantType -from published_apis.models.protocol import Protocol -from published_apis.models.security_method import SecurityMethod -from published_apis.models.service_kpis import ServiceKpis -from published_apis.models.version import Version from published_apis import util - from published_apis.models.aef_location import AefLocation # noqa: E501 +from published_apis.models.base_model import Model from published_apis.models.data_format import DataFormat # noqa: E501 -from published_apis.models.interface_description import InterfaceDescription # noqa: E501 +from published_apis.models.interface_description import \ + InterfaceDescription # noqa: E501 from published_apis.models.ip_addr_range import IpAddrRange # noqa: E501 -from published_apis.models.o_auth_grant_type import OAuthGrantType # noqa: E501 +from published_apis.models.o_auth_grant_type import \ + OAuthGrantType # noqa: E501 from published_apis.models.protocol import Protocol # noqa: E501 from published_apis.models.security_method import SecurityMethod # noqa: E501 from published_apis.models.service_kpis import ServiceKpis # noqa: E501 from published_apis.models.version import Version # noqa: E501 + class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py index 99c705c3..26964f00 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class ApiStatus(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py index ae24c559..d4fac36d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from published_apis import util diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/civic_address.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/civic_address.py index b4fa7c06..2985c188 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/civic_address.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/civic_address.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type.py index a91645f4..34963f38 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/custom_operation.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/custom_operation.py index 1f4a66a6..e9557704 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/custom_operation.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/custom_operation.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.communication_type import CommunicationType -from published_apis.models.operation import Operation from published_apis import util - -from published_apis.models.communication_type import CommunicationType # noqa: E501 +from published_apis.models.base_model import Model +from published_apis.models.communication_type import \ + CommunicationType # noqa: E501 from published_apis.models.operation import Operation # noqa: E501 + class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format.py index 5c6c9072..0f79d52e 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class DataFormat(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py index ca81b714..4e6598b3 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.gad_shape import GADShape -from published_apis.models.geographical_coordinates import GeographicalCoordinates -from published_apis.models.supported_gad_shapes import SupportedGADShapes from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.gad_shape import GADShape # noqa: E501 -from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from published_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py index f4754606..527ea675 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.supported_gad_shapes import SupportedGADShapes from published_apis import util +from published_apis.models.base_model import Model +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py index 0fa074cd..ac4963d8 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py @@ -1,30 +1,25 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.ellipsoid_arc import EllipsoidArc -from published_apis.models.geographical_coordinates import GeographicalCoordinates -from published_apis.models.point import Point -from published_apis.models.point_altitude import PointAltitude -from published_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty -from published_apis.models.point_uncertainty_circle import PointUncertaintyCircle -from published_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from published_apis.models.polygon import Polygon -from published_apis.models.supported_gad_shapes import SupportedGADShapes -from published_apis.models.uncertainty_ellipse import UncertaintyEllipse from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.ellipsoid_arc import EllipsoidArc # noqa: E501 -from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from published_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from published_apis.models.point import Point # noqa: E501 from published_apis.models.point_altitude import PointAltitude # noqa: E501 -from published_apis.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 -from published_apis.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 -from published_apis.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from published_apis.models.point_altitude_uncertainty import \ + PointAltitudeUncertainty # noqa: E501 +from published_apis.models.point_uncertainty_circle import \ + PointUncertaintyCircle # noqa: E501 +from published_apis.models.point_uncertainty_ellipse import \ + PointUncertaintyEllipse # noqa: E501 from published_apis.models.polygon import Polygon # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from published_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from published_apis.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py index 49c59769..253a9089 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/interface_description.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/interface_description.py index 9dc53d39..57beee92 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/interface_description.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/interface_description.py @@ -1,16 +1,13 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.o_auth_grant_type import OAuthGrantType -from published_apis.models.security_method import SecurityMethod -import re from published_apis import util - -from published_apis.models.o_auth_grant_type import OAuthGrantType # noqa: E501 +from published_apis.models.base_model import Model +from published_apis.models.o_auth_grant_type import \ + OAuthGrantType # noqa: E501 from published_apis.models.security_method import SecurityMethod # noqa: E501 -import re # noqa: E501 + class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/invalid_param.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/invalid_param.py index 16472ecc..b7b4d5ce 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/invalid_param.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ip_addr_range.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ip_addr_range.py index 7934c226..17227d51 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ip_addr_range.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.ipv4_address_range import Ipv4AddressRange -from published_apis.models.ipv6_address_range import Ipv6AddressRange from published_apis import util +from published_apis.models.base_model import Model +from published_apis.models.ipv4_address_range import \ + Ipv4AddressRange # noqa: E501 +from published_apis.models.ipv6_address_range import \ + Ipv6AddressRange # noqa: E501 -from published_apis.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 -from published_apis.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv4_address_range.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv4_address_range.py index f72ef00e..2547d74c 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv4_address_range.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -import re from published_apis import util +from published_apis.models.base_model import Model -import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py index 268ec666..354ce469 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_address_range.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_address_range.py index 37f319c8..a28eff1f 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_address_range.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.ipv6_addr1 import Ipv6Addr1 from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 + class Ipv6AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local2d_point_uncertainty_ellipse.py index 2c575408..5d918f09 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local2d_point_uncertainty_ellipse.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.gad_shape import GADShape -from published_apis.models.local_origin import LocalOrigin -from published_apis.models.relative_cartesian_location import RelativeCartesianLocation -from published_apis.models.supported_gad_shapes import SupportedGADShapes -from published_apis.models.uncertainty_ellipse import UncertaintyEllipse from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.local_origin import LocalOrigin # noqa: E501 -from published_apis.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from published_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from published_apis.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from published_apis.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local3d_point_uncertainty_ellipsoid.py index 2dfe87ae..d10e304d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local3d_point_uncertainty_ellipsoid.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.gad_shape import GADShape -from published_apis.models.local_origin import LocalOrigin -from published_apis.models.relative_cartesian_location import RelativeCartesianLocation -from published_apis.models.supported_gad_shapes import SupportedGADShapes -from published_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.gad_shape import GADShape # noqa: E501 from published_apis.models.local_origin import LocalOrigin # noqa: E501 -from published_apis.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from published_apis.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 +from published_apis.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from published_apis.models.uncertainty_ellipsoid import \ + UncertaintyEllipsoid # noqa: E501 + class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local_origin.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local_origin.py index 6686d14d..aaef45f0 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local_origin.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local_origin.py @@ -1,14 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.geographic_area import GeographicArea -from published_apis.models.geographical_coordinates import GeographicalCoordinates from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.geographic_area import GeographicArea # noqa: E501 -from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from published_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 + class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/net_slice_id.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/net_slice_id.py index 55fbea33..9f433ff3 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/net_slice_id.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/net_slice_id.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.snssai import Snssai from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.snssai import Snssai # noqa: E501 + class NetSliceId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/o_auth_grant_type.py index d957daf8..a61d636f 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/o_auth_grant_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation.py index 0923ce76..abfa0c22 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class Operation(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point.py index d16cbaaa..a0fdab6b 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.gad_shape import GADShape -from published_apis.models.geographical_coordinates import GeographicalCoordinates -from published_apis.models.supported_gad_shapes import SupportedGADShapes from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.gad_shape import GADShape # noqa: E501 -from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from published_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py index 0fb374f7..c1967bcf 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.gad_shape import GADShape -from published_apis.models.geographical_coordinates import GeographicalCoordinates -from published_apis.models.supported_gad_shapes import SupportedGADShapes from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.gad_shape import GADShape # noqa: E501 -from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from published_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py index cf96f55d..2cbf072c 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.gad_shape import GADShape -from published_apis.models.geographical_coordinates import GeographicalCoordinates -from published_apis.models.supported_gad_shapes import SupportedGADShapes -from published_apis.models.uncertainty_ellipse import UncertaintyEllipse from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.gad_shape import GADShape # noqa: E501 -from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from published_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from published_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from published_apis.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py index 3b773f51..d2dbf9ea 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.gad_shape import GADShape -from published_apis.models.geographical_coordinates import GeographicalCoordinates -from published_apis.models.supported_gad_shapes import SupportedGADShapes from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.gad_shape import GADShape # noqa: E501 -from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from published_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py index ea57f68d..9c1094f0 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.gad_shape import GADShape -from published_apis.models.geographical_coordinates import GeographicalCoordinates -from published_apis.models.supported_gad_shapes import SupportedGADShapes -from published_apis.models.uncertainty_ellipse import UncertaintyEllipse from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.gad_shape import GADShape # noqa: E501 -from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from published_apis.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from published_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from published_apis.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py index 8a3f6baa..47b66cfe 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.gad_shape import GADShape -from published_apis.models.geographical_coordinates import GeographicalCoordinates -from published_apis.models.supported_gad_shapes import SupportedGADShapes from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.gad_shape import GADShape # noqa: E501 -from published_apis.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from published_apis.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from published_apis.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from published_apis.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/problem_details.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/problem_details.py index 41b69ae8..39abad6a 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/problem_details.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/problem_details.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.invalid_param import InvalidParam -import re from published_apis import util - +from published_apis.models.base_model import Model from published_apis.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol.py index 9eb3203e..011e1942 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class Protocol(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/published_api_path.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/published_api_path.py index 4d3538df..8e02d485 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/published_api_path.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/published_api_path.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class PublishedApiPath(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/relative_cartesian_location.py index 2f17cb84..0d1e9116 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/relative_cartesian_location.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/resource.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/resource.py index fe7445df..9c6c42e5 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/resource.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/resource.py @@ -1,17 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.communication_type import CommunicationType -from published_apis.models.custom_operation import CustomOperation -from published_apis.models.operation import Operation from published_apis import util - -from published_apis.models.communication_type import CommunicationType # noqa: E501 -from published_apis.models.custom_operation import CustomOperation # noqa: E501 +from published_apis.models.base_model import Model +from published_apis.models.communication_type import \ + CommunicationType # noqa: E501 +from published_apis.models.custom_operation import \ + CustomOperation # noqa: E501 from published_apis.models.operation import Operation # noqa: E501 + class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method.py index 59142370..97c264ab 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description.py index 4b8fdc83..5d62e68b 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description.py @@ -1,22 +1,17 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.aef_profile import AefProfile -from published_apis.models.api_status import ApiStatus -from published_apis.models.net_slice_id import NetSliceId -from published_apis.models.published_api_path import PublishedApiPath -from published_apis.models.shareable_information import ShareableInformation -import re from published_apis import util - from published_apis.models.aef_profile import AefProfile # noqa: E501 from published_apis.models.api_status import ApiStatus # noqa: E501 +from published_apis.models.base_model import Model from published_apis.models.net_slice_id import NetSliceId # noqa: E501 -from published_apis.models.published_api_path import PublishedApiPath # noqa: E501 -from published_apis.models.shareable_information import ShareableInformation # noqa: E501 -import re # noqa: E501 +from published_apis.models.published_api_path import \ + PublishedApiPath # noqa: E501 +from published_apis.models.shareable_information import \ + ShareableInformation # noqa: E501 + class ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description_patch.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description_patch.py index 71dd39c9..6cb128e8 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description_patch.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description_patch.py @@ -1,20 +1,16 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.aef_profile import AefProfile -from published_apis.models.api_status import ApiStatus -from published_apis.models.published_api_path import PublishedApiPath -from published_apis.models.shareable_information import ShareableInformation -import re from published_apis import util - from published_apis.models.aef_profile import AefProfile # noqa: E501 from published_apis.models.api_status import ApiStatus # noqa: E501 -from published_apis.models.published_api_path import PublishedApiPath # noqa: E501 -from published_apis.models.shareable_information import ShareableInformation # noqa: E501 -import re # noqa: E501 +from published_apis.models.base_model import Model +from published_apis.models.published_api_path import \ + PublishedApiPath # noqa: E501 +from published_apis.models.shareable_information import \ + ShareableInformation # noqa: E501 + class ServiceAPIDescriptionPatch(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_kpis.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_kpis.py index f4b8ae12..ac1a773e 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_kpis.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_kpis.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -import re from published_apis import util +from published_apis.models.base_model import Model -import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/shareable_information.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/shareable_information.py index d608566d..926099ec 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/shareable_information.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/shareable_information.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class ShareableInformation(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/snssai.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/snssai.py index f9b86fc0..d143e2b4 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/snssai.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/snssai.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -import re from published_apis import util +from published_apis.models.base_model import Model -import re # noqa: E501 class Snssai(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py index 50d7db72..095abd0a 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipse.py index 2aef9633..44957aa6 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipse.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py index 88a428d4..0a341783 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model from published_apis import util +from published_apis.models.base_model import Model class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/version.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/version.py index 4126d65a..ce6a7420 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/version.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/version.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from published_apis.models.base_model import Model -from published_apis.models.custom_operation import CustomOperation -from published_apis.models.resource import Resource from published_apis import util - -from published_apis.models.custom_operation import CustomOperation # noqa: E501 +from published_apis.models.base_model import Model +from published_apis.models.custom_operation import \ + CustomOperation # noqa: E501 from published_apis.models.resource import Resource # noqa: E501 + class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/__init__.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/__init__.py index 108a343a..07e31c34 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/__init__.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/__init__.py @@ -2,7 +2,6 @@ import logging import connexion from flask_testing import TestCase - from published_apis.encoder import JSONEncoder diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py index 1de71e7b..d8205f8d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py @@ -1,9 +1,9 @@ import unittest from flask import json - from published_apis.models.problem_details import ProblemDetails # noqa: E501 -from published_apis.models.service_api_description import ServiceAPIDescription # noqa: E501 +from published_apis.models.service_api_description import \ + ServiceAPIDescription # noqa: E501 from published_apis.test import BaseTestCase diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_individual_apf_published_api_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_individual_apf_published_api_controller.py index c9978525..5503d2d1 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_individual_apf_published_api_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_individual_apf_published_api_controller.py @@ -1,10 +1,11 @@ import unittest from flask import json - from published_apis.models.problem_details import ProblemDetails # noqa: E501 -from published_apis.models.service_api_description import ServiceAPIDescription # noqa: E501 -from published_apis.models.service_api_description_patch import ServiceAPIDescriptionPatch # noqa: E501 +from published_apis.models.service_api_description import \ + ServiceAPIDescription # noqa: E501 +from published_apis.models.service_api_description_patch import \ + ServiceAPIDescriptionPatch # noqa: E501 from published_apis.test import BaseTestCase diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py index 57a3e59f..1b195665 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py @@ -1,8 +1,8 @@ import datetime -import typing from published_apis import typing_utils + def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_Publish_Service_API/setup.py b/services/TS29222_CAPIF_Publish_Service_API/setup.py index 031861d9..bff47bfd 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/setup.py +++ b/services/TS29222_CAPIF_Publish_Service_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "published_apis" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/default_controller.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/default_controller.py index 9dafc055..09656f49 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/default_controller.py @@ -1,11 +1,7 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union -from capif_routing_info.models.problem_details import ProblemDetails # noqa: E501 +from capif_routing_info.models.problem_details import \ + ProblemDetails # noqa: E501 from capif_routing_info.models.routing_info import RoutingInfo # noqa: E501 -from capif_routing_info import util def service_apis_service_api_id_get(service_api_id, aef_id, supp_feat=None): # noqa: E501 diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/encoder.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/encoder.py index 106c8209..61d252c5 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/encoder.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/encoder.py @@ -1,6 +1,5 @@ -from connexion.jsonifier import JSONEncoder - from capif_routing_info.models.base_model import Model +from connexion.jsonifier import JSONEncoder class CustomJSONEncoder(JSONEncoder): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/__init__.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/__init__.py index 04378bc9..d036df69 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/__init__.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/__init__.py @@ -1,43 +1,2 @@ # flake8: noqa # import models into model package -from capif_routing_info.models.aef_location import AefLocation -from capif_routing_info.models.aef_profile import AefProfile -from capif_routing_info.models.civic_address import CivicAddress -from capif_routing_info.models.communication_type import CommunicationType -from capif_routing_info.models.custom_operation import CustomOperation -from capif_routing_info.models.data_format import DataFormat -from capif_routing_info.models.ellipsoid_arc import EllipsoidArc -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.geographic_area import GeographicArea -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates -from capif_routing_info.models.interface_description import InterfaceDescription -from capif_routing_info.models.invalid_param import InvalidParam -from capif_routing_info.models.ip_addr_range import IpAddrRange -from capif_routing_info.models.ipv4_address_range import Ipv4AddressRange -from capif_routing_info.models.ipv4_address_range1 import Ipv4AddressRange1 -from capif_routing_info.models.ipv6_addr1 import Ipv6Addr1 -from capif_routing_info.models.ipv6_address_range import Ipv6AddressRange -from capif_routing_info.models.ipv6_address_range1 import Ipv6AddressRange1 -from capif_routing_info.models.local2d_point_uncertainty_ellipse import Local2dPointUncertaintyEllipse -from capif_routing_info.models.local3d_point_uncertainty_ellipsoid import Local3dPointUncertaintyEllipsoid -from capif_routing_info.models.local_origin import LocalOrigin -from capif_routing_info.models.o_auth_grant_type import OAuthGrantType -from capif_routing_info.models.operation import Operation -from capif_routing_info.models.point import Point -from capif_routing_info.models.point_altitude import PointAltitude -from capif_routing_info.models.point_altitude_uncertainty import PointAltitudeUncertainty -from capif_routing_info.models.point_uncertainty_circle import PointUncertaintyCircle -from capif_routing_info.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from capif_routing_info.models.polygon import Polygon -from capif_routing_info.models.problem_details import ProblemDetails -from capif_routing_info.models.protocol import Protocol -from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation -from capif_routing_info.models.resource import Resource -from capif_routing_info.models.routing_info import RoutingInfo -from capif_routing_info.models.routing_rule import RoutingRule -from capif_routing_info.models.security_method import SecurityMethod -from capif_routing_info.models.service_kpis import ServiceKpis -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes -from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse -from capif_routing_info.models.uncertainty_ellipsoid import UncertaintyEllipsoid -from capif_routing_info.models.version import Version diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_location.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_location.py index e60b523e..360463c5 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_location.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_location.py @@ -1,14 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.civic_address import CivicAddress -from capif_routing_info.models.geographic_area import GeographicArea from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.civic_address import CivicAddress # noqa: E501 -from capif_routing_info.models.geographic_area import GeographicArea # noqa: E501 +from capif_routing_info.models.geographic_area import \ + GeographicArea # noqa: E501 + class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_profile.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_profile.py index 2cb26e13..00ae4c85 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_profile.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_profile.py @@ -1,29 +1,22 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.aef_location import AefLocation -from capif_routing_info.models.data_format import DataFormat -from capif_routing_info.models.interface_description import InterfaceDescription -from capif_routing_info.models.ip_addr_range import IpAddrRange -from capif_routing_info.models.o_auth_grant_type import OAuthGrantType -from capif_routing_info.models.protocol import Protocol -from capif_routing_info.models.security_method import SecurityMethod -from capif_routing_info.models.service_kpis import ServiceKpis -from capif_routing_info.models.version import Version from capif_routing_info import util - from capif_routing_info.models.aef_location import AefLocation # noqa: E501 +from capif_routing_info.models.base_model import Model from capif_routing_info.models.data_format import DataFormat # noqa: E501 -from capif_routing_info.models.interface_description import InterfaceDescription # noqa: E501 +from capif_routing_info.models.interface_description import \ + InterfaceDescription # noqa: E501 from capif_routing_info.models.ip_addr_range import IpAddrRange # noqa: E501 -from capif_routing_info.models.o_auth_grant_type import OAuthGrantType # noqa: E501 +from capif_routing_info.models.o_auth_grant_type import \ + OAuthGrantType # noqa: E501 from capif_routing_info.models.protocol import Protocol # noqa: E501 -from capif_routing_info.models.security_method import SecurityMethod # noqa: E501 +from capif_routing_info.models.security_method import \ + SecurityMethod # noqa: E501 from capif_routing_info.models.service_kpis import ServiceKpis # noqa: E501 from capif_routing_info.models.version import Version # noqa: E501 + class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model.py index 48496362..57cac681 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from capif_routing_info import util diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/civic_address.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/civic_address.py index fd306ef3..46b947c1 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/civic_address.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/civic_address.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class CivicAddress(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type.py index c355c6de..84355f1b 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class CommunicationType(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/custom_operation.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/custom_operation.py index 0e0995b2..fb1b8525 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/custom_operation.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/custom_operation.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.communication_type import CommunicationType -from capif_routing_info.models.operation import Operation from capif_routing_info import util - -from capif_routing_info.models.communication_type import CommunicationType # noqa: E501 +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.communication_type import \ + CommunicationType # noqa: E501 from capif_routing_info.models.operation import Operation # noqa: E501 + class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format.py index 83f31a21..8c400e5e 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class DataFormat(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py index 345698c2..939772aa 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.gad_shape import GADShape # noqa: E501 -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_routing_info.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py index d956d8d2..c027b877 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes from capif_routing_info import util +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py index 5c159825..013d4207 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py @@ -1,30 +1,26 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.ellipsoid_arc import EllipsoidArc -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates -from capif_routing_info.models.point import Point -from capif_routing_info.models.point_altitude import PointAltitude -from capif_routing_info.models.point_altitude_uncertainty import PointAltitudeUncertainty -from capif_routing_info.models.point_uncertainty_circle import PointUncertaintyCircle -from capif_routing_info.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from capif_routing_info.models.polygon import Polygon -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes -from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.ellipsoid_arc import EllipsoidArc # noqa: E501 -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from capif_routing_info.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from capif_routing_info.models.point import Point # noqa: E501 -from capif_routing_info.models.point_altitude import PointAltitude # noqa: E501 -from capif_routing_info.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 -from capif_routing_info.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 -from capif_routing_info.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from capif_routing_info.models.point_altitude import \ + PointAltitude # noqa: E501 +from capif_routing_info.models.point_altitude_uncertainty import \ + PointAltitudeUncertainty # noqa: E501 +from capif_routing_info.models.point_uncertainty_circle import \ + PointUncertaintyCircle # noqa: E501 +from capif_routing_info.models.point_uncertainty_ellipse import \ + PointUncertaintyEllipse # noqa: E501 from capif_routing_info.models.polygon import Polygon # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_routing_info.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py index 8b0e51f2..e33c892b 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class GeographicalCoordinates(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/interface_description.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/interface_description.py index f9b79570..028ae4bf 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/interface_description.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/interface_description.py @@ -1,16 +1,14 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.o_auth_grant_type import OAuthGrantType -from capif_routing_info.models.security_method import SecurityMethod -import re from capif_routing_info import util +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.o_auth_grant_type import \ + OAuthGrantType # noqa: E501 +from capif_routing_info.models.security_method import \ + SecurityMethod # noqa: E501 -from capif_routing_info.models.o_auth_grant_type import OAuthGrantType # noqa: E501 -from capif_routing_info.models.security_method import SecurityMethod # noqa: E501 -import re # noqa: E501 class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/invalid_param.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/invalid_param.py index e6d4edec..b42e24b5 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/invalid_param.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ip_addr_range.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ip_addr_range.py index d470760f..aa13f075 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ip_addr_range.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ip_addr_range.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.ipv4_address_range1 import Ipv4AddressRange1 -from capif_routing_info.models.ipv6_address_range1 import Ipv6AddressRange1 from capif_routing_info import util +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.ipv4_address_range1 import \ + Ipv4AddressRange1 # noqa: E501 +from capif_routing_info.models.ipv6_address_range1 import \ + Ipv6AddressRange1 # noqa: E501 -from capif_routing_info.models.ipv4_address_range1 import Ipv4AddressRange1 # noqa: E501 -from capif_routing_info.models.ipv6_address_range1 import Ipv6AddressRange1 # noqa: E501 class IpAddrRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range.py index e4a0b763..cdde631b 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -import re from capif_routing_info import util +from capif_routing_info.models.base_model import Model -import re # noqa: E501 class Ipv4AddressRange(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range1.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range1.py index ca5d5f4a..beae3e04 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range1.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range1.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -import re from capif_routing_info import util +from capif_routing_info.models.base_model import Model -import re # noqa: E501 class Ipv4AddressRange1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py index f4248ba8..bfe95315 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class Ipv6Addr1(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range.py index aeaff9c1..c419f267 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class Ipv6AddressRange(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range1.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range1.py index a1060d8a..2efedbc2 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range1.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range1.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.ipv6_addr1 import Ipv6Addr1 from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.ipv6_addr1 import Ipv6Addr1 # noqa: E501 + class Ipv6AddressRange1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local2d_point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local2d_point_uncertainty_ellipse.py index c9b258b1..f5cf0634 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local2d_point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local2d_point_uncertainty_ellipse.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.local_origin import LocalOrigin -from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes -from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.local_origin import LocalOrigin # noqa: E501 -from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from capif_routing_info.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_routing_info.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class Local2dPointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py index 076c7f49..8a2bbd6d 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py @@ -1,20 +1,17 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.local_origin import LocalOrigin -from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes -from capif_routing_info.models.uncertainty_ellipsoid import UncertaintyEllipsoid from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.gad_shape import GADShape # noqa: E501 from capif_routing_info.models.local_origin import LocalOrigin # noqa: E501 -from capif_routing_info.models.relative_cartesian_location import RelativeCartesianLocation # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_routing_info.models.uncertainty_ellipsoid import UncertaintyEllipsoid # noqa: E501 +from capif_routing_info.models.relative_cartesian_location import \ + RelativeCartesianLocation # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_routing_info.models.uncertainty_ellipsoid import \ + UncertaintyEllipsoid # noqa: E501 + class Local3dPointUncertaintyEllipsoid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local_origin.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local_origin.py index 0b89a0dc..bb062da8 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local_origin.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local_origin.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.geographic_area import GeographicArea -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates from capif_routing_info import util +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.geographic_area import \ + GeographicArea # noqa: E501 +from capif_routing_info.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 -from capif_routing_info.models.geographic_area import GeographicArea # noqa: E501 -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 class LocalOrigin(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/o_auth_grant_type.py index 420b4513..eabc37f6 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/o_auth_grant_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation.py index 856dc775..b72c36a0 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class Operation(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point.py index 88b0a922..d15a3158 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.gad_shape import GADShape # noqa: E501 -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_routing_info.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py index ff5cab9e..d9cb7cd8 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.gad_shape import GADShape # noqa: E501 -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_routing_info.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude_uncertainty.py index fdcea5e2..78ea64b6 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude_uncertainty.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude_uncertainty.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes -from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.gad_shape import GADShape # noqa: E501 -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from capif_routing_info.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_routing_info.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_circle.py index 80faac43..52f9fee4 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_circle.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_circle.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.gad_shape import GADShape # noqa: E501 -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_routing_info.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_ellipse.py index 03c55bf7..21fd3efc 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_ellipse.py @@ -1,18 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes -from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.gad_shape import GADShape # noqa: E501 -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 -from capif_routing_info.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 +from capif_routing_info.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 +from capif_routing_info.models.uncertainty_ellipse import \ + UncertaintyEllipse # noqa: E501 + class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py index 3af36a1e..5e34ade4 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.gad_shape import GADShape -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.gad_shape import GADShape # noqa: E501 -from capif_routing_info.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 -from capif_routing_info.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from capif_routing_info.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 +from capif_routing_info.models.supported_gad_shapes import \ + SupportedGADShapes # noqa: E501 + class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/problem_details.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/problem_details.py index 096c04eb..d095ab5a 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/problem_details.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/problem_details.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.invalid_param import InvalidParam -import re from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol.py index fe4b2bf3..59c0a37d 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class Protocol(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py index 592f4bc6..b71e9ce1 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class RelativeCartesianLocation(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/resource.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/resource.py index c6540878..d9bc7ae6 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/resource.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/resource.py @@ -1,17 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.communication_type import CommunicationType -from capif_routing_info.models.custom_operation import CustomOperation -from capif_routing_info.models.operation import Operation from capif_routing_info import util - -from capif_routing_info.models.communication_type import CommunicationType # noqa: E501 -from capif_routing_info.models.custom_operation import CustomOperation # noqa: E501 +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.communication_type import \ + CommunicationType # noqa: E501 +from capif_routing_info.models.custom_operation import \ + CustomOperation # noqa: E501 from capif_routing_info.models.operation import Operation # noqa: E501 + class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_info.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_info.py index 8d086045..9615bb65 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_info.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_info.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.routing_rule import RoutingRule from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.models.routing_rule import RoutingRule # noqa: E501 + class RoutingInfo(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_rule.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_rule.py index 88cb2c7a..b373e9f0 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_rule.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/routing_rule.py @@ -1,16 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.aef_profile import AefProfile -from capif_routing_info.models.ipv4_address_range import Ipv4AddressRange -from capif_routing_info.models.ipv6_address_range import Ipv6AddressRange from capif_routing_info import util - from capif_routing_info.models.aef_profile import AefProfile # noqa: E501 -from capif_routing_info.models.ipv4_address_range import Ipv4AddressRange # noqa: E501 -from capif_routing_info.models.ipv6_address_range import Ipv6AddressRange # noqa: E501 +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.ipv4_address_range import \ + Ipv4AddressRange # noqa: E501 +from capif_routing_info.models.ipv6_address_range import \ + Ipv6AddressRange # noqa: E501 + class RoutingRule(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method.py index 0ef293df..948a0e08 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/service_kpis.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/service_kpis.py index 869dc5a3..b06404f7 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/service_kpis.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/service_kpis.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -import re from capif_routing_info import util +from capif_routing_info.models.base_model import Model -import re # noqa: E501 class ServiceKpis(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py index e238c97b..ef3f27ba 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class SupportedGADShapes(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipse.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipse.py index 27a6acd1..00d8acb9 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipse.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipse.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class UncertaintyEllipse(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py index 45538ba7..c1307ee3 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model from capif_routing_info import util +from capif_routing_info.models.base_model import Model class UncertaintyEllipsoid(Model): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/version.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/version.py index 1be123dc..87405312 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/version.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/version.py @@ -1,15 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model import Model -from capif_routing_info.models.custom_operation import CustomOperation -from capif_routing_info.models.resource import Resource from capif_routing_info import util - -from capif_routing_info.models.custom_operation import CustomOperation # noqa: E501 +from capif_routing_info.models.base_model import Model +from capif_routing_info.models.custom_operation import \ + CustomOperation # noqa: E501 from capif_routing_info.models.resource import Resource # noqa: E501 + class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/__init__.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/__init__.py index e95f59cf..fe016ad6 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/__init__.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/__init__.py @@ -1,9 +1,8 @@ import logging import connexion -from flask_testing import TestCase - from capif_routing_info.encoder import JSONEncoder +from flask_testing import TestCase class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/test_default_controller.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/test_default_controller.py index 7241b494..b5fa256c 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/test/test_default_controller.py @@ -1,8 +1,7 @@ import unittest -from flask import json - -from capif_routing_info.models.problem_details import ProblemDetails # noqa: E501 +from capif_routing_info.models.problem_details import \ + ProblemDetails # noqa: E501 from capif_routing_info.models.routing_info import RoutingInfo # noqa: E501 from capif_routing_info.test import BaseTestCase diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/util.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/util.py index 6f369d51..fc17a1ca 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/util.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/util.py @@ -1,6 +1,5 @@ import datetime -import typing from capif_routing_info import typing_utils diff --git a/services/TS29222_CAPIF_Routing_Info_API/setup.py b/services/TS29222_CAPIF_Routing_Info_API/setup.py index f3e2e6ad..327037e0 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/setup.py +++ b/services/TS29222_CAPIF_Routing_Info_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "capif_routing_info" VERSION = "1.0.0" diff --git a/services/TS29222_CAPIF_Security_API/capif_security/app.py b/services/TS29222_CAPIF_Security_API/capif_security/app.py index f4f39fde..5756b5b7 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/app.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/app.py @@ -14,13 +14,15 @@ from flask_executor import Executor from flask_jwt_extended import JWTManager from fluent import sender from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import \ + OTLPSpanExporter from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry.instrumentation.redis import RedisInstrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from opentelemetry.trace.propagation.tracecontext import \ + TraceContextTextMapPropagator NAME = "Security-Service" diff --git a/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py b/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py index 9df39a0a..21a51cfc 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py @@ -1,8 +1,10 @@ from functools import wraps from capif_security.models.res_owner_id import ResOwnerId # noqa: E501 -from capif_security.models.security_notification import SecurityNotification # noqa: E501 -from capif_security.models.service_security import ServiceSecurity # noqa: E501 +from capif_security.models.security_notification import \ + SecurityNotification # noqa: E501 +from capif_security.models.service_security import \ + ServiceSecurity # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request diff --git a/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller.py b/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py index 7dee91b3..70d665e3 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py @@ -1,6 +1,9 @@ +import hashlib +import hmac import json import os +import unicodedata from datetime import datetime, timedelta import rfc3987 @@ -8,10 +11,6 @@ from bson import json_util from flask import current_app, request from flask_jwt_extended import create_access_token from pymongo import ReturnDocument -import hmac -import hashlib -import unicodedata - from ..core.publisher import Publisher from ..models.access_token_claims import AccessTokenClaims @@ -20,7 +19,8 @@ from ..models.access_token_rsp import AccessTokenRsp from ..util import clean_empty, dict_to_camel_case, serialize_clean_camel_case from .redis_event import RedisEvent from .resources import Resource -from .responses import bad_request_error, forbidden_error, internal_server_error, make_response, not_found_error +from .responses import (bad_request_error, forbidden_error, + internal_server_error, make_response, not_found_error) publish_ops = Publisher() diff --git a/services/TS29222_CAPIF_Security_API/capif_security/encoder.py b/services/TS29222_CAPIF_Security_API/capif_security/encoder.py index ca3326a5..099bd1f8 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/encoder.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/encoder.py @@ -1,5 +1,5 @@ -from connexion.jsonifier import JSONEncoder from capif_security.models.base_model import Model +from connexion.jsonifier import JSONEncoder class CustomJSONEncoder(JSONEncoder): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py b/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py index f4510143..d036df69 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py @@ -1,30 +1,2 @@ # flake8: noqa # import models into model package -from capif_security.models.access_token_claims import AccessTokenClaims -from capif_security.models.access_token_err import AccessTokenErr -from capif_security.models.access_token_err1 import AccessTokenErr1 -from capif_security.models.access_token_req1 import AccessTokenReq1 -from capif_security.models.access_token_rsp import AccessTokenRsp -from capif_security.models.cause import Cause -from capif_security.models.interface_description import InterfaceDescription -from capif_security.models.invalid_param import InvalidParam -from capif_security.models.invalid_param1 import InvalidParam1 -from capif_security.models.ml_model_inter_ind import MlModelInterInd -from capif_security.models.nf_type import NFType -from capif_security.models.no_profile_match_info import NoProfileMatchInfo -from capif_security.models.no_profile_match_reason import NoProfileMatchReason -from capif_security.models.nwdaf_event import NwdafEvent -from capif_security.models.o_auth_grant_type import OAuthGrantType -from capif_security.models.plmn_id import PlmnId -from capif_security.models.plmn_id_nid import PlmnIdNid -from capif_security.models.problem_details import ProblemDetails -from capif_security.models.problem_details1 import ProblemDetails1 -from capif_security.models.query_param_combination import QueryParamCombination -from capif_security.models.query_parameter import QueryParameter -from capif_security.models.res_owner_id import ResOwnerId -from capif_security.models.security_information import SecurityInformation -from capif_security.models.security_method import SecurityMethod -from capif_security.models.security_notification import SecurityNotification -from capif_security.models.service_security import ServiceSecurity -from capif_security.models.snssai import Snssai -from capif_security.models.websock_notif_config import WebsockNotifConfig diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_claims.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_claims.py index 46593ae6..61a482b6 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_claims.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_claims.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.res_owner_id import ResOwnerId from capif_security import util - +from capif_security.models.base_model import Model from capif_security.models.res_owner_id import ResOwnerId # noqa: E501 + class AccessTokenClaims(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err.py index c6002302..3e7629b5 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class AccessTokenErr(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err1.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err1.py index 23007798..efd3e8f4 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err1.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_err1.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class AccessTokenErr1(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req1.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req1.py index b119ea5c..67d4d2e1 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req1.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req1.py @@ -1,24 +1,17 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.ml_model_inter_ind import MlModelInterInd -from capif_security.models.nf_type import NFType -from capif_security.models.nwdaf_event import NwdafEvent -from capif_security.models.plmn_id import PlmnId -from capif_security.models.plmn_id_nid import PlmnIdNid -from capif_security.models.snssai import Snssai -import re from capif_security import util - -from capif_security.models.ml_model_inter_ind import MlModelInterInd # noqa: E501 +from capif_security.models.base_model import Model +from capif_security.models.ml_model_inter_ind import \ + MlModelInterInd # noqa: E501 from capif_security.models.nf_type import NFType # noqa: E501 from capif_security.models.nwdaf_event import NwdafEvent # noqa: E501 from capif_security.models.plmn_id import PlmnId # noqa: E501 from capif_security.models.plmn_id_nid import PlmnIdNid # noqa: E501 from capif_security.models.snssai import Snssai # noqa: E501 -import re # noqa: E501 + class AccessTokenReq1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_rsp.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_rsp.py index f8e524db..477f3a63 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_rsp.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_rsp.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class AccessTokenRsp(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/base_model.py b/services/TS29222_CAPIF_Security_API/capif_security/models/base_model.py index 4bf93155..32a1219f 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/base_model.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from capif_security import util diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py b/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py index 227ba107..b4fbd86e 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class Cause(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/interface_description.py b/services/TS29222_CAPIF_Security_API/capif_security/models/interface_description.py index ade7fc69..58119e8b 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/interface_description.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/interface_description.py @@ -1,16 +1,13 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.o_auth_grant_type import OAuthGrantType -from capif_security.models.security_method import SecurityMethod -import re from capif_security import util - -from capif_security.models.o_auth_grant_type import OAuthGrantType # noqa: E501 +from capif_security.models.base_model import Model +from capif_security.models.o_auth_grant_type import \ + OAuthGrantType # noqa: E501 from capif_security.models.security_method import SecurityMethod # noqa: E501 -import re # noqa: E501 + class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param.py b/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param.py index f86b2086..57a65695 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class InvalidParam(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param1.py b/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param1.py index 77919000..e7abd4e9 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param1.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/invalid_param1.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class InvalidParam1(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/ml_model_inter_ind.py b/services/TS29222_CAPIF_Security_API/capif_security/models/ml_model_inter_ind.py index 3e87273d..c1ab27a7 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/ml_model_inter_ind.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/ml_model_inter_ind.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.nwdaf_event import NwdafEvent from capif_security import util - +from capif_security.models.base_model import Model from capif_security.models.nwdaf_event import NwdafEvent # noqa: E501 + class MlModelInterInd(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type.py b/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type.py index 184a7c0d..017f0384 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class NFType(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_info.py b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_info.py index 4d8885b5..233d1a47 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_info.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_info.py @@ -1,14 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.no_profile_match_reason import NoProfileMatchReason -from capif_security.models.query_param_combination import QueryParamCombination from capif_security import util +from capif_security.models.base_model import Model +from capif_security.models.no_profile_match_reason import \ + NoProfileMatchReason # noqa: E501 +from capif_security.models.query_param_combination import \ + QueryParamCombination # noqa: E501 -from capif_security.models.no_profile_match_reason import NoProfileMatchReason # noqa: E501 -from capif_security.models.query_param_combination import QueryParamCombination # noqa: E501 class NoProfileMatchInfo(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py index ccec0b37..5fe37d57 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class NoProfileMatchReason(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/nwdaf_event.py b/services/TS29222_CAPIF_Security_API/capif_security/models/nwdaf_event.py index f07de0c3..d1701a39 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/nwdaf_event.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/nwdaf_event.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class NwdafEvent(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/o_auth_grant_type.py b/services/TS29222_CAPIF_Security_API/capif_security/models/o_auth_grant_type.py index 8bace2b9..3813c056 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/o_auth_grant_type.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/o_auth_grant_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class OAuthGrantType(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py b/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py index 74dd8bf0..c86104bb 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -import re from capif_security import util +from capif_security.models.base_model import Model -import re # noqa: E501 class PlmnId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id_nid.py b/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id_nid.py index 02bfde85..9e414876 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id_nid.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id_nid.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -import re from capif_security import util +from capif_security.models.base_model import Model -import re # noqa: E501 class PlmnIdNid(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details.py b/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details.py index f24710e4..47dd078a 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details.py @@ -1,14 +1,11 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.invalid_param import InvalidParam -import re from capif_security import util - +from capif_security.models.base_model import Model from capif_security.models.invalid_param import InvalidParam # noqa: E501 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details1.py b/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details1.py index 27b782fc..7742f17b 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details1.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/problem_details1.py @@ -1,20 +1,17 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.access_token_err1 import AccessTokenErr1 -from capif_security.models.access_token_req1 import AccessTokenReq1 -from capif_security.models.invalid_param1 import InvalidParam1 -from capif_security.models.no_profile_match_info import NoProfileMatchInfo -import re from capif_security import util - -from capif_security.models.access_token_err1 import AccessTokenErr1 # noqa: E501 -from capif_security.models.access_token_req1 import AccessTokenReq1 # noqa: E501 +from capif_security.models.access_token_err1 import \ + AccessTokenErr1 # noqa: E501 +from capif_security.models.access_token_req1 import \ + AccessTokenReq1 # noqa: E501 +from capif_security.models.base_model import Model from capif_security.models.invalid_param1 import InvalidParam1 # noqa: E501 -from capif_security.models.no_profile_match_info import NoProfileMatchInfo # noqa: E501 -import re # noqa: E501 +from capif_security.models.no_profile_match_info import \ + NoProfileMatchInfo # noqa: E501 + class ProblemDetails1(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/query_param_combination.py b/services/TS29222_CAPIF_Security_API/capif_security/models/query_param_combination.py index a28fb4ad..430eab7c 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/query_param_combination.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/query_param_combination.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.query_parameter import QueryParameter from capif_security import util - +from capif_security.models.base_model import Model from capif_security.models.query_parameter import QueryParameter # noqa: E501 + class QueryParamCombination(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/query_parameter.py b/services/TS29222_CAPIF_Security_API/capif_security/models/query_parameter.py index 183bb325..39302f5b 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/query_parameter.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/query_parameter.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class QueryParameter(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/res_owner_id.py b/services/TS29222_CAPIF_Security_API/capif_security/models/res_owner_id.py index 0229dd1f..7ad71592 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/res_owner_id.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/res_owner_id.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -import re from capif_security import util +from capif_security.models.base_model import Model -import re # noqa: E501 class ResOwnerId(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/security_information.py b/services/TS29222_CAPIF_Security_API/capif_security/models/security_information.py index 10e85193..413b1568 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/security_information.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/security_information.py @@ -1,17 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.interface_description import InterfaceDescription -from capif_security.models.o_auth_grant_type import OAuthGrantType -from capif_security.models.security_method import SecurityMethod from capif_security import util - -from capif_security.models.interface_description import InterfaceDescription # noqa: E501 -from capif_security.models.o_auth_grant_type import OAuthGrantType # noqa: E501 +from capif_security.models.base_model import Model +from capif_security.models.interface_description import \ + InterfaceDescription # noqa: E501 +from capif_security.models.o_auth_grant_type import \ + OAuthGrantType # noqa: E501 from capif_security.models.security_method import SecurityMethod # noqa: E501 + class SecurityInformation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/security_method.py b/services/TS29222_CAPIF_Security_API/capif_security/models/security_method.py index c319a38a..c3deabe5 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/security_method.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/security_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class SecurityMethod(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/security_notification.py b/services/TS29222_CAPIF_Security_API/capif_security/models/security_notification.py index f3bf0604..3c5a3434 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/security_notification.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/security_notification.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.cause import Cause from capif_security import util - +from capif_security.models.base_model import Model from capif_security.models.cause import Cause # noqa: E501 + class SecurityNotification(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/service_security.py b/services/TS29222_CAPIF_Security_API/capif_security/models/service_security.py index c0bae73e..f636cb1d 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/service_security.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/service_security.py @@ -1,16 +1,14 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -from capif_security.models.security_information import SecurityInformation -from capif_security.models.websock_notif_config import WebsockNotifConfig -import re from capif_security import util +from capif_security.models.base_model import Model +from capif_security.models.security_information import \ + SecurityInformation # noqa: E501 +from capif_security.models.websock_notif_config import \ + WebsockNotifConfig # noqa: E501 -from capif_security.models.security_information import SecurityInformation # noqa: E501 -from capif_security.models.websock_notif_config import WebsockNotifConfig # noqa: E501 -import re # noqa: E501 class ServiceSecurity(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py b/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py index 1d00dd90..90cde98e 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py @@ -1,12 +1,10 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model -import re from capif_security import util +from capif_security.models.base_model import Model -import re # noqa: E501 class Snssai(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/websock_notif_config.py b/services/TS29222_CAPIF_Security_API/capif_security/models/websock_notif_config.py index 1482ee7d..13109aa1 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/websock_notif_config.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/websock_notif_config.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model import Model from capif_security import util +from capif_security.models.base_model import Model class WebsockNotifConfig(Model): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py b/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py index d3c5dca1..aa37efef 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py @@ -1,9 +1,8 @@ import logging import connexion -from flask_testing import TestCase - from capif_security.encoder import JSONEncoder +from flask_testing import TestCase class BaseTestCase(TestCase): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py b/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py index 586c4530..f9cd1a80 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py @@ -1,14 +1,15 @@ import unittest -from flask import json - from capif_security.models.access_token_err import AccessTokenErr # noqa: E501 from capif_security.models.access_token_rsp import AccessTokenRsp # noqa: E501 from capif_security.models.problem_details import ProblemDetails # noqa: E501 from capif_security.models.res_owner_id import ResOwnerId # noqa: E501 -from capif_security.models.security_notification import SecurityNotification # noqa: E501 -from capif_security.models.service_security import ServiceSecurity # noqa: E501 +from capif_security.models.security_notification import \ + SecurityNotification # noqa: E501 +from capif_security.models.service_security import \ + ServiceSecurity # noqa: E501 from capif_security.test import BaseTestCase +from flask import json class TestDefaultController(BaseTestCase): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/util.py b/services/TS29222_CAPIF_Security_API/capif_security/util.py index 1f117235..18c6bf02 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/util.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/util.py @@ -1,8 +1,8 @@ import datetime -import typing from capif_security import typing_utils + def serialize_clean_camel_case(obj): res = obj.to_dict() res = clean_empty(res) diff --git a/services/TS29222_CAPIF_Security_API/setup.py b/services/TS29222_CAPIF_Security_API/setup.py index 655e2690..d88c7483 100644 --- a/services/TS29222_CAPIF_Security_API/setup.py +++ b/services/TS29222_CAPIF_Security_API/setup.py @@ -1,5 +1,5 @@ -import sys -from setuptools import setup, find_packages + +from setuptools import find_packages, setup NAME = "capif_security" VERSION = "1.0.0" diff --git a/services/celery/tasks.py b/services/celery/tasks.py index 21290267..707ded6e 100644 --- a/services/celery/tasks.py +++ b/services/celery/tasks.py @@ -1,14 +1,15 @@ # celery/tasks.py -from celery import Celery +import asyncio +import logging +import os from datetime import datetime, timezone +from logging.handlers import RotatingFileHandler + +import aiohttp import pymongo -import os from bson.codec_options import CodecOptions +from celery import Celery from config import Config -import aiohttp -import asyncio -import logging -from logging.handlers import RotatingFileHandler # Initialize Celery celery = Celery( diff --git a/services/helper/helper_service/app.py b/services/helper/helper_service/app.py index 88d918b9..cb7a3d51 100644 --- a/services/helper/helper_service/app.py +++ b/services/helper/helper_service/app.py @@ -1,15 +1,17 @@ import json import logging import os +import sys +from pathlib import Path + +import connexion import requests +from asgiref.wsgi import WsgiToAsgi from config import Config -from pathlib import Path from db.db import get_mongo -import connexion -import sys from flask import Flask -from OpenSSL.crypto import FILETYPE_PEM, TYPE_RSA, PKey, X509Req, dump_certificate_request, dump_privatekey -from asgiref.wsgi import WsgiToAsgi +from OpenSSL.crypto import (FILETYPE_PEM, TYPE_RSA, PKey, X509Req, + dump_certificate_request, dump_privatekey) # --- Paths setup: make 'services' discoverable so "import api..." works --- BASE_DIR = Path(__file__).resolve().parent diff --git a/services/helper/helper_service/db/db.py b/services/helper/helper_service/db/db.py index 757933d3..27896463 100644 --- a/services/helper/helper_service/db/db.py +++ b/services/helper/helper_service/db/db.py @@ -1,5 +1,5 @@ -import time import secrets +import time from threading import Lock from bson.codec_options import CodecOptions diff --git a/services/helper/helper_service/services/api/__main__.py b/services/helper/helper_service/services/api/__main__.py index 2af7e092..5a3c4321 100644 --- a/services/helper/helper_service/services/api/__main__.py +++ b/services/helper/helper_service/services/api/__main__.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import connexion - from api import encoder diff --git a/services/helper/helper_service/services/api/controllers/default_controller.py b/services/helper/helper_service/services/api/controllers/default_controller.py index 7b8d451c..ade46c25 100644 --- a/services/helper/helper_service/services/api/controllers/default_controller.py +++ b/services/helper/helper_service/services/api/controllers/default_controller.py @@ -1,19 +1,18 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union from api.models.error_response import ErrorResponse # noqa: E501 -from api.models.paginated_response_event import PaginatedResponseEvent # noqa: E501 -from api.models.paginated_response_invoker import PaginatedResponseInvoker # noqa: E501 -from api.models.paginated_response_provider import PaginatedResponseProvider # noqa: E501 -from api.models.paginated_response_security import PaginatedResponseSecurity # noqa: E501 -from api.models.paginated_response_service import PaginatedResponseService # noqa: E501 -from api import util +from api.models.paginated_response_event import \ + PaginatedResponseEvent # noqa: E501 +from api.models.paginated_response_invoker import \ + PaginatedResponseInvoker # noqa: E501 +from api.models.paginated_response_provider import \ + PaginatedResponseProvider # noqa: E501 +from api.models.paginated_response_security import \ + PaginatedResponseSecurity # noqa: E501 +from api.models.paginated_response_service import \ + PaginatedResponseService # noqa: E501 from ..core.helper_operations import HelperOperations - helper_operations = HelperOperations() def helper_controller_delete_entities(uuid): # noqa: E501 diff --git a/services/helper/helper_service/services/api/controllers/security_controller.py b/services/helper/helper_service/services/api/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/helper/helper_service/services/api/controllers/security_controller.py +++ b/services/helper/helper_service/services/api/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/helper/helper_service/services/api/core/helper_operations.py b/services/helper/helper_service/services/api/core/helper_operations.py index f0e5514d..02df638d 100644 --- a/services/helper/helper_service/services/api/core/helper_operations.py +++ b/services/helper/helper_service/services/api/core/helper_operations.py @@ -6,6 +6,7 @@ from config import Config from db.db import get_mongo from flask import current_app, jsonify + class HelperOperations: def __init__(self): diff --git a/services/helper/helper_service/services/api/encoder.py b/services/helper/helper_service/services/api/encoder.py index 1a660a3e..8a8098ff 100644 --- a/services/helper/helper_service/services/api/encoder.py +++ b/services/helper/helper_service/services/api/encoder.py @@ -1,6 +1,5 @@ -from connexion.apps.flask_app import FlaskJSONEncoder - from api.models.base_model import Model +from connexion.apps.flask_app import FlaskJSONEncoder class JSONEncoder(FlaskJSONEncoder): diff --git a/services/helper/helper_service/services/api/models/__init__.py b/services/helper/helper_service/services/api/models/__init__.py index 68260afd..d036df69 100644 --- a/services/helper/helper_service/services/api/models/__init__.py +++ b/services/helper/helper_service/services/api/models/__init__.py @@ -1,53 +1,2 @@ # flake8: noqa # import models into model package -from api.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails -from api.models.api_list import APIList -from api.models.api_provider_enrolment_details import APIProviderEnrolmentDetails -from api.models.api_provider_function_details import APIProviderFunctionDetails -from api.models.aef_location import AefLocation -from api.models.aef_profile import AefProfile -from api.models.api_provider_func_role import ApiProviderFuncRole -from api.models.capif_event import CAPIFEvent -from api.models.capif_event_filter import CAPIFEventFilter -from api.models.civic_address import CivicAddress -from api.models.communication_type import CommunicationType -from api.models.custom_operation import CustomOperation -from api.models.data_format import DataFormat -from api.models.ellipsoid_arc import EllipsoidArc -from api.models.error_response import ErrorResponse -from api.models.event_subscription import EventSubscription -from api.models.gad_shape import GADShape -from api.models.geographic_area import GeographicArea -from api.models.geographical_coordinates import GeographicalCoordinates -from api.models.interface_description import InterfaceDescription -from api.models.notification_flag import NotificationFlag -from api.models.notification_method import NotificationMethod -from api.models.onboarding_information import OnboardingInformation -from api.models.operation import Operation -from api.models.paginated_response_base import PaginatedResponseBase -from api.models.paginated_response_event import PaginatedResponseEvent -from api.models.paginated_response_invoker import PaginatedResponseInvoker -from api.models.paginated_response_provider import PaginatedResponseProvider -from api.models.paginated_response_security import PaginatedResponseSecurity -from api.models.paginated_response_service import PaginatedResponseService -from api.models.partitioning_criteria import PartitioningCriteria -from api.models.point import Point -from api.models.point_altitude import PointAltitude -from api.models.point_altitude_uncertainty import PointAltitudeUncertainty -from api.models.point_uncertainty_circle import PointUncertaintyCircle -from api.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from api.models.polygon import Polygon -from api.models.protocol import Protocol -from api.models.published_api_path import PublishedApiPath -from api.models.registration_information import RegistrationInformation -from api.models.reporting_information import ReportingInformation -from api.models.resource import Resource -from api.models.security_information import SecurityInformation -from api.models.security_method import SecurityMethod -from api.models.service_api_description import ServiceAPIDescription -from api.models.service_security import ServiceSecurity -from api.models.shareable_information import ShareableInformation -from api.models.supported_gad_shapes import SupportedGADShapes -from api.models.uncertainty_ellipse import UncertaintyEllipse -from api.models.version import Version -from api.models.websock_notif_config import WebsockNotifConfig diff --git a/services/helper/helper_service/services/api/models/aef_location.py b/services/helper/helper_service/services/api/models/aef_location.py index 5ab80902..aa060187 100644 --- a/services/helper/helper_service/services/api/models/aef_location.py +++ b/services/helper/helper_service/services/api/models/aef_location.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.civic_address import CivicAddress -from api.models.geographic_area import GeographicArea from api import util - +from api.models.base_model import Model from api.models.civic_address import CivicAddress # noqa: E501 from api.models.geographic_area import GeographicArea # noqa: E501 + class AefLocation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/aef_profile.py b/services/helper/helper_service/services/api/models/aef_profile.py index 4b397816..e3f5945d 100644 --- a/services/helper/helper_service/services/api/models/aef_profile.py +++ b/services/helper/helper_service/services/api/models/aef_profile.py @@ -1,23 +1,16 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.aef_location import AefLocation -from api.models.data_format import DataFormat -from api.models.interface_description import InterfaceDescription -from api.models.protocol import Protocol -from api.models.security_method import SecurityMethod -from api.models.version import Version from api import util - from api.models.aef_location import AefLocation # noqa: E501 +from api.models.base_model import Model from api.models.data_format import DataFormat # noqa: E501 from api.models.interface_description import InterfaceDescription # noqa: E501 from api.models.protocol import Protocol # noqa: E501 from api.models.security_method import SecurityMethod # noqa: E501 from api.models.version import Version # noqa: E501 + class AefProfile(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py b/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py index fa1b4d4a..ee195831 100644 --- a/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py +++ b/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py @@ -1,18 +1,14 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.api_list import APIList -from api.models.onboarding_information import OnboardingInformation -from api.models.websock_notif_config import WebsockNotifConfig -import re from api import util - from api.models.api_list import APIList # noqa: E501 -from api.models.onboarding_information import OnboardingInformation # noqa: E501 +from api.models.base_model import Model +from api.models.onboarding_information import \ + OnboardingInformation # noqa: E501 from api.models.websock_notif_config import WebsockNotifConfig # noqa: E501 -import re # noqa: E501 + class APIInvokerEnrolmentDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/api_list.py b/services/helper/helper_service/services/api/models/api_list.py index 09e0dd1a..1b9646dd 100644 --- a/services/helper/helper_service/services/api/models/api_list.py +++ b/services/helper/helper_service/services/api/models/api_list.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.service_api_description import ServiceAPIDescription from api import util +from api.models.base_model import Model +from api.models.service_api_description import \ + ServiceAPIDescription # noqa: E501 -from api.models.service_api_description import ServiceAPIDescription # noqa: E501 class APIList(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py b/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py index 8cba9810..a1ed3a2d 100644 --- a/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py +++ b/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py @@ -1,14 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.api_provider_function_details import APIProviderFunctionDetails -import re from api import util +from api.models.api_provider_function_details import \ + APIProviderFunctionDetails # noqa: E501 +from api.models.base_model import Model -from api.models.api_provider_function_details import APIProviderFunctionDetails # noqa: E501 -import re # noqa: E501 class APIProviderEnrolmentDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/api_provider_func_role.py b/services/helper/helper_service/services/api/models/api_provider_func_role.py index d3bda3c8..8f126740 100644 --- a/services/helper/helper_service/services/api/models/api_provider_func_role.py +++ b/services/helper/helper_service/services/api/models/api_provider_func_role.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class ApiProviderFuncRole(Model): diff --git a/services/helper/helper_service/services/api/models/api_provider_function_details.py b/services/helper/helper_service/services/api/models/api_provider_function_details.py index 6998632a..2a0da6a6 100644 --- a/services/helper/helper_service/services/api/models/api_provider_function_details.py +++ b/services/helper/helper_service/services/api/models/api_provider_function_details.py @@ -1,14 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.api_provider_func_role import ApiProviderFuncRole -from api.models.registration_information import RegistrationInformation from api import util - from api.models.api_provider_func_role import ApiProviderFuncRole # noqa: E501 -from api.models.registration_information import RegistrationInformation # noqa: E501 +from api.models.base_model import Model +from api.models.registration_information import \ + RegistrationInformation # noqa: E501 + class APIProviderFunctionDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/base_model.py b/services/helper/helper_service/services/api/models/base_model.py index 7b48dda2..2c5a2678 100644 --- a/services/helper/helper_service/services/api/models/base_model.py +++ b/services/helper/helper_service/services/api/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from api import util diff --git a/services/helper/helper_service/services/api/models/capif_event.py b/services/helper/helper_service/services/api/models/capif_event.py index edf95766..c67ba8cd 100644 --- a/services/helper/helper_service/services/api/models/capif_event.py +++ b/services/helper/helper_service/services/api/models/capif_event.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class CAPIFEvent(Model): diff --git a/services/helper/helper_service/services/api/models/capif_event_filter.py b/services/helper/helper_service/services/api/models/capif_event_filter.py index f0f6a138..7f14aca2 100644 --- a/services/helper/helper_service/services/api/models/capif_event_filter.py +++ b/services/helper/helper_service/services/api/models/capif_event_filter.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class CAPIFEventFilter(Model): diff --git a/services/helper/helper_service/services/api/models/civic_address.py b/services/helper/helper_service/services/api/models/civic_address.py index 736673b2..26caca34 100644 --- a/services/helper/helper_service/services/api/models/civic_address.py +++ b/services/helper/helper_service/services/api/models/civic_address.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class CivicAddress(Model): diff --git a/services/helper/helper_service/services/api/models/communication_type.py b/services/helper/helper_service/services/api/models/communication_type.py index 03b51da9..984740fc 100644 --- a/services/helper/helper_service/services/api/models/communication_type.py +++ b/services/helper/helper_service/services/api/models/communication_type.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class CommunicationType(Model): diff --git a/services/helper/helper_service/services/api/models/custom_operation.py b/services/helper/helper_service/services/api/models/custom_operation.py index 19fefc74..478334c4 100644 --- a/services/helper/helper_service/services/api/models/custom_operation.py +++ b/services/helper/helper_service/services/api/models/custom_operation.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.communication_type import CommunicationType -from api.models.operation import Operation from api import util - +from api.models.base_model import Model from api.models.communication_type import CommunicationType # noqa: E501 from api.models.operation import Operation # noqa: E501 + class CustomOperation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/data_format.py b/services/helper/helper_service/services/api/models/data_format.py index d58cc9ed..49cba1d7 100644 --- a/services/helper/helper_service/services/api/models/data_format.py +++ b/services/helper/helper_service/services/api/models/data_format.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class DataFormat(Model): diff --git a/services/helper/helper_service/services/api/models/ellipsoid_arc.py b/services/helper/helper_service/services/api/models/ellipsoid_arc.py index 21fbfcb0..0bf4081f 100644 --- a/services/helper/helper_service/services/api/models/ellipsoid_arc.py +++ b/services/helper/helper_service/services/api/models/ellipsoid_arc.py @@ -1,17 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.gad_shape import GADShape -from api.models.geographical_coordinates import GeographicalCoordinates -from api.models.supported_gad_shapes import SupportedGADShapes from api import util - +from api.models.base_model import Model from api.models.gad_shape import GADShape # noqa: E501 -from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + class EllipsoidArc(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/error_response.py b/services/helper/helper_service/services/api/models/error_response.py index 1748be6f..8f5fd61b 100644 --- a/services/helper/helper_service/services/api/models/error_response.py +++ b/services/helper/helper_service/services/api/models/error_response.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class ErrorResponse(Model): diff --git a/services/helper/helper_service/services/api/models/event_subscription.py b/services/helper/helper_service/services/api/models/event_subscription.py index ea6429c7..fa2306dc 100644 --- a/services/helper/helper_service/services/api/models/event_subscription.py +++ b/services/helper/helper_service/services/api/models/event_subscription.py @@ -1,20 +1,14 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.capif_event import CAPIFEvent -from api.models.capif_event_filter import CAPIFEventFilter -from api.models.reporting_information import ReportingInformation -from api.models.websock_notif_config import WebsockNotifConfig -import re from api import util - +from api.models.base_model import Model from api.models.capif_event import CAPIFEvent # noqa: E501 from api.models.capif_event_filter import CAPIFEventFilter # noqa: E501 from api.models.reporting_information import ReportingInformation # noqa: E501 from api.models.websock_notif_config import WebsockNotifConfig # noqa: E501 -import re # noqa: E501 + class EventSubscription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/gad_shape.py b/services/helper/helper_service/services/api/models/gad_shape.py index 291b6528..e4d83408 100644 --- a/services/helper/helper_service/services/api/models/gad_shape.py +++ b/services/helper/helper_service/services/api/models/gad_shape.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.supported_gad_shapes import SupportedGADShapes from api import util - +from api.models.base_model import Model from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + class GADShape(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/geographic_area.py b/services/helper/helper_service/services/api/models/geographic_area.py index 0b402441..69ff7fb4 100644 --- a/services/helper/helper_service/services/api/models/geographic_area.py +++ b/services/helper/helper_service/services/api/models/geographic_area.py @@ -1,31 +1,24 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.ellipsoid_arc import EllipsoidArc -from api.models.geographical_coordinates import GeographicalCoordinates -from api.models.point import Point -from api.models.point_altitude import PointAltitude -from api.models.point_altitude_uncertainty import PointAltitudeUncertainty -from api.models.point_uncertainty_circle import PointUncertaintyCircle -from api.models.point_uncertainty_ellipse import PointUncertaintyEllipse -from api.models.polygon import Polygon -from api.models.supported_gad_shapes import SupportedGADShapes -from api.models.uncertainty_ellipse import UncertaintyEllipse from api import util - +from api.models.base_model import Model from api.models.ellipsoid_arc import EllipsoidArc # noqa: E501 -from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from api.models.point import Point # noqa: E501 from api.models.point_altitude import PointAltitude # noqa: E501 -from api.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 -from api.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 -from api.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from api.models.point_altitude_uncertainty import \ + PointAltitudeUncertainty # noqa: E501 +from api.models.point_uncertainty_circle import \ + PointUncertaintyCircle # noqa: E501 +from api.models.point_uncertainty_ellipse import \ + PointUncertaintyEllipse # noqa: E501 from api.models.polygon import Polygon # noqa: E501 from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from api.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + class GeographicArea(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/geographical_coordinates.py b/services/helper/helper_service/services/api/models/geographical_coordinates.py index 86ffac3a..368f9012 100644 --- a/services/helper/helper_service/services/api/models/geographical_coordinates.py +++ b/services/helper/helper_service/services/api/models/geographical_coordinates.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class GeographicalCoordinates(Model): diff --git a/services/helper/helper_service/services/api/models/interface_description.py b/services/helper/helper_service/services/api/models/interface_description.py index 64a9e1bf..1fbc82a2 100644 --- a/services/helper/helper_service/services/api/models/interface_description.py +++ b/services/helper/helper_service/services/api/models/interface_description.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.security_method import SecurityMethod from api import util - +from api.models.base_model import Model from api.models.security_method import SecurityMethod # noqa: E501 + class InterfaceDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/notification_flag.py b/services/helper/helper_service/services/api/models/notification_flag.py index a41c1d8a..199fc2cd 100644 --- a/services/helper/helper_service/services/api/models/notification_flag.py +++ b/services/helper/helper_service/services/api/models/notification_flag.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class NotificationFlag(Model): diff --git a/services/helper/helper_service/services/api/models/notification_method.py b/services/helper/helper_service/services/api/models/notification_method.py index b3a906ef..09c6cdf0 100644 --- a/services/helper/helper_service/services/api/models/notification_method.py +++ b/services/helper/helper_service/services/api/models/notification_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class NotificationMethod(Model): diff --git a/services/helper/helper_service/services/api/models/onboarding_information.py b/services/helper/helper_service/services/api/models/onboarding_information.py index 370d59ac..e0de508a 100644 --- a/services/helper/helper_service/services/api/models/onboarding_information.py +++ b/services/helper/helper_service/services/api/models/onboarding_information.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class OnboardingInformation(Model): diff --git a/services/helper/helper_service/services/api/models/operation.py b/services/helper/helper_service/services/api/models/operation.py index 1ed73788..e081461b 100644 --- a/services/helper/helper_service/services/api/models/operation.py +++ b/services/helper/helper_service/services/api/models/operation.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class Operation(Model): diff --git a/services/helper/helper_service/services/api/models/paginated_response_base.py b/services/helper/helper_service/services/api/models/paginated_response_base.py index 339b5b56..be72e6a9 100644 --- a/services/helper/helper_service/services/api/models/paginated_response_base.py +++ b/services/helper/helper_service/services/api/models/paginated_response_base.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class PaginatedResponseBase(Model): diff --git a/services/helper/helper_service/services/api/models/paginated_response_event.py b/services/helper/helper_service/services/api/models/paginated_response_event.py index fd9445d3..dd0c9602 100644 --- a/services/helper/helper_service/services/api/models/paginated_response_event.py +++ b/services/helper/helper_service/services/api/models/paginated_response_event.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.event_subscription import EventSubscription from api import util - +from api.models.base_model import Model from api.models.event_subscription import EventSubscription # noqa: E501 + class PaginatedResponseEvent(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/paginated_response_invoker.py b/services/helper/helper_service/services/api/models/paginated_response_invoker.py index 11e9334e..2bef346b 100644 --- a/services/helper/helper_service/services/api/models/paginated_response_invoker.py +++ b/services/helper/helper_service/services/api/models/paginated_response_invoker.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails from api import util +from api.models.api_invoker_enrolment_details import \ + APIInvokerEnrolmentDetails # noqa: E501 +from api.models.base_model import Model -from api.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 class PaginatedResponseInvoker(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/paginated_response_provider.py b/services/helper/helper_service/services/api/models/paginated_response_provider.py index a6ae7f69..277632af 100644 --- a/services/helper/helper_service/services/api/models/paginated_response_provider.py +++ b/services/helper/helper_service/services/api/models/paginated_response_provider.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.api_provider_enrolment_details import APIProviderEnrolmentDetails from api import util +from api.models.api_provider_enrolment_details import \ + APIProviderEnrolmentDetails # noqa: E501 +from api.models.base_model import Model -from api.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 class PaginatedResponseProvider(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/paginated_response_security.py b/services/helper/helper_service/services/api/models/paginated_response_security.py index d6c85717..070416db 100644 --- a/services/helper/helper_service/services/api/models/paginated_response_security.py +++ b/services/helper/helper_service/services/api/models/paginated_response_security.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.service_security import ServiceSecurity from api import util - +from api.models.base_model import Model from api.models.service_security import ServiceSecurity # noqa: E501 + class PaginatedResponseSecurity(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/paginated_response_service.py b/services/helper/helper_service/services/api/models/paginated_response_service.py index 96f65220..e1ea68f4 100644 --- a/services/helper/helper_service/services/api/models/paginated_response_service.py +++ b/services/helper/helper_service/services/api/models/paginated_response_service.py @@ -1,12 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.service_api_description import ServiceAPIDescription from api import util +from api.models.base_model import Model +from api.models.service_api_description import \ + ServiceAPIDescription # noqa: E501 -from api.models.service_api_description import ServiceAPIDescription # noqa: E501 class PaginatedResponseService(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/partitioning_criteria.py b/services/helper/helper_service/services/api/models/partitioning_criteria.py index d4ad3b81..6908835c 100644 --- a/services/helper/helper_service/services/api/models/partitioning_criteria.py +++ b/services/helper/helper_service/services/api/models/partitioning_criteria.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class PartitioningCriteria(Model): diff --git a/services/helper/helper_service/services/api/models/point.py b/services/helper/helper_service/services/api/models/point.py index cb7f758b..1468812f 100644 --- a/services/helper/helper_service/services/api/models/point.py +++ b/services/helper/helper_service/services/api/models/point.py @@ -1,17 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.gad_shape import GADShape -from api.models.geographical_coordinates import GeographicalCoordinates -from api.models.supported_gad_shapes import SupportedGADShapes from api import util - +from api.models.base_model import Model from api.models.gad_shape import GADShape # noqa: E501 -from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + class Point(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/point_altitude.py b/services/helper/helper_service/services/api/models/point_altitude.py index d2041c32..74de994c 100644 --- a/services/helper/helper_service/services/api/models/point_altitude.py +++ b/services/helper/helper_service/services/api/models/point_altitude.py @@ -1,17 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.gad_shape import GADShape -from api.models.geographical_coordinates import GeographicalCoordinates -from api.models.supported_gad_shapes import SupportedGADShapes from api import util - +from api.models.base_model import Model from api.models.gad_shape import GADShape # noqa: E501 -from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + class PointAltitude(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py b/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py index e5ff1da8..1bd39c27 100644 --- a/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py +++ b/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py @@ -1,19 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.gad_shape import GADShape -from api.models.geographical_coordinates import GeographicalCoordinates -from api.models.supported_gad_shapes import SupportedGADShapes -from api.models.uncertainty_ellipse import UncertaintyEllipse from api import util - +from api.models.base_model import Model from api.models.gad_shape import GADShape # noqa: E501 -from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from api.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + class PointAltitudeUncertainty(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/point_uncertainty_circle.py b/services/helper/helper_service/services/api/models/point_uncertainty_circle.py index 54c312f2..de505759 100644 --- a/services/helper/helper_service/services/api/models/point_uncertainty_circle.py +++ b/services/helper/helper_service/services/api/models/point_uncertainty_circle.py @@ -1,17 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.gad_shape import GADShape -from api.models.geographical_coordinates import GeographicalCoordinates -from api.models.supported_gad_shapes import SupportedGADShapes from api import util - +from api.models.base_model import Model from api.models.gad_shape import GADShape # noqa: E501 -from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + class PointUncertaintyCircle(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py b/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py index 293c7b08..55c25cb0 100644 --- a/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py +++ b/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py @@ -1,19 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.gad_shape import GADShape -from api.models.geographical_coordinates import GeographicalCoordinates -from api.models.supported_gad_shapes import SupportedGADShapes -from api.models.uncertainty_ellipse import UncertaintyEllipse from api import util - +from api.models.base_model import Model from api.models.gad_shape import GADShape # noqa: E501 -from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 from api.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + class PointUncertaintyEllipse(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/polygon.py b/services/helper/helper_service/services/api/models/polygon.py index 069abe4a..800ffe05 100644 --- a/services/helper/helper_service/services/api/models/polygon.py +++ b/services/helper/helper_service/services/api/models/polygon.py @@ -1,17 +1,14 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.gad_shape import GADShape -from api.models.geographical_coordinates import GeographicalCoordinates -from api.models.supported_gad_shapes import SupportedGADShapes from api import util - +from api.models.base_model import Model from api.models.gad_shape import GADShape # noqa: E501 -from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.geographical_coordinates import \ + GeographicalCoordinates # noqa: E501 from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + class Polygon(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/protocol.py b/services/helper/helper_service/services/api/models/protocol.py index b311a1aa..12d1f2fb 100644 --- a/services/helper/helper_service/services/api/models/protocol.py +++ b/services/helper/helper_service/services/api/models/protocol.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class Protocol(Model): diff --git a/services/helper/helper_service/services/api/models/published_api_path.py b/services/helper/helper_service/services/api/models/published_api_path.py index 94acc894..765b4a46 100644 --- a/services/helper/helper_service/services/api/models/published_api_path.py +++ b/services/helper/helper_service/services/api/models/published_api_path.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class PublishedApiPath(Model): diff --git a/services/helper/helper_service/services/api/models/registration_information.py b/services/helper/helper_service/services/api/models/registration_information.py index e1db5aa4..ff8a9b4c 100644 --- a/services/helper/helper_service/services/api/models/registration_information.py +++ b/services/helper/helper_service/services/api/models/registration_information.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class RegistrationInformation(Model): diff --git a/services/helper/helper_service/services/api/models/reporting_information.py b/services/helper/helper_service/services/api/models/reporting_information.py index 432bddbb..766261fd 100644 --- a/services/helper/helper_service/services/api/models/reporting_information.py +++ b/services/helper/helper_service/services/api/models/reporting_information.py @@ -1,17 +1,13 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.notification_flag import NotificationFlag -from api.models.notification_method import NotificationMethod -from api.models.partitioning_criteria import PartitioningCriteria from api import util - +from api.models.base_model import Model from api.models.notification_flag import NotificationFlag # noqa: E501 from api.models.notification_method import NotificationMethod # noqa: E501 from api.models.partitioning_criteria import PartitioningCriteria # noqa: E501 + class ReportingInformation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/resource.py b/services/helper/helper_service/services/api/models/resource.py index c32f79c3..e7282fa6 100644 --- a/services/helper/helper_service/services/api/models/resource.py +++ b/services/helper/helper_service/services/api/models/resource.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.communication_type import CommunicationType -from api.models.operation import Operation from api import util - +from api.models.base_model import Model from api.models.communication_type import CommunicationType # noqa: E501 from api.models.operation import Operation # noqa: E501 + class Resource(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/security_information.py b/services/helper/helper_service/services/api/models/security_information.py index 49aabfcf..20e92e47 100644 --- a/services/helper/helper_service/services/api/models/security_information.py +++ b/services/helper/helper_service/services/api/models/security_information.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.interface_description import InterfaceDescription -from api.models.security_method import SecurityMethod from api import util - +from api.models.base_model import Model from api.models.interface_description import InterfaceDescription # noqa: E501 from api.models.security_method import SecurityMethod # noqa: E501 + class SecurityInformation(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/security_method.py b/services/helper/helper_service/services/api/models/security_method.py index df7d3ecc..69fed445 100644 --- a/services/helper/helper_service/services/api/models/security_method.py +++ b/services/helper/helper_service/services/api/models/security_method.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class SecurityMethod(Model): diff --git a/services/helper/helper_service/services/api/models/service_api_description.py b/services/helper/helper_service/services/api/models/service_api_description.py index a89c8016..ca5a3f16 100644 --- a/services/helper/helper_service/services/api/models/service_api_description.py +++ b/services/helper/helper_service/services/api/models/service_api_description.py @@ -1,18 +1,13 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.aef_profile import AefProfile -from api.models.published_api_path import PublishedApiPath -from api.models.shareable_information import ShareableInformation -import re from api import util - from api.models.aef_profile import AefProfile # noqa: E501 +from api.models.base_model import Model from api.models.published_api_path import PublishedApiPath # noqa: E501 from api.models.shareable_information import ShareableInformation # noqa: E501 -import re # noqa: E501 + class ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/service_security.py b/services/helper/helper_service/services/api/models/service_security.py index ad66ad20..4d8f76b1 100644 --- a/services/helper/helper_service/services/api/models/service_security.py +++ b/services/helper/helper_service/services/api/models/service_security.py @@ -1,16 +1,12 @@ +import re # noqa: E501 from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.security_information import SecurityInformation -from api.models.websock_notif_config import WebsockNotifConfig -import re from api import util - +from api.models.base_model import Model from api.models.security_information import SecurityInformation # noqa: E501 from api.models.websock_notif_config import WebsockNotifConfig # noqa: E501 -import re # noqa: E501 + class ServiceSecurity(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/shareable_information.py b/services/helper/helper_service/services/api/models/shareable_information.py index 4be3ded4..744803b3 100644 --- a/services/helper/helper_service/services/api/models/shareable_information.py +++ b/services/helper/helper_service/services/api/models/shareable_information.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class ShareableInformation(Model): diff --git a/services/helper/helper_service/services/api/models/supported_gad_shapes.py b/services/helper/helper_service/services/api/models/supported_gad_shapes.py index 81ef146f..bab499b0 100644 --- a/services/helper/helper_service/services/api/models/supported_gad_shapes.py +++ b/services/helper/helper_service/services/api/models/supported_gad_shapes.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class SupportedGADShapes(Model): diff --git a/services/helper/helper_service/services/api/models/uncertainty_ellipse.py b/services/helper/helper_service/services/api/models/uncertainty_ellipse.py index b93bc86a..1d4bfed3 100644 --- a/services/helper/helper_service/services/api/models/uncertainty_ellipse.py +++ b/services/helper/helper_service/services/api/models/uncertainty_ellipse.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class UncertaintyEllipse(Model): diff --git a/services/helper/helper_service/services/api/models/version.py b/services/helper/helper_service/services/api/models/version.py index 79ccbdf9..5cb0e712 100644 --- a/services/helper/helper_service/services/api/models/version.py +++ b/services/helper/helper_service/services/api/models/version.py @@ -1,15 +1,12 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model -from api.models.custom_operation import CustomOperation -from api.models.resource import Resource from api import util - +from api.models.base_model import Model from api.models.custom_operation import CustomOperation # noqa: E501 from api.models.resource import Resource # noqa: E501 + class Version(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/api/models/websock_notif_config.py b/services/helper/helper_service/services/api/models/websock_notif_config.py index 3c05d398..b2605620 100644 --- a/services/helper/helper_service/services/api/models/websock_notif_config.py +++ b/services/helper/helper_service/services/api/models/websock_notif_config.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from api.models.base_model import Model from api import util +from api.models.base_model import Model class WebsockNotifConfig(Model): diff --git a/services/helper/helper_service/services/api/util.py b/services/helper/helper_service/services/api/util.py index c05d0ed0..ec396190 100644 --- a/services/helper/helper_service/services/api/util.py +++ b/services/helper/helper_service/services/api/util.py @@ -1,6 +1,5 @@ import datetime -import typing from api import typing_utils diff --git a/services/helper/helper_service/services/configuration/__main__.py b/services/helper/helper_service/services/configuration/__main__.py index 30956708..90c35785 100644 --- a/services/helper/helper_service/services/configuration/__main__.py +++ b/services/helper/helper_service/services/configuration/__main__.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import connexion - from configuration import encoder diff --git a/services/helper/helper_service/services/configuration/controllers/default_controller.py b/services/helper/helper_service/services/configuration/controllers/default_controller.py index 100bedac..3621c584 100644 --- a/services/helper/helper_service/services/configuration/controllers/default_controller.py +++ b/services/helper/helper_service/services/configuration/controllers/default_controller.py @@ -1,13 +1,12 @@ -import connexion -from typing import Dict -from typing import Tuple -from typing import Union -from configuration.models.capif_configuration import CapifConfiguration # noqa: E501 -from configuration.models.config_category_create_request import ConfigCategoryCreateRequest # noqa: E501 -from configuration.models.config_param_update_request import ConfigParamUpdateRequest # noqa: E501 +import connexion +from configuration.models.capif_configuration import \ + CapifConfiguration # noqa: E501 +from configuration.models.config_category_create_request import \ + ConfigCategoryCreateRequest # noqa: E501 +from configuration.models.config_param_update_request import \ + ConfigParamUpdateRequest # noqa: E501 from configuration.models.generic_error import GenericError # noqa: E501 -from configuration import util from ..core.configuration_operations import ConfigurationOperations diff --git a/services/helper/helper_service/services/configuration/controllers/security_controller.py b/services/helper/helper_service/services/configuration/controllers/security_controller.py index 6d294ffd..8b137891 100644 --- a/services/helper/helper_service/services/configuration/controllers/security_controller.py +++ b/services/helper/helper_service/services/configuration/controllers/security_controller.py @@ -1,2 +1 @@ -from typing import List diff --git a/services/helper/helper_service/services/configuration/core/configuration_operations.py b/services/helper/helper_service/services/configuration/core/configuration_operations.py index 49a3e4ab..da415e45 100644 --- a/services/helper/helper_service/services/configuration/core/configuration_operations.py +++ b/services/helper/helper_service/services/configuration/core/configuration_operations.py @@ -1,18 +1,12 @@ -import os -import pymongo -import requests from config import Config from db.db import get_mongo from flask import current_app, jsonify -from utils.utils import ( - convert_dict_keys_to_snake_case, - convert_nested_values, - convert_value_to_original_type, - get_nested_value, - to_snake_case, - validate_snake_case_keys -) +from utils.utils import (convert_dict_keys_to_snake_case, + convert_nested_values, convert_value_to_original_type, + get_nested_value, to_snake_case, + validate_snake_case_keys) + class ConfigurationOperations: diff --git a/services/helper/helper_service/services/configuration/encoder.py b/services/helper/helper_service/services/configuration/encoder.py index 27e1d86a..7b5d6ac2 100644 --- a/services/helper/helper_service/services/configuration/encoder.py +++ b/services/helper/helper_service/services/configuration/encoder.py @@ -1,6 +1,5 @@ -from connexion.apps.flask_app import FlaskJSONEncoder - from configuration.models.base_model import Model +from connexion.apps.flask_app import FlaskJSONEncoder class JSONEncoder(FlaskJSONEncoder): diff --git a/services/helper/helper_service/services/configuration/models/__init__.py b/services/helper/helper_service/services/configuration/models/__init__.py index 951c845b..d036df69 100644 --- a/services/helper/helper_service/services/configuration/models/__init__.py +++ b/services/helper/helper_service/services/configuration/models/__init__.py @@ -1,10 +1,2 @@ # flake8: noqa # import models into model package -from configuration.models.capif_configuration import CapifConfiguration -from configuration.models.config_category_create_request import ConfigCategoryCreateRequest -from configuration.models.config_param_update_request import ConfigParamUpdateRequest -from configuration.models.generic_error import GenericError -from configuration.models.settings import Settings -from configuration.models.settings_acl_policy_settings import SettingsAclPolicySettings -from configuration.models.settings_certificates_expiry import SettingsCertificatesExpiry -from configuration.models.settings_security_method_priority import SettingsSecurityMethodPriority diff --git a/services/helper/helper_service/services/configuration/models/base_model.py b/services/helper/helper_service/services/configuration/models/base_model.py index aa9250b3..286ac1e6 100644 --- a/services/helper/helper_service/services/configuration/models/base_model.py +++ b/services/helper/helper_service/services/configuration/models/base_model.py @@ -1,5 +1,4 @@ import pprint - import typing from configuration import util diff --git a/services/helper/helper_service/services/configuration/models/capif_configuration.py b/services/helper/helper_service/services/configuration/models/capif_configuration.py index e51aa812..f71c2c28 100644 --- a/services/helper/helper_service/services/configuration/models/capif_configuration.py +++ b/services/helper/helper_service/services/configuration/models/capif_configuration.py @@ -1,13 +1,11 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model -from configuration.models.settings import Settings from configuration import util - +from configuration.models.base_model import Model from configuration.models.settings import Settings # noqa: E501 + class CapifConfiguration(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/configuration/models/config_category_create_request.py b/services/helper/helper_service/services/configuration/models/config_category_create_request.py index 305c43f1..f197c5f6 100644 --- a/services/helper/helper_service/services/configuration/models/config_category_create_request.py +++ b/services/helper/helper_service/services/configuration/models/config_category_create_request.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model from configuration import util +from configuration.models.base_model import Model class ConfigCategoryCreateRequest(Model): diff --git a/services/helper/helper_service/services/configuration/models/config_param_update_request.py b/services/helper/helper_service/services/configuration/models/config_param_update_request.py index 6d608e78..b3130751 100644 --- a/services/helper/helper_service/services/configuration/models/config_param_update_request.py +++ b/services/helper/helper_service/services/configuration/models/config_param_update_request.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model from configuration import util +from configuration.models.base_model import Model class ConfigParamUpdateRequest(Model): diff --git a/services/helper/helper_service/services/configuration/models/generic_error.py b/services/helper/helper_service/services/configuration/models/generic_error.py index 506bc0f3..30a85749 100644 --- a/services/helper/helper_service/services/configuration/models/generic_error.py +++ b/services/helper/helper_service/services/configuration/models/generic_error.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model from configuration import util +from configuration.models.base_model import Model class GenericError(Model): diff --git a/services/helper/helper_service/services/configuration/models/settings.py b/services/helper/helper_service/services/configuration/models/settings.py index c658eae4..20d3ab0f 100644 --- a/services/helper/helper_service/services/configuration/models/settings.py +++ b/services/helper/helper_service/services/configuration/models/settings.py @@ -1,16 +1,15 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model -from configuration.models.settings_acl_policy_settings import SettingsAclPolicySettings -from configuration.models.settings_certificates_expiry import SettingsCertificatesExpiry -from configuration.models.settings_security_method_priority import SettingsSecurityMethodPriority from configuration import util +from configuration.models.base_model import Model +from configuration.models.settings_acl_policy_settings import \ + SettingsAclPolicySettings # noqa: E501 +from configuration.models.settings_certificates_expiry import \ + SettingsCertificatesExpiry # noqa: E501 +from configuration.models.settings_security_method_priority import \ + SettingsSecurityMethodPriority # noqa: E501 -from configuration.models.settings_acl_policy_settings import SettingsAclPolicySettings # noqa: E501 -from configuration.models.settings_certificates_expiry import SettingsCertificatesExpiry # noqa: E501 -from configuration.models.settings_security_method_priority import SettingsSecurityMethodPriority # noqa: E501 class Settings(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py b/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py index d018f225..3e0fbdf0 100644 --- a/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py +++ b/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model from configuration import util +from configuration.models.base_model import Model class SettingsAclPolicySettings(Model): diff --git a/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py b/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py index c08aaad0..366f7404 100644 --- a/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py +++ b/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model from configuration import util +from configuration.models.base_model import Model class SettingsCertificatesExpiry(Model): diff --git a/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py b/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py index 4dcc573b..342e5f2e 100644 --- a/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py +++ b/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py @@ -1,9 +1,8 @@ from datetime import date, datetime # noqa: F401 +from typing import Dict, List # noqa: F401 -from typing import List, Dict # noqa: F401 - -from configuration.models.base_model import Model from configuration import util +from configuration.models.base_model import Model class SettingsSecurityMethodPriority(Model): diff --git a/services/helper/helper_service/services/configuration/util.py b/services/helper/helper_service/services/configuration/util.py index f96d28fd..8e6b2c7e 100644 --- a/services/helper/helper_service/services/configuration/util.py +++ b/services/helper/helper_service/services/configuration/util.py @@ -1,6 +1,5 @@ import datetime -import typing from configuration import typing_utils diff --git a/services/register/register_service/app.py b/services/register/register_service/app.py index 60447746..0554a75d 100644 --- a/services/register/register_service/app.py +++ b/services/register/register_service/app.py @@ -9,7 +9,8 @@ from controllers.register_controller import register_routes from db.db import MongoDatabse from flask import Flask from flask_jwt_extended import JWTManager -from OpenSSL.crypto import FILETYPE_PEM, TYPE_RSA, PKey, X509Req, dump_certificate_request, dump_privatekey +from OpenSSL.crypto import (FILETYPE_PEM, TYPE_RSA, PKey, X509Req, + dump_certificate_request, dump_privatekey) from utils.auth_utils import hash_password app = Flask(__name__) diff --git a/services/register/register_service/core/register_operations.py b/services/register/register_service/core/register_operations.py index 8dc4a2ea..6cbe6c60 100644 --- a/services/register/register_service/core/register_operations.py +++ b/services/register/register_service/core/register_operations.py @@ -7,8 +7,9 @@ from config import Config from db.db import MongoDatabse from flask import current_app, jsonify from flask_jwt_extended import create_access_token -from utils.utils import convert_dict_keys_to_snake_case, to_snake_case, validate_snake_case_keys from utils.auth_utils import hash_password +from utils.utils import (convert_dict_keys_to_snake_case, to_snake_case, + validate_snake_case_keys) class RegisterOperations: -- GitLab From 4ae454b44b80e7a31757099403a1a06692946283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Wed, 10 Dec 2025 17:09:20 +0100 Subject: [PATCH 052/101] vault for every capif --- services/vault/vault_prepare_certs.sh | 101 ++++++++------------------ 1 file changed, 32 insertions(+), 69 deletions(-) diff --git a/services/vault/vault_prepare_certs.sh b/services/vault/vault_prepare_certs.sh index f1e1c5aa..3a5d0a7a 100755 --- a/services/vault/vault_prepare_certs.sh +++ b/services/vault/vault_prepare_certs.sh @@ -11,19 +11,26 @@ echo "VAULT_TOKEN: $VAULT_TOKEN" vault secrets enable pki -# Generate a root CA +############################################################ +# 1) ENABLE ROOT PKI +############################################################ + vault secrets tune -max-lease-ttl=87600h pki vault write -field=certificate pki/root/generate/internal \ common_name="capif" \ - issuer_name="root-2023" \ - ttl=87600h > root_2023_ca.crt + issuer_name="root-2025" \ + ttl=87600h > root_ca.crt vault write pki/config/urls \ issuing_certificates="$VAULT_ADDR/v1/pki/ca" \ crl_distribution_points="$VAULT_ADDR/v1/pki/crl" -# Generate an intermediate CA + + +############################################################ +# 2) ENABLE INTERMEDIATE PKI +############################################################ vault secrets enable -path=pki_int pki vault secrets tune -max-lease-ttl=43800h pki_int @@ -35,7 +42,7 @@ vault write -format=json pki_int/intermediate/generate/internal \ # Sign the intermediate CA vault write -format=json pki/root/sign-intermediate \ - issuer_ref="root-2023" \ + issuer_ref="root-2025" \ csr=@pki_intermediate.csr \ format=pem_bundle ttl="43800h" \ | jq -r '.data.certificate' > capif_intermediate.cert.pem @@ -43,74 +50,30 @@ vault write -format=json pki/root/sign-intermediate \ # Configure the intermediate CA vault write pki_int/intermediate/set-signed certificate=@capif_intermediate.cert.pem -# Configure the role for the intermediate CA -vault write pki_int/roles/my-ca use_csr_common_name=false require_cn=true use_csr_sans=false allowed_domains=$CAPIF_HOSTNAME allow_any_name=true allow_bare_domains=true allow_glob_domains=true allow_subdomains=true max_ttl=4300h - -# Generate a certificate -openssl genrsa -out ./server.key 2048 - - -COUNTRY="ES" # 2 letter country-code -STATE="Madrid" # state or province name -LOCALITY="Madrid" # Locality Name (e.g. city) -ORGNAME="Telefonica I+D" # Organization Name (eg, company) -ORGUNIT="Innovation" # Organizational Unit Name (eg. section) -COMMONNAME="$CAPIF_HOSTNAME" -EMAIL="inno@tid.es" # certificate's email address -# optional extra details -CHALLENGE="" # challenge password -COMPANY="" # company name - -# DAYS="-days 365" - -# create the certificate request -cat <<__EOF__ | openssl req -new $DAYS -key ./server.key -out ./server.csr -$COUNTRY -$STATE -$LOCALITY -$ORGNAME -$ORGUNIT -$COMMONNAME -$EMAIL -$CHALLENGE -$COMPANY -__EOF__ - - -vault write -format=json pki_int/sign/my-ca format=pem_bundle ttl="43000h" csr=@server.csr common_name="$CAPIF_HOSTNAME" | jq -r '.data.issuing_ca as $issuing_ca | .data.certificate as $certificate | [$issuing_ca, $certificate]' > cert_data.json - -jq -r '.[0]' cert_data.json > root_ca.crt.pem -jq -r '.[1]' cert_data.json > server_certificate.crt.pem - -openssl x509 -pubkey -noout -in server_certificate.crt.pem > server_certificate_pub.pem - -# Concatenate the root and intermediate CA certificates -cat > certificados_concatenados.crt << EOF -$(cat "root_2023_ca.crt") -$(cat "root_ca.crt.pem") -EOF - -vault kv put secret/ca ca=@certificados_concatenados.crt - -vault kv put secret/server_cert cert=@server_certificate.crt.pem -vault kv put secret/server_cert/pub pub_key=@server_certificate_pub.pem -vault kv put secret/server_cert/private key=@server.key +############################################################ +# 3) CONFIGURE SIGNING ROLE +############################################################ -POLICY_NAME="my-policy" -POLICY_FILE="my-policy.hcl" -TOKEN_ID="read-ca-token" +vault write pki_int/roles/my-ca \ + use_csr_common_name=true \ + require_cn=true \ + use_csr_sans=true \ + allow_any_name=true \ + allow_bare_domains=true \ + allow_glob_domains=true \ + allow_subdomains=true \ + max_ttl=4300h -# Create a policy to read the CA -echo "path \"secret/data/ca\" { - capabilities = [\"read\"] -}" > "$POLICY_FILE" +# Note: CAPIF hostname is no longer needed here. The role is "open". -vault policy write "$POLICY_NAME" "$POLICY_FILE" +############################################################ +# 4) STORE ROOT + INTERMEDIATE IN A SINGLE BUNDLE +############################################################ +cat root_ca.crt capif_intermediate.cert.pem > capif_ca_bundle.crt -# Create a token with the policy -TOKEN=$(vault token create -id="$TOKEN_ID" -policy="$POLICY_NAME" -format=json | jq -r '.auth.client_token') +vault kv put secret/ca ca=@capif_ca_bundle.crt -echo "Generated Token:" -echo "$TOKEN" \ No newline at end of file +echo "[INFO] Vault PKI ready: Root + Intermediate created." +echo "[INFO] CAPIF CA bundle stored at secret/ca" -- GitLab From 25e10375b8db019612eadafcc7416267054eb92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Thu, 11 Dec 2025 17:18:11 +0100 Subject: [PATCH 053/101] nginx create certs --- services/nginx/nginx_prepare.sh | 159 ++++++++++++++++++++------------ 1 file changed, 99 insertions(+), 60 deletions(-) diff --git a/services/nginx/nginx_prepare.sh b/services/nginx/nginx_prepare.sh index 91884863..661ed49c 100644 --- a/services/nginx/nginx_prepare.sh +++ b/services/nginx/nginx_prepare.sh @@ -5,6 +5,11 @@ cd $CERTS_FOLDER VAULT_ADDR="http://$VAULT_HOSTNAME:$VAULT_PORT" VAULT_TOKEN=$VAULT_ACCESS_TOKEN +CAPIF_HOSTNAME="${CAPIF_HOSTNAME:-capifcore}" + + +HELPER_URL="http://$HELPER_HOST:8080/api/getCcfId" + # Maximum number of retry attempts MAX_RETRIES=30 # Delay between retries (in seconds) @@ -12,26 +17,19 @@ RETRY_DELAY=10 # Attempt counter ATTEMPT=0 # Success check -SUCCES_OPERATION=false +SUCCESS_OPERATION=false while [ $ATTEMPT -lt $MAX_RETRIES ]; do # Increment ATTEMPT using eval eval "ATTEMPT=\$((ATTEMPT + 1))" echo "Attempt $ATTEMPT of $MAX_RETRIES" - # Make the request to Vault and store the response in a variable - RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ - --header "X-Vault-Token: $VAULT_TOKEN" \ - --request GET "$VAULT_ADDR/v1/secret/data/ca" | jq -r '.data.data.ca') - - echo "$RESPONSE" + RESPONSE=$(curl -s --connect-timeout 5 --max-time 10 "$HELPER_URL") + CCF_ID=$(echo "$RESPONSE" | jq -r '.ccf_id') - # Check if the response is "null" or empty - if [ -n "$RESPONSE" ] && [ "$RESPONSE" != "null" ]; then - echo "$RESPONSE" > $CERTS_FOLDER/ca.crt - openssl verify -CAfile $CERTS_FOLDER/ca.crt $CERTS_FOLDER/ca.crt - echo "CA Root successfully saved." - SUCCES_OPERATION=true + if [ -n "$CCF_ID" ] && [ "$CCF_ID" != "null" ]; then + echo "CCF ID retrieved successfully: $CCF_ID" + SUCCESS_OPERATION=true break else echo "Invalid response ('null' or empty), retrying in $RETRY_DELAY seconds..." @@ -39,79 +37,120 @@ while [ $ATTEMPT -lt $MAX_RETRIES ]; do fi done -if [ "$SUCCES_OPERATION" = false ]; then - echo "Error: Failed to retrieve a valid response after $MAX_RETRIES attempts." - exit 1 # Exit with failure +if [ "$SUCCESS_OPERATION" = false ]; then + echo "Error: Failed to retrieve CCF ID after $MAX_RETRIES attempts." + exit 1 fi # Setup inital value to ATTEMPT and SUCCESS_OPERATION ATTEMPT=0 -SUCCES_OPERATION=false +SUCCESS_OPERATION=false while [ $ATTEMPT -lt $MAX_RETRIES ]; do - # Increment ATTEMPT using eval - eval "ATTEMPT=\$((ATTEMPT + 1))" + ATTEMPT=$((ATTEMPT + 1)) echo "Attempt $ATTEMPT of $MAX_RETRIES" - # Make the request to Vault and store the response in a variable - RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ + CA_RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ --header "X-Vault-Token: $VAULT_TOKEN" \ - --request GET "$VAULT_ADDR/v1/secret/data/server_cert" | jq -r '.data.data.cert') - - echo "$RESPONSE" + --request GET "$VAULT_ADDR/v1/secret/data/ca" | jq -r '.data.data.ca') - # Check if the response is "null" or empty - if [ -n "$RESPONSE" ] && [ "$RESPONSE" != "null" ]; then - echo "$RESPONSE" > $CERTS_FOLDER/server.crt - echo "Server Certificate successfully saved." - ATTEMPT=0 - SUCCES_OPERATION=true + if [ -n "$CA_RESPONSE" ] && [ "$CA_RESPONSE" != "null" ]; then + echo "$CA_RESPONSE" > $CERTS_FOLDER/ca.crt + echo "CA Root successfully saved." + SUCCESS_OPERATION=true break else - echo "Invalid response ('null' or empty), retrying in $RETRY_DELAY seconds..." + echo "Invalid response retrieving CA. Retrying in $RETRY_DELAY seconds..." sleep $RETRY_DELAY fi done -if [ "$SUCCES_OPERATION" = false ]; then - echo "Error: Failed to retrieve a valid response after $MAX_RETRIES attempts." - exit 1 # Exit with failure +if [ "$SUCCESS_OPERATION" = false ]; then + echo "Error: Failed to retrieve CA after $MAX_RETRIES attempts." + exit 1 fi -# Setup inital value to ATTEMPT and SUCCESS_OPERATION +# Reset counters ATTEMPT=0 -SUCCES_OPERATION=false +SUCCESS_OPERATION=false -while [ $ATTEMPT -lt $MAX_RETRIES ]; do - # Increment ATTEMPT using eval - eval "ATTEMPT=\$((ATTEMPT + 1))" - echo "Attempt $ATTEMPT of $MAX_RETRIES" - # Make the request to Vault and store the response in a variable - RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ - --header "X-Vault-Token: $VAULT_TOKEN" \ - --request GET "$VAULT_ADDR/v1/secret/data/server_cert/private" | jq -r '.data.data.key') +############################################################### +# 2) GENERATE SERVER KEY IF MISSING +############################################################### +if [ ! -f server.key ]; then + echo "server.key not found. Generating new private key..." + openssl genrsa -out server.key 2048 +else + echo "server.key already exists. Skipping generation." +fi - echo "$RESPONSE" - # Check if the response is "null" or empty - if [ -n "$RESPONSE" ] && [ "$RESPONSE" != "null" ]; then - echo "$RESPONSE" > $CERTS_FOLDER/server.key - echo "Server Key successfully saved." - ATTEMPT=0 - SUCCES_OPERATION=true - break - else - echo "Invalid response ('null' or empty), retrying in $RETRY_DELAY seconds..." - sleep $RETRY_DELAY - fi -done +############################################################### +# 3) IF NO SERVER CERT → GENERATE CSR + REQUEST SIGNING IN VAULT +############################################################### +if [ ! -f server.crt ]; then + SUCCESS_OPERATION=false + echo "server.crt not found. Generating CSR..." + + openssl req -new -key server.key \ + -subj "/CN=$CAPIF_HOSTNAME" \ + -addext "subjectAltName=DNS:$CAPIF_HOSTNAME" \ + -out server.csr + + CSR_CONTENT=$(sed ':a;N;$!ba;s/\n/\\n/g' server.csr) + + echo "Requesting certificate signing from Vault..." + + ATTEMPT=0 + SUCCESS_OPERATION=false -if [ "$SUCCES_OPERATION" = false ]; then - echo "Error: Failed to retrieve a valid response after $MAX_RETRIES attempts." - exit 1 # Exit with failure + while [ $ATTEMPT -lt $MAX_RETRIES ]; do + ATTEMPT=$((ATTEMPT + 1)) + echo "Attempt $ATTEMPT of $MAX_RETRIES" + + SIGN_RESPONSE=$(curl -s -X POST \ + -H "X-Vault-Token: $VAULT_TOKEN" \ + -d "{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\",\"common_name\":\"$CAPIF_HOSTNAME\"}" \ + "$VAULT_ADDR/v1/pki_int/sign/my-ca") + + CERT=$(echo "$SIGN_RESPONSE" | jq -r '.data.certificate') + + if [ -n "$CERT" ] && [ "$CERT" != "null" ]; then + echo "$CERT" > server.crt + echo "Server certificate successfully signed and saved." + SUCCESS_OPERATION=true + break + else + echo "Invalid certificate response. Retrying in $RETRY_DELAY seconds..." + sleep $RETRY_DELAY + fi + done + + if [ "$SUCCESS_OPERATION" = false ]; then + echo "Error: Failed to sign certificate after $MAX_RETRIES attempts." + exit 1 + fi +else + echo "server.crt already exists. Skipping signing." fi + +############################################################### +# 4) STORE CERTIFICATES IN VAULT UNDER capif/ +############################################################### +echo "Storing CAPIF certificates in Vault..." + +vault kv put secret/capif/$CCF_ID/server crt=@server.crt +vault kv put secret/capif/$CCF_ID/private key=@server.key +vault kv put secret/capif/$CCF_ID/ca ca=@ca.crt + +echo "Certificates successfully stored in Vault namespace: secret/capif/$CCF_ID" + + +############################################################### +# 5) START NGINX +############################################################### LOG_LEVEL=$(echo "${LOG_LEVEL}" | tr '[:upper:]' '[:lower:]') case "$LOG_LEVEL" in -- GitLab From f0493bd7e0be6a39e7590621a26b3ba927b008d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Wed, 17 Dec 2025 18:07:38 +0100 Subject: [PATCH 054/101] register create certs --- services/register/register_prepare.sh | 114 ++++++++++++++++++++------ 1 file changed, 88 insertions(+), 26 deletions(-) diff --git a/services/register/register_prepare.sh b/services/register/register_prepare.sh index 05234114..b0ef1d2e 100644 --- a/services/register/register_prepare.sh +++ b/services/register/register_prepare.sh @@ -6,27 +6,64 @@ cd $CERTS_FOLDER VAULT_ADDR="http://$VAULT_HOSTNAME:$VAULT_PORT" VAULT_TOKEN=$VAULT_ACCESS_TOKEN -COUNTRY="ES" # 2 letter country-code -STATE="Madrid" # state or province name -LOCALITY="Madrid" # Locality Name (e.g. city) -ORGNAME="Telefonica I+D" # Organization Name (eg, company) -ORGUNIT="Innovation" # Organizational Unit Name (eg. section) -COMMONNAME=${REGISTER_HOSTNAME:-register} -EMAIL="inno@tid.es" # certificate's email address +# NEW: Get CAPIF instance ID from helper +HELPER_URL="http://$HELPER_HOST:8080/api/getCcfId" +echo "Retrieving CCF ID from Helper..." + +CCF_ID=$(curl -s --connect-timeout 5 "$HELPER_URL" | jq -r '.ccf_id') + +if [ -z "$CCF_ID" ] || [ "$CCF_ID" = "null" ]; then + echo "ERROR: Could not retrieve CCF ID from Helper." + exit 1 +fi + +echo "CCF ID for this CAPIF instance: $CCF_ID" + + +COUNTRY="ES" +STATE="Madrid" +LOCALITY="Madrid" +ORGNAME="Telefonica I+D" +ORGUNIT="Innovation" +COMMONNAME=${REGISTER_HOSTNAME:-register} TTL="4300h" -echo "Generating private key for Register." -openssl genrsa -out register_key.key 2048 +# ============================================================== +# 1) GENERATE PRIVATE KEY IF NOT EXISTS +# ============================================================== +if [ ! -f register_key.key ]; then + echo "Generating private key for Register." + openssl genrsa -out register_key.key 2048 +else + echo "Private key already exists → skipping generation." +fi + +# ============================================================== +# 2) GENERATE CSR ONLY IF CERT DOES NOT EXIST +# ============================================================== + +if [ ! -f register_cert.crt ]; then + echo "Creating CSR for CN=${COMMONNAME}." + + openssl req -new -key register_key.key \ + -subj "/C=${COUNTRY}/ST=${STATE}/L=${LOCALITY}/O=${ORGNAME}/OU=${ORGUNIT}/CN=${COMMONNAME}" \ + -addext "subjectAltName=DNS:${COMMONNAME}" \ + -out register.csr -echo "Creating CSR for CN=${COMMONNAME}." -openssl req -new -key register_key.key \ - -subj "/C=${COUNTRY}/ST=${STATE}/L=${LOCALITY}/O=${ORGNAME}/OU=${ORGUNIT}/CN=${COMMONNAME}/emailAddress=${EMAIL}" \ - -out register.csr + echo "CSR created." +else + echo "register_cert.crt already exists → skipping CSR generation." +fi + +# ============================================================== +# 3) DOWNLOAD CA FROM VAULT +# ============================================================== echo "Downloading CA chain from Vault." + curl -s -H "X-Vault-Token: ${VAULT_TOKEN}" \ "${VAULT_ADDR}/v1/secret/data/ca" | jq -r '.data.data.ca' > ca_root.crt - + if [ ! -s ca_root.crt ]; then echo "ERROR: could not retrieve CA from Vault." exit 1 @@ -34,27 +71,52 @@ fi echo "CA chain retrieved successfully." -echo "Requesting certificate signature from Vault..." -CSR_CONTENT=$(awk '{printf "%s\\n", $0}' register.csr) +# ============================================================== +# 4) REQUEST SIGNATURE ONLY IF CERT DOES NOT EXIST +# ============================================================== +if [ ! -f register_cert.crt ]; then + echo "Requesting certificate signature from Vault..." + CSR_CONTENT=$(sed ':a;N;$!ba;s/\n/\\n/g' register.csr) -curl -s -X POST \ - -H "X-Vault-Token: ${VAULT_TOKEN}" \ - -d "{\"csr\": \"${CSR_CONTENT}\", \"common_name\": \"${COMMONNAME}\", \"format\": \"pem_bundle\", \"ttl\": \"${TTL}\"}" \ - "${VAULT_ADDR}/v1/pki_int/sign/my-ca" \ - | jq -r '.data.certificate' | awk '{gsub("\\\\n","\n")}1' > register_cert.crt + curl -s -X POST \ + -H "X-Vault-Token: ${VAULT_TOKEN}" \ + -d "{\"csr\": \"${CSR_CONTENT}\", \"common_name\": \"${COMMONNAME}\", \"format\": \"pem_bundle\", \"ttl\": \"${TTL}\"}" \ + "${VAULT_ADDR}/v1/pki_int/sign/my-ca" \ + | jq -r '.data.certificate' | awk '{gsub("\\\\n","\n")}1' > register_cert.crt -if [ ! -s register_cert.crt ]; then - echo "ERROR: could not retrieve signed certificate from Vault." - exit 1 -fi + if [ ! -s register_cert.crt ]; then + echo "ERROR: could not retrieve signed certificate from Vault." + exit 1 + fi -echo "Certificate signed successfully by Vault intermediate CA." + echo "Certificate signed successfully by Vault intermediate CA." +else + echo "register_cert.crt already exists → skipping signing step." +fi +# ============================================================== +# 5) VERIFY CERTIFICATE CHAIN +# ============================================================== echo "Verifying certificate chain." openssl verify -CAfile ca_root.crt register_cert.crt || { echo "WARNING: certificate verification failed" } +# ============================================================== +# 6) NEW → STORE REGISTER CERTIFICATES IN VAULT +# ============================================================== +echo "Storing Register certificates under secret/capif/${CCF_ID}/register" + +vault kv put secret/capif/$CCF_ID/register/server crt=@register_cert.crt +vault kv put secret/capif/$CCF_ID/register/private key=@register_key.key +vault kv put secret/capif/$CCF_ID/register/ca ca=@ca_root.crt + +echo "Certificates stored successfully." + + +# ============================================================== +# 7) START REGISTER SERVICE +# ============================================================== echo "Starting Register service with signed certificate." gunicorn --certfile=/usr/src/app/register_service/certs/register_cert.crt \ --keyfile=/usr/src/app/register_service/certs/register_key.key \ -- GitLab From 52df4829d9707080e2e544d563a39582d384f81c Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Fri, 19 Dec 2025 13:09:25 +0100 Subject: [PATCH 055/101] added visibility control api to helper --- services/helper/config.yaml | 4 +- .../openapi_helper_visibility_control.yaml | 533 +++++ .../helper/helper_service/openapitools.json | 7 + .../services/visibility_control/__init__.py | 0 .../services/visibility_control/__main__.py | 19 + .../controllers/__init__.py | 0 .../controllers/decision_controller.py | 21 + .../controllers/rules_controller.py | 49 + .../controllers/security_controller.py | 2 + .../visibility_control/core/__init__.py | 0 .../core/visibility_control_core.py | 44 + .../services/visibility_control/encoder.py | 19 + .../visibility_control/models/__init__.py | 30 + .../visibility_control/models/aef_location.py | 61 + .../visibility_control/models/aef_profile.py | 345 +++ .../visibility_control/models/api_status.py | 63 + .../visibility_control/models/base_model.py | 68 + .../models/communication_type.py | 39 + .../models/custom_operation.py | 147 ++ .../visibility_control/models/data_format.py | 40 + .../models/discovered_apis.py | 95 + .../visibility_control/models/error.py | 117 + .../models/interface_description.py | 221 ++ .../models/invoker_selector.py | 91 + .../models/ip_addr_range.py | 63 + ...ip_addr_range_ue_ipv4_addr_ranges_inner.py | 87 + .../models/o_auth_grant_type.py | 40 + .../visibility_control/models/operation.py | 42 + .../models/patch_provider_selector.py | 147 ++ .../visibility_control/models/protocol.py | 41 + .../models/provider_selector.py | 177 ++ .../models/published_api_path.py | 61 + .../visibility_control/models/resource.py | 201 ++ .../visibility_control/models/rule.py | 309 +++ .../models/rule_create_request.py | 229 ++ .../models/rule_patch_request.py | 227 ++ .../models/rules_get200_response.py | 91 + .../models/security_method.py | 40 + .../models/service_api_description.py | 365 ++++ .../visibility_control/models/service_kpis.py | 191 ++ .../models/shareable_information.py | 89 + .../visibility_control/models/version.py | 145 ++ .../visibility_control/openapi/openapi.yaml | 1938 +++++++++++++++++ .../visibility_control/typing_utils.py | 30 + .../services/visibility_control/util.py | 147 ++ 45 files changed, 6674 insertions(+), 1 deletion(-) create mode 100644 services/helper/helper_service/openapi_helper_visibility_control.yaml create mode 100644 services/helper/helper_service/openapitools.json create mode 100644 services/helper/helper_service/services/visibility_control/__init__.py create mode 100644 services/helper/helper_service/services/visibility_control/__main__.py create mode 100644 services/helper/helper_service/services/visibility_control/controllers/__init__.py create mode 100644 services/helper/helper_service/services/visibility_control/controllers/decision_controller.py create mode 100644 services/helper/helper_service/services/visibility_control/controllers/rules_controller.py create mode 100644 services/helper/helper_service/services/visibility_control/controllers/security_controller.py create mode 100644 services/helper/helper_service/services/visibility_control/core/__init__.py create mode 100644 services/helper/helper_service/services/visibility_control/core/visibility_control_core.py create mode 100644 services/helper/helper_service/services/visibility_control/encoder.py create mode 100644 services/helper/helper_service/services/visibility_control/models/__init__.py create mode 100644 services/helper/helper_service/services/visibility_control/models/aef_location.py create mode 100644 services/helper/helper_service/services/visibility_control/models/aef_profile.py create mode 100644 services/helper/helper_service/services/visibility_control/models/api_status.py create mode 100644 services/helper/helper_service/services/visibility_control/models/base_model.py create mode 100644 services/helper/helper_service/services/visibility_control/models/communication_type.py create mode 100644 services/helper/helper_service/services/visibility_control/models/custom_operation.py create mode 100644 services/helper/helper_service/services/visibility_control/models/data_format.py create mode 100644 services/helper/helper_service/services/visibility_control/models/discovered_apis.py create mode 100644 services/helper/helper_service/services/visibility_control/models/error.py create mode 100644 services/helper/helper_service/services/visibility_control/models/interface_description.py create mode 100644 services/helper/helper_service/services/visibility_control/models/invoker_selector.py create mode 100644 services/helper/helper_service/services/visibility_control/models/ip_addr_range.py create mode 100644 services/helper/helper_service/services/visibility_control/models/ip_addr_range_ue_ipv4_addr_ranges_inner.py create mode 100644 services/helper/helper_service/services/visibility_control/models/o_auth_grant_type.py create mode 100644 services/helper/helper_service/services/visibility_control/models/operation.py create mode 100644 services/helper/helper_service/services/visibility_control/models/patch_provider_selector.py create mode 100644 services/helper/helper_service/services/visibility_control/models/protocol.py create mode 100644 services/helper/helper_service/services/visibility_control/models/provider_selector.py create mode 100644 services/helper/helper_service/services/visibility_control/models/published_api_path.py create mode 100644 services/helper/helper_service/services/visibility_control/models/resource.py create mode 100644 services/helper/helper_service/services/visibility_control/models/rule.py create mode 100644 services/helper/helper_service/services/visibility_control/models/rule_create_request.py create mode 100644 services/helper/helper_service/services/visibility_control/models/rule_patch_request.py create mode 100644 services/helper/helper_service/services/visibility_control/models/rules_get200_response.py create mode 100644 services/helper/helper_service/services/visibility_control/models/security_method.py create mode 100644 services/helper/helper_service/services/visibility_control/models/service_api_description.py create mode 100644 services/helper/helper_service/services/visibility_control/models/service_kpis.py create mode 100644 services/helper/helper_service/services/visibility_control/models/shareable_information.py create mode 100644 services/helper/helper_service/services/visibility_control/models/version.py create mode 100644 services/helper/helper_service/services/visibility_control/openapi/openapi.yaml create mode 100644 services/helper/helper_service/services/visibility_control/typing_utils.py create mode 100644 services/helper/helper_service/services/visibility_control/util.py diff --git a/services/helper/config.yaml b/services/helper/config.yaml index 2cf3193d..1147d571 100644 --- a/services/helper/config.yaml +++ b/services/helper/config.yaml @@ -44,4 +44,6 @@ package_paths: configuration_api: path: /configuration openapi_file: configuration/openapi/openapi.yaml - + visibility_control: + path: /visibility-control + openapi_file: visibility_control/openapi/openapi.yaml diff --git a/services/helper/helper_service/openapi_helper_visibility_control.yaml b/services/helper/helper_service/openapi_helper_visibility_control.yaml new file mode 100644 index 00000000..4d386230 --- /dev/null +++ b/services/helper/helper_service/openapi_helper_visibility_control.yaml @@ -0,0 +1,533 @@ +openapi: 3.0.3 +info: + title: OpenCAPIF Access Control + version: 1.0.0 + description: | + Access-control API to manage visibility rules and evaluate decisions for API discovery and + security-context access within OpenCAPIF. This API controls whether APIs are visible to invokers + (discovery) and whether invokers are allowed to create a security context to access them. + - Rules are global and evaluated with "more specific wins" precedence. + - If no rule matches, the decision uses OpenCAPIF's global default (outside this API). + - Provider selector is mandatory in rules and must contain at least one selector field. +servers: + - url: https://capif.example.com/access-control + description: Production + - url: https://sandbox.capif.example.com/access-control + description: Sandbox + +tags: + - name: Rules + description: Manage visibility rules + - name: Decision + description: Evaluate discovery and access decisions + +paths: + /rules: + get: + tags: [Rules] + summary: List rules + responses: + '200': + description: List of rules + content: + application/json: + schema: + type: object + properties: + items: + type: array + items: + $ref: '#/components/schemas/Rule' + nextPageToken: + type: string + required: [items] + post: + tags: [Rules] + summary: Create a rule + description: Server generates the ruleId. Provider selector must include at least one field. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RuleCreateRequest' + examples: + allow_except_some_invokers: + value: + providerSelector: + createdByUser: "userA" + apiProviderId: [ "capif-prov-01", "capif-prov-02" ] + apiName: [ "apiName-001" ] + apiId: [ "apiId-001" ] + aefId: [ "aef-001" ] + invokerExceptions: + apiInvokerId: [ "invk-123", "invk-999" ] + default_access: ALLOW + enabled: true + responses: + '201': + description: Rule created + content: + application/json: + schema: + $ref: '#/components/schemas/Rule' + '400': + description: Invalid input + content: + application/json: + schema: { $ref: '#/components/schemas/Error' } + + /rules/{ruleId}: + get: + tags: [Rules] + summary: Get a rule + parameters: + - $ref: '#/components/parameters/RuleId' + responses: + '200': + description: Rule + content: + application/json: + schema: + $ref: '#/components/schemas/Rule' + '404': + description: Rule not found + content: + application/json: + schema: { $ref: '#/components/schemas/Error' } + patch: + tags: [Rules] + summary: Update a rule (partial) + parameters: + - $ref: '#/components/parameters/RuleId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RulePatchRequest' + responses: + '200': + description: Rule updated + content: + application/json: + schema: + $ref: '#/components/schemas/Rule' + '400': + description: Invalid input + content: + application/json: + schema: { $ref: '#/components/schemas/Error' } + '404': + description: Rule not found + content: + application/json: + schema: { $ref: '#/components/schemas/Error' } + delete: + tags: [Rules] + summary: Delete a rule + parameters: + - $ref: '#/components/parameters/RuleId' + responses: + '204': + description: Deleted + '404': + description: Rule not found + content: + application/json: + schema: { $ref: '#/components/schemas/Error' } + + /decision/invokers/{apiInvokerId}/discoverable-apis: + get: + tags: [Decision] + summary: Get discoverable APIs filter for an invoker (global scope) + description: | + Returns a filtered list of APIs for the API Invoker. + parameters: + - $ref: '#/components/parameters/ApiInvokerId' + responses: + '200': + description: Discover filter + content: + application/json: + schema: + $ref: '#/components/schemas/DiscoveredAPIs' + '400': + description: Invalid input + content: + application/json: + schema: { $ref: '#/components/schemas/Error' } + '404': + description: Invoker not found (optional behavior) + content: + application/json: + schema: { $ref: '#/components/schemas/Error' } + +components: + parameters: + RuleId: + in: path + name: ruleId + required: true + schema: + type: string + description: Server-generated rule identifier + ApiInvokerId: + in: path + name: apiInvokerId + required: true + schema: + type: string + description: CAPIF API Invoker identifier + + schemas: + # ---------- Core Rule Schemas ---------- + RuleCreateRequest: + type: object + required: [providerSelector, default_access] + properties: + providerSelector: + $ref: '#/components/schemas/ProviderSelector' + invokerExceptions: + $ref: '#/components/schemas/InvokerSelector' + default_access: + type: string + enum: [ALLOW, DENY] + enabled: + type: boolean + default: true + startsAt: + type: string + format: date-time + endsAt: + type: string + format: date-time + notes: + type: string + description: | + Create a new rule. Provider selector is mandatory and must include at least one field. + If both startsAt and endsAt are present, endsAt must be greater than startsAt. + + RulePatchRequest: + type: object + properties: + providerSelector: + $ref: '#/components/schemas/PatchProviderSelector' + invokerExceptions: + $ref: '#/components/schemas/InvokerSelector' + default_access: + type: string + enum: [ALLOW, DENY] + enabled: + type: boolean + startsAt: + type: string + format: date-time + endsAt: + type: string + format: date-time + notes: + type: string + description: Partial update. Any omitted field remains unchanged. + + Rule: + type: object + properties: + ruleId: + type: string + providerSelector: + $ref: '#/components/schemas/ProviderSelector' + invokerExceptions: + $ref: '#/components/schemas/InvokerSelector' + default_access: + type: string + enum: [ALLOW, DENY] + enabled: + type: boolean + default: true + startsAt: + type: string + format: date-time + endsAt: + type: string + format: date-time + notes: + type: string + updatedAt: + type: string + format: date-time + updatedBy: + type: string + required: [ruleId, providerSelector, default_access] + + PatchProviderSelector: + type: object + description: | + Patch Provider-side selector. + properties: + apiProviderId: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + apiName: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + apiId: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + aefId: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + additionalProperties: false + + ProviderSelector: + type: object + description: | + Provider-side selector. Arrays apply OR within the field; AND across fields. + At least one of these fields must be present. + required: + - createdByUser + properties: + createdByUser: + type: string + minLength: 1 + apiProviderId: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + apiName: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + apiId: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + aefId: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + additionalProperties: false + + InvokerSelector: + type: object + description: Invoker-side selector used for exceptions. Optional; arrays use OR within the field; AND across fields. + properties: + invokerOnboardedByUser: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + apiInvokerId: + type: array + items: { type: string } + minItems: 0 + uniqueItems: true + additionalProperties: false + + # ---------- Decision Schemas (3GPP Based) ---------- + DiscoveredAPIs: + type: object + properties: + serviceAPIDescriptions: + type: array + items: + $ref: '#/components/schemas/ServiceAPIDescription' + minItems: 1 + suppFeat: + $ref: '#/components/schemas/SupportedFeatures' + + ServiceAPIDescription: + type: object + required: [apiName] + properties: + apiName: { type: string } + apiId: { type: string } + apiStatus: { $ref: '#/components/schemas/ApiStatus' } + aefProfiles: + type: array + items: { $ref: '#/components/schemas/AefProfile' } + minItems: 1 + description: { type: string } + supportedFeatures: { $ref: '#/components/schemas/SupportedFeatures' } + shareableInfo: { $ref: '#/components/schemas/ShareableInformation' } + serviceAPICategory: { type: string } + apiSuppFeats: { $ref: '#/components/schemas/SupportedFeatures' } + pubApiPath: { $ref: '#/components/schemas/PublishedApiPath' } + ccfId: { type: string } + apiProvName: { type: string } + #apiProvName is apiProviderId? + + + AefProfile: + type: object + required: [aefId, versions] + properties: + aefId: { type: string } + versions: + type: array + items: { $ref: '#/components/schemas/Version' } + minItems: 1 + protocol: { $ref: '#/components/schemas/Protocol' } + dataFormat: { $ref: '#/components/schemas/DataFormat' } + securityMethods: + type: array + items: { $ref: '#/components/schemas/SecurityMethod' } + grantTypes: + type: array + items: { $ref: '#/components/schemas/OAuthGrantType' } + domainName: { type: string } + interfaceDescriptions: + type: array + items: { $ref: '#/components/schemas/InterfaceDescription' } + aefLocation: { $ref: '#/components/schemas/AefLocation' } + serviceKpis: { $ref: '#/components/schemas/ServiceKpis' } + ueIpRange: { $ref: '#/components/schemas/IpAddrRange' } + + Version: + type: object + required: [apiVersion] + properties: + apiVersion: { type: string } + expiry: { type: string, format: date-time } + resources: + type: array + items: { $ref: '#/components/schemas/Resource' } + custOperations: + type: array + items: { $ref: '#/components/schemas/CustomOperation' } + + Resource: + type: object + required: [commType, resourceName, uri] + properties: + resourceName: { type: string } + commType: { $ref: '#/components/schemas/CommunicationType' } + uri: { type: string } + custOpName: { type: string } + operations: + type: array + items: { $ref: '#/components/schemas/Operation' } + description: { type: string } + + CustomOperation: + type: object + required: [commType, custOpName] + properties: + commType: { $ref: '#/components/schemas/CommunicationType' } + custOpName: { type: string } + operations: + type: array + items: { $ref: '#/components/schemas/Operation' } + description: { type: string } + + ApiStatus: + type: object + required: [aefIds] + properties: + aefIds: + type: array + items: { type: string } + + InterfaceDescription: + type: object + properties: + ipv4Addr: { type: string } + ipv6Addr: { type: string } + fqdn: { type: string } + port: { type: integer } + apiPrefix: { type: string } + securityMethods: + type: array + items: { $ref: '#/components/schemas/SecurityMethod' } + grantTypes: + type: array + items: { $ref: '#/components/schemas/OAuthGrantType' } + + # ---------- Supporting 3GPP Types ---------- + SupportedFeatures: + type: string + pattern: "^[A-Fa-f0-9]*$" + CommunicationType: + type: string + enum: [REQUEST_RESPONSE, SUBSCRIBE_NOTIFY] + Protocol: + type: string + enum: [HTTP_1_1, HTTP_2, MQTT, WEBSOCKET] + DataFormat: + type: string + enum: [JSON, XML, PROTOBUF3] + Operation: + type: string + enum: [GET, POST, PUT, PATCH, DELETE] + SecurityMethod: + type: string + enum: [PSK, PKI, OAUTH] + OAuthGrantType: + type: string + enum: [CLIENT_CREDENTIALS, AUTHORIZATION_CODE, AUTHORIZATION_CODE_WITH_PKCE] + + ShareableInformation: + type: object + required: [isShareable] + properties: + isShareable: { type: boolean } + capifProvDoms: + type: array + items: { type: string } + + PublishedApiPath: + type: object + properties: + ccfIds: + type: array + items: { type: string } + + AefLocation: + type: object + properties: + dcId: { type: string } + # Simplified for brevity, you can add GeographicArea/CivicAddress if needed + + ServiceKpis: + type: object + properties: + maxReqRate: { type: integer } + maxRestime: { type: integer } + availability: { type: integer } + avalComp: { type: string } + avalMem: { type: string } + avalStor: { type: string } + + IpAddrRange: + type: object + properties: + ueIpv4AddrRanges: + type: array + items: + type: object + properties: + start: { type: string } + end: { type: string } + + # ---------- Errors ---------- + Error: + type: object + required: [code, message] + properties: + code: { type: string } + message: { type: string } + details: + type: object + additionalProperties: true \ No newline at end of file diff --git a/services/helper/helper_service/openapitools.json b/services/helper/helper_service/openapitools.json new file mode 100644 index 00000000..f8d07ce1 --- /dev/null +++ b/services/helper/helper_service/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.10.0" + } +} diff --git a/services/helper/helper_service/services/visibility_control/__init__.py b/services/helper/helper_service/services/visibility_control/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/services/helper/helper_service/services/visibility_control/__main__.py b/services/helper/helper_service/services/visibility_control/__main__.py new file mode 100644 index 00000000..346127a6 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/__main__.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import connexion + +from visibility_control import encoder + + +def main(): + app = connexion.App(__name__, specification_dir='./openapi/') + app.app.json_encoder = encoder.JSONEncoder + app.add_api('openapi.yaml', + arguments={'title': 'OpenCAPIF Access Control'}, + pythonic_params=True) + + app.run(port=8080) + + +if __name__ == '__main__': + main() diff --git a/services/helper/helper_service/services/visibility_control/controllers/__init__.py b/services/helper/helper_service/services/visibility_control/controllers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/services/helper/helper_service/services/visibility_control/controllers/decision_controller.py b/services/helper/helper_service/services/visibility_control/controllers/decision_controller.py new file mode 100644 index 00000000..4bfdeaff --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/controllers/decision_controller.py @@ -0,0 +1,21 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from visibility_control.models.discovered_apis import DiscoveredAPIs # noqa: E501 +from visibility_control.models.error import Error # noqa: E501 +from visibility_control import util + + +def decision_invokers_api_invoker_id_discoverable_apis_get(api_invoker_id): # noqa: E501 + """Get discoverable APIs filter for an invoker (global scope) + + Returns a filtered list of APIs for the API Invoker. # noqa: E501 + + :param api_invoker_id: CAPIF API Invoker identifier + :type api_invoker_id: str + + :rtype: Union[DiscoveredAPIs, Tuple[DiscoveredAPIs, int], Tuple[DiscoveredAPIs, int, Dict[str, str]] + """ + return 'do some magic!' diff --git a/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py b/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py new file mode 100644 index 00000000..bc0a3014 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py @@ -0,0 +1,49 @@ +import connexion +from typing import Dict, Tuple, Union + +# Importamos la lógica del CORE (Asegúrate de crear este archivo después) +from ..core.visibility_control_core import ( + get_all_rules, + create_new_rule, + get_rule_by_id, + delete_rule_by_id, + update_rule_patch +) + +from visibility_control.models.error import Error +from visibility_control.models.rule import Rule +from visibility_control.models.rule_create_request import RuleCreateRequest +from visibility_control.models.rule_patch_request import RulePatchRequest +from visibility_control.models.rules_get200_response import RulesGet200Response +from visibility_control import util + +def rules_get(): + """List rules""" + return get_all_rules() + +def rules_post(body): + """ + Create a rule + """ + if body is not None: + return create_new_rule(body) + if connexion.request.is_json: + body = connexion.request.get_json() + return create_new_rule(body) + + return Error(title="Bad Request", detail="JSON body required", status=400), 400 + +def rules_rule_id_delete(rule_id): + """Delete a rule""" + return delete_rule_by_id(rule_id) + +def rules_rule_id_get(rule_id): + """Get a rule""" + return get_rule_by_id(rule_id) + +def rules_rule_id_patch(rule_id, rule_patch_request): + """Update a rule (partial)""" + if connexion.request.is_json: + body = connexion.request.get_json() + return update_rule_patch(rule_id, body) + return Error(title="Bad Request", detail="JSON body required", status=400), 400 \ No newline at end of file diff --git a/services/helper/helper_service/services/visibility_control/controllers/security_controller.py b/services/helper/helper_service/services/visibility_control/controllers/security_controller.py new file mode 100644 index 00000000..6d294ffd --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/controllers/security_controller.py @@ -0,0 +1,2 @@ +from typing import List + diff --git a/services/helper/helper_service/services/visibility_control/core/__init__.py b/services/helper/helper_service/services/visibility_control/core/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py new file mode 100644 index 00000000..6d3af076 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py @@ -0,0 +1,44 @@ +import uuid +from db.db import get_mongo +from config import Config + +def get_all_rules(): + db = get_mongo() + # Usamos la colección configurada en el helper + col = db.get_col_by_name("visibility_rules") + rules = list(col.find({}, {"_id": 0})) + return {"rules": rules}, 200 + +def create_new_rule(body): + db = get_mongo() + col = db.get_col_by_name("visibility_rules") + + # Generamos el ruleId (Server generates it, según tu comentario) + body['ruleId'] = str(uuid.uuid4()) + + col.insert_one(body) + body.pop('_id', None) + return body, 201 + +def get_rule_by_id(rule_id): + db = get_mongo() + col = db.get_col_by_name("visibility_rules") + rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) + if rule: + return rule, 200 + return {"title": "Not Found", "detail": "Rule not found"}, 404 + +def delete_rule_by_id(rule_id): + db = get_mongo() + col = db.get_col_by_name("visibility_rules") + res = col.delete_one({"ruleId": rule_id}) + if res.deleted_count > 0: + return None, 204 + return {"title": "Not Found", "detail": "Rule not found"}, 404 + +def update_rule_patch(rule_id, body): + db = get_mongo() + col = db.get_col_by_name("visibility_rules") + col.update_one({"ruleId": rule_id}, {"$set": body}) + updated_rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) + return updated_rule, 200 \ No newline at end of file diff --git a/services/helper/helper_service/services/visibility_control/encoder.py b/services/helper/helper_service/services/visibility_control/encoder.py new file mode 100644 index 00000000..740bbe7d --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/encoder.py @@ -0,0 +1,19 @@ +from connexion.apps.flask_app import FlaskJSONEncoder + +from visibility_control.models.base_model import Model + + +class JSONEncoder(FlaskJSONEncoder): + include_nulls = False + + def default(self, o): + if isinstance(o, Model): + dikt = {} + for attr in o.openapi_types: + value = getattr(o, attr) + if value is None and not self.include_nulls: + continue + attr = o.attribute_map[attr] + dikt[attr] = value + return dikt + return FlaskJSONEncoder.default(self, o) diff --git a/services/helper/helper_service/services/visibility_control/models/__init__.py b/services/helper/helper_service/services/visibility_control/models/__init__.py new file mode 100644 index 00000000..8ba41842 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/__init__.py @@ -0,0 +1,30 @@ +# flake8: noqa +# import models into model package +from visibility_control.models.aef_location import AefLocation +from visibility_control.models.aef_profile import AefProfile +from visibility_control.models.api_status import ApiStatus +from visibility_control.models.communication_type import CommunicationType +from visibility_control.models.custom_operation import CustomOperation +from visibility_control.models.data_format import DataFormat +from visibility_control.models.discovered_apis import DiscoveredAPIs +from visibility_control.models.error import Error +from visibility_control.models.interface_description import InterfaceDescription +from visibility_control.models.invoker_selector import InvokerSelector +from visibility_control.models.ip_addr_range import IpAddrRange +from visibility_control.models.ip_addr_range_ue_ipv4_addr_ranges_inner import IpAddrRangeUeIpv4AddrRangesInner +from visibility_control.models.o_auth_grant_type import OAuthGrantType +from visibility_control.models.operation import Operation +from visibility_control.models.patch_provider_selector import PatchProviderSelector +from visibility_control.models.protocol import Protocol +from visibility_control.models.provider_selector import ProviderSelector +from visibility_control.models.published_api_path import PublishedApiPath +from visibility_control.models.resource import Resource +from visibility_control.models.rule import Rule +from visibility_control.models.rule_create_request import RuleCreateRequest +from visibility_control.models.rule_patch_request import RulePatchRequest +from visibility_control.models.rules_get200_response import RulesGet200Response +from visibility_control.models.security_method import SecurityMethod +from visibility_control.models.service_api_description import ServiceAPIDescription +from visibility_control.models.service_kpis import ServiceKpis +from visibility_control.models.shareable_information import ShareableInformation +from visibility_control.models.version import Version diff --git a/services/helper/helper_service/services/visibility_control/models/aef_location.py b/services/helper/helper_service/services/visibility_control/models/aef_location.py new file mode 100644 index 00000000..fa0d4275 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/aef_location.py @@ -0,0 +1,61 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class AefLocation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, dc_id=None): # noqa: E501 + """AefLocation - a model defined in OpenAPI + + :param dc_id: The dc_id of this AefLocation. # noqa: E501 + :type dc_id: str + """ + self.openapi_types = { + 'dc_id': str + } + + self.attribute_map = { + 'dc_id': 'dcId' + } + + self._dc_id = dc_id + + @classmethod + def from_dict(cls, dikt) -> 'AefLocation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The AefLocation of this AefLocation. # noqa: E501 + :rtype: AefLocation + """ + return util.deserialize_model(dikt, cls) + + @property + def dc_id(self) -> str: + """Gets the dc_id of this AefLocation. + + + :return: The dc_id of this AefLocation. + :rtype: str + """ + return self._dc_id + + @dc_id.setter + def dc_id(self, dc_id: str): + """Sets the dc_id of this AefLocation. + + + :param dc_id: The dc_id of this AefLocation. + :type dc_id: str + """ + + self._dc_id = dc_id diff --git a/services/helper/helper_service/services/visibility_control/models/aef_profile.py b/services/helper/helper_service/services/visibility_control/models/aef_profile.py new file mode 100644 index 00000000..8d9535c2 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/aef_profile.py @@ -0,0 +1,345 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.aef_location import AefLocation +from visibility_control.models.data_format import DataFormat +from visibility_control.models.interface_description import InterfaceDescription +from visibility_control.models.ip_addr_range import IpAddrRange +from visibility_control.models.o_auth_grant_type import OAuthGrantType +from visibility_control.models.protocol import Protocol +from visibility_control.models.security_method import SecurityMethod +from visibility_control.models.service_kpis import ServiceKpis +from visibility_control.models.version import Version +from visibility_control import util + +from visibility_control.models.aef_location import AefLocation # noqa: E501 +from visibility_control.models.data_format import DataFormat # noqa: E501 +from visibility_control.models.interface_description import InterfaceDescription # noqa: E501 +from visibility_control.models.ip_addr_range import IpAddrRange # noqa: E501 +from visibility_control.models.o_auth_grant_type import OAuthGrantType # noqa: E501 +from visibility_control.models.protocol import Protocol # noqa: E501 +from visibility_control.models.security_method import SecurityMethod # noqa: E501 +from visibility_control.models.service_kpis import ServiceKpis # noqa: E501 +from visibility_control.models.version import Version # noqa: E501 + +class AefProfile(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, aef_id=None, versions=None, protocol=None, data_format=None, security_methods=None, grant_types=None, domain_name=None, interface_descriptions=None, aef_location=None, service_kpis=None, ue_ip_range=None): # noqa: E501 + """AefProfile - a model defined in OpenAPI + + :param aef_id: The aef_id of this AefProfile. # noqa: E501 + :type aef_id: str + :param versions: The versions of this AefProfile. # noqa: E501 + :type versions: List[Version] + :param protocol: The protocol of this AefProfile. # noqa: E501 + :type protocol: Protocol + :param data_format: The data_format of this AefProfile. # noqa: E501 + :type data_format: DataFormat + :param security_methods: The security_methods of this AefProfile. # noqa: E501 + :type security_methods: List[SecurityMethod] + :param grant_types: The grant_types of this AefProfile. # noqa: E501 + :type grant_types: List[OAuthGrantType] + :param domain_name: The domain_name of this AefProfile. # noqa: E501 + :type domain_name: str + :param interface_descriptions: The interface_descriptions of this AefProfile. # noqa: E501 + :type interface_descriptions: List[InterfaceDescription] + :param aef_location: The aef_location of this AefProfile. # noqa: E501 + :type aef_location: AefLocation + :param service_kpis: The service_kpis of this AefProfile. # noqa: E501 + :type service_kpis: ServiceKpis + :param ue_ip_range: The ue_ip_range of this AefProfile. # noqa: E501 + :type ue_ip_range: IpAddrRange + """ + self.openapi_types = { + 'aef_id': str, + 'versions': List[Version], + 'protocol': Protocol, + 'data_format': DataFormat, + 'security_methods': List[SecurityMethod], + 'grant_types': List[OAuthGrantType], + 'domain_name': str, + 'interface_descriptions': List[InterfaceDescription], + 'aef_location': AefLocation, + 'service_kpis': ServiceKpis, + 'ue_ip_range': IpAddrRange + } + + self.attribute_map = { + 'aef_id': 'aefId', + 'versions': 'versions', + 'protocol': 'protocol', + 'data_format': 'dataFormat', + 'security_methods': 'securityMethods', + 'grant_types': 'grantTypes', + 'domain_name': 'domainName', + 'interface_descriptions': 'interfaceDescriptions', + 'aef_location': 'aefLocation', + 'service_kpis': 'serviceKpis', + 'ue_ip_range': 'ueIpRange' + } + + self._aef_id = aef_id + self._versions = versions + self._protocol = protocol + self._data_format = data_format + self._security_methods = security_methods + self._grant_types = grant_types + self._domain_name = domain_name + self._interface_descriptions = interface_descriptions + self._aef_location = aef_location + self._service_kpis = service_kpis + self._ue_ip_range = ue_ip_range + + @classmethod + def from_dict(cls, dikt) -> 'AefProfile': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The AefProfile of this AefProfile. # noqa: E501 + :rtype: AefProfile + """ + return util.deserialize_model(dikt, cls) + + @property + def aef_id(self) -> str: + """Gets the aef_id of this AefProfile. + + + :return: The aef_id of this AefProfile. + :rtype: str + """ + return self._aef_id + + @aef_id.setter + def aef_id(self, aef_id: str): + """Sets the aef_id of this AefProfile. + + + :param aef_id: The aef_id of this AefProfile. + :type aef_id: str + """ + if aef_id is None: + raise ValueError("Invalid value for `aef_id`, must not be `None`") # noqa: E501 + + self._aef_id = aef_id + + @property + def versions(self) -> List[Version]: + """Gets the versions of this AefProfile. + + + :return: The versions of this AefProfile. + :rtype: List[Version] + """ + return self._versions + + @versions.setter + def versions(self, versions: List[Version]): + """Sets the versions of this AefProfile. + + + :param versions: The versions of this AefProfile. + :type versions: List[Version] + """ + if versions is None: + raise ValueError("Invalid value for `versions`, must not be `None`") # noqa: E501 + if versions is not None and len(versions) < 1: + raise ValueError("Invalid value for `versions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._versions = versions + + @property + def protocol(self) -> Protocol: + """Gets the protocol of this AefProfile. + + + :return: The protocol of this AefProfile. + :rtype: Protocol + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol: Protocol): + """Sets the protocol of this AefProfile. + + + :param protocol: The protocol of this AefProfile. + :type protocol: Protocol + """ + + self._protocol = protocol + + @property + def data_format(self) -> DataFormat: + """Gets the data_format of this AefProfile. + + + :return: The data_format of this AefProfile. + :rtype: DataFormat + """ + return self._data_format + + @data_format.setter + def data_format(self, data_format: DataFormat): + """Sets the data_format of this AefProfile. + + + :param data_format: The data_format of this AefProfile. + :type data_format: DataFormat + """ + + self._data_format = data_format + + @property + def security_methods(self) -> List[SecurityMethod]: + """Gets the security_methods of this AefProfile. + + + :return: The security_methods of this AefProfile. + :rtype: List[SecurityMethod] + """ + return self._security_methods + + @security_methods.setter + def security_methods(self, security_methods: List[SecurityMethod]): + """Sets the security_methods of this AefProfile. + + + :param security_methods: The security_methods of this AefProfile. + :type security_methods: List[SecurityMethod] + """ + + self._security_methods = security_methods + + @property + def grant_types(self) -> List[OAuthGrantType]: + """Gets the grant_types of this AefProfile. + + + :return: The grant_types of this AefProfile. + :rtype: List[OAuthGrantType] + """ + return self._grant_types + + @grant_types.setter + def grant_types(self, grant_types: List[OAuthGrantType]): + """Sets the grant_types of this AefProfile. + + + :param grant_types: The grant_types of this AefProfile. + :type grant_types: List[OAuthGrantType] + """ + + self._grant_types = grant_types + + @property + def domain_name(self) -> str: + """Gets the domain_name of this AefProfile. + + + :return: The domain_name of this AefProfile. + :rtype: str + """ + return self._domain_name + + @domain_name.setter + def domain_name(self, domain_name: str): + """Sets the domain_name of this AefProfile. + + + :param domain_name: The domain_name of this AefProfile. + :type domain_name: str + """ + + self._domain_name = domain_name + + @property + def interface_descriptions(self) -> List[InterfaceDescription]: + """Gets the interface_descriptions of this AefProfile. + + + :return: The interface_descriptions of this AefProfile. + :rtype: List[InterfaceDescription] + """ + return self._interface_descriptions + + @interface_descriptions.setter + def interface_descriptions(self, interface_descriptions: List[InterfaceDescription]): + """Sets the interface_descriptions of this AefProfile. + + + :param interface_descriptions: The interface_descriptions of this AefProfile. + :type interface_descriptions: List[InterfaceDescription] + """ + + self._interface_descriptions = interface_descriptions + + @property + def aef_location(self) -> AefLocation: + """Gets the aef_location of this AefProfile. + + + :return: The aef_location of this AefProfile. + :rtype: AefLocation + """ + return self._aef_location + + @aef_location.setter + def aef_location(self, aef_location: AefLocation): + """Sets the aef_location of this AefProfile. + + + :param aef_location: The aef_location of this AefProfile. + :type aef_location: AefLocation + """ + + self._aef_location = aef_location + + @property + def service_kpis(self) -> ServiceKpis: + """Gets the service_kpis of this AefProfile. + + + :return: The service_kpis of this AefProfile. + :rtype: ServiceKpis + """ + return self._service_kpis + + @service_kpis.setter + def service_kpis(self, service_kpis: ServiceKpis): + """Sets the service_kpis of this AefProfile. + + + :param service_kpis: The service_kpis of this AefProfile. + :type service_kpis: ServiceKpis + """ + + self._service_kpis = service_kpis + + @property + def ue_ip_range(self) -> IpAddrRange: + """Gets the ue_ip_range of this AefProfile. + + + :return: The ue_ip_range of this AefProfile. + :rtype: IpAddrRange + """ + return self._ue_ip_range + + @ue_ip_range.setter + def ue_ip_range(self, ue_ip_range: IpAddrRange): + """Sets the ue_ip_range of this AefProfile. + + + :param ue_ip_range: The ue_ip_range of this AefProfile. + :type ue_ip_range: IpAddrRange + """ + + self._ue_ip_range = ue_ip_range diff --git a/services/helper/helper_service/services/visibility_control/models/api_status.py b/services/helper/helper_service/services/visibility_control/models/api_status.py new file mode 100644 index 00000000..9c00fa2d --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/api_status.py @@ -0,0 +1,63 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class ApiStatus(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, aef_ids=None): # noqa: E501 + """ApiStatus - a model defined in OpenAPI + + :param aef_ids: The aef_ids of this ApiStatus. # noqa: E501 + :type aef_ids: List[str] + """ + self.openapi_types = { + 'aef_ids': List[str] + } + + self.attribute_map = { + 'aef_ids': 'aefIds' + } + + self._aef_ids = aef_ids + + @classmethod + def from_dict(cls, dikt) -> 'ApiStatus': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ApiStatus of this ApiStatus. # noqa: E501 + :rtype: ApiStatus + """ + return util.deserialize_model(dikt, cls) + + @property + def aef_ids(self) -> List[str]: + """Gets the aef_ids of this ApiStatus. + + + :return: The aef_ids of this ApiStatus. + :rtype: List[str] + """ + return self._aef_ids + + @aef_ids.setter + def aef_ids(self, aef_ids: List[str]): + """Sets the aef_ids of this ApiStatus. + + + :param aef_ids: The aef_ids of this ApiStatus. + :type aef_ids: List[str] + """ + if aef_ids is None: + raise ValueError("Invalid value for `aef_ids`, must not be `None`") # noqa: E501 + + self._aef_ids = aef_ids diff --git a/services/helper/helper_service/services/visibility_control/models/base_model.py b/services/helper/helper_service/services/visibility_control/models/base_model.py new file mode 100644 index 00000000..ad4a3fb5 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/base_model.py @@ -0,0 +1,68 @@ +import pprint + +import typing + +from visibility_control import util + +T = typing.TypeVar('T') + + +class Model: + # openapiTypes: The key is attribute name and the + # value is attribute type. + openapi_types: typing.Dict[str, type] = {} + + # attributeMap: The key is attribute name and the + # value is json key in definition. + attribute_map: typing.Dict[str, str] = {} + + @classmethod + def from_dict(cls: typing.Type[T], dikt) -> T: + """Returns the dict as a model""" + return util.deserialize_model(dikt, cls) + + def to_dict(self): + """Returns the model properties as a dict + + :rtype: dict + """ + result = {} + + for attr in self.openapi_types: + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model + + :rtype: str + """ + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/services/helper/helper_service/services/visibility_control/models/communication_type.py b/services/helper/helper_service/services/visibility_control/models/communication_type.py new file mode 100644 index 00000000..5ef1f973 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/communication_type.py @@ -0,0 +1,39 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class CommunicationType(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + REQUEST_RESPONSE = 'REQUEST_RESPONSE' + SUBSCRIBE_NOTIFY = 'SUBSCRIBE_NOTIFY' + def __init__(self): # noqa: E501 + """CommunicationType - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'CommunicationType': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CommunicationType of this CommunicationType. # noqa: E501 + :rtype: CommunicationType + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/visibility_control/models/custom_operation.py b/services/helper/helper_service/services/visibility_control/models/custom_operation.py new file mode 100644 index 00000000..9699385d --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/custom_operation.py @@ -0,0 +1,147 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.communication_type import CommunicationType +from visibility_control.models.operation import Operation +from visibility_control import util + +from visibility_control.models.communication_type import CommunicationType # noqa: E501 +from visibility_control.models.operation import Operation # noqa: E501 + +class CustomOperation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, comm_type=None, cust_op_name=None, operations=None, description=None): # noqa: E501 + """CustomOperation - a model defined in OpenAPI + + :param comm_type: The comm_type of this CustomOperation. # noqa: E501 + :type comm_type: CommunicationType + :param cust_op_name: The cust_op_name of this CustomOperation. # noqa: E501 + :type cust_op_name: str + :param operations: The operations of this CustomOperation. # noqa: E501 + :type operations: List[Operation] + :param description: The description of this CustomOperation. # noqa: E501 + :type description: str + """ + self.openapi_types = { + 'comm_type': CommunicationType, + 'cust_op_name': str, + 'operations': List[Operation], + 'description': str + } + + self.attribute_map = { + 'comm_type': 'commType', + 'cust_op_name': 'custOpName', + 'operations': 'operations', + 'description': 'description' + } + + self._comm_type = comm_type + self._cust_op_name = cust_op_name + self._operations = operations + self._description = description + + @classmethod + def from_dict(cls, dikt) -> 'CustomOperation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CustomOperation of this CustomOperation. # noqa: E501 + :rtype: CustomOperation + """ + return util.deserialize_model(dikt, cls) + + @property + def comm_type(self) -> CommunicationType: + """Gets the comm_type of this CustomOperation. + + + :return: The comm_type of this CustomOperation. + :rtype: CommunicationType + """ + return self._comm_type + + @comm_type.setter + def comm_type(self, comm_type: CommunicationType): + """Sets the comm_type of this CustomOperation. + + + :param comm_type: The comm_type of this CustomOperation. + :type comm_type: CommunicationType + """ + if comm_type is None: + raise ValueError("Invalid value for `comm_type`, must not be `None`") # noqa: E501 + + self._comm_type = comm_type + + @property + def cust_op_name(self) -> str: + """Gets the cust_op_name of this CustomOperation. + + + :return: The cust_op_name of this CustomOperation. + :rtype: str + """ + return self._cust_op_name + + @cust_op_name.setter + def cust_op_name(self, cust_op_name: str): + """Sets the cust_op_name of this CustomOperation. + + + :param cust_op_name: The cust_op_name of this CustomOperation. + :type cust_op_name: str + """ + if cust_op_name is None: + raise ValueError("Invalid value for `cust_op_name`, must not be `None`") # noqa: E501 + + self._cust_op_name = cust_op_name + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this CustomOperation. + + + :return: The operations of this CustomOperation. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this CustomOperation. + + + :param operations: The operations of this CustomOperation. + :type operations: List[Operation] + """ + + self._operations = operations + + @property + def description(self) -> str: + """Gets the description of this CustomOperation. + + + :return: The description of this CustomOperation. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this CustomOperation. + + + :param description: The description of this CustomOperation. + :type description: str + """ + + self._description = description diff --git a/services/helper/helper_service/services/visibility_control/models/data_format.py b/services/helper/helper_service/services/visibility_control/models/data_format.py new file mode 100644 index 00000000..1e4c3549 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/data_format.py @@ -0,0 +1,40 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class DataFormat(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + JSON = 'JSON' + XML = 'XML' + PROTOBUF3 = 'PROTOBUF3' + def __init__(self): # noqa: E501 + """DataFormat - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'DataFormat': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DataFormat of this DataFormat. # noqa: E501 + :rtype: DataFormat + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/visibility_control/models/discovered_apis.py b/services/helper/helper_service/services/visibility_control/models/discovered_apis.py new file mode 100644 index 00000000..37b336f6 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/discovered_apis.py @@ -0,0 +1,95 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.service_api_description import ServiceAPIDescription +import re +from visibility_control import util + +from visibility_control.models.service_api_description import ServiceAPIDescription # noqa: E501 +import re # noqa: E501 + +class DiscoveredAPIs(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, service_api_descriptions=None, supp_feat=None): # noqa: E501 + """DiscoveredAPIs - a model defined in OpenAPI + + :param service_api_descriptions: The service_api_descriptions of this DiscoveredAPIs. # noqa: E501 + :type service_api_descriptions: List[ServiceAPIDescription] + :param supp_feat: The supp_feat of this DiscoveredAPIs. # noqa: E501 + :type supp_feat: str + """ + self.openapi_types = { + 'service_api_descriptions': List[ServiceAPIDescription], + 'supp_feat': str + } + + self.attribute_map = { + 'service_api_descriptions': 'serviceAPIDescriptions', + 'supp_feat': 'suppFeat' + } + + self._service_api_descriptions = service_api_descriptions + self._supp_feat = supp_feat + + @classmethod + def from_dict(cls, dikt) -> 'DiscoveredAPIs': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DiscoveredAPIs of this DiscoveredAPIs. # noqa: E501 + :rtype: DiscoveredAPIs + """ + return util.deserialize_model(dikt, cls) + + @property + def service_api_descriptions(self) -> List[ServiceAPIDescription]: + """Gets the service_api_descriptions of this DiscoveredAPIs. + + + :return: The service_api_descriptions of this DiscoveredAPIs. + :rtype: List[ServiceAPIDescription] + """ + return self._service_api_descriptions + + @service_api_descriptions.setter + def service_api_descriptions(self, service_api_descriptions: List[ServiceAPIDescription]): + """Sets the service_api_descriptions of this DiscoveredAPIs. + + + :param service_api_descriptions: The service_api_descriptions of this DiscoveredAPIs. + :type service_api_descriptions: List[ServiceAPIDescription] + """ + if service_api_descriptions is not None and len(service_api_descriptions) < 1: + raise ValueError("Invalid value for `service_api_descriptions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._service_api_descriptions = service_api_descriptions + + @property + def supp_feat(self) -> str: + """Gets the supp_feat of this DiscoveredAPIs. + + + :return: The supp_feat of this DiscoveredAPIs. + :rtype: str + """ + return self._supp_feat + + @supp_feat.setter + def supp_feat(self, supp_feat: str): + """Sets the supp_feat of this DiscoveredAPIs. + + + :param supp_feat: The supp_feat of this DiscoveredAPIs. + :type supp_feat: str + """ + if supp_feat is not None and not re.search(r'^[A-Fa-f0-9]*$', supp_feat): # noqa: E501 + raise ValueError(r"Invalid value for `supp_feat`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supp_feat = supp_feat diff --git a/services/helper/helper_service/services/visibility_control/models/error.py b/services/helper/helper_service/services/visibility_control/models/error.py new file mode 100644 index 00000000..de24c323 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/error.py @@ -0,0 +1,117 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class Error(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, code=None, message=None, details=None): # noqa: E501 + """Error - a model defined in OpenAPI + + :param code: The code of this Error. # noqa: E501 + :type code: str + :param message: The message of this Error. # noqa: E501 + :type message: str + :param details: The details of this Error. # noqa: E501 + :type details: Dict[str, object] + """ + self.openapi_types = { + 'code': str, + 'message': str, + 'details': Dict[str, object] + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message', + 'details': 'details' + } + + self._code = code + self._message = message + self._details = details + + @classmethod + def from_dict(cls, dikt) -> 'Error': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Error of this Error. # noqa: E501 + :rtype: Error + """ + return util.deserialize_model(dikt, cls) + + @property + def code(self) -> str: + """Gets the code of this Error. + + + :return: The code of this Error. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code: str): + """Sets the code of this Error. + + + :param code: The code of this Error. + :type code: str + """ + if code is None: + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self) -> str: + """Gets the message of this Error. + + + :return: The message of this Error. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message: str): + """Sets the message of this Error. + + + :param message: The message of this Error. + :type message: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def details(self) -> Dict[str, object]: + """Gets the details of this Error. + + + :return: The details of this Error. + :rtype: Dict[str, object] + """ + return self._details + + @details.setter + def details(self, details: Dict[str, object]): + """Sets the details of this Error. + + + :param details: The details of this Error. + :type details: Dict[str, object] + """ + + self._details = details diff --git a/services/helper/helper_service/services/visibility_control/models/interface_description.py b/services/helper/helper_service/services/visibility_control/models/interface_description.py new file mode 100644 index 00000000..477ebd82 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/interface_description.py @@ -0,0 +1,221 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.o_auth_grant_type import OAuthGrantType +from visibility_control.models.security_method import SecurityMethod +from visibility_control import util + +from visibility_control.models.o_auth_grant_type import OAuthGrantType # noqa: E501 +from visibility_control.models.security_method import SecurityMethod # noqa: E501 + +class InterfaceDescription(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, ipv4_addr=None, ipv6_addr=None, fqdn=None, port=None, api_prefix=None, security_methods=None, grant_types=None): # noqa: E501 + """InterfaceDescription - a model defined in OpenAPI + + :param ipv4_addr: The ipv4_addr of this InterfaceDescription. # noqa: E501 + :type ipv4_addr: str + :param ipv6_addr: The ipv6_addr of this InterfaceDescription. # noqa: E501 + :type ipv6_addr: str + :param fqdn: The fqdn of this InterfaceDescription. # noqa: E501 + :type fqdn: str + :param port: The port of this InterfaceDescription. # noqa: E501 + :type port: int + :param api_prefix: The api_prefix of this InterfaceDescription. # noqa: E501 + :type api_prefix: str + :param security_methods: The security_methods of this InterfaceDescription. # noqa: E501 + :type security_methods: List[SecurityMethod] + :param grant_types: The grant_types of this InterfaceDescription. # noqa: E501 + :type grant_types: List[OAuthGrantType] + """ + self.openapi_types = { + 'ipv4_addr': str, + 'ipv6_addr': str, + 'fqdn': str, + 'port': int, + 'api_prefix': str, + 'security_methods': List[SecurityMethod], + 'grant_types': List[OAuthGrantType] + } + + self.attribute_map = { + 'ipv4_addr': 'ipv4Addr', + 'ipv6_addr': 'ipv6Addr', + 'fqdn': 'fqdn', + 'port': 'port', + 'api_prefix': 'apiPrefix', + 'security_methods': 'securityMethods', + 'grant_types': 'grantTypes' + } + + self._ipv4_addr = ipv4_addr + self._ipv6_addr = ipv6_addr + self._fqdn = fqdn + self._port = port + self._api_prefix = api_prefix + self._security_methods = security_methods + self._grant_types = grant_types + + @classmethod + def from_dict(cls, dikt) -> 'InterfaceDescription': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The InterfaceDescription of this InterfaceDescription. # noqa: E501 + :rtype: InterfaceDescription + """ + return util.deserialize_model(dikt, cls) + + @property + def ipv4_addr(self) -> str: + """Gets the ipv4_addr of this InterfaceDescription. + + + :return: The ipv4_addr of this InterfaceDescription. + :rtype: str + """ + return self._ipv4_addr + + @ipv4_addr.setter + def ipv4_addr(self, ipv4_addr: str): + """Sets the ipv4_addr of this InterfaceDescription. + + + :param ipv4_addr: The ipv4_addr of this InterfaceDescription. + :type ipv4_addr: str + """ + + self._ipv4_addr = ipv4_addr + + @property + def ipv6_addr(self) -> str: + """Gets the ipv6_addr of this InterfaceDescription. + + + :return: The ipv6_addr of this InterfaceDescription. + :rtype: str + """ + return self._ipv6_addr + + @ipv6_addr.setter + def ipv6_addr(self, ipv6_addr: str): + """Sets the ipv6_addr of this InterfaceDescription. + + + :param ipv6_addr: The ipv6_addr of this InterfaceDescription. + :type ipv6_addr: str + """ + + self._ipv6_addr = ipv6_addr + + @property + def fqdn(self) -> str: + """Gets the fqdn of this InterfaceDescription. + + + :return: The fqdn of this InterfaceDescription. + :rtype: str + """ + return self._fqdn + + @fqdn.setter + def fqdn(self, fqdn: str): + """Sets the fqdn of this InterfaceDescription. + + + :param fqdn: The fqdn of this InterfaceDescription. + :type fqdn: str + """ + + self._fqdn = fqdn + + @property + def port(self) -> int: + """Gets the port of this InterfaceDescription. + + + :return: The port of this InterfaceDescription. + :rtype: int + """ + return self._port + + @port.setter + def port(self, port: int): + """Sets the port of this InterfaceDescription. + + + :param port: The port of this InterfaceDescription. + :type port: int + """ + + self._port = port + + @property + def api_prefix(self) -> str: + """Gets the api_prefix of this InterfaceDescription. + + + :return: The api_prefix of this InterfaceDescription. + :rtype: str + """ + return self._api_prefix + + @api_prefix.setter + def api_prefix(self, api_prefix: str): + """Sets the api_prefix of this InterfaceDescription. + + + :param api_prefix: The api_prefix of this InterfaceDescription. + :type api_prefix: str + """ + + self._api_prefix = api_prefix + + @property + def security_methods(self) -> List[SecurityMethod]: + """Gets the security_methods of this InterfaceDescription. + + + :return: The security_methods of this InterfaceDescription. + :rtype: List[SecurityMethod] + """ + return self._security_methods + + @security_methods.setter + def security_methods(self, security_methods: List[SecurityMethod]): + """Sets the security_methods of this InterfaceDescription. + + + :param security_methods: The security_methods of this InterfaceDescription. + :type security_methods: List[SecurityMethod] + """ + + self._security_methods = security_methods + + @property + def grant_types(self) -> List[OAuthGrantType]: + """Gets the grant_types of this InterfaceDescription. + + + :return: The grant_types of this InterfaceDescription. + :rtype: List[OAuthGrantType] + """ + return self._grant_types + + @grant_types.setter + def grant_types(self, grant_types: List[OAuthGrantType]): + """Sets the grant_types of this InterfaceDescription. + + + :param grant_types: The grant_types of this InterfaceDescription. + :type grant_types: List[OAuthGrantType] + """ + + self._grant_types = grant_types diff --git a/services/helper/helper_service/services/visibility_control/models/invoker_selector.py b/services/helper/helper_service/services/visibility_control/models/invoker_selector.py new file mode 100644 index 00000000..b2dbae7f --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/invoker_selector.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class InvokerSelector(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, invoker_onboarded_by_user=None, api_invoker_id=None): # noqa: E501 + """InvokerSelector - a model defined in OpenAPI + + :param invoker_onboarded_by_user: The invoker_onboarded_by_user of this InvokerSelector. # noqa: E501 + :type invoker_onboarded_by_user: list[str] + :param api_invoker_id: The api_invoker_id of this InvokerSelector. # noqa: E501 + :type api_invoker_id: list[str] + """ + self.openapi_types = { + 'invoker_onboarded_by_user': list[str], + 'api_invoker_id': list[str] + } + + self.attribute_map = { + 'invoker_onboarded_by_user': 'invokerOnboardedByUser', + 'api_invoker_id': 'apiInvokerId' + } + + self._invoker_onboarded_by_user = invoker_onboarded_by_user + self._api_invoker_id = api_invoker_id + + @classmethod + def from_dict(cls, dikt) -> 'InvokerSelector': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The InvokerSelector of this InvokerSelector. # noqa: E501 + :rtype: InvokerSelector + """ + return util.deserialize_model(dikt, cls) + + @property + def invoker_onboarded_by_user(self) -> list[str]: + """Gets the invoker_onboarded_by_user of this InvokerSelector. + + + :return: The invoker_onboarded_by_user of this InvokerSelector. + :rtype: list[str] + """ + return self._invoker_onboarded_by_user + + @invoker_onboarded_by_user.setter + def invoker_onboarded_by_user(self, invoker_onboarded_by_user: list[str]): + """Sets the invoker_onboarded_by_user of this InvokerSelector. + + + :param invoker_onboarded_by_user: The invoker_onboarded_by_user of this InvokerSelector. + :type invoker_onboarded_by_user: list[str] + """ + if invoker_onboarded_by_user is not None and len(invoker_onboarded_by_user) < 0: + raise ValueError("Invalid value for `invoker_onboarded_by_user`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._invoker_onboarded_by_user = invoker_onboarded_by_user + + @property + def api_invoker_id(self) -> list[str]: + """Gets the api_invoker_id of this InvokerSelector. + + + :return: The api_invoker_id of this InvokerSelector. + :rtype: list[str] + """ + return self._api_invoker_id + + @api_invoker_id.setter + def api_invoker_id(self, api_invoker_id: list[str]): + """Sets the api_invoker_id of this InvokerSelector. + + + :param api_invoker_id: The api_invoker_id of this InvokerSelector. + :type api_invoker_id: list[str] + """ + if api_invoker_id is not None and len(api_invoker_id) < 0: + raise ValueError("Invalid value for `api_invoker_id`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._api_invoker_id = api_invoker_id diff --git a/services/helper/helper_service/services/visibility_control/models/ip_addr_range.py b/services/helper/helper_service/services/visibility_control/models/ip_addr_range.py new file mode 100644 index 00000000..e1eddcf6 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/ip_addr_range.py @@ -0,0 +1,63 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.ip_addr_range_ue_ipv4_addr_ranges_inner import IpAddrRangeUeIpv4AddrRangesInner +from visibility_control import util + +from visibility_control.models.ip_addr_range_ue_ipv4_addr_ranges_inner import IpAddrRangeUeIpv4AddrRangesInner # noqa: E501 + +class IpAddrRange(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, ue_ipv4_addr_ranges=None): # noqa: E501 + """IpAddrRange - a model defined in OpenAPI + + :param ue_ipv4_addr_ranges: The ue_ipv4_addr_ranges of this IpAddrRange. # noqa: E501 + :type ue_ipv4_addr_ranges: List[IpAddrRangeUeIpv4AddrRangesInner] + """ + self.openapi_types = { + 'ue_ipv4_addr_ranges': List[IpAddrRangeUeIpv4AddrRangesInner] + } + + self.attribute_map = { + 'ue_ipv4_addr_ranges': 'ueIpv4AddrRanges' + } + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + + @classmethod + def from_dict(cls, dikt) -> 'IpAddrRange': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The IpAddrRange of this IpAddrRange. # noqa: E501 + :rtype: IpAddrRange + """ + return util.deserialize_model(dikt, cls) + + @property + def ue_ipv4_addr_ranges(self) -> List[IpAddrRangeUeIpv4AddrRangesInner]: + """Gets the ue_ipv4_addr_ranges of this IpAddrRange. + + + :return: The ue_ipv4_addr_ranges of this IpAddrRange. + :rtype: List[IpAddrRangeUeIpv4AddrRangesInner] + """ + return self._ue_ipv4_addr_ranges + + @ue_ipv4_addr_ranges.setter + def ue_ipv4_addr_ranges(self, ue_ipv4_addr_ranges: List[IpAddrRangeUeIpv4AddrRangesInner]): + """Sets the ue_ipv4_addr_ranges of this IpAddrRange. + + + :param ue_ipv4_addr_ranges: The ue_ipv4_addr_ranges of this IpAddrRange. + :type ue_ipv4_addr_ranges: List[IpAddrRangeUeIpv4AddrRangesInner] + """ + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges diff --git a/services/helper/helper_service/services/visibility_control/models/ip_addr_range_ue_ipv4_addr_ranges_inner.py b/services/helper/helper_service/services/visibility_control/models/ip_addr_range_ue_ipv4_addr_ranges_inner.py new file mode 100644 index 00000000..d92d5e9d --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/ip_addr_range_ue_ipv4_addr_ranges_inner.py @@ -0,0 +1,87 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class IpAddrRangeUeIpv4AddrRangesInner(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, start=None, end=None): # noqa: E501 + """IpAddrRangeUeIpv4AddrRangesInner - a model defined in OpenAPI + + :param start: The start of this IpAddrRangeUeIpv4AddrRangesInner. # noqa: E501 + :type start: str + :param end: The end of this IpAddrRangeUeIpv4AddrRangesInner. # noqa: E501 + :type end: str + """ + self.openapi_types = { + 'start': str, + 'end': str + } + + self.attribute_map = { + 'start': 'start', + 'end': 'end' + } + + self._start = start + self._end = end + + @classmethod + def from_dict(cls, dikt) -> 'IpAddrRangeUeIpv4AddrRangesInner': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The IpAddrRange_ueIpv4AddrRanges_inner of this IpAddrRangeUeIpv4AddrRangesInner. # noqa: E501 + :rtype: IpAddrRangeUeIpv4AddrRangesInner + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> str: + """Gets the start of this IpAddrRangeUeIpv4AddrRangesInner. + + + :return: The start of this IpAddrRangeUeIpv4AddrRangesInner. + :rtype: str + """ + return self._start + + @start.setter + def start(self, start: str): + """Sets the start of this IpAddrRangeUeIpv4AddrRangesInner. + + + :param start: The start of this IpAddrRangeUeIpv4AddrRangesInner. + :type start: str + """ + + self._start = start + + @property + def end(self) -> str: + """Gets the end of this IpAddrRangeUeIpv4AddrRangesInner. + + + :return: The end of this IpAddrRangeUeIpv4AddrRangesInner. + :rtype: str + """ + return self._end + + @end.setter + def end(self, end: str): + """Sets the end of this IpAddrRangeUeIpv4AddrRangesInner. + + + :param end: The end of this IpAddrRangeUeIpv4AddrRangesInner. + :type end: str + """ + + self._end = end diff --git a/services/helper/helper_service/services/visibility_control/models/o_auth_grant_type.py b/services/helper/helper_service/services/visibility_control/models/o_auth_grant_type.py new file mode 100644 index 00000000..5536af03 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/o_auth_grant_type.py @@ -0,0 +1,40 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class OAuthGrantType(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + CLIENT_CREDENTIALS = 'CLIENT_CREDENTIALS' + AUTHORIZATION_CODE = 'AUTHORIZATION_CODE' + AUTHORIZATION_CODE_WITH_PKCE = 'AUTHORIZATION_CODE_WITH_PKCE' + def __init__(self): # noqa: E501 + """OAuthGrantType - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'OAuthGrantType': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The OAuthGrantType of this OAuthGrantType. # noqa: E501 + :rtype: OAuthGrantType + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/visibility_control/models/operation.py b/services/helper/helper_service/services/visibility_control/models/operation.py new file mode 100644 index 00000000..3b06d35a --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/operation.py @@ -0,0 +1,42 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class Operation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + GET = 'GET' + POST = 'POST' + PUT = 'PUT' + PATCH = 'PATCH' + DELETE = 'DELETE' + def __init__(self): # noqa: E501 + """Operation - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'Operation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Operation of this Operation. # noqa: E501 + :rtype: Operation + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/visibility_control/models/patch_provider_selector.py b/services/helper/helper_service/services/visibility_control/models/patch_provider_selector.py new file mode 100644 index 00000000..c5b83c5b --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/patch_provider_selector.py @@ -0,0 +1,147 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class PatchProviderSelector(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_provider_id=None, api_name=None, api_id=None, aef_id=None): # noqa: E501 + """PatchProviderSelector - a model defined in OpenAPI + + :param api_provider_id: The api_provider_id of this PatchProviderSelector. # noqa: E501 + :type api_provider_id: list[str] + :param api_name: The api_name of this PatchProviderSelector. # noqa: E501 + :type api_name: list[str] + :param api_id: The api_id of this PatchProviderSelector. # noqa: E501 + :type api_id: list[str] + :param aef_id: The aef_id of this PatchProviderSelector. # noqa: E501 + :type aef_id: list[str] + """ + self.openapi_types = { + 'api_provider_id': list[str], + 'api_name': list[str], + 'api_id': list[str], + 'aef_id': list[str] + } + + self.attribute_map = { + 'api_provider_id': 'apiProviderId', + 'api_name': 'apiName', + 'api_id': 'apiId', + 'aef_id': 'aefId' + } + + self._api_provider_id = api_provider_id + self._api_name = api_name + self._api_id = api_id + self._aef_id = aef_id + + @classmethod + def from_dict(cls, dikt) -> 'PatchProviderSelector': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PatchProviderSelector of this PatchProviderSelector. # noqa: E501 + :rtype: PatchProviderSelector + """ + return util.deserialize_model(dikt, cls) + + @property + def api_provider_id(self) -> list[str]: + """Gets the api_provider_id of this PatchProviderSelector. + + + :return: The api_provider_id of this PatchProviderSelector. + :rtype: list[str] + """ + return self._api_provider_id + + @api_provider_id.setter + def api_provider_id(self, api_provider_id: list[str]): + """Sets the api_provider_id of this PatchProviderSelector. + + + :param api_provider_id: The api_provider_id of this PatchProviderSelector. + :type api_provider_id: list[str] + """ + if api_provider_id is not None and len(api_provider_id) < 0: + raise ValueError("Invalid value for `api_provider_id`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._api_provider_id = api_provider_id + + @property + def api_name(self) -> list[str]: + """Gets the api_name of this PatchProviderSelector. + + + :return: The api_name of this PatchProviderSelector. + :rtype: list[str] + """ + return self._api_name + + @api_name.setter + def api_name(self, api_name: list[str]): + """Sets the api_name of this PatchProviderSelector. + + + :param api_name: The api_name of this PatchProviderSelector. + :type api_name: list[str] + """ + if api_name is not None and len(api_name) < 0: + raise ValueError("Invalid value for `api_name`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._api_name = api_name + + @property + def api_id(self) -> list[str]: + """Gets the api_id of this PatchProviderSelector. + + + :return: The api_id of this PatchProviderSelector. + :rtype: list[str] + """ + return self._api_id + + @api_id.setter + def api_id(self, api_id: list[str]): + """Sets the api_id of this PatchProviderSelector. + + + :param api_id: The api_id of this PatchProviderSelector. + :type api_id: list[str] + """ + if api_id is not None and len(api_id) < 0: + raise ValueError("Invalid value for `api_id`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._api_id = api_id + + @property + def aef_id(self) -> list[str]: + """Gets the aef_id of this PatchProviderSelector. + + + :return: The aef_id of this PatchProviderSelector. + :rtype: list[str] + """ + return self._aef_id + + @aef_id.setter + def aef_id(self, aef_id: list[str]): + """Sets the aef_id of this PatchProviderSelector. + + + :param aef_id: The aef_id of this PatchProviderSelector. + :type aef_id: list[str] + """ + if aef_id is not None and len(aef_id) < 0: + raise ValueError("Invalid value for `aef_id`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._aef_id = aef_id diff --git a/services/helper/helper_service/services/visibility_control/models/protocol.py b/services/helper/helper_service/services/visibility_control/models/protocol.py new file mode 100644 index 00000000..ef8c55c7 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/protocol.py @@ -0,0 +1,41 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class Protocol(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + HTTP_1_1 = 'HTTP_1_1' + HTTP_2 = 'HTTP_2' + MQTT = 'MQTT' + WEBSOCKET = 'WEBSOCKET' + def __init__(self): # noqa: E501 + """Protocol - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'Protocol': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Protocol of this Protocol. # noqa: E501 + :rtype: Protocol + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/visibility_control/models/provider_selector.py b/services/helper/helper_service/services/visibility_control/models/provider_selector.py new file mode 100644 index 00000000..975d96cc --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/provider_selector.py @@ -0,0 +1,177 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class ProviderSelector(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, created_by_user=None, api_provider_id=None, api_name=None, api_id=None, aef_id=None): # noqa: E501 + """ProviderSelector - a model defined in OpenAPI + + :param created_by_user: The created_by_user of this ProviderSelector. # noqa: E501 + :type created_by_user: str + :param api_provider_id: The api_provider_id of this ProviderSelector. # noqa: E501 + :type api_provider_id: list[str] + :param api_name: The api_name of this ProviderSelector. # noqa: E501 + :type api_name: list[str] + :param api_id: The api_id of this ProviderSelector. # noqa: E501 + :type api_id: list[str] + :param aef_id: The aef_id of this ProviderSelector. # noqa: E501 + :type aef_id: list[str] + """ + self.openapi_types = { + 'created_by_user': str, + 'api_provider_id': list[str], + 'api_name': list[str], + 'api_id': list[str], + 'aef_id': list[str] + } + + self.attribute_map = { + 'created_by_user': 'createdByUser', + 'api_provider_id': 'apiProviderId', + 'api_name': 'apiName', + 'api_id': 'apiId', + 'aef_id': 'aefId' + } + + self._created_by_user = created_by_user + self._api_provider_id = api_provider_id + self._api_name = api_name + self._api_id = api_id + self._aef_id = aef_id + + @classmethod + def from_dict(cls, dikt) -> 'ProviderSelector': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ProviderSelector of this ProviderSelector. # noqa: E501 + :rtype: ProviderSelector + """ + return util.deserialize_model(dikt, cls) + + @property + def created_by_user(self) -> str: + """Gets the created_by_user of this ProviderSelector. + + + :return: The created_by_user of this ProviderSelector. + :rtype: str + """ + return self._created_by_user + + @created_by_user.setter + def created_by_user(self, created_by_user: str): + """Sets the created_by_user of this ProviderSelector. + + + :param created_by_user: The created_by_user of this ProviderSelector. + :type created_by_user: str + """ + if created_by_user is None: + raise ValueError("Invalid value for `created_by_user`, must not be `None`") # noqa: E501 + if created_by_user is not None and len(created_by_user) < 1: + raise ValueError("Invalid value for `created_by_user`, length must be greater than or equal to `1`") # noqa: E501 + + self._created_by_user = created_by_user + + @property + def api_provider_id(self) -> list[str]: + """Gets the api_provider_id of this ProviderSelector. + + + :return: The api_provider_id of this ProviderSelector. + :rtype: list[str] + """ + return self._api_provider_id + + @api_provider_id.setter + def api_provider_id(self, api_provider_id: list[str]): + """Sets the api_provider_id of this ProviderSelector. + + + :param api_provider_id: The api_provider_id of this ProviderSelector. + :type api_provider_id: list[str] + """ + if api_provider_id is not None and len(api_provider_id) < 0: + raise ValueError("Invalid value for `api_provider_id`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._api_provider_id = api_provider_id + + @property + def api_name(self) -> list[str]: + """Gets the api_name of this ProviderSelector. + + + :return: The api_name of this ProviderSelector. + :rtype: list[str] + """ + return self._api_name + + @api_name.setter + def api_name(self, api_name: list[str]): + """Sets the api_name of this ProviderSelector. + + + :param api_name: The api_name of this ProviderSelector. + :type api_name: list[str] + """ + if api_name is not None and len(api_name) < 0: + raise ValueError("Invalid value for `api_name`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._api_name = api_name + + @property + def api_id(self) -> list[str]: + """Gets the api_id of this ProviderSelector. + + + :return: The api_id of this ProviderSelector. + :rtype: list[str] + """ + return self._api_id + + @api_id.setter + def api_id(self, api_id: list[str]): + """Sets the api_id of this ProviderSelector. + + + :param api_id: The api_id of this ProviderSelector. + :type api_id: list[str] + """ + if api_id is not None and len(api_id) < 0: + raise ValueError("Invalid value for `api_id`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._api_id = api_id + + @property + def aef_id(self) -> list[str]: + """Gets the aef_id of this ProviderSelector. + + + :return: The aef_id of this ProviderSelector. + :rtype: list[str] + """ + return self._aef_id + + @aef_id.setter + def aef_id(self, aef_id: list[str]): + """Sets the aef_id of this ProviderSelector. + + + :param aef_id: The aef_id of this ProviderSelector. + :type aef_id: list[str] + """ + if aef_id is not None and len(aef_id) < 0: + raise ValueError("Invalid value for `aef_id`, number of items must be greater than or equal to `0`") # noqa: E501 + + self._aef_id = aef_id diff --git a/services/helper/helper_service/services/visibility_control/models/published_api_path.py b/services/helper/helper_service/services/visibility_control/models/published_api_path.py new file mode 100644 index 00000000..629df636 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/published_api_path.py @@ -0,0 +1,61 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class PublishedApiPath(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, ccf_ids=None): # noqa: E501 + """PublishedApiPath - a model defined in OpenAPI + + :param ccf_ids: The ccf_ids of this PublishedApiPath. # noqa: E501 + :type ccf_ids: List[str] + """ + self.openapi_types = { + 'ccf_ids': List[str] + } + + self.attribute_map = { + 'ccf_ids': 'ccfIds' + } + + self._ccf_ids = ccf_ids + + @classmethod + def from_dict(cls, dikt) -> 'PublishedApiPath': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PublishedApiPath of this PublishedApiPath. # noqa: E501 + :rtype: PublishedApiPath + """ + return util.deserialize_model(dikt, cls) + + @property + def ccf_ids(self) -> List[str]: + """Gets the ccf_ids of this PublishedApiPath. + + + :return: The ccf_ids of this PublishedApiPath. + :rtype: List[str] + """ + return self._ccf_ids + + @ccf_ids.setter + def ccf_ids(self, ccf_ids: List[str]): + """Sets the ccf_ids of this PublishedApiPath. + + + :param ccf_ids: The ccf_ids of this PublishedApiPath. + :type ccf_ids: List[str] + """ + + self._ccf_ids = ccf_ids diff --git a/services/helper/helper_service/services/visibility_control/models/resource.py b/services/helper/helper_service/services/visibility_control/models/resource.py new file mode 100644 index 00000000..a7b3f90a --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/resource.py @@ -0,0 +1,201 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.communication_type import CommunicationType +from visibility_control.models.operation import Operation +from visibility_control import util + +from visibility_control.models.communication_type import CommunicationType # noqa: E501 +from visibility_control.models.operation import Operation # noqa: E501 + +class Resource(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, resource_name=None, comm_type=None, uri=None, cust_op_name=None, operations=None, description=None): # noqa: E501 + """Resource - a model defined in OpenAPI + + :param resource_name: The resource_name of this Resource. # noqa: E501 + :type resource_name: str + :param comm_type: The comm_type of this Resource. # noqa: E501 + :type comm_type: CommunicationType + :param uri: The uri of this Resource. # noqa: E501 + :type uri: str + :param cust_op_name: The cust_op_name of this Resource. # noqa: E501 + :type cust_op_name: str + :param operations: The operations of this Resource. # noqa: E501 + :type operations: List[Operation] + :param description: The description of this Resource. # noqa: E501 + :type description: str + """ + self.openapi_types = { + 'resource_name': str, + 'comm_type': CommunicationType, + 'uri': str, + 'cust_op_name': str, + 'operations': List[Operation], + 'description': str + } + + self.attribute_map = { + 'resource_name': 'resourceName', + 'comm_type': 'commType', + 'uri': 'uri', + 'cust_op_name': 'custOpName', + 'operations': 'operations', + 'description': 'description' + } + + self._resource_name = resource_name + self._comm_type = comm_type + self._uri = uri + self._cust_op_name = cust_op_name + self._operations = operations + self._description = description + + @classmethod + def from_dict(cls, dikt) -> 'Resource': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Resource of this Resource. # noqa: E501 + :rtype: Resource + """ + return util.deserialize_model(dikt, cls) + + @property + def resource_name(self) -> str: + """Gets the resource_name of this Resource. + + + :return: The resource_name of this Resource. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name: str): + """Sets the resource_name of this Resource. + + + :param resource_name: The resource_name of this Resource. + :type resource_name: str + """ + if resource_name is None: + raise ValueError("Invalid value for `resource_name`, must not be `None`") # noqa: E501 + + self._resource_name = resource_name + + @property + def comm_type(self) -> CommunicationType: + """Gets the comm_type of this Resource. + + + :return: The comm_type of this Resource. + :rtype: CommunicationType + """ + return self._comm_type + + @comm_type.setter + def comm_type(self, comm_type: CommunicationType): + """Sets the comm_type of this Resource. + + + :param comm_type: The comm_type of this Resource. + :type comm_type: CommunicationType + """ + if comm_type is None: + raise ValueError("Invalid value for `comm_type`, must not be `None`") # noqa: E501 + + self._comm_type = comm_type + + @property + def uri(self) -> str: + """Gets the uri of this Resource. + + + :return: The uri of this Resource. + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri: str): + """Sets the uri of this Resource. + + + :param uri: The uri of this Resource. + :type uri: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def cust_op_name(self) -> str: + """Gets the cust_op_name of this Resource. + + + :return: The cust_op_name of this Resource. + :rtype: str + """ + return self._cust_op_name + + @cust_op_name.setter + def cust_op_name(self, cust_op_name: str): + """Sets the cust_op_name of this Resource. + + + :param cust_op_name: The cust_op_name of this Resource. + :type cust_op_name: str + """ + + self._cust_op_name = cust_op_name + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this Resource. + + + :return: The operations of this Resource. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this Resource. + + + :param operations: The operations of this Resource. + :type operations: List[Operation] + """ + + self._operations = operations + + @property + def description(self) -> str: + """Gets the description of this Resource. + + + :return: The description of this Resource. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this Resource. + + + :param description: The description of this Resource. + :type description: str + """ + + self._description = description diff --git a/services/helper/helper_service/services/visibility_control/models/rule.py b/services/helper/helper_service/services/visibility_control/models/rule.py new file mode 100644 index 00000000..1aa6de1c --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/rule.py @@ -0,0 +1,309 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.invoker_selector import InvokerSelector +from visibility_control.models.provider_selector import ProviderSelector +from visibility_control import util + +from visibility_control.models.invoker_selector import InvokerSelector # noqa: E501 +from visibility_control.models.provider_selector import ProviderSelector # noqa: E501 + +class Rule(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, rule_id=None, provider_selector=None, invoker_exceptions=None, default_access=None, enabled=True, starts_at=None, ends_at=None, notes=None, updated_at=None, updated_by=None): # noqa: E501 + """Rule - a model defined in OpenAPI + + :param rule_id: The rule_id of this Rule. # noqa: E501 + :type rule_id: str + :param provider_selector: The provider_selector of this Rule. # noqa: E501 + :type provider_selector: ProviderSelector + :param invoker_exceptions: The invoker_exceptions of this Rule. # noqa: E501 + :type invoker_exceptions: InvokerSelector + :param default_access: The default_access of this Rule. # noqa: E501 + :type default_access: str + :param enabled: The enabled of this Rule. # noqa: E501 + :type enabled: bool + :param starts_at: The starts_at of this Rule. # noqa: E501 + :type starts_at: datetime + :param ends_at: The ends_at of this Rule. # noqa: E501 + :type ends_at: datetime + :param notes: The notes of this Rule. # noqa: E501 + :type notes: str + :param updated_at: The updated_at of this Rule. # noqa: E501 + :type updated_at: datetime + :param updated_by: The updated_by of this Rule. # noqa: E501 + :type updated_by: str + """ + self.openapi_types = { + 'rule_id': str, + 'provider_selector': ProviderSelector, + 'invoker_exceptions': InvokerSelector, + 'default_access': str, + 'enabled': bool, + 'starts_at': datetime, + 'ends_at': datetime, + 'notes': str, + 'updated_at': datetime, + 'updated_by': str + } + + self.attribute_map = { + 'rule_id': 'ruleId', + 'provider_selector': 'providerSelector', + 'invoker_exceptions': 'invokerExceptions', + 'default_access': 'default_access', + 'enabled': 'enabled', + 'starts_at': 'startsAt', + 'ends_at': 'endsAt', + 'notes': 'notes', + 'updated_at': 'updatedAt', + 'updated_by': 'updatedBy' + } + + self._rule_id = rule_id + self._provider_selector = provider_selector + self._invoker_exceptions = invoker_exceptions + self._default_access = default_access + self._enabled = enabled + self._starts_at = starts_at + self._ends_at = ends_at + self._notes = notes + self._updated_at = updated_at + self._updated_by = updated_by + + @classmethod + def from_dict(cls, dikt) -> 'Rule': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Rule of this Rule. # noqa: E501 + :rtype: Rule + """ + return util.deserialize_model(dikt, cls) + + @property + def rule_id(self) -> str: + """Gets the rule_id of this Rule. + + + :return: The rule_id of this Rule. + :rtype: str + """ + return self._rule_id + + @rule_id.setter + def rule_id(self, rule_id: str): + """Sets the rule_id of this Rule. + + + :param rule_id: The rule_id of this Rule. + :type rule_id: str + """ + if rule_id is None: + raise ValueError("Invalid value for `rule_id`, must not be `None`") # noqa: E501 + + self._rule_id = rule_id + + @property + def provider_selector(self) -> ProviderSelector: + """Gets the provider_selector of this Rule. + + + :return: The provider_selector of this Rule. + :rtype: ProviderSelector + """ + return self._provider_selector + + @provider_selector.setter + def provider_selector(self, provider_selector: ProviderSelector): + """Sets the provider_selector of this Rule. + + + :param provider_selector: The provider_selector of this Rule. + :type provider_selector: ProviderSelector + """ + if provider_selector is None: + raise ValueError("Invalid value for `provider_selector`, must not be `None`") # noqa: E501 + + self._provider_selector = provider_selector + + @property + def invoker_exceptions(self) -> InvokerSelector: + """Gets the invoker_exceptions of this Rule. + + + :return: The invoker_exceptions of this Rule. + :rtype: InvokerSelector + """ + return self._invoker_exceptions + + @invoker_exceptions.setter + def invoker_exceptions(self, invoker_exceptions: InvokerSelector): + """Sets the invoker_exceptions of this Rule. + + + :param invoker_exceptions: The invoker_exceptions of this Rule. + :type invoker_exceptions: InvokerSelector + """ + + self._invoker_exceptions = invoker_exceptions + + @property + def default_access(self) -> str: + """Gets the default_access of this Rule. + + + :return: The default_access of this Rule. + :rtype: str + """ + return self._default_access + + @default_access.setter + def default_access(self, default_access: str): + """Sets the default_access of this Rule. + + + :param default_access: The default_access of this Rule. + :type default_access: str + """ + allowed_values = ["ALLOW", "DENY"] # noqa: E501 + if default_access not in allowed_values: + raise ValueError( + "Invalid value for `default_access` ({0}), must be one of {1}" + .format(default_access, allowed_values) + ) + + self._default_access = default_access + + @property + def enabled(self) -> bool: + """Gets the enabled of this Rule. + + + :return: The enabled of this Rule. + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled: bool): + """Sets the enabled of this Rule. + + + :param enabled: The enabled of this Rule. + :type enabled: bool + """ + + self._enabled = enabled + + @property + def starts_at(self) -> datetime: + """Gets the starts_at of this Rule. + + + :return: The starts_at of this Rule. + :rtype: datetime + """ + return self._starts_at + + @starts_at.setter + def starts_at(self, starts_at: datetime): + """Sets the starts_at of this Rule. + + + :param starts_at: The starts_at of this Rule. + :type starts_at: datetime + """ + + self._starts_at = starts_at + + @property + def ends_at(self) -> datetime: + """Gets the ends_at of this Rule. + + + :return: The ends_at of this Rule. + :rtype: datetime + """ + return self._ends_at + + @ends_at.setter + def ends_at(self, ends_at: datetime): + """Sets the ends_at of this Rule. + + + :param ends_at: The ends_at of this Rule. + :type ends_at: datetime + """ + + self._ends_at = ends_at + + @property + def notes(self) -> str: + """Gets the notes of this Rule. + + + :return: The notes of this Rule. + :rtype: str + """ + return self._notes + + @notes.setter + def notes(self, notes: str): + """Sets the notes of this Rule. + + + :param notes: The notes of this Rule. + :type notes: str + """ + + self._notes = notes + + @property + def updated_at(self) -> datetime: + """Gets the updated_at of this Rule. + + + :return: The updated_at of this Rule. + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at: datetime): + """Sets the updated_at of this Rule. + + + :param updated_at: The updated_at of this Rule. + :type updated_at: datetime + """ + + self._updated_at = updated_at + + @property + def updated_by(self) -> str: + """Gets the updated_by of this Rule. + + + :return: The updated_by of this Rule. + :rtype: str + """ + return self._updated_by + + @updated_by.setter + def updated_by(self, updated_by: str): + """Sets the updated_by of this Rule. + + + :param updated_by: The updated_by of this Rule. + :type updated_by: str + """ + + self._updated_by = updated_by diff --git a/services/helper/helper_service/services/visibility_control/models/rule_create_request.py b/services/helper/helper_service/services/visibility_control/models/rule_create_request.py new file mode 100644 index 00000000..76aa429c --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/rule_create_request.py @@ -0,0 +1,229 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.invoker_selector import InvokerSelector +from visibility_control.models.provider_selector import ProviderSelector +from visibility_control import util + +from visibility_control.models.invoker_selector import InvokerSelector # noqa: E501 +from visibility_control.models.provider_selector import ProviderSelector # noqa: E501 + +class RuleCreateRequest(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, provider_selector=None, invoker_exceptions=None, default_access=None, enabled=True, starts_at=None, ends_at=None, notes=None): # noqa: E501 + """RuleCreateRequest - a model defined in OpenAPI + + :param provider_selector: The provider_selector of this RuleCreateRequest. # noqa: E501 + :type provider_selector: ProviderSelector + :param invoker_exceptions: The invoker_exceptions of this RuleCreateRequest. # noqa: E501 + :type invoker_exceptions: InvokerSelector + :param default_access: The default_access of this RuleCreateRequest. # noqa: E501 + :type default_access: str + :param enabled: The enabled of this RuleCreateRequest. # noqa: E501 + :type enabled: bool + :param starts_at: The starts_at of this RuleCreateRequest. # noqa: E501 + :type starts_at: datetime + :param ends_at: The ends_at of this RuleCreateRequest. # noqa: E501 + :type ends_at: datetime + :param notes: The notes of this RuleCreateRequest. # noqa: E501 + :type notes: str + """ + self.openapi_types = { + 'provider_selector': ProviderSelector, + 'invoker_exceptions': InvokerSelector, + 'default_access': str, + 'enabled': bool, + 'starts_at': datetime, + 'ends_at': datetime, + 'notes': str + } + + self.attribute_map = { + 'provider_selector': 'providerSelector', + 'invoker_exceptions': 'invokerExceptions', + 'default_access': 'default_access', + 'enabled': 'enabled', + 'starts_at': 'startsAt', + 'ends_at': 'endsAt', + 'notes': 'notes' + } + + self._provider_selector = provider_selector + self._invoker_exceptions = invoker_exceptions + self._default_access = default_access + self._enabled = enabled + self._starts_at = starts_at + self._ends_at = ends_at + self._notes = notes + + @classmethod + def from_dict(cls, dikt) -> 'RuleCreateRequest': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The RuleCreateRequest of this RuleCreateRequest. # noqa: E501 + :rtype: RuleCreateRequest + """ + return util.deserialize_model(dikt, cls) + + @property + def provider_selector(self) -> ProviderSelector: + """Gets the provider_selector of this RuleCreateRequest. + + + :return: The provider_selector of this RuleCreateRequest. + :rtype: ProviderSelector + """ + return self._provider_selector + + @provider_selector.setter + def provider_selector(self, provider_selector: ProviderSelector): + """Sets the provider_selector of this RuleCreateRequest. + + + :param provider_selector: The provider_selector of this RuleCreateRequest. + :type provider_selector: ProviderSelector + """ + if provider_selector is None: + raise ValueError("Invalid value for `provider_selector`, must not be `None`") # noqa: E501 + + self._provider_selector = provider_selector + + @property + def invoker_exceptions(self) -> InvokerSelector: + """Gets the invoker_exceptions of this RuleCreateRequest. + + + :return: The invoker_exceptions of this RuleCreateRequest. + :rtype: InvokerSelector + """ + return self._invoker_exceptions + + @invoker_exceptions.setter + def invoker_exceptions(self, invoker_exceptions: InvokerSelector): + """Sets the invoker_exceptions of this RuleCreateRequest. + + + :param invoker_exceptions: The invoker_exceptions of this RuleCreateRequest. + :type invoker_exceptions: InvokerSelector + """ + + self._invoker_exceptions = invoker_exceptions + + @property + def default_access(self) -> str: + """Gets the default_access of this RuleCreateRequest. + + + :return: The default_access of this RuleCreateRequest. + :rtype: str + """ + return self._default_access + + @default_access.setter + def default_access(self, default_access: str): + """Sets the default_access of this RuleCreateRequest. + + + :param default_access: The default_access of this RuleCreateRequest. + :type default_access: str + """ + allowed_values = ["ALLOW", "DENY"] # noqa: E501 + if default_access not in allowed_values: + raise ValueError( + "Invalid value for `default_access` ({0}), must be one of {1}" + .format(default_access, allowed_values) + ) + + self._default_access = default_access + + @property + def enabled(self) -> bool: + """Gets the enabled of this RuleCreateRequest. + + + :return: The enabled of this RuleCreateRequest. + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled: bool): + """Sets the enabled of this RuleCreateRequest. + + + :param enabled: The enabled of this RuleCreateRequest. + :type enabled: bool + """ + + self._enabled = enabled + + @property + def starts_at(self) -> datetime: + """Gets the starts_at of this RuleCreateRequest. + + + :return: The starts_at of this RuleCreateRequest. + :rtype: datetime + """ + return self._starts_at + + @starts_at.setter + def starts_at(self, starts_at: datetime): + """Sets the starts_at of this RuleCreateRequest. + + + :param starts_at: The starts_at of this RuleCreateRequest. + :type starts_at: datetime + """ + + self._starts_at = starts_at + + @property + def ends_at(self) -> datetime: + """Gets the ends_at of this RuleCreateRequest. + + + :return: The ends_at of this RuleCreateRequest. + :rtype: datetime + """ + return self._ends_at + + @ends_at.setter + def ends_at(self, ends_at: datetime): + """Sets the ends_at of this RuleCreateRequest. + + + :param ends_at: The ends_at of this RuleCreateRequest. + :type ends_at: datetime + """ + + self._ends_at = ends_at + + @property + def notes(self) -> str: + """Gets the notes of this RuleCreateRequest. + + + :return: The notes of this RuleCreateRequest. + :rtype: str + """ + return self._notes + + @notes.setter + def notes(self, notes: str): + """Sets the notes of this RuleCreateRequest. + + + :param notes: The notes of this RuleCreateRequest. + :type notes: str + """ + + self._notes = notes diff --git a/services/helper/helper_service/services/visibility_control/models/rule_patch_request.py b/services/helper/helper_service/services/visibility_control/models/rule_patch_request.py new file mode 100644 index 00000000..a53a0e6a --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/rule_patch_request.py @@ -0,0 +1,227 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.invoker_selector import InvokerSelector +from visibility_control.models.patch_provider_selector import PatchProviderSelector +from visibility_control import util + +from visibility_control.models.invoker_selector import InvokerSelector # noqa: E501 +from visibility_control.models.patch_provider_selector import PatchProviderSelector # noqa: E501 + +class RulePatchRequest(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, provider_selector=None, invoker_exceptions=None, default_access=None, enabled=None, starts_at=None, ends_at=None, notes=None): # noqa: E501 + """RulePatchRequest - a model defined in OpenAPI + + :param provider_selector: The provider_selector of this RulePatchRequest. # noqa: E501 + :type provider_selector: PatchProviderSelector + :param invoker_exceptions: The invoker_exceptions of this RulePatchRequest. # noqa: E501 + :type invoker_exceptions: InvokerSelector + :param default_access: The default_access of this RulePatchRequest. # noqa: E501 + :type default_access: str + :param enabled: The enabled of this RulePatchRequest. # noqa: E501 + :type enabled: bool + :param starts_at: The starts_at of this RulePatchRequest. # noqa: E501 + :type starts_at: datetime + :param ends_at: The ends_at of this RulePatchRequest. # noqa: E501 + :type ends_at: datetime + :param notes: The notes of this RulePatchRequest. # noqa: E501 + :type notes: str + """ + self.openapi_types = { + 'provider_selector': PatchProviderSelector, + 'invoker_exceptions': InvokerSelector, + 'default_access': str, + 'enabled': bool, + 'starts_at': datetime, + 'ends_at': datetime, + 'notes': str + } + + self.attribute_map = { + 'provider_selector': 'providerSelector', + 'invoker_exceptions': 'invokerExceptions', + 'default_access': 'default_access', + 'enabled': 'enabled', + 'starts_at': 'startsAt', + 'ends_at': 'endsAt', + 'notes': 'notes' + } + + self._provider_selector = provider_selector + self._invoker_exceptions = invoker_exceptions + self._default_access = default_access + self._enabled = enabled + self._starts_at = starts_at + self._ends_at = ends_at + self._notes = notes + + @classmethod + def from_dict(cls, dikt) -> 'RulePatchRequest': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The RulePatchRequest of this RulePatchRequest. # noqa: E501 + :rtype: RulePatchRequest + """ + return util.deserialize_model(dikt, cls) + + @property + def provider_selector(self) -> PatchProviderSelector: + """Gets the provider_selector of this RulePatchRequest. + + + :return: The provider_selector of this RulePatchRequest. + :rtype: PatchProviderSelector + """ + return self._provider_selector + + @provider_selector.setter + def provider_selector(self, provider_selector: PatchProviderSelector): + """Sets the provider_selector of this RulePatchRequest. + + + :param provider_selector: The provider_selector of this RulePatchRequest. + :type provider_selector: PatchProviderSelector + """ + + self._provider_selector = provider_selector + + @property + def invoker_exceptions(self) -> InvokerSelector: + """Gets the invoker_exceptions of this RulePatchRequest. + + + :return: The invoker_exceptions of this RulePatchRequest. + :rtype: InvokerSelector + """ + return self._invoker_exceptions + + @invoker_exceptions.setter + def invoker_exceptions(self, invoker_exceptions: InvokerSelector): + """Sets the invoker_exceptions of this RulePatchRequest. + + + :param invoker_exceptions: The invoker_exceptions of this RulePatchRequest. + :type invoker_exceptions: InvokerSelector + """ + + self._invoker_exceptions = invoker_exceptions + + @property + def default_access(self) -> str: + """Gets the default_access of this RulePatchRequest. + + + :return: The default_access of this RulePatchRequest. + :rtype: str + """ + return self._default_access + + @default_access.setter + def default_access(self, default_access: str): + """Sets the default_access of this RulePatchRequest. + + + :param default_access: The default_access of this RulePatchRequest. + :type default_access: str + """ + allowed_values = ["ALLOW", "DENY"] # noqa: E501 + if default_access not in allowed_values: + raise ValueError( + "Invalid value for `default_access` ({0}), must be one of {1}" + .format(default_access, allowed_values) + ) + + self._default_access = default_access + + @property + def enabled(self) -> bool: + """Gets the enabled of this RulePatchRequest. + + + :return: The enabled of this RulePatchRequest. + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled: bool): + """Sets the enabled of this RulePatchRequest. + + + :param enabled: The enabled of this RulePatchRequest. + :type enabled: bool + """ + + self._enabled = enabled + + @property + def starts_at(self) -> datetime: + """Gets the starts_at of this RulePatchRequest. + + + :return: The starts_at of this RulePatchRequest. + :rtype: datetime + """ + return self._starts_at + + @starts_at.setter + def starts_at(self, starts_at: datetime): + """Sets the starts_at of this RulePatchRequest. + + + :param starts_at: The starts_at of this RulePatchRequest. + :type starts_at: datetime + """ + + self._starts_at = starts_at + + @property + def ends_at(self) -> datetime: + """Gets the ends_at of this RulePatchRequest. + + + :return: The ends_at of this RulePatchRequest. + :rtype: datetime + """ + return self._ends_at + + @ends_at.setter + def ends_at(self, ends_at: datetime): + """Sets the ends_at of this RulePatchRequest. + + + :param ends_at: The ends_at of this RulePatchRequest. + :type ends_at: datetime + """ + + self._ends_at = ends_at + + @property + def notes(self) -> str: + """Gets the notes of this RulePatchRequest. + + + :return: The notes of this RulePatchRequest. + :rtype: str + """ + return self._notes + + @notes.setter + def notes(self, notes: str): + """Sets the notes of this RulePatchRequest. + + + :param notes: The notes of this RulePatchRequest. + :type notes: str + """ + + self._notes = notes diff --git a/services/helper/helper_service/services/visibility_control/models/rules_get200_response.py b/services/helper/helper_service/services/visibility_control/models/rules_get200_response.py new file mode 100644 index 00000000..28530b7b --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/rules_get200_response.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.rule import Rule +from visibility_control import util + +from visibility_control.models.rule import Rule # noqa: E501 + +class RulesGet200Response(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, items=None, next_page_token=None): # noqa: E501 + """RulesGet200Response - a model defined in OpenAPI + + :param items: The items of this RulesGet200Response. # noqa: E501 + :type items: List[Rule] + :param next_page_token: The next_page_token of this RulesGet200Response. # noqa: E501 + :type next_page_token: str + """ + self.openapi_types = { + 'items': List[Rule], + 'next_page_token': str + } + + self.attribute_map = { + 'items': 'items', + 'next_page_token': 'nextPageToken' + } + + self._items = items + self._next_page_token = next_page_token + + @classmethod + def from_dict(cls, dikt) -> 'RulesGet200Response': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The _rules_get_200_response of this RulesGet200Response. # noqa: E501 + :rtype: RulesGet200Response + """ + return util.deserialize_model(dikt, cls) + + @property + def items(self) -> List[Rule]: + """Gets the items of this RulesGet200Response. + + + :return: The items of this RulesGet200Response. + :rtype: List[Rule] + """ + return self._items + + @items.setter + def items(self, items: List[Rule]): + """Sets the items of this RulesGet200Response. + + + :param items: The items of this RulesGet200Response. + :type items: List[Rule] + """ + if items is None: + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def next_page_token(self) -> str: + """Gets the next_page_token of this RulesGet200Response. + + + :return: The next_page_token of this RulesGet200Response. + :rtype: str + """ + return self._next_page_token + + @next_page_token.setter + def next_page_token(self, next_page_token: str): + """Sets the next_page_token of this RulesGet200Response. + + + :param next_page_token: The next_page_token of this RulesGet200Response. + :type next_page_token: str + """ + + self._next_page_token = next_page_token diff --git a/services/helper/helper_service/services/visibility_control/models/security_method.py b/services/helper/helper_service/services/visibility_control/models/security_method.py new file mode 100644 index 00000000..4ceae5be --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/security_method.py @@ -0,0 +1,40 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class SecurityMethod(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + PSK = 'PSK' + PKI = 'PKI' + OAUTH = 'OAUTH' + def __init__(self): # noqa: E501 + """SecurityMethod - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'SecurityMethod': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The SecurityMethod of this SecurityMethod. # noqa: E501 + :rtype: SecurityMethod + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/visibility_control/models/service_api_description.py b/services/helper/helper_service/services/visibility_control/models/service_api_description.py new file mode 100644 index 00000000..bbbb3a54 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/service_api_description.py @@ -0,0 +1,365 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.aef_profile import AefProfile +from visibility_control.models.api_status import ApiStatus +from visibility_control.models.published_api_path import PublishedApiPath +from visibility_control.models.shareable_information import ShareableInformation +import re +from visibility_control import util + +from visibility_control.models.aef_profile import AefProfile # noqa: E501 +from visibility_control.models.api_status import ApiStatus # noqa: E501 +from visibility_control.models.published_api_path import PublishedApiPath # noqa: E501 +from visibility_control.models.shareable_information import ShareableInformation # noqa: E501 +import re # noqa: E501 + +class ServiceAPIDescription(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_name=None, api_id=None, api_status=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None, api_prov_name=None): # noqa: E501 + """ServiceAPIDescription - a model defined in OpenAPI + + :param api_name: The api_name of this ServiceAPIDescription. # noqa: E501 + :type api_name: str + :param api_id: The api_id of this ServiceAPIDescription. # noqa: E501 + :type api_id: str + :param api_status: The api_status of this ServiceAPIDescription. # noqa: E501 + :type api_status: ApiStatus + :param aef_profiles: The aef_profiles of this ServiceAPIDescription. # noqa: E501 + :type aef_profiles: List[AefProfile] + :param description: The description of this ServiceAPIDescription. # noqa: E501 + :type description: str + :param supported_features: The supported_features of this ServiceAPIDescription. # noqa: E501 + :type supported_features: str + :param shareable_info: The shareable_info of this ServiceAPIDescription. # noqa: E501 + :type shareable_info: ShareableInformation + :param service_api_category: The service_api_category of this ServiceAPIDescription. # noqa: E501 + :type service_api_category: str + :param api_supp_feats: The api_supp_feats of this ServiceAPIDescription. # noqa: E501 + :type api_supp_feats: str + :param pub_api_path: The pub_api_path of this ServiceAPIDescription. # noqa: E501 + :type pub_api_path: PublishedApiPath + :param ccf_id: The ccf_id of this ServiceAPIDescription. # noqa: E501 + :type ccf_id: str + :param api_prov_name: The api_prov_name of this ServiceAPIDescription. # noqa: E501 + :type api_prov_name: str + """ + self.openapi_types = { + 'api_name': str, + 'api_id': str, + 'api_status': ApiStatus, + 'aef_profiles': List[AefProfile], + 'description': str, + 'supported_features': str, + 'shareable_info': ShareableInformation, + 'service_api_category': str, + 'api_supp_feats': str, + 'pub_api_path': PublishedApiPath, + 'ccf_id': str, + 'api_prov_name': str + } + + self.attribute_map = { + 'api_name': 'apiName', + 'api_id': 'apiId', + 'api_status': 'apiStatus', + 'aef_profiles': 'aefProfiles', + 'description': 'description', + 'supported_features': 'supportedFeatures', + 'shareable_info': 'shareableInfo', + 'service_api_category': 'serviceAPICategory', + 'api_supp_feats': 'apiSuppFeats', + 'pub_api_path': 'pubApiPath', + 'ccf_id': 'ccfId', + 'api_prov_name': 'apiProvName' + } + + self._api_name = api_name + self._api_id = api_id + self._api_status = api_status + self._aef_profiles = aef_profiles + self._description = description + self._supported_features = supported_features + self._shareable_info = shareable_info + self._service_api_category = service_api_category + self._api_supp_feats = api_supp_feats + self._pub_api_path = pub_api_path + self._ccf_id = ccf_id + self._api_prov_name = api_prov_name + + @classmethod + def from_dict(cls, dikt) -> 'ServiceAPIDescription': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ServiceAPIDescription of this ServiceAPIDescription. # noqa: E501 + :rtype: ServiceAPIDescription + """ + return util.deserialize_model(dikt, cls) + + @property + def api_name(self) -> str: + """Gets the api_name of this ServiceAPIDescription. + + + :return: The api_name of this ServiceAPIDescription. + :rtype: str + """ + return self._api_name + + @api_name.setter + def api_name(self, api_name: str): + """Sets the api_name of this ServiceAPIDescription. + + + :param api_name: The api_name of this ServiceAPIDescription. + :type api_name: str + """ + if api_name is None: + raise ValueError("Invalid value for `api_name`, must not be `None`") # noqa: E501 + + self._api_name = api_name + + @property + def api_id(self) -> str: + """Gets the api_id of this ServiceAPIDescription. + + + :return: The api_id of this ServiceAPIDescription. + :rtype: str + """ + return self._api_id + + @api_id.setter + def api_id(self, api_id: str): + """Sets the api_id of this ServiceAPIDescription. + + + :param api_id: The api_id of this ServiceAPIDescription. + :type api_id: str + """ + + self._api_id = api_id + + @property + def api_status(self) -> ApiStatus: + """Gets the api_status of this ServiceAPIDescription. + + + :return: The api_status of this ServiceAPIDescription. + :rtype: ApiStatus + """ + return self._api_status + + @api_status.setter + def api_status(self, api_status: ApiStatus): + """Sets the api_status of this ServiceAPIDescription. + + + :param api_status: The api_status of this ServiceAPIDescription. + :type api_status: ApiStatus + """ + + self._api_status = api_status + + @property + def aef_profiles(self) -> List[AefProfile]: + """Gets the aef_profiles of this ServiceAPIDescription. + + + :return: The aef_profiles of this ServiceAPIDescription. + :rtype: List[AefProfile] + """ + return self._aef_profiles + + @aef_profiles.setter + def aef_profiles(self, aef_profiles: List[AefProfile]): + """Sets the aef_profiles of this ServiceAPIDescription. + + + :param aef_profiles: The aef_profiles of this ServiceAPIDescription. + :type aef_profiles: List[AefProfile] + """ + if aef_profiles is not None and len(aef_profiles) < 1: + raise ValueError("Invalid value for `aef_profiles`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._aef_profiles = aef_profiles + + @property + def description(self) -> str: + """Gets the description of this ServiceAPIDescription. + + + :return: The description of this ServiceAPIDescription. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this ServiceAPIDescription. + + + :param description: The description of this ServiceAPIDescription. + :type description: str + """ + + self._description = description + + @property + def supported_features(self) -> str: + """Gets the supported_features of this ServiceAPIDescription. + + + :return: The supported_features of this ServiceAPIDescription. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this ServiceAPIDescription. + + + :param supported_features: The supported_features of this ServiceAPIDescription. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features + + @property + def shareable_info(self) -> ShareableInformation: + """Gets the shareable_info of this ServiceAPIDescription. + + + :return: The shareable_info of this ServiceAPIDescription. + :rtype: ShareableInformation + """ + return self._shareable_info + + @shareable_info.setter + def shareable_info(self, shareable_info: ShareableInformation): + """Sets the shareable_info of this ServiceAPIDescription. + + + :param shareable_info: The shareable_info of this ServiceAPIDescription. + :type shareable_info: ShareableInformation + """ + + self._shareable_info = shareable_info + + @property + def service_api_category(self) -> str: + """Gets the service_api_category of this ServiceAPIDescription. + + + :return: The service_api_category of this ServiceAPIDescription. + :rtype: str + """ + return self._service_api_category + + @service_api_category.setter + def service_api_category(self, service_api_category: str): + """Sets the service_api_category of this ServiceAPIDescription. + + + :param service_api_category: The service_api_category of this ServiceAPIDescription. + :type service_api_category: str + """ + + self._service_api_category = service_api_category + + @property + def api_supp_feats(self) -> str: + """Gets the api_supp_feats of this ServiceAPIDescription. + + + :return: The api_supp_feats of this ServiceAPIDescription. + :rtype: str + """ + return self._api_supp_feats + + @api_supp_feats.setter + def api_supp_feats(self, api_supp_feats: str): + """Sets the api_supp_feats of this ServiceAPIDescription. + + + :param api_supp_feats: The api_supp_feats of this ServiceAPIDescription. + :type api_supp_feats: str + """ + if api_supp_feats is not None and not re.search(r'^[A-Fa-f0-9]*$', api_supp_feats): # noqa: E501 + raise ValueError(r"Invalid value for `api_supp_feats`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._api_supp_feats = api_supp_feats + + @property + def pub_api_path(self) -> PublishedApiPath: + """Gets the pub_api_path of this ServiceAPIDescription. + + + :return: The pub_api_path of this ServiceAPIDescription. + :rtype: PublishedApiPath + """ + return self._pub_api_path + + @pub_api_path.setter + def pub_api_path(self, pub_api_path: PublishedApiPath): + """Sets the pub_api_path of this ServiceAPIDescription. + + + :param pub_api_path: The pub_api_path of this ServiceAPIDescription. + :type pub_api_path: PublishedApiPath + """ + + self._pub_api_path = pub_api_path + + @property + def ccf_id(self) -> str: + """Gets the ccf_id of this ServiceAPIDescription. + + + :return: The ccf_id of this ServiceAPIDescription. + :rtype: str + """ + return self._ccf_id + + @ccf_id.setter + def ccf_id(self, ccf_id: str): + """Sets the ccf_id of this ServiceAPIDescription. + + + :param ccf_id: The ccf_id of this ServiceAPIDescription. + :type ccf_id: str + """ + + self._ccf_id = ccf_id + + @property + def api_prov_name(self) -> str: + """Gets the api_prov_name of this ServiceAPIDescription. + + + :return: The api_prov_name of this ServiceAPIDescription. + :rtype: str + """ + return self._api_prov_name + + @api_prov_name.setter + def api_prov_name(self, api_prov_name: str): + """Sets the api_prov_name of this ServiceAPIDescription. + + + :param api_prov_name: The api_prov_name of this ServiceAPIDescription. + :type api_prov_name: str + """ + + self._api_prov_name = api_prov_name diff --git a/services/helper/helper_service/services/visibility_control/models/service_kpis.py b/services/helper/helper_service/services/visibility_control/models/service_kpis.py new file mode 100644 index 00000000..16abcd92 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/service_kpis.py @@ -0,0 +1,191 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class ServiceKpis(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, max_req_rate=None, max_restime=None, availability=None, aval_comp=None, aval_mem=None, aval_stor=None): # noqa: E501 + """ServiceKpis - a model defined in OpenAPI + + :param max_req_rate: The max_req_rate of this ServiceKpis. # noqa: E501 + :type max_req_rate: int + :param max_restime: The max_restime of this ServiceKpis. # noqa: E501 + :type max_restime: int + :param availability: The availability of this ServiceKpis. # noqa: E501 + :type availability: int + :param aval_comp: The aval_comp of this ServiceKpis. # noqa: E501 + :type aval_comp: str + :param aval_mem: The aval_mem of this ServiceKpis. # noqa: E501 + :type aval_mem: str + :param aval_stor: The aval_stor of this ServiceKpis. # noqa: E501 + :type aval_stor: str + """ + self.openapi_types = { + 'max_req_rate': int, + 'max_restime': int, + 'availability': int, + 'aval_comp': str, + 'aval_mem': str, + 'aval_stor': str + } + + self.attribute_map = { + 'max_req_rate': 'maxReqRate', + 'max_restime': 'maxRestime', + 'availability': 'availability', + 'aval_comp': 'avalComp', + 'aval_mem': 'avalMem', + 'aval_stor': 'avalStor' + } + + self._max_req_rate = max_req_rate + self._max_restime = max_restime + self._availability = availability + self._aval_comp = aval_comp + self._aval_mem = aval_mem + self._aval_stor = aval_stor + + @classmethod + def from_dict(cls, dikt) -> 'ServiceKpis': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ServiceKpis of this ServiceKpis. # noqa: E501 + :rtype: ServiceKpis + """ + return util.deserialize_model(dikt, cls) + + @property + def max_req_rate(self) -> int: + """Gets the max_req_rate of this ServiceKpis. + + + :return: The max_req_rate of this ServiceKpis. + :rtype: int + """ + return self._max_req_rate + + @max_req_rate.setter + def max_req_rate(self, max_req_rate: int): + """Sets the max_req_rate of this ServiceKpis. + + + :param max_req_rate: The max_req_rate of this ServiceKpis. + :type max_req_rate: int + """ + + self._max_req_rate = max_req_rate + + @property + def max_restime(self) -> int: + """Gets the max_restime of this ServiceKpis. + + + :return: The max_restime of this ServiceKpis. + :rtype: int + """ + return self._max_restime + + @max_restime.setter + def max_restime(self, max_restime: int): + """Sets the max_restime of this ServiceKpis. + + + :param max_restime: The max_restime of this ServiceKpis. + :type max_restime: int + """ + + self._max_restime = max_restime + + @property + def availability(self) -> int: + """Gets the availability of this ServiceKpis. + + + :return: The availability of this ServiceKpis. + :rtype: int + """ + return self._availability + + @availability.setter + def availability(self, availability: int): + """Sets the availability of this ServiceKpis. + + + :param availability: The availability of this ServiceKpis. + :type availability: int + """ + + self._availability = availability + + @property + def aval_comp(self) -> str: + """Gets the aval_comp of this ServiceKpis. + + + :return: The aval_comp of this ServiceKpis. + :rtype: str + """ + return self._aval_comp + + @aval_comp.setter + def aval_comp(self, aval_comp: str): + """Sets the aval_comp of this ServiceKpis. + + + :param aval_comp: The aval_comp of this ServiceKpis. + :type aval_comp: str + """ + + self._aval_comp = aval_comp + + @property + def aval_mem(self) -> str: + """Gets the aval_mem of this ServiceKpis. + + + :return: The aval_mem of this ServiceKpis. + :rtype: str + """ + return self._aval_mem + + @aval_mem.setter + def aval_mem(self, aval_mem: str): + """Sets the aval_mem of this ServiceKpis. + + + :param aval_mem: The aval_mem of this ServiceKpis. + :type aval_mem: str + """ + + self._aval_mem = aval_mem + + @property + def aval_stor(self) -> str: + """Gets the aval_stor of this ServiceKpis. + + + :return: The aval_stor of this ServiceKpis. + :rtype: str + """ + return self._aval_stor + + @aval_stor.setter + def aval_stor(self, aval_stor: str): + """Sets the aval_stor of this ServiceKpis. + + + :param aval_stor: The aval_stor of this ServiceKpis. + :type aval_stor: str + """ + + self._aval_stor = aval_stor diff --git a/services/helper/helper_service/services/visibility_control/models/shareable_information.py b/services/helper/helper_service/services/visibility_control/models/shareable_information.py new file mode 100644 index 00000000..997f424a --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/shareable_information.py @@ -0,0 +1,89 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control import util + + +class ShareableInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, is_shareable=None, capif_prov_doms=None): # noqa: E501 + """ShareableInformation - a model defined in OpenAPI + + :param is_shareable: The is_shareable of this ShareableInformation. # noqa: E501 + :type is_shareable: bool + :param capif_prov_doms: The capif_prov_doms of this ShareableInformation. # noqa: E501 + :type capif_prov_doms: List[str] + """ + self.openapi_types = { + 'is_shareable': bool, + 'capif_prov_doms': List[str] + } + + self.attribute_map = { + 'is_shareable': 'isShareable', + 'capif_prov_doms': 'capifProvDoms' + } + + self._is_shareable = is_shareable + self._capif_prov_doms = capif_prov_doms + + @classmethod + def from_dict(cls, dikt) -> 'ShareableInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ShareableInformation of this ShareableInformation. # noqa: E501 + :rtype: ShareableInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def is_shareable(self) -> bool: + """Gets the is_shareable of this ShareableInformation. + + + :return: The is_shareable of this ShareableInformation. + :rtype: bool + """ + return self._is_shareable + + @is_shareable.setter + def is_shareable(self, is_shareable: bool): + """Sets the is_shareable of this ShareableInformation. + + + :param is_shareable: The is_shareable of this ShareableInformation. + :type is_shareable: bool + """ + if is_shareable is None: + raise ValueError("Invalid value for `is_shareable`, must not be `None`") # noqa: E501 + + self._is_shareable = is_shareable + + @property + def capif_prov_doms(self) -> List[str]: + """Gets the capif_prov_doms of this ShareableInformation. + + + :return: The capif_prov_doms of this ShareableInformation. + :rtype: List[str] + """ + return self._capif_prov_doms + + @capif_prov_doms.setter + def capif_prov_doms(self, capif_prov_doms: List[str]): + """Sets the capif_prov_doms of this ShareableInformation. + + + :param capif_prov_doms: The capif_prov_doms of this ShareableInformation. + :type capif_prov_doms: List[str] + """ + + self._capif_prov_doms = capif_prov_doms diff --git a/services/helper/helper_service/services/visibility_control/models/version.py b/services/helper/helper_service/services/visibility_control/models/version.py new file mode 100644 index 00000000..5752d1cf --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/models/version.py @@ -0,0 +1,145 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from visibility_control.models.base_model import Model +from visibility_control.models.custom_operation import CustomOperation +from visibility_control.models.resource import Resource +from visibility_control import util + +from visibility_control.models.custom_operation import CustomOperation # noqa: E501 +from visibility_control.models.resource import Resource # noqa: E501 + +class Version(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_version=None, expiry=None, resources=None, cust_operations=None): # noqa: E501 + """Version - a model defined in OpenAPI + + :param api_version: The api_version of this Version. # noqa: E501 + :type api_version: str + :param expiry: The expiry of this Version. # noqa: E501 + :type expiry: datetime + :param resources: The resources of this Version. # noqa: E501 + :type resources: List[Resource] + :param cust_operations: The cust_operations of this Version. # noqa: E501 + :type cust_operations: List[CustomOperation] + """ + self.openapi_types = { + 'api_version': str, + 'expiry': datetime, + 'resources': List[Resource], + 'cust_operations': List[CustomOperation] + } + + self.attribute_map = { + 'api_version': 'apiVersion', + 'expiry': 'expiry', + 'resources': 'resources', + 'cust_operations': 'custOperations' + } + + self._api_version = api_version + self._expiry = expiry + self._resources = resources + self._cust_operations = cust_operations + + @classmethod + def from_dict(cls, dikt) -> 'Version': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Version of this Version. # noqa: E501 + :rtype: Version + """ + return util.deserialize_model(dikt, cls) + + @property + def api_version(self) -> str: + """Gets the api_version of this Version. + + + :return: The api_version of this Version. + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version: str): + """Sets the api_version of this Version. + + + :param api_version: The api_version of this Version. + :type api_version: str + """ + if api_version is None: + raise ValueError("Invalid value for `api_version`, must not be `None`") # noqa: E501 + + self._api_version = api_version + + @property + def expiry(self) -> datetime: + """Gets the expiry of this Version. + + + :return: The expiry of this Version. + :rtype: datetime + """ + return self._expiry + + @expiry.setter + def expiry(self, expiry: datetime): + """Sets the expiry of this Version. + + + :param expiry: The expiry of this Version. + :type expiry: datetime + """ + + self._expiry = expiry + + @property + def resources(self) -> List[Resource]: + """Gets the resources of this Version. + + + :return: The resources of this Version. + :rtype: List[Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources: List[Resource]): + """Sets the resources of this Version. + + + :param resources: The resources of this Version. + :type resources: List[Resource] + """ + + self._resources = resources + + @property + def cust_operations(self) -> List[CustomOperation]: + """Gets the cust_operations of this Version. + + + :return: The cust_operations of this Version. + :rtype: List[CustomOperation] + """ + return self._cust_operations + + @cust_operations.setter + def cust_operations(self, cust_operations: List[CustomOperation]): + """Sets the cust_operations of this Version. + + + :param cust_operations: The cust_operations of this Version. + :type cust_operations: List[CustomOperation] + """ + + self._cust_operations = cust_operations diff --git a/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml new file mode 100644 index 00000000..eeaeafcc --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml @@ -0,0 +1,1938 @@ +openapi: 3.0.3 +info: + description: | + Access-control API to manage visibility rules and evaluate decisions for API discovery and + security-context access within OpenCAPIF. This API controls whether APIs are visible to invokers + (discovery) and whether invokers are allowed to create a security context to access them. + - Rules are global and evaluated with "more specific wins" precedence. + - If no rule matches, the decision uses OpenCAPIF's global default (outside this API). + - Provider selector is mandatory in rules and must contain at least one selector field. + title: OpenCAPIF Access Control + version: 1.0.0 +servers: +- description: Production + url: https://capif.example.com/access-control +- description: Sandbox + url: https://sandbox.capif.example.com/access-control +tags: +- description: Manage visibility rules + name: Rules +- description: Evaluate discovery and access decisions + name: Decision +paths: + /decision/invokers/{apiInvokerId}/discoverable-apis: + get: + description: | + Returns a filtered list of APIs for the API Invoker. + operationId: decision_invokers_api_invoker_id_discoverable_apis_get + parameters: + - description: CAPIF API Invoker identifier + explode: false + in: path + name: apiInvokerId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DiscoveredAPIs' + description: Discover filter + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invalid input + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invoker not found (optional behavior) + summary: Get discoverable APIs filter for an invoker (global scope) + tags: + - Decision + x-openapi-router-controller: visibility_control.controllers.decision_controller + /rules: + get: + operationId: rules_get + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_rules_get_200_response' + description: List of rules + summary: List rules + tags: + - Rules + x-openapi-router-controller: visibility_control.controllers.rules_controller + post: + description: Server generates the ruleId. Provider selector must include at + least one field. + operationId: rules_post + requestBody: + content: + application/json: + examples: + allow_except_some_invokers: + value: + providerSelector: + createdByUser: userA + apiProviderId: + - capif-prov-01 + - capif-prov-02 + apiName: + - apiName-001 + apiId: + - apiId-001 + aefId: + - aef-001 + invokerExceptions: + apiInvokerId: + - invk-123 + - invk-999 + default_access: ALLOW + enabled: true + schema: + $ref: '#/components/schemas/RuleCreateRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Rule' + description: Rule created + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invalid input + summary: Create a rule + tags: + - Rules + x-openapi-router-controller: visibility_control.controllers.rules_controller + /rules/{ruleId}: + delete: + operationId: rules_rule_id_delete + parameters: + - description: Server-generated rule identifier + explode: false + in: path + name: ruleId + required: true + schema: + type: string + style: simple + responses: + "204": + description: Deleted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Rule not found + summary: Delete a rule + tags: + - Rules + x-openapi-router-controller: visibility_control.controllers.rules_controller + get: + operationId: rules_rule_id_get + parameters: + - description: Server-generated rule identifier + explode: false + in: path + name: ruleId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Rule' + description: Rule + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Rule not found + summary: Get a rule + tags: + - Rules + x-openapi-router-controller: visibility_control.controllers.rules_controller + patch: + operationId: rules_rule_id_patch + parameters: + - description: Server-generated rule identifier + explode: false + in: path + name: ruleId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RulePatchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Rule' + description: Rule updated + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invalid input + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Rule not found + summary: Update a rule (partial) + tags: + - Rules + x-openapi-router-controller: visibility_control.controllers.rules_controller +components: + parameters: + RuleId: + description: Server-generated rule identifier + explode: false + in: path + name: ruleId + required: true + schema: + type: string + style: simple + ApiInvokerId: + description: CAPIF API Invoker identifier + explode: false + in: path + name: apiInvokerId + required: true + schema: + type: string + style: simple + schemas: + RuleCreateRequest: + description: | + Create a new rule. Provider selector is mandatory and must include at least one field. + If both startsAt and endsAt are present, endsAt must be greater than startsAt. + example: + default_access: ALLOW + notes: notes + startsAt: 2000-01-23T04:56:07.000+00:00 + invokerExceptions: + invokerOnboardedByUser: + - invokerOnboardedByUser + - invokerOnboardedByUser + apiInvokerId: + - apiInvokerId + - apiInvokerId + providerSelector: + apiProviderId: + - apiProviderId + - apiProviderId + apiName: + - apiName + - apiName + createdByUser: createdByUser + aefId: + - aefId + - aefId + apiId: + - apiId + - apiId + endsAt: 2000-01-23T04:56:07.000+00:00 + enabled: true + properties: + providerSelector: + $ref: '#/components/schemas/ProviderSelector' + invokerExceptions: + $ref: '#/components/schemas/InvokerSelector' + default_access: + enum: + - ALLOW + - DENY + title: default_access + type: string + enabled: + default: true + title: enabled + type: boolean + startsAt: + format: date-time + title: startsAt + type: string + endsAt: + format: date-time + title: endsAt + type: string + notes: + title: notes + type: string + required: + - default_access + - providerSelector + title: RuleCreateRequest + type: object + RulePatchRequest: + description: Partial update. Any omitted field remains unchanged. + example: + default_access: ALLOW + notes: notes + startsAt: 2000-01-23T04:56:07.000+00:00 + invokerExceptions: + invokerOnboardedByUser: + - invokerOnboardedByUser + - invokerOnboardedByUser + apiInvokerId: + - apiInvokerId + - apiInvokerId + providerSelector: + apiProviderId: + - apiProviderId + - apiProviderId + apiName: + - apiName + - apiName + aefId: + - aefId + - aefId + apiId: + - apiId + - apiId + endsAt: 2000-01-23T04:56:07.000+00:00 + enabled: true + properties: + providerSelector: + $ref: '#/components/schemas/PatchProviderSelector' + invokerExceptions: + $ref: '#/components/schemas/InvokerSelector' + default_access: + enum: + - ALLOW + - DENY + title: default_access + type: string + enabled: + title: enabled + type: boolean + startsAt: + format: date-time + title: startsAt + type: string + endsAt: + format: date-time + title: endsAt + type: string + notes: + title: notes + type: string + title: RulePatchRequest + type: object + Rule: + example: + default_access: ALLOW + notes: notes + updatedBy: updatedBy + startsAt: 2000-01-23T04:56:07.000+00:00 + invokerExceptions: + invokerOnboardedByUser: + - invokerOnboardedByUser + - invokerOnboardedByUser + apiInvokerId: + - apiInvokerId + - apiInvokerId + providerSelector: + apiProviderId: + - apiProviderId + - apiProviderId + apiName: + - apiName + - apiName + createdByUser: createdByUser + aefId: + - aefId + - aefId + apiId: + - apiId + - apiId + ruleId: ruleId + endsAt: 2000-01-23T04:56:07.000+00:00 + enabled: true + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + ruleId: + title: ruleId + type: string + providerSelector: + $ref: '#/components/schemas/ProviderSelector' + invokerExceptions: + $ref: '#/components/schemas/InvokerSelector' + default_access: + enum: + - ALLOW + - DENY + title: default_access + type: string + enabled: + default: true + title: enabled + type: boolean + startsAt: + format: date-time + title: startsAt + type: string + endsAt: + format: date-time + title: endsAt + type: string + notes: + title: notes + type: string + updatedAt: + format: date-time + title: updatedAt + type: string + updatedBy: + title: updatedBy + type: string + required: + - default_access + - providerSelector + - ruleId + title: Rule + type: object + PatchProviderSelector: + additionalProperties: false + description: | + Patch Provider-side selector. + example: + apiProviderId: + - apiProviderId + - apiProviderId + apiName: + - apiName + - apiName + aefId: + - aefId + - aefId + apiId: + - apiId + - apiId + properties: + apiProviderId: + items: + type: string + minItems: 0 + title: apiProviderId + type: array + uniqueItems: true + apiName: + items: + type: string + minItems: 0 + title: apiName + type: array + uniqueItems: true + apiId: + items: + type: string + minItems: 0 + title: apiId + type: array + uniqueItems: true + aefId: + items: + type: string + minItems: 0 + title: aefId + type: array + uniqueItems: true + title: PatchProviderSelector + type: object + ProviderSelector: + additionalProperties: false + description: | + Provider-side selector. Arrays apply OR within the field; AND across fields. + At least one of these fields must be present. + example: + apiProviderId: + - apiProviderId + - apiProviderId + apiName: + - apiName + - apiName + createdByUser: createdByUser + aefId: + - aefId + - aefId + apiId: + - apiId + - apiId + properties: + createdByUser: + minLength: 1 + title: createdByUser + type: string + apiProviderId: + items: + type: string + minItems: 0 + title: apiProviderId + type: array + uniqueItems: true + apiName: + items: + type: string + minItems: 0 + title: apiName + type: array + uniqueItems: true + apiId: + items: + type: string + minItems: 0 + title: apiId + type: array + uniqueItems: true + aefId: + items: + type: string + minItems: 0 + title: aefId + type: array + uniqueItems: true + required: + - createdByUser + title: ProviderSelector + type: object + InvokerSelector: + additionalProperties: false + description: Invoker-side selector used for exceptions. Optional; arrays use + OR within the field; AND across fields. + example: + invokerOnboardedByUser: + - invokerOnboardedByUser + - invokerOnboardedByUser + apiInvokerId: + - apiInvokerId + - apiInvokerId + properties: + invokerOnboardedByUser: + items: + type: string + minItems: 0 + title: invokerOnboardedByUser + type: array + uniqueItems: true + apiInvokerId: + items: + type: string + minItems: 0 + title: apiInvokerId + type: array + uniqueItems: true + title: InvokerSelector + type: object + DiscoveredAPIs: + example: + serviceAPIDescriptions: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds + aefProfiles: + - protocol: HTTP_1_1 + grantTypes: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS + ueIpRange: + ueIpv4AddrRanges: + - start: start + end: end + - start: start + end: end + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + maxRestime: 1 + availability: 5 + maxReqRate: 6 + - protocol: HTTP_1_1 + grantTypes: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS + ueIpRange: + ueIpv4AddrRanges: + - start: start + end: end + - start: start + end: end + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + maxRestime: 1 + availability: 5 + maxReqRate: 6 + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds + aefProfiles: + - protocol: HTTP_1_1 + grantTypes: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS + ueIpRange: + ueIpv4AddrRanges: + - start: start + end: end + - start: start + end: end + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + maxRestime: 1 + availability: 5 + maxReqRate: 6 + - protocol: HTTP_1_1 + grantTypes: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS + ueIpRange: + ueIpv4AddrRanges: + - start: start + end: end + - start: start + end: end + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + maxRestime: 1 + availability: 5 + maxReqRate: 6 + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + suppFeat: suppFeat + properties: + serviceAPIDescriptions: + items: + $ref: '#/components/schemas/ServiceAPIDescription' + minItems: 1 + title: serviceAPIDescriptions + type: array + suppFeat: + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + title: DiscoveredAPIs + type: object + ServiceAPIDescription: + example: + serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + apiProvName: apiProvName + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds + aefProfiles: + - protocol: HTTP_1_1 + grantTypes: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS + ueIpRange: + ueIpv4AddrRanges: + - start: start + end: end + - start: start + end: end + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + maxRestime: 1 + availability: 5 + maxReqRate: 6 + - protocol: HTTP_1_1 + grantTypes: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS + ueIpRange: + ueIpv4AddrRanges: + - start: start + end: end + - start: start + end: end + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + maxRestime: 1 + availability: 5 + maxReqRate: 6 + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + properties: + apiName: + title: apiName + type: string + apiId: + title: apiId + type: string + apiStatus: + $ref: '#/components/schemas/ApiStatus' + aefProfiles: + items: + $ref: '#/components/schemas/AefProfile' + minItems: 1 + title: aefProfiles + type: array + description: + title: description + type: string + supportedFeatures: + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + shareableInfo: + $ref: '#/components/schemas/ShareableInformation' + serviceAPICategory: + title: serviceAPICategory + type: string + apiSuppFeats: + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + pubApiPath: + $ref: '#/components/schemas/PublishedApiPath' + ccfId: + title: ccfId + type: string + apiProvName: + title: apiProvName + type: string + required: + - apiName + title: ServiceAPIDescription + type: object + AefProfile: + example: + protocol: HTTP_1_1 + grantTypes: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS + ueIpRange: + ueIpv4AddrRanges: + - start: start + end: end + - start: start + end: end + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + maxRestime: 1 + availability: 5 + maxReqRate: 6 + properties: + aefId: + title: aefId + type: string + versions: + items: + $ref: '#/components/schemas/Version' + minItems: 1 + title: versions + type: array + protocol: + $ref: '#/components/schemas/Protocol' + dataFormat: + $ref: '#/components/schemas/DataFormat' + securityMethods: + items: + $ref: '#/components/schemas/SecurityMethod' + title: securityMethods + type: array + grantTypes: + items: + $ref: '#/components/schemas/OAuthGrantType' + title: grantTypes + type: array + domainName: + title: domainName + type: string + interfaceDescriptions: + items: + $ref: '#/components/schemas/InterfaceDescription' + title: interfaceDescriptions + type: array + aefLocation: + $ref: '#/components/schemas/AefLocation' + serviceKpis: + $ref: '#/components/schemas/ServiceKpis' + ueIpRange: + $ref: '#/components/schemas/IpAddrRange' + required: + - aefId + - versions + title: AefProfile + type: object + Version: + example: + apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + properties: + apiVersion: + title: apiVersion + type: string + expiry: + format: date-time + title: expiry + type: string + resources: + items: + $ref: '#/components/schemas/Resource' + title: resources + type: array + custOperations: + items: + $ref: '#/components/schemas/CustomOperation' + title: custOperations + type: array + required: + - apiVersion + title: Version + type: object + Resource: + example: + operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + properties: + resourceName: + title: resourceName + type: string + commType: + $ref: '#/components/schemas/CommunicationType' + uri: + title: uri + type: string + custOpName: + title: custOpName + type: string + operations: + items: + $ref: '#/components/schemas/Operation' + title: operations + type: array + description: + title: description + type: string + required: + - commType + - resourceName + - uri + title: Resource + type: object + CustomOperation: + example: + operations: + - null + - null + commType: null + description: description + custOpName: custOpName + properties: + commType: + $ref: '#/components/schemas/CommunicationType' + custOpName: + title: custOpName + type: string + operations: + items: + $ref: '#/components/schemas/Operation' + title: operations + type: array + description: + title: description + type: string + required: + - commType + - custOpName + title: CustomOperation + type: object + ApiStatus: + example: + aefIds: + - aefIds + - aefIds + properties: + aefIds: + items: + type: string + title: aefIds + type: array + required: + - aefIds + title: ApiStatus + type: object + InterfaceDescription: + example: + ipv6Addr: ipv6Addr + grantTypes: + - null + - null + securityMethods: + - null + - null + fqdn: fqdn + port: 0 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + properties: + ipv4Addr: + title: ipv4Addr + type: string + ipv6Addr: + title: ipv6Addr + type: string + fqdn: + title: fqdn + type: string + port: + title: port + type: integer + apiPrefix: + title: apiPrefix + type: string + securityMethods: + items: + $ref: '#/components/schemas/SecurityMethod' + title: securityMethods + type: array + grantTypes: + items: + $ref: '#/components/schemas/OAuthGrantType' + title: grantTypes + type: array + title: InterfaceDescription + type: object + SupportedFeatures: + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + CommunicationType: + enum: + - REQUEST_RESPONSE + - SUBSCRIBE_NOTIFY + title: CommunicationType + type: string + Protocol: + enum: + - HTTP_1_1 + - HTTP_2 + - MQTT + - WEBSOCKET + title: Protocol + type: string + DataFormat: + enum: + - JSON + - XML + - PROTOBUF3 + title: DataFormat + type: string + Operation: + enum: + - GET + - POST + - PUT + - PATCH + - DELETE + title: Operation + type: string + SecurityMethod: + enum: + - PSK + - PKI + - OAUTH + title: SecurityMethod + type: string + OAuthGrantType: + enum: + - CLIENT_CREDENTIALS + - AUTHORIZATION_CODE + - AUTHORIZATION_CODE_WITH_PKCE + title: OAuthGrantType + type: string + ShareableInformation: + example: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + properties: + isShareable: + title: isShareable + type: boolean + capifProvDoms: + items: + type: string + title: capifProvDoms + type: array + required: + - isShareable + title: ShareableInformation + type: object + PublishedApiPath: + example: + ccfIds: + - ccfIds + - ccfIds + properties: + ccfIds: + items: + type: string + title: ccfIds + type: array + title: PublishedApiPath + type: object + AefLocation: + example: + dcId: dcId + properties: + dcId: + title: dcId + type: string + title: AefLocation + type: object + ServiceKpis: + example: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + maxRestime: 1 + availability: 5 + maxReqRate: 6 + properties: + maxReqRate: + title: maxReqRate + type: integer + maxRestime: + title: maxRestime + type: integer + availability: + title: availability + type: integer + avalComp: + title: avalComp + type: string + avalMem: + title: avalMem + type: string + avalStor: + title: avalStor + type: string + title: ServiceKpis + type: object + IpAddrRange: + example: + ueIpv4AddrRanges: + - start: start + end: end + - start: start + end: end + properties: + ueIpv4AddrRanges: + items: + $ref: '#/components/schemas/IpAddrRange_ueIpv4AddrRanges_inner' + title: ueIpv4AddrRanges + type: array + title: IpAddrRange + type: object + Error: + example: + code: code + details: + key: "" + message: message + properties: + code: + title: code + type: string + message: + title: message + type: string + details: + additionalProperties: true + title: details + type: object + required: + - code + - message + title: Error + type: object + _rules_get_200_response: + example: + nextPageToken: nextPageToken + items: + - default_access: ALLOW + notes: notes + updatedBy: updatedBy + startsAt: 2000-01-23T04:56:07.000+00:00 + invokerExceptions: + invokerOnboardedByUser: + - invokerOnboardedByUser + - invokerOnboardedByUser + apiInvokerId: + - apiInvokerId + - apiInvokerId + providerSelector: + apiProviderId: + - apiProviderId + - apiProviderId + apiName: + - apiName + - apiName + createdByUser: createdByUser + aefId: + - aefId + - aefId + apiId: + - apiId + - apiId + ruleId: ruleId + endsAt: 2000-01-23T04:56:07.000+00:00 + enabled: true + updatedAt: 2000-01-23T04:56:07.000+00:00 + - default_access: ALLOW + notes: notes + updatedBy: updatedBy + startsAt: 2000-01-23T04:56:07.000+00:00 + invokerExceptions: + invokerOnboardedByUser: + - invokerOnboardedByUser + - invokerOnboardedByUser + apiInvokerId: + - apiInvokerId + - apiInvokerId + providerSelector: + apiProviderId: + - apiProviderId + - apiProviderId + apiName: + - apiName + - apiName + createdByUser: createdByUser + aefId: + - aefId + - aefId + apiId: + - apiId + - apiId + ruleId: ruleId + endsAt: 2000-01-23T04:56:07.000+00:00 + enabled: true + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + items: + items: + $ref: '#/components/schemas/Rule' + title: items + type: array + nextPageToken: + title: nextPageToken + type: string + required: + - items + title: _rules_get_200_response + type: object + IpAddrRange_ueIpv4AddrRanges_inner: + example: + start: start + end: end + properties: + start: + title: start + type: string + end: + title: end + type: string + title: IpAddrRange_ueIpv4AddrRanges_inner + type: object diff --git a/services/helper/helper_service/services/visibility_control/typing_utils.py b/services/helper/helper_service/services/visibility_control/typing_utils.py new file mode 100644 index 00000000..74e3c913 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/typing_utils.py @@ -0,0 +1,30 @@ +import sys + +if sys.version_info < (3, 7): + import typing + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return type(klass) == typing.GenericMeta + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__extra__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__extra__ == list + +else: + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return hasattr(klass, '__origin__') + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__origin__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__origin__ == list diff --git a/services/helper/helper_service/services/visibility_control/util.py b/services/helper/helper_service/services/visibility_control/util.py new file mode 100644 index 00000000..bc420a26 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/util.py @@ -0,0 +1,147 @@ +import datetime + +import typing +from visibility_control import typing_utils + + +def _deserialize(data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if klass in (int, float, str, bool, bytearray): + return _deserialize_primitive(data, klass) + elif klass == object: + return _deserialize_object(data) + elif klass == datetime.date: + return deserialize_date(data) + elif klass == datetime.datetime: + return deserialize_datetime(data) + elif typing_utils.is_generic(klass): + if typing_utils.is_list(klass): + return _deserialize_list(data, klass.__args__[0]) + if typing_utils.is_dict(klass): + return _deserialize_dict(data, klass.__args__[1]) + else: + return deserialize_model(data, klass) + + +def _deserialize_primitive(data, klass): + """Deserializes to primitive type. + + :param data: data to deserialize. + :param klass: class literal. + + :return: int, long, float, str, bool. + :rtype: int | long | float | str | bool + """ + try: + value = klass(data) + except UnicodeEncodeError: + value = data + except TypeError: + value = data + return value + + +def _deserialize_object(value): + """Return an original value. + + :return: object. + """ + return value + + +def deserialize_date(string): + """Deserializes string to date. + + :param string: str. + :type string: str + :return: date. + :rtype: date + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + + +def deserialize_datetime(string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :type string: str + :return: datetime. + :rtype: datetime + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + + +def deserialize_model(data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :type data: dict | list + :param klass: class literal. + :return: model object. + """ + instance = klass() + + if not instance.openapi_types: + return data + + for attr, attr_type in instance.openapi_types.items(): + if data is not None \ + and instance.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): + value = data[instance.attribute_map[attr]] + setattr(instance, attr, _deserialize(value, attr_type)) + + return instance + + +def _deserialize_list(data, boxed_type): + """Deserializes a list and its elements. + + :param data: list to deserialize. + :type data: list + :param boxed_type: class literal. + + :return: deserialized list. + :rtype: list + """ + return [_deserialize(sub_data, boxed_type) + for sub_data in data] + + +def _deserialize_dict(data, boxed_type): + """Deserializes a dict and its elements. + + :param data: dict to deserialize. + :type data: dict + :param boxed_type: class literal. + + :return: deserialized dict. + :rtype: dict + """ + return {k: _deserialize(v, boxed_type) + for k, v in data.items() } -- GitLab From 290c4a521535fc15f1579077a1943044989af6f0 Mon Sep 17 00:00:00 2001 From: Panagiotis Pavlidis Date: Tue, 23 Dec 2025 12:04:19 +0200 Subject: [PATCH 056/101] cert verification in provider modify #188 - Implement certificate verification for api_provider_enrolment_details_controller --- ...i_provider_enrolment_details_controller.py | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py index cefef1ef..d79a106e 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py @@ -1,10 +1,42 @@ +from functools import wraps from flask import current_app, request +from cryptography import x509 +from cryptography.hazmat.backends import default_backend from ..core.provider_enrolment_details_api import ProviderManagementOperations -from ..models.api_provider_enrolment_details_patch import APIProviderEnrolmentDetailsPatch # noqa: E501 +from ..core.validate_user import ControlAccess +from ..models.api_provider_enrolment_details_patch import \ + APIProviderEnrolmentDetailsPatch # noqa: E501 provider_management_ops = ProviderManagementOperations() +valid_user = ControlAccess() +def cert_validation(): + def _cert_validation(f): + @wraps(f) + def __cert_validation(*args, **kwargs): + + args = request.view_args + cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_raw = cert_tmp.replace('\t', '') + + cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) + + cn = cert.subject.get_attributes_for_oid(x509.OID_COMMON_NAME)[0].value.strip() + + if cn != "superadmin": + cert_signature = cert.signature.hex() + result = valid_user.validate_user_cert(args["registrationId"], cert_signature) + + if result is not None: + return result + + result = f(**kwargs) + return result + return __cert_validation + return _cert_validation + +@cert_validation() def modify_ind_api_provider_enrolment(registration_id, body): # noqa: E501 """modify_ind_api_provider_enrolment -- GitLab From ffae527f4ecb564672a1794878c4a51d10f21ef3 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Wed, 21 Jan 2026 15:57:55 +0100 Subject: [PATCH 057/101] fix helper endpoint --- tests/resources/common/basicRequests.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/resources/common/basicRequests.robot b/tests/resources/common/basicRequests.robot index b1b350e2..e02a9c93 100644 --- a/tests/resources/common/basicRequests.robot +++ b/tests/resources/common/basicRequests.robot @@ -970,7 +970,7 @@ Get Number Of Services Get Capif Ccf Id ${resp}= Get Request Capif - ... /helper/getCcfId + ... /helper/api/getCcfId ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${SUPERADMIN_USERNAME} -- GitLab From 9fbce1c76dc79eb5a08cc972b40c81b186ce2c5b Mon Sep 17 00:00:00 2001 From: Alex Kakyris Date: Thu, 22 Jan 2026 16:32:27 +0200 Subject: [PATCH 058/101] Change update_api_provider_enrolment_details with patch_api_provider_enrolment_details --- .../individual_api_provider_enrolment_details_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py index cc23f5ed..bff5575d 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py @@ -29,6 +29,6 @@ def modify_ind_api_provider_enrolment(registration_id, body): # noqa: E501 if request.is_json: body = APIProviderEnrolmentDetailsPatch.from_dict(request.get_json()) # noqa: E501 - res = provider_management_ops.update_api_provider_enrolment_details(registration_id, body) + res = provider_management_ops.patch_api_provider_enrolment_details(registration_id, body) return res -- GitLab From 9320d11654bc997a3632488477dda9467c48359b Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Thu, 22 Jan 2026 19:35:00 +0100 Subject: [PATCH 059/101] fix: nginx routes and helper communication --- services/nginx/nginx.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index dfea48b8..4b543afe 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -1,6 +1,6 @@ worker_processes auto; -error_log /var/log/nginx/error.log ${LOG_LEVEL}; +error_log /var/log/nginx/error.log warn; pid /tmp/nginx.pid; events { @@ -183,6 +183,12 @@ http { proxy_pass http://helper:8080/; } + location /visibility-control/ { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://helper:8080/visibility-control/; + } } } -- GitLab From 060e2bf8d8a992001944758e90cfda9ef6a5bfef Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Fri, 23 Jan 2026 11:18:33 +0100 Subject: [PATCH 060/101] feat: add UTC date validation and rule timestamps to response (startsAt/updatedAt) --- .../core/visibility_control_core.py | 97 ++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py index 6d3af076..22e78f65 100644 --- a/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py +++ b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py @@ -1,4 +1,5 @@ import uuid +from datetime import datetime, timezone from db.db import get_mongo from config import Config @@ -9,15 +10,72 @@ def get_all_rules(): rules = list(col.find({}, {"_id": 0})) return {"rules": rules}, 200 +# def create_new_rule(body): +# db = get_mongo() +# col = db.get_col_by_name("visibility_rules") + +# # Generamos el ruleId (Server generates it, según tu comentario) +# body['ruleId'] = str(uuid.uuid4()) + +# col.insert_one(body) +# body.pop('_id', None) +# return body, 201 + def create_new_rule(body): db = get_mongo() col = db.get_col_by_name("visibility_rules") - # Generamos el ruleId (Server generates it, según tu comentario) + # 1. Generate a unique ruleId body['ruleId'] = str(uuid.uuid4()) + # 2. Generate current timestamp in UTC ISO 8601 format with 'Z' + now = datetime.now(timezone.utc).isoformat().replace('+00:00', 'Z') + + # 3. Handle and validate 'startsAt' + if 'startsAt' not in body or not body['startsAt']: + # If not provided, default to current time + body['startsAt'] = now + else: + # If provided, validate ISO 8601 format + try: + datetime.fromisoformat(body['startsAt'].replace('Z', '+00:00')) + except ValueError: + return { + "title": "Bad Request", + "detail": "Invalid startsAt format. Please use ISO 8601 (e.g., 2026-01-23T10:00:00Z)" + }, 400 + + # 4. 'updatedAt' is always set to current time during creation + body['updatedAt'] = now + + # 5. Logic validation: endsAt must be greater than startsAt + if 'endsAt' in body and body['endsAt']: + try: + # Convert strings to datetime objects for comparison + start_dt = datetime.fromisoformat(body['startsAt'].replace('Z', '+00:00')) + end_dt = datetime.fromisoformat(body['endsAt'].replace('Z', '+00:00')) + + if end_dt <= start_dt: + return { + "title": "Bad Request", + "detail": "Validation Error: endsAt must be later than startsAt" + }, 400 + except ValueError: + return { + "title": "Bad Request", + "detail": "Invalid endsAt format." + }, 400 + + # 6. Set 'updatedBy' metadata from providerSelector + ps = body.get('providerSelector', {}) + body['updatedBy'] = ps.get('createdByUser', 'system') + + # Save to MongoDB col.insert_one(body) + + # Remove Mongo internal ID before returning the response body.pop('_id', None) + return body, 201 def get_rule_by_id(rule_id): @@ -36,9 +94,46 @@ def delete_rule_by_id(rule_id): return None, 204 return {"title": "Not Found", "detail": "Rule not found"}, 404 +# def update_rule_patch(rule_id, body): +# db = get_mongo() +# col = db.get_col_by_name("visibility_rules") +# col.update_one({"ruleId": rule_id}, {"$set": body}) +# updated_rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) +# return updated_rule, 200 + def update_rule_patch(rule_id, body): db = get_mongo() col = db.get_col_by_name("visibility_rules") + + # Fetch existing rule for comparison + existing_rule = col.find_one({"ruleId": rule_id}) + if not existing_rule: + return {"title": "Not Found", "detail": "Rule not found"}, 404 + + # Always update 'updatedAt' timestamp + now = datetime.now(timezone.utc).isoformat().replace('+00:00', 'Z') + body['updatedAt'] = now + + # Re-validate date logic if dates are being modified + new_start = body.get('startsAt', existing_rule.get('startsAt')) + new_end = body.get('endsAt', existing_rule.get('endsAt')) + + if new_start and new_end: + try: + s = datetime.fromisoformat(new_start.replace('Z', '+00:00')) + e = datetime.fromisoformat(new_end.replace('Z', '+00:00')) + if e <= s: + return { + "title": "Bad Request", + "detail": "Validation Error: endsAt must be later than startsAt" + }, 400 + except ValueError: + return {"title": "Bad Request", "detail": "Invalid date format."}, 400 + + # Update metadata if user info is provided + if 'providerSelector' in body and 'createdByUser' in body['providerSelector']: + body['updatedBy'] = body['providerSelector']['createdByUser'] + col.update_one({"ruleId": rule_id}, {"$set": body}) updated_rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) return updated_rule, 200 \ No newline at end of file -- GitLab From 8dfd230e895ef64efc318d2a2161b71f6f55f233 Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Mon, 26 Jan 2026 16:48:48 +0100 Subject: [PATCH 061/101] add client certificate validation and API authorization logic --- .../services/visibility_control/auth.py | 63 +++++++++++++++++ .../controllers/rules_controller.py | 11 ++- .../visibility_control/core/validate_user.py | 31 +++++++++ .../core/visibility_control_core.py | 69 +++++++++++++++++-- 4 files changed, 168 insertions(+), 6 deletions(-) create mode 100644 services/helper/helper_service/services/visibility_control/auth.py create mode 100644 services/helper/helper_service/services/visibility_control/core/validate_user.py diff --git a/services/helper/helper_service/services/visibility_control/auth.py b/services/helper/helper_service/services/visibility_control/auth.py new file mode 100644 index 00000000..20fcf423 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/auth.py @@ -0,0 +1,63 @@ +from functools import wraps +from cryptography import x509 +from cryptography.hazmat.backends import default_backend +from flask import request +import connexion +#from ..core.validate_user import ControlAccess + +from visibility_control.core.validate_user import ControlAccess +valid_user = ControlAccess() + +def cert_validation(): + def _cert_validation(f): + @wraps(f) + def __cert_validation(*args, **kwargs): + # 1. Get certificate header safely + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return {"title": "Unauthorized", "detail": "Certificate header missing"}, 401 + + try: + # 2. Process certificate + cert_raw = cert_tmp.replace('\\t', '') + cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) + cn = cert.subject.get_attributes_for_oid(x509.OID_COMMON_NAME)[0].value.strip() + + # 3. Store identity for the Core logic + request.user_cn = cn + request.cert_signature = cert.signature.hex() + + return f(**kwargs) + except Exception: + return {"title": "Unauthorized", "detail": "Invalid certificate format"}, 401 + return __cert_validation + return _cert_validation + +# def cert_validation(): +# def _cert_validation(f): +# @wraps(f) +# def __cert_validation(*args, **kwargs): +# # 1. Validación de existencia de certificado (Literal del ejemplo) +# cert_tmp = request.headers['X-Ssl-Client-Cert'] + +# cert_raw = cert_tmp.replace('\\t', '') +# cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) +# cn = cert.subject.get_attributes_for_oid(x509.OID_COMMON_NAME)[0].value.strip() + +# # Guardamos para que el Core los vea +# request.user_cn = cn +# request.cert_signature = cert.signature.hex() + +# if cn != "superadmin": +# cert_signature = cert.signature.hex() +# # Aquí, si hay un ID en la URL (como rule_id), podríamos validar. +# # Pero para el POST, como el ID está en el cuerpo, +# # simplemente dejamos que el Core lo gestione para no romper el wrap. + +# # Si quieres que el wrap sea universal, lo dejamos pasar tras validar el CN +# pass + +# return f(**kwargs) +# return __cert_validation +# return _cert_validation \ No newline at end of file diff --git a/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py b/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py index bc0a3014..07ac3cd4 100644 --- a/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py +++ b/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py @@ -1,7 +1,11 @@ import connexion from typing import Dict, Tuple, Union -# Importamos la lógica del CORE (Asegúrate de crear este archivo después) +#from ..auth import cert_validation + +from visibility_control.auth import cert_validation + +# Importamos la lógica del CORE from ..core.visibility_control_core import ( get_all_rules, create_new_rule, @@ -17,10 +21,12 @@ from visibility_control.models.rule_patch_request import RulePatchRequest from visibility_control.models.rules_get200_response import RulesGet200Response from visibility_control import util +@cert_validation() def rules_get(): """List rules""" return get_all_rules() +@cert_validation() def rules_post(body): """ Create a rule @@ -33,14 +39,17 @@ def rules_post(body): return Error(title="Bad Request", detail="JSON body required", status=400), 400 +@cert_validation() def rules_rule_id_delete(rule_id): """Delete a rule""" return delete_rule_by_id(rule_id) +@cert_validation() def rules_rule_id_get(rule_id): """Get a rule""" return get_rule_by_id(rule_id) +@cert_validation() def rules_rule_id_patch(rule_id, rule_patch_request): """Update a rule (partial)""" if connexion.request.is_json: diff --git a/services/helper/helper_service/services/visibility_control/core/validate_user.py b/services/helper/helper_service/services/visibility_control/core/validate_user.py new file mode 100644 index 00000000..750bb9d5 --- /dev/null +++ b/services/helper/helper_service/services/visibility_control/core/validate_user.py @@ -0,0 +1,31 @@ +import json +from flask import Response, current_app + +class Resource: + def __init__(self): + # We use the existing mongo helper from your service + from db.db import get_mongo + self.db = get_mongo() + +class ControlAccess(Resource): + def validate_user_cert(self, api_provider_id, cert_signature): + # Access the certificates collection in CAPIF database + cert_col = self.db.get_col_by_name("certs") + try: + # Check if provider_id matches the certificate signature + my_query = {'provider_id': api_provider_id} + cert_entry = cert_col.find_one(my_query) + + if cert_entry is not None: + if cert_entry["cert_signature"] != cert_signature: + # Return 401 if signatures don't match + prob = { + "title": "Unauthorized", + "detail": "User not authorized", + "cause": "You are not the owner of this resource" + } + return Response(json.dumps(prob), status=401, mimetype="application/json") + return None + except Exception as e: + current_app.logger.error("Error in validate_user_cert: " + str(e)) + return Response(json.dumps({"title": "Internal Server Error", "detail": str(e)}), status=500, mimetype="application/json") \ No newline at end of file diff --git a/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py index 22e78f65..894eb1d1 100644 --- a/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py +++ b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py @@ -3,6 +3,11 @@ from datetime import datetime, timezone from db.db import get_mongo from config import Config +from flask import request +from visibility_control.core.validate_user import ControlAccess + +valid_user = ControlAccess() + def get_all_rules(): db = get_mongo() # Usamos la colección configurada en el helper @@ -24,6 +29,31 @@ def get_all_rules(): def create_new_rule(body): db = get_mongo() col = db.get_col_by_name("visibility_rules") + + # Get identity extracted by the decorator + cn = request.user_cn + cert_sig = request.cert_signature + + # Security check: If not superadmin, validate the mandatory identity + if cn != "superadmin": + ps = body.get('providerSelector', {}) + + # We check apiProviderId if it exists, but we focus on the mandatory identity + api_id = ps.get('apiProviderId', [None])[0] + created_by = ps.get('createdByUser') + + # Use the available ID to validate ownership via certificate signature + # We prioritize apiProviderId, then createdByUser as fallback for validation + user_to_validate = api_id if api_id else created_by + + if user_to_validate: + result = valid_user.validate_user_cert(user_to_validate, cert_sig) + if result is not None: + return result + else: + # If even createdByUser is missing (despite being mandatory in your logic), + # we block it or handle it as a Bad Request + return {"title": "Bad Request", "detail": "createdByUser is mandatory"}, 400 # 1. Generate a unique ruleId body['ruleId'] = str(uuid.uuid4()) @@ -67,8 +97,10 @@ def create_new_rule(body): }, 400 # 6. Set 'updatedBy' metadata from providerSelector - ps = body.get('providerSelector', {}) - body['updatedBy'] = ps.get('createdByUser', 'system') + # ps = body.get('providerSelector', {}) + # body['updatedBy'] = ps.get('createdByUser', 'system') + # This prevents a user from putting "User_A" in the JSON while using "User_B" certificate + body['updatedBy'] = cn # Save to MongoDB col.insert_one(body) @@ -82,16 +114,39 @@ def get_rule_by_id(rule_id): db = get_mongo() col = db.get_col_by_name("visibility_rules") rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) - if rule: - return rule, 200 - return {"title": "Not Found", "detail": "Rule not found"}, 404 + # if rule: + # return rule, 200 + # return {"title": "Not Found", "detail": "Rule not found"}, 404 + if not rule: + return {"title": "Not Found", "detail": "Rule not found"}, 404 + + # SECURITY CHECK: Only Superadmin or the actual owner (CN) can view + if request.user_cn != "superadmin" and rule.get('updatedBy') != request.user_cn: + return {"title": "Unauthorized", "detail": "You do not have permission to view this rule"}, 401 + + rule.pop('_id', None) + return rule, 200 def delete_rule_by_id(rule_id): db = get_mongo() col = db.get_col_by_name("visibility_rules") + # 1. Fetch the rule first to check ownership + rule = col.find_one({"ruleId": rule_id}) + if not rule: + return {"title": "Not Found", "detail": "Rule not found"}, 404 + + # 2. SECURITY CHECK: Only Superadmin or the actual owner (CN) can delete + # We compare the current certificate CN against the stored 'updatedBy' + if request.user_cn != "superadmin" and rule.get('updatedBy') != request.user_cn: + return {"title": "Unauthorized", "detail": "You do not have permission to delete this rule"}, 401 + + # 3. Perform the actual deletion res = col.delete_one({"ruleId": rule_id}) + + # 4. Final check on the operation result if res.deleted_count > 0: return None, 204 + return {"title": "Not Found", "detail": "Rule not found"}, 404 # def update_rule_patch(rule_id, body): @@ -109,6 +164,10 @@ def update_rule_patch(rule_id, body): existing_rule = col.find_one({"ruleId": rule_id}) if not existing_rule: return {"title": "Not Found", "detail": "Rule not found"}, 404 + + # SECURITY CHECK: Only Superadmin or the actual owner (CN) can update + if request.user_cn != "superadmin" and existing_rule.get('updatedBy') != request.user_cn: + return {"title": "Unauthorized", "detail": "You do not have permission to modify this rule"}, 401 # Always update 'updatedAt' timestamp now = datetime.now(timezone.utc).isoformat().replace('+00:00', 'Z') -- GitLab From 3cdde44c43faad59195f4e92f8ade654054711b9 Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Mon, 26 Jan 2026 16:56:26 +0100 Subject: [PATCH 062/101] changes on the openapi name and description --- .../services/visibility_control/openapi/openapi.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml index eeaeafcc..12953fd1 100644 --- a/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml +++ b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml @@ -1,13 +1,13 @@ openapi: 3.0.3 info: description: | - Access-control API to manage visibility rules and evaluate decisions for API discovery and + Visibility control API manages visibility rules and evaluate decisions for API discovery and security-context access within OpenCAPIF. This API controls whether APIs are visible to invokers (discovery) and whether invokers are allowed to create a security context to access them. - Rules are global and evaluated with "more specific wins" precedence. - If no rule matches, the decision uses OpenCAPIF's global default (outside this API). - - Provider selector is mandatory in rules and must contain at least one selector field. - title: OpenCAPIF Access Control + - Provider selector is mandatory in rules and must contain at least one selector field (createdByUser is mandatory). + title: OpenCAPIF Visibility Control version: 1.0.0 servers: - description: Production -- GitLab From 05728e3817563068105eccc79fb3d7907b5cd0f0 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 3 Feb 2026 15:36:29 +0100 Subject: [PATCH 063/101] New tests and some minor fixes over helper new api and nginx --- .../visibility_control/openapi/openapi.yaml | 14 ++- services/nginx/nginx.conf | 21 ++-- .../features/Helper/visibility_control.robot | 96 +++++++++++++++++++ tests/libraries/bodyRequests.py | 1 + .../libraries/helper_service/bodyRequests.py | 28 ++++++ tests/resources/common/basicRequests.robot | 2 +- 6 files changed, 147 insertions(+), 15 deletions(-) create mode 100644 tests/features/Helper/visibility_control.robot create mode 100644 tests/libraries/helper_service/bodyRequests.py diff --git a/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml index 12953fd1..76ed307b 100644 --- a/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml +++ b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml @@ -9,11 +9,17 @@ info: - Provider selector is mandatory in rules and must contain at least one selector field (createdByUser is mandatory). title: OpenCAPIF Visibility Control version: 1.0.0 +# servers: +# - description: Production +# url: https://capif.example.com/access-control +# - description: Sandbox +# url: https://sandbox.capif.example.com/access-control servers: -- description: Production - url: https://capif.example.com/access-control -- description: Sandbox - url: https://sandbox.capif.example.com/access-control +- url: "{apiRoot}/visibility-control" + variables: + apiRoot: + default: http://localhost:8080 + description: Base URL of the Helper service. tags: - description: Manage visibility rules name: Rules diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index 4b543afe..33260144 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -14,7 +14,7 @@ http { } map "$request_method:$uri:$ssl_client_s_dn_cn" $helper_error_message { default 'SUCCESS'; - "~*(GET|DELETE):.*:(?!(superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; + "~*(GET|DELETE|POST):.*:(?!(superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; } map "$request_method:$uri:$ssl_client_s_dn_cn" $invoker_error_message { default 'SUCCESS'; @@ -177,18 +177,19 @@ http { add_header Content-Type 'application/problem+json'; return 401 $helper_error_message; } - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_set_header Host $host; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://helper:8080/; } - location /visibility-control/ { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://helper:8080/visibility-control/; - } + # location /visibility-control/ { + # proxy_set_header Host $host; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_pass http://helper:8080/visibility-control/; + # } } } diff --git a/tests/features/Helper/visibility_control.robot b/tests/features/Helper/visibility_control.robot new file mode 100644 index 00000000..24e05e55 --- /dev/null +++ b/tests/features/Helper/visibility_control.robot @@ -0,0 +1,96 @@ +*** Settings *** +Resource /opt/robot-tests/tests/resources/common.resource +Library /opt/robot-tests/tests/libraries/bodyRequests.py +Library XML +Library String +Resource /opt/robot-tests/tests/resources/common/basicRequests.robot +Resource ../../resources/common.resource +Resource ../../resources/common/basicRequests.robot + +Suite Teardown Reset Testing Environment +Test Setup Reset Testing Environment +Test Teardown Reset Testing Environment + + +*** Variables *** +${API_INVOKER_NOT_REGISTERED} not-valid +${SUBSCRIBER_ID_NOT_VALID} not-valid +${SUBSCRIPTION_ID_NOT_VALID} not-valid + + +*** Test Cases *** +Get Visibility Control Rules as Superadmin + [Tags] visibility_control_1 + + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + Length Should Be ${resp.json()['rules']} 0 + +Create Visibility Control Rule Invalid Dates as Superadmin + [Tags] visibility_control_2 + + ${body}= Create Visibility Control Rule Body Invalid Dates + + ${resp}= Post Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + ... json=${body} + + Status Should Be ${resp} 400 + +Create Visibility Control Rule + [Tags] visibility_control_3 + ${body}= Create Visibility Control Rule Body + + ${resp}= Post Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + ... json=${body} + + ${rule_id}= Set Variable ${resp.json()['ruleId']} + + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + Length Should Be ${resp.json()['rules']} 1 + + ${resp}= Delete Request Capif + ... /helper/visibility-control/rules/${rule_id} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + Length Should Be ${resp.json()['rules']} 0 + +Create Visibility Control Rule by Provider + [Tags] visibility_control_4 + + ${register_user_info}= Provider Default Registration + + ${body}= Create Visibility Control Rule Body + + ${resp}= Post Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + ... json=${body} + + diff --git a/tests/libraries/bodyRequests.py b/tests/libraries/bodyRequests.py index 450ca5ae..cc909bcd 100644 --- a/tests/libraries/bodyRequests.py +++ b/tests/libraries/bodyRequests.py @@ -7,3 +7,4 @@ from security_api.bodyRequests import * from api_provider_management.bodyRequests import * from vendor_extensibility.bodyRequests import * from vault_requests.bodyRequests import * +from helper_service.bodyRequests import * diff --git a/tests/libraries/helper_service/bodyRequests.py b/tests/libraries/helper_service/bodyRequests.py new file mode 100644 index 00000000..6f3cdc50 --- /dev/null +++ b/tests/libraries/helper_service/bodyRequests.py @@ -0,0 +1,28 @@ +def create_visibility_control_rule_body_invalid_dates(): + return { + "default_access": "ALLOW", + "enabled": True, + "startsAt": "2026-01-23T12:00:00Z", + "endsAt": "2025-01-23T08:00:00Z", + "providerSelector": { + "apiName": ["api-test-error"], + "createdByUser": "claudia" + } + } + + +def create_visibility_control_rule_body(): + return { + "default_access": "ALLOW", + "enabled": True, + "invokerExceptions": { + "apiInvokerId": ["invk-X77"] + }, + "providerSelector": { + "aefId": ["aef-002"], + "apiId": ["apiId-999"], + "apiName": ["api-test-cli"], + "apiProviderId": ["capif-prov-01"], + "createdByUser": "claudia" + } + } diff --git a/tests/resources/common/basicRequests.robot b/tests/resources/common/basicRequests.robot index b1b350e2..e02a9c93 100644 --- a/tests/resources/common/basicRequests.robot +++ b/tests/resources/common/basicRequests.robot @@ -970,7 +970,7 @@ Get Number Of Services Get Capif Ccf Id ${resp}= Get Request Capif - ... /helper/getCcfId + ... /helper/api/getCcfId ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${SUPERADMIN_USERNAME} -- GitLab From 28aa9989491382b2b47ad542de31e060ad34e379 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 3 Feb 2026 15:52:54 +0100 Subject: [PATCH 064/101] Minor fix nginx.conf and visibility tests --- services/nginx/nginx.conf | 2 +- .../features/Helper/visibility_control.robot | 27 +++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index 33260144..9fbe7031 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -14,7 +14,7 @@ http { } map "$request_method:$uri:$ssl_client_s_dn_cn" $helper_error_message { default 'SUCCESS'; - "~*(GET|DELETE|POST):.*:(?!(superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; + "~*(GET|DELETE|POST):.*:(?!(superadmin|AMF))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; } map "$request_method:$uri:$ssl_client_s_dn_cn" $invoker_error_message { default 'SUCCESS'; diff --git a/tests/features/Helper/visibility_control.robot b/tests/features/Helper/visibility_control.robot index 24e05e55..8253eafa 100644 --- a/tests/features/Helper/visibility_control.robot +++ b/tests/features/Helper/visibility_control.robot @@ -42,7 +42,7 @@ Create Visibility Control Rule Invalid Dates as Superadmin ... username=${SUPERADMIN_USERNAME} ... json=${body} - Status Should Be ${resp} 400 + Status Should Be 400 ${resp} Create Visibility Control Rule [Tags] visibility_control_3 @@ -79,9 +79,22 @@ Create Visibility Control Rule Length Should Be ${resp.json()['rules']} 0 -Create Visibility Control Rule by Provider +Get Visibility Control Rule by AMF Provider [Tags] visibility_control_4 + ${register_user_info}= Provider Default Registration + + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + + Status Should Be 200 ${resp} + +Create Visibility Control Rule by AMF Provider + [Tags] visibility_control_5 + ${register_user_info}= Provider Default Registration ${body}= Create Visibility Control Rule Body @@ -93,4 +106,14 @@ Create Visibility Control Rule by Provider ... username=${AMF_PROVIDER_USERNAME} ... json=${body} + Status Should Be 201 ${resp} + + ${rule_id}= Set Variable ${resp.json()['ruleId']} + + ${resp}= Delete Request Capif + ... /helper/visibility-control/rules/${rule_id} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + -- GitLab From 61041929c97d2d4472b0a3fa6392678d5db33c45 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 3 Feb 2026 16:26:30 +0100 Subject: [PATCH 065/101] Improvement of testing organization --- tests/features/Helper/Control Api/__init__.robot | 2 ++ .../features/Helper/{helper.robot => Control Api/api.robot} | 6 +++--- tests/features/Helper/Visibility Control Api/__init__.robot | 2 ++ .../{ => Visibility Control Api}/visibility_control.robot | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 tests/features/Helper/Control Api/__init__.robot rename tests/features/Helper/{helper.robot => Control Api/api.robot} (80%) create mode 100644 tests/features/Helper/Visibility Control Api/__init__.robot rename tests/features/Helper/{ => Visibility Control Api}/visibility_control.robot (95%) diff --git a/tests/features/Helper/Control Api/__init__.robot b/tests/features/Helper/Control Api/__init__.robot new file mode 100644 index 00000000..f9d8bb13 --- /dev/null +++ b/tests/features/Helper/Control Api/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Force Tags api \ No newline at end of file diff --git a/tests/features/Helper/helper.robot b/tests/features/Helper/Control Api/api.robot similarity index 80% rename from tests/features/Helper/helper.robot rename to tests/features/Helper/Control Api/api.robot index b9f8300d..cf7101c9 100644 --- a/tests/features/Helper/helper.robot +++ b/tests/features/Helper/Control Api/api.robot @@ -4,8 +4,8 @@ Library /opt/robot-tests/tests/libraries/bodyRequests.py Library XML Library String Resource /opt/robot-tests/tests/resources/common/basicRequests.robot -Resource ../../resources/common.resource -Resource ../../resources/common/basicRequests.robot +Resource /opt/robot-tests/tests/resources/common.resource +Resource /opt/robot-tests/tests/resources/common/basicRequests.robot Suite Teardown Reset Testing Environment Test Setup Reset Testing Environment @@ -20,7 +20,7 @@ ${SUBSCRIPTION_ID_NOT_VALID} not-valid *** Test Cases *** Obtain ccfId - [Tags] helper_1 smoke + [Tags] api_1 smoke ${ccfId}= Get Capif Ccf Id diff --git a/tests/features/Helper/Visibility Control Api/__init__.robot b/tests/features/Helper/Visibility Control Api/__init__.robot new file mode 100644 index 00000000..18227ad2 --- /dev/null +++ b/tests/features/Helper/Visibility Control Api/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Force Tags visibility_control \ No newline at end of file diff --git a/tests/features/Helper/visibility_control.robot b/tests/features/Helper/Visibility Control Api/visibility_control.robot similarity index 95% rename from tests/features/Helper/visibility_control.robot rename to tests/features/Helper/Visibility Control Api/visibility_control.robot index 8253eafa..bcf688c7 100644 --- a/tests/features/Helper/visibility_control.robot +++ b/tests/features/Helper/Visibility Control Api/visibility_control.robot @@ -4,8 +4,8 @@ Library /opt/robot-tests/tests/libraries/bodyRequests.py Library XML Library String Resource /opt/robot-tests/tests/resources/common/basicRequests.robot -Resource ../../resources/common.resource -Resource ../../resources/common/basicRequests.robot +Resource /opt/robot-tests/tests/resources/common.resource +Resource /opt/robot-tests/tests/resources/common/basicRequests.robot Suite Teardown Reset Testing Environment Test Setup Reset Testing Environment -- GitLab From 6876c74234175b3ea0c2a644473cbf731d712465 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Fri, 6 Feb 2026 11:28:51 +0100 Subject: [PATCH 066/101] Changed Helper and invoker management --- services/nginx/Dockerfile | 3 +++ services/nginx/endpoints/endpoints.conf | 9 +++++++++ services/nginx/maps/00-services.conf | 6 ++++++ services/nginx/maps/20-methods.conf | 8 ++++++++ services/nginx/maps/30-auth-type.conf | 9 +++++++++ services/nginx/maps/40-roles.conf | 9 +++++++++ services/nginx/maps/90-policy-dispatch.conf | 12 ++++++++++++ services/nginx/maps/95-auth-error.conf | 6 ++++++ services/nginx/maps/99-auth-decision.conf | 4 ++++ services/nginx/nginx.conf | 18 ++++++++++++++---- services/nginx/nginx_prepare.sh | 2 ++ services/nginx/policies/helper-mtls.conf | 4 ++++ services/nginx/policies/invoker-mtls.conf | 10 ++++++++++ services/nginx/policies/invoker-token.conf | 4 ++++ 14 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 services/nginx/endpoints/endpoints.conf create mode 100644 services/nginx/maps/00-services.conf create mode 100644 services/nginx/maps/20-methods.conf create mode 100644 services/nginx/maps/30-auth-type.conf create mode 100644 services/nginx/maps/40-roles.conf create mode 100644 services/nginx/maps/90-policy-dispatch.conf create mode 100644 services/nginx/maps/95-auth-error.conf create mode 100644 services/nginx/maps/99-auth-decision.conf create mode 100644 services/nginx/policies/helper-mtls.conf create mode 100644 services/nginx/policies/invoker-mtls.conf create mode 100644 services/nginx/policies/invoker-token.conf diff --git a/services/nginx/Dockerfile b/services/nginx/Dockerfile index b163386e..f8bb5356 100644 --- a/services/nginx/Dockerfile +++ b/services/nginx/Dockerfile @@ -9,6 +9,9 @@ RUN mkdir -p /etc/nginx/certs COPY ./certs/sign_req_body_tmp.json /etc/nginx/certs/sign_req_body_tmp.json COPY ./nginx.conf /etc/nginx/nginx.conf +COPY ./endpoints /etc/nginx/endpoints +COPY ./maps /etc/nginx/maps +COPY ./policies /etc/nginx/policies COPY ./nginx_prepare.sh . RUN chmod a+x nginx_prepare.sh diff --git a/services/nginx/endpoints/endpoints.conf b/services/nginx/endpoints/endpoints.conf new file mode 100644 index 00000000..a32e51d7 --- /dev/null +++ b/services/nginx/endpoints/endpoints.conf @@ -0,0 +1,9 @@ +map $uri $endpoint { + default "NO MATCH"; + + /api-invoker-management/v1/onboardedInvokers invoker_onboarding_exact; + + ~^/helper/ helper_base_tree; + ~^/api-invoker-management/v1/onboardedInvokers/ invoker_onboarding_tree; + +} diff --git a/services/nginx/maps/00-services.conf b/services/nginx/maps/00-services.conf new file mode 100644 index 00000000..0ae9d393 --- /dev/null +++ b/services/nginx/maps/00-services.conf @@ -0,0 +1,6 @@ +map $uri $service { + default ""; + ~^/helper(/|$) helper; + ~^/api-invoker-management(/|$) invoker-management; + +} diff --git a/services/nginx/maps/20-methods.conf b/services/nginx/maps/20-methods.conf new file mode 100644 index 00000000..2f3bd120 --- /dev/null +++ b/services/nginx/maps/20-methods.conf @@ -0,0 +1,8 @@ +map $request_method $method { + default OTHER; + GET GET; + POST POST; + PUT PUT; + DELETE DELETE; + PATCH PATCH; +} diff --git a/services/nginx/maps/30-auth-type.conf b/services/nginx/maps/30-auth-type.conf new file mode 100644 index 00000000..90309a9a --- /dev/null +++ b/services/nginx/maps/30-auth-type.conf @@ -0,0 +1,9 @@ +map $ssl_client_verify $has_cert { + default 0; + SUCCESS 1; +} + +map $http_authorization $has_token { + default 0; + ~^Bearer\s+.+ 1; +} diff --git a/services/nginx/maps/40-roles.conf b/services/nginx/maps/40-roles.conf new file mode 100644 index 00000000..7984b351 --- /dev/null +++ b/services/nginx/maps/40-roles.conf @@ -0,0 +1,9 @@ +map $ssl_client_s_dn_cn $role { + default unknown; + superadmin superadmin; + "~^INV[a-zA-Z0-9]+$" invoker; + "~^AMF[a-zA-Z0-9]+$" amf; + "~^APF[a-zA-Z0-9]+$" apf; + "~^AEF[a-zA-Z0-9]+$" aef; + "~^CCF[a-zA-Z0-9]+$" ccf; +} \ No newline at end of file diff --git a/services/nginx/maps/90-policy-dispatch.conf b/services/nginx/maps/90-policy-dispatch.conf new file mode 100644 index 00000000..99e5b141 --- /dev/null +++ b/services/nginx/maps/90-policy-dispatch.conf @@ -0,0 +1,12 @@ +map "$service:$has_token:$has_cert" $active_policy { + default DENY; + # Define policies for each service, based on the presence of a token and/or client certificate + # The format is: service_name:has_token:has_cert + + # Helper Service + helper:0:1 $helper_mtls_policy; + + # Api Invoker Management Service + invoker-management:1:0 $invoker_token_policy; + invoker-management:0:1 $invoker_mtls_policy; +} diff --git a/services/nginx/maps/95-auth-error.conf b/services/nginx/maps/95-auth-error.conf new file mode 100644 index 00000000..218a22d4 --- /dev/null +++ b/services/nginx/maps/95-auth-error.conf @@ -0,0 +1,6 @@ +map "$service:$endpoint:$method:$has_token:$has_cert:$role" $auth_error { + default '{"status":401,"title":"Unauthorized","detail":"Operation not allowed","cause":"Access denied by policy"}'; + ~^.*:.*:.*:0:0:.*$ '{"status":401, "title":"Unauthorized" ,"detail":"Certifcate not present", "cause":"Certificate is required for this API route"}'; + + ~^helper:.*:.*:0:1:(invoker|apf|aef|amf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; +} diff --git a/services/nginx/maps/99-auth-decision.conf b/services/nginx/maps/99-auth-decision.conf new file mode 100644 index 00000000..82aa8bf0 --- /dev/null +++ b/services/nginx/maps/99-auth-decision.conf @@ -0,0 +1,4 @@ +map $active_policy $auth_allowed { + default 0; + ALLOW 1; +} diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index dfea48b8..ea1c30cb 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -12,6 +12,13 @@ http { default ""; ~(^|,)CN=(?[^,]+) $CN; } + include maps/*.conf; + include policies/*.conf; + include endpoints/*.conf; + + log_format debug_map 'política: $uri - $endpoint:$method:$role / $helper_mtls_policy / $invoker_token_policy / $invoker_mtls_policy/ "$service:$has_token:$has_cert" / $active_policy /$auth_allowed // $ssl_client_s_dn_cn'; + + map "$request_method:$uri:$ssl_client_s_dn_cn" $helper_error_message { default 'SUCCESS'; "~*(GET|DELETE):.*:(?!(superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; @@ -72,14 +79,17 @@ http { ssl_verify_depth 2; ssl_session_tickets off; + # (ONLY DEVELOPMENT)Send the log directly to the console (useful in Docker or terminal) + access_log /dev/stdout debug_map; + location / { proxy_pass $scheme://$http_host/api-invoker-management/v1/ui/; } location /api-invoker-management { - if ( $invoker_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $invoker_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://api-invoker-management:8080; @@ -173,9 +183,9 @@ http { } location /helper { - if ( $helper_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $helper_error_message; + return 401 $auth_error; } proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/services/nginx/nginx_prepare.sh b/services/nginx/nginx_prepare.sh index 91884863..5d2179e9 100644 --- a/services/nginx/nginx_prepare.sh +++ b/services/nginx/nginx_prepare.sh @@ -126,6 +126,8 @@ case "$LOG_LEVEL" in ;; esac +echo "Using log level: $LOG_LEVEL" envsubst '$LOG_LEVEL' < /etc/nginx/nginx.conf > /etc/nginx/nginx.conf.tmp mv /etc/nginx/nginx.conf.tmp /etc/nginx/nginx.conf +echo "Saving nginx configuration with log level: $LOG_LEVEL" nginx diff --git a/services/nginx/policies/helper-mtls.conf b/services/nginx/policies/helper-mtls.conf new file mode 100644 index 00000000..5f50229a --- /dev/null +++ b/services/nginx/policies/helper-mtls.conf @@ -0,0 +1,4 @@ +map "$endpoint:$method:$role" $helper_mtls_policy { + default "DENY"; + "~^helper_base_tree:.*:superadmin$" "ALLOW"; +} diff --git a/services/nginx/policies/invoker-mtls.conf b/services/nginx/policies/invoker-mtls.conf new file mode 100644 index 00000000..1d559d88 --- /dev/null +++ b/services/nginx/policies/invoker-mtls.conf @@ -0,0 +1,10 @@ +map "$endpoint:$method:$role" $invoker_mtls_policy { + default DENY; + # Invoker policies that use mTLS for authentication + "~^invoker_onboarding_tree:.*:superadmin$" ALLOW; + invoker_onboarding_tree:PUT:invoker ALLOW; + invoker_onboarding_tree:DELETE:invoker ALLOW; + invoker_onboarding_tree:PATCH:invoker ALLOW; + +} + diff --git a/services/nginx/policies/invoker-token.conf b/services/nginx/policies/invoker-token.conf new file mode 100644 index 00000000..8f385e02 --- /dev/null +++ b/services/nginx/policies/invoker-token.conf @@ -0,0 +1,4 @@ +map "$endpoint:$method" $invoker_token_policy { + default DENY; + invoker_onboarding_exact:POST ALLOW; +} -- GitLab From 15acbb53d88f1b8aafbbd3ba6df09042722b2b82 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Fri, 6 Feb 2026 14:33:13 +0100 Subject: [PATCH 067/101] added helper, invoker, provider, published, discover, auditin, login events, events, acl --- services/nginx/endpoints/endpoints.conf | 37 +++++++++++-- services/nginx/maps/00-services.conf | 9 +++- services/nginx/maps/90-policy-dispatch.conf | 22 ++++++++ services/nginx/maps/95-auth-error.conf | 15 +++++- services/nginx/nginx.conf | 57 +++++++-------------- services/nginx/policies/auditing-mtls.conf | 6 +++ services/nginx/policies/discover-mtls.conf | 6 +++ services/nginx/policies/helper-mtls.conf | 2 +- services/nginx/policies/invoker-mtls.conf | 7 +-- services/nginx/policies/logging-mtls.conf | 6 +++ services/nginx/policies/provider-mtls.conf | 7 +++ services/nginx/policies/provider-token.conf | 4 ++ services/nginx/policies/publish-mtls.conf | 6 +++ services/nginx/policies/security-mtls.conf | 14 +++++ 14 files changed, 148 insertions(+), 50 deletions(-) create mode 100644 services/nginx/policies/auditing-mtls.conf create mode 100644 services/nginx/policies/discover-mtls.conf create mode 100644 services/nginx/policies/logging-mtls.conf create mode 100644 services/nginx/policies/provider-mtls.conf create mode 100644 services/nginx/policies/provider-token.conf create mode 100644 services/nginx/policies/publish-mtls.conf create mode 100644 services/nginx/policies/security-mtls.conf diff --git a/services/nginx/endpoints/endpoints.conf b/services/nginx/endpoints/endpoints.conf index a32e51d7..76448f7e 100644 --- a/services/nginx/endpoints/endpoints.conf +++ b/services/nginx/endpoints/endpoints.conf @@ -1,9 +1,40 @@ map $uri $endpoint { default "NO MATCH"; - /api-invoker-management/v1/onboardedInvokers invoker_onboarding_exact; + # Exact matches for endpoints that require specific handling (Must be on top of the regex matches) + /api-invoker-management/v1/onboardedInvokers invoker_onboarding_exact; + /api-provider-management/v1/registrations provider_registrations_exact; + /service-apis/v1/allServiceAPIs discover_service_exact; + + # Regex matches for endpoints that can be grouped by common patterns + # Helper related endpoints + ~^/helper/ helper_base_tree; + + # Invoker management related endpoints + ~^/api-invoker-management/v1/onboardedInvokers/ invoker_onboarding_tree; + + # Provider management related endpoints + ~^/api-provider-management/v1/registrations/ provider_registrations_tree; - ~^/helper/ helper_base_tree; - ~^/api-invoker-management/v1/onboardedInvokers/ invoker_onboarding_tree; + # Published APIs related endpoints + ~^/published-apis/v1/ published_apis_tree; + + # Logging related endpoints + ~^/api-invocation-logs/v1/ logging_tree; + + # Auditing related endpoints + ~^/logs/v1/ auditing_tree; + + # Security related endpoints + ~^/capif-security/v1/trustedInvokers/.+/update security_update; + ~^/capif-security/v1/trustedInvokers/.+/delete security_delete; + ~^/capif-security/v1/trustedInvokers/.+ security_trusted_invokers_exact; + ~^/capif-security/v1/securities/.+/token security_token; + ~^/capif-security/v1/ security_tree; + + # Events related endpoints + ~^/capif-events/v1/ events_tree; + # Access control policy related endpoints + ~^/access-control-policy/v1/ acl_tree; } diff --git a/services/nginx/maps/00-services.conf b/services/nginx/maps/00-services.conf index 0ae9d393..44ec4730 100644 --- a/services/nginx/maps/00-services.conf +++ b/services/nginx/maps/00-services.conf @@ -2,5 +2,12 @@ map $uri $service { default ""; ~^/helper(/|$) helper; ~^/api-invoker-management(/|$) invoker-management; - + ~^/api-provider-management(/|$) provider-management; + ~^/service-apis(/|$) discover-service; + ~^/published-apis(/|$) publish-service; + ~^/api-invocation-logs(/|$) logging-service; + ~^/logs(/|$) auditing-service; + ~^/capif-security(/|$) security-service; + ~^/capif-events(/|$) events-service; + ~^/access-control-policy(/|$) access-control-policy; } diff --git a/services/nginx/maps/90-policy-dispatch.conf b/services/nginx/maps/90-policy-dispatch.conf index 99e5b141..4ff4bab7 100644 --- a/services/nginx/maps/90-policy-dispatch.conf +++ b/services/nginx/maps/90-policy-dispatch.conf @@ -9,4 +9,26 @@ map "$service:$has_token:$has_cert" $active_policy { # Api Invoker Management Service invoker-management:1:0 $invoker_token_policy; invoker-management:0:1 $invoker_mtls_policy; + + # Api Provider Management Service + provider-management:1:0 $provider_token_policy; + provider-management:0:1 $provider_mtls_policy; + + # Discover Service + discover-service:0:1 $discover_service_mtls_policy; + + # Published APIs Service + publish-service:0:1 $publish_service_mtls_policy; + + # Logging Service + logging-service:0:1 $logging_service_mtls_policy; + + # Auditing Service + auditing-service:0:1 $auditing_service_mtls_policy; + + # Security Service + security-service:0:1 $security_service_mtls_policy; + + + } diff --git a/services/nginx/maps/95-auth-error.conf b/services/nginx/maps/95-auth-error.conf index 218a22d4..5862f05d 100644 --- a/services/nginx/maps/95-auth-error.conf +++ b/services/nginx/maps/95-auth-error.conf @@ -1,6 +1,19 @@ map "$service:$endpoint:$method:$has_token:$has_cert:$role" $auth_error { default '{"status":401,"title":"Unauthorized","detail":"Operation not allowed","cause":"Access denied by policy"}'; ~^.*:.*:.*:0:0:.*$ '{"status":401, "title":"Unauthorized" ,"detail":"Certifcate not present", "cause":"Certificate is required for this API route"}'; - ~^helper:.*:.*:0:1:(invoker|apf|aef|amf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; + ~^invoker-management:.*:.*:0:1:(amf|apf|aef|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; + ~^provider-management:.*:.*:0:1:(invoker|apf|aef|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be amf"}'; + ~^discover-service:.*:.*:0:1:(amf|apf|aef)$ '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; + ~^publish-service:.*:.*:0:1:(invoker|amf|aef)$ '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; + + ~^security-service:security_trusted_invokers_exact:GET:0:1:(invoker|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; + ~^security-service:security_trusted_invokers_exact:DELETE:0:1:(invoker|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; + ~^security-service:security_trusted_invokers_exact:PUT:0:1:(aef|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; + ~^security-service:security_update:POST:0:1:(aef|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; + ~^security-service:security_delete:POST:0:1:(invoker|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; + ~^security-service:security_token:POST:0:1:(aef|amf|apf|ccf)$ '{"error":"unauthorized_client", "error_description":"Role not authorized for this API route"}'; + + + } diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index ea1c30cb..b85182a5 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -18,40 +18,11 @@ http { log_format debug_map 'política: $uri - $endpoint:$method:$role / $helper_mtls_policy / $invoker_token_policy / $invoker_mtls_policy/ "$service:$has_token:$has_cert" / $active_policy /$auth_allowed // $ssl_client_s_dn_cn'; - - map "$request_method:$uri:$ssl_client_s_dn_cn" $helper_error_message { - default 'SUCCESS'; - "~*(GET|DELETE):.*:(?!(superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $invoker_error_message { - default 'SUCCESS'; - "~*(PUT|DELETE):.*:(?!(INV|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $provider_error_message { - default 'SUCCESS'; - "~*(PUT|DELETE|PATCH):.*:(?!(AMF|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be amf"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $publish_error_message { - default 'SUCCESS'; - "~*.*:.*:(?!(APF|ccf|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; - } map "$request_method:$uri:$ssl_client_s_dn_cn" $acl_error_message { default 'SUCCESS'; "~*.*:.*:(?!(AEF|ccf|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"Certificate not authorized"}'; } - map "$request_method:$uri:$ssl_client_s_dn_cn" $discover_error_message { - default 'SUCCESS'; - "~*.*:.*:(?!(INV|ccf|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $security_error_message { - default 'SUCCESS'; - "~*DELETE:.*:(?!(AEF|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; - "~*PUT:.*:(?!(INV|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; - "~*GET:.*:(?!(AEF|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; - "~*POST:.*/update:(?!(INV|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; - "~*POST:.*/delete:(?!(AEF|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; - "~*POST:.*/token:(?!(INV|superadmin))(.*)" '{"error":"unauthorized_client", "error_description":"Role not authorized for this API route"}'; - } + map "$request_method:$uri:$ssl_client_s_dn_cn" $events_error_message { default 'SUCCESS'; "~*.*:.*:ccf" '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; @@ -96,9 +67,9 @@ http { } location /api-provider-management { - if ( $provider_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $provider_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://api-provider-management:8080; @@ -108,9 +79,9 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } - if ( $discover_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $discover_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://service-apis:8080; @@ -120,9 +91,9 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } - if ( $publish_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $publish_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://published-apis:8080; @@ -132,6 +103,10 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } + if ($auth_allowed = 0) { + add_header Content-Type 'application/problem+json'; + return 401 $auth_error; + } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://api-invocation-logs:8080; } @@ -140,6 +115,10 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } + if ($auth_allowed = 0) { + add_header Content-Type 'application/problem+json'; + return 401 $auth_error; + } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://logs:8080; } @@ -148,9 +127,9 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } - if ( $security_error_message != SUCCESS ) { - add_header Content-Type 'application/problem+json'; - return 401 $security_error_message; + if ($auth_allowed = 0) { + add_header Content-Type 'application/problem+json'; + return 401 $auth_error; } proxy_set_header X-TLS-Protocol $ssl_protocol; diff --git a/services/nginx/policies/auditing-mtls.conf b/services/nginx/policies/auditing-mtls.conf new file mode 100644 index 00000000..3c1379fa --- /dev/null +++ b/services/nginx/policies/auditing-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $auditing_service_mtls_policy { + default DENY; + # Auditing policies that use mTLS for authentication + ~^auditing_tree:(GET):(amf|superadmin)$ ALLOW; +} + diff --git a/services/nginx/policies/discover-mtls.conf b/services/nginx/policies/discover-mtls.conf new file mode 100644 index 00000000..ba07065a --- /dev/null +++ b/services/nginx/policies/discover-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $discover_service_mtls_policy { + default DENY; + # Discover policies that use mTLS for authentication + ~^discover_service_exact:GET:(invoker|ccf|superadmin)$ ALLOW; +} + diff --git a/services/nginx/policies/helper-mtls.conf b/services/nginx/policies/helper-mtls.conf index 5f50229a..22f87ca9 100644 --- a/services/nginx/policies/helper-mtls.conf +++ b/services/nginx/policies/helper-mtls.conf @@ -1,4 +1,4 @@ map "$endpoint:$method:$role" $helper_mtls_policy { default "DENY"; - "~^helper_base_tree:.*:superadmin$" "ALLOW"; + ~^helper_base_tree:.*:superadmin$ ALLOW; } diff --git a/services/nginx/policies/invoker-mtls.conf b/services/nginx/policies/invoker-mtls.conf index 1d559d88..ccd479a6 100644 --- a/services/nginx/policies/invoker-mtls.conf +++ b/services/nginx/policies/invoker-mtls.conf @@ -1,10 +1,7 @@ map "$endpoint:$method:$role" $invoker_mtls_policy { default DENY; # Invoker policies that use mTLS for authentication - "~^invoker_onboarding_tree:.*:superadmin$" ALLOW; - invoker_onboarding_tree:PUT:invoker ALLOW; - invoker_onboarding_tree:DELETE:invoker ALLOW; - invoker_onboarding_tree:PATCH:invoker ALLOW; - + ~^invoker_onboarding_tree:(PUT|DELETE|PATCH):superadmin$ ALLOW; + ~^invoker_onboarding_tree:(PUT|DELETE|PATCH):invoker$ ALLOW; } diff --git a/services/nginx/policies/logging-mtls.conf b/services/nginx/policies/logging-mtls.conf new file mode 100644 index 00000000..dc66bb49 --- /dev/null +++ b/services/nginx/policies/logging-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $logging_service_mtls_policy { + default DENY; + # Logging policies that use mTLS for authentication + ~^logging_tree:POST:(aef|superadmin)$ ALLOW; +} + diff --git a/services/nginx/policies/provider-mtls.conf b/services/nginx/policies/provider-mtls.conf new file mode 100644 index 00000000..d8db996e --- /dev/null +++ b/services/nginx/policies/provider-mtls.conf @@ -0,0 +1,7 @@ +map "$endpoint:$method:$role" $provider_mtls_policy { + default DENY; + #Provider policies that use mTLS for authentication + ~^provider_registrations_tree:(PUT|DELETE|PATCH):superadmin$ ALLOW; + ~^provider_registrations_tree:(PUT|DELETE|PATCH):amf$ ALLOW; +} + diff --git a/services/nginx/policies/provider-token.conf b/services/nginx/policies/provider-token.conf new file mode 100644 index 00000000..3dac3cf3 --- /dev/null +++ b/services/nginx/policies/provider-token.conf @@ -0,0 +1,4 @@ +map "$endpoint:$method" $provider_token_policy { + default DENY; + provider_registrations_exact:POST ALLOW; +} diff --git a/services/nginx/policies/publish-mtls.conf b/services/nginx/policies/publish-mtls.conf new file mode 100644 index 00000000..368089f7 --- /dev/null +++ b/services/nginx/policies/publish-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $publish_service_mtls_policy { + default DENY; + #Publish policies that use mTLS for authentication + ~^published_apis_tree:(GET|POST|PUT|DELETE|PATCH):(apf|superadmin|ccf)$ ALLOW; +} + diff --git a/services/nginx/policies/security-mtls.conf b/services/nginx/policies/security-mtls.conf new file mode 100644 index 00000000..f1879835 --- /dev/null +++ b/services/nginx/policies/security-mtls.conf @@ -0,0 +1,14 @@ +map "$endpoint:$method:$role" $security_service_mtls_policy { + default DENY; + # Security policies that use mTLS for authentication + security_trusted_invokers_exact:DELETE:aef ALLOW; + security_trusted_invokers_exact:PUT:invoker ALLOW; + security_trusted_invokers_exact:GET:aef ALLOW; + security_update:POST:invoker ALLOW; + security_delete:POST:aef ALLOW; + security_token:POST:invoker ALLOW; + + ~^.*:.*:superadmin$ ALLOW; + +} + -- GitLab From 355921f1dcd037a5e9fd999e3c9128075634b688 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 9 Feb 2026 10:43:15 +0100 Subject: [PATCH 068/101] Added other services to nginx --- services/nginx/maps/90-policy-dispatch.conf | 4 ++++ services/nginx/maps/95-auth-error.conf | 6 +++--- services/nginx/nginx.conf | 18 ++++-------------- services/nginx/policies/acl-mtls.conf | 7 +++++++ services/nginx/policies/events-mtls.conf | 6 ++++++ 5 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 services/nginx/policies/acl-mtls.conf create mode 100644 services/nginx/policies/events-mtls.conf diff --git a/services/nginx/maps/90-policy-dispatch.conf b/services/nginx/maps/90-policy-dispatch.conf index 4ff4bab7..6c856570 100644 --- a/services/nginx/maps/90-policy-dispatch.conf +++ b/services/nginx/maps/90-policy-dispatch.conf @@ -29,6 +29,10 @@ map "$service:$has_token:$has_cert" $active_policy { # Security Service security-service:0:1 $security_service_mtls_policy; + # Events Service + events-service:0:1 $events_service_mtls_policy; + # Access Control Policy Service + access-control-policy:0:1 $access_control_policy_mtls_policy; } diff --git a/services/nginx/maps/95-auth-error.conf b/services/nginx/maps/95-auth-error.conf index 5862f05d..f3e63ce0 100644 --- a/services/nginx/maps/95-auth-error.conf +++ b/services/nginx/maps/95-auth-error.conf @@ -6,14 +6,14 @@ map "$service:$endpoint:$method:$has_token:$has_cert:$role" $auth_error { ~^provider-management:.*:.*:0:1:(invoker|apf|aef|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be amf"}'; ~^discover-service:.*:.*:0:1:(amf|apf|aef)$ '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; ~^publish-service:.*:.*:0:1:(invoker|amf|aef)$ '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; - + ~^events-service:.*:.*:0:1:(ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; + ~^access-control-policy:.*:.*:0:1:(amf|apf|invoker)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"Certificate not authorized"}'; + ~^security-service:security_trusted_invokers_exact:GET:0:1:(invoker|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; ~^security-service:security_trusted_invokers_exact:DELETE:0:1:(invoker|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; ~^security-service:security_trusted_invokers_exact:PUT:0:1:(aef|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; ~^security-service:security_update:POST:0:1:(aef|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; ~^security-service:security_delete:POST:0:1:(invoker|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; ~^security-service:security_token:POST:0:1:(aef|amf|apf|ccf)$ '{"error":"unauthorized_client", "error_description":"Role not authorized for this API route"}'; - - } diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index b85182a5..aa12111f 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -18,16 +18,6 @@ http { log_format debug_map 'política: $uri - $endpoint:$method:$role / $helper_mtls_policy / $invoker_token_policy / $invoker_mtls_policy/ "$service:$has_token:$has_cert" / $active_policy /$auth_allowed // $ssl_client_s_dn_cn'; - map "$request_method:$uri:$ssl_client_s_dn_cn" $acl_error_message { - default 'SUCCESS'; - "~*.*:.*:(?!(AEF|ccf|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"Certificate not authorized"}'; - } - - map "$request_method:$uri:$ssl_client_s_dn_cn" $events_error_message { - default 'SUCCESS'; - "~*.*:.*:ccf" '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; - } - server { listen 8080; @@ -144,18 +134,18 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } - if ( $events_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $events_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://capif-events:8080; } location /access-control-policy { - if ( $acl_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $acl_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://access-control-policy:8080; diff --git a/services/nginx/policies/acl-mtls.conf b/services/nginx/policies/acl-mtls.conf new file mode 100644 index 00000000..67d8a4a5 --- /dev/null +++ b/services/nginx/policies/acl-mtls.conf @@ -0,0 +1,7 @@ +map "$endpoint:$method:$role" $access_control_policy_mtls_policy { + default DENY; + # Security policies that use mTLS for authentication + ~^acl_tree:GET:(aef|superadmin)$ ALLOW; + +} + diff --git a/services/nginx/policies/events-mtls.conf b/services/nginx/policies/events-mtls.conf new file mode 100644 index 00000000..2000826a --- /dev/null +++ b/services/nginx/policies/events-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $events_service_mtls_policy { + default DENY; + #Publish policies that use mTLS for authentication + ~^events_tree:(POST|DELETE|PUT|PATCH):(amf|apf|aef|invoker|superadmin)$ ALLOW; +} + -- GitLab From 13937cc83d0ff7f9ffda8fa51fc2b8dc6489b6fd Mon Sep 17 00:00:00 2001 From: Afonso Castanheta Date: Mon, 9 Feb 2026 10:39:10 +0000 Subject: [PATCH 069/101] update requirements.txt to fix urllib3 version and adjust dependencies --- .../requirements.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt index e11792bf..feb93b7f 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt @@ -1,25 +1,26 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 80.9.0 +urllib3 >= 2.6.0 +setuptools == 74.0.0 Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 flask_jwt_extended == 4.6.0 -cryptography == 46.0.1 +cryptography == 43.0.1 rfc3987 == 1.3.8 opentelemetry-instrumentation == 0.41b0 opentelemetry-instrumentation-flask == 0.41b0 opentelemetry-instrumentation-redis == 0.41b0 opentelemetry-instrumentation-pymongo == 0.41b0 opentelemetry-exporter-otlp == 1.20.0 -opentelemetry-exporter-jaeger == 1.21.0 +opentelemetry-exporter-jaeger == 1.20.0 fluent == 0.10.0 fluent-logger == 0.10.0 opentelemetry-api == 1.20.0 opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 Flask-APScheduler == 1.13.1 -werkzeug == 3.1.3 +werkzeug == 3.0.6 gunicorn == 23.0.0 packaging == 24.0 \ No newline at end of file -- GitLab From 46699bd8e4ef622c3f448c366be1943b1de8d7af Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Mon, 9 Feb 2026 18:01:21 +0100 Subject: [PATCH 070/101] improving visibility control logic (authorization) and adding new tests --- .gitignore | 6 +- .../openapi_helper_visibility_control.yaml | 6 +- .../services/visibility_control/auth.py | 27 -- .../core/visibility_control_core.py | 284 ++++++++++++++---- .../visibility_control/openapi/openapi.yaml | 20 +- .../visibility_control.robot | 73 ++++- .../libraries/helper_service/bodyRequests.py | 4 +- 7 files changed, 320 insertions(+), 100 deletions(-) diff --git a/.gitignore b/.gitignore index ddc84e3d..c7737031 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,8 @@ results helm/capif/*.lock helm/capif/charts/tempo* -*.bak \ No newline at end of file +*.bakresults/ +.venv/ +tests/features/Helper/Visibility Control Api/*.html +tests/features/Helper/Visibility Control Api/*.xml +*.bak diff --git a/services/helper/helper_service/openapi_helper_visibility_control.yaml b/services/helper/helper_service/openapi_helper_visibility_control.yaml index 4d386230..fc4817e7 100644 --- a/services/helper/helper_service/openapi_helper_visibility_control.yaml +++ b/services/helper/helper_service/openapi_helper_visibility_control.yaml @@ -55,7 +55,7 @@ paths: allow_except_some_invokers: value: providerSelector: - createdByUser: "userA" + userName: "userA" apiProviderId: [ "capif-prov-01", "capif-prov-02" ] apiName: [ "apiName-001" ] apiId: [ "apiId-001" ] @@ -293,9 +293,9 @@ components: Provider-side selector. Arrays apply OR within the field; AND across fields. At least one of these fields must be present. required: - - createdByUser + - userName properties: - createdByUser: + userName: type: string minLength: 1 apiProviderId: diff --git a/services/helper/helper_service/services/visibility_control/auth.py b/services/helper/helper_service/services/visibility_control/auth.py index 20fcf423..de01e3c0 100644 --- a/services/helper/helper_service/services/visibility_control/auth.py +++ b/services/helper/helper_service/services/visibility_control/auth.py @@ -34,30 +34,3 @@ def cert_validation(): return __cert_validation return _cert_validation -# def cert_validation(): -# def _cert_validation(f): -# @wraps(f) -# def __cert_validation(*args, **kwargs): -# # 1. Validación de existencia de certificado (Literal del ejemplo) -# cert_tmp = request.headers['X-Ssl-Client-Cert'] - -# cert_raw = cert_tmp.replace('\\t', '') -# cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) -# cn = cert.subject.get_attributes_for_oid(x509.OID_COMMON_NAME)[0].value.strip() - -# # Guardamos para que el Core los vea -# request.user_cn = cn -# request.cert_signature = cert.signature.hex() - -# if cn != "superadmin": -# cert_signature = cert.signature.hex() -# # Aquí, si hay un ID en la URL (como rule_id), podríamos validar. -# # Pero para el POST, como el ID está en el cuerpo, -# # simplemente dejamos que el Core lo gestione para no romper el wrap. - -# # Si quieres que el wrap sea universal, lo dejamos pasar tras validar el CN -# pass - -# return f(**kwargs) -# return __cert_validation -# return _cert_validation \ No newline at end of file diff --git a/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py index 894eb1d1..14ad7a09 100644 --- a/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py +++ b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py @@ -8,23 +8,63 @@ from visibility_control.core.validate_user import ControlAccess valid_user = ControlAccess() +# def get_all_rules(): +# db = get_mongo() +# # Usamos la colección configurada en el helper +# col = db.get_col_by_name("visibility_rules") +# rules = list(col.find({}, {"_id": 0})) +# return {"rules": rules}, 200 + +# def get_all_rules(): +# """ +# Retrieve visibility rules. +# - If superadmin: Returns all rules without filtering. +# - If provider: Returns only rules matching the certificate identity (CN). +# """ +# db = get_mongo() +# col = db.get_col_by_name("visibility_rules") + +# # Safely retrieve identity from request object +# cn = request.user_cn + +# # Professional logic tree: +# # 1. Bypass security filters for Superadmin +# if cn != "superadmin": +# rules = list(col.find({"userName": cn}, {"_id": 0})) +# return {"rules": rules}, 200 + +# rules = list(col.find({}, {"_id": 0})) +# return {"rules": rules}, 200 + def get_all_rules(): db = get_mongo() - # Usamos la colección configurada en el helper col = db.get_col_by_name("visibility_rules") - rules = list(col.find({}, {"_id": 0})) - return {"rules": rules}, 200 + + # The ID from the certificate (e.g., AMFe9d24...) + cn = getattr(request, 'user_cn', None) -# def create_new_rule(body): -# db = get_mongo() -# col = db.get_col_by_name("visibility_rules") + # 1. Superadmin: No filters, returns everything + if cn != "superadmin": + # We look into CAPIF's provider registration to find the friendly name + # assigned to this specific Certificate ID (CN) + prov_col = db.get_col_by_name("provider_details") + provider = prov_col.find_one({"apiProvFuncs.apiProvFuncId": cn}) + + friendly_name = provider.get('userName') if provider else None + + # The query uses an $or operator to ensure visibility: + # - Rules where I am the owner (friendly_name) + # - Rules I created or updated myself (cn) + query_conditions = [{"updatedBy": cn}] + if friendly_name: + query_conditions.append({"providerSelector.userName": friendly_name}) + + rules = list(col.find({"$or": query_conditions}, {"_id": 0})) + return {"rules": rules}, 200 -# # Generamos el ruleId (Server generates it, según tu comentario) -# body['ruleId'] = str(uuid.uuid4()) + rules = list(col.find({}, {"_id": 0})) + return {"rules": rules}, 200 -# col.insert_one(body) -# body.pop('_id', None) -# return body, 201 def create_new_rule(body): db = get_mongo() @@ -40,20 +80,20 @@ def create_new_rule(body): # We check apiProviderId if it exists, but we focus on the mandatory identity api_id = ps.get('apiProviderId', [None])[0] - created_by = ps.get('createdByUser') + user_name = ps.get('userName') # Use the available ID to validate ownership via certificate signature - # We prioritize apiProviderId, then createdByUser as fallback for validation - user_to_validate = api_id if api_id else created_by + # We prioritize apiProviderId, then userName as fallback for validation + user_to_validate = api_id if api_id else user_name if user_to_validate: result = valid_user.validate_user_cert(user_to_validate, cert_sig) if result is not None: return result else: - # If even createdByUser is missing (despite being mandatory in your logic), + # If even userName is missing (despite being mandatory in your logic), # we block it or handle it as a Bad Request - return {"title": "Bad Request", "detail": "createdByUser is mandatory"}, 400 + return {"title": "Bad Request", "detail": "userName is mandatory"}, 400 # 1. Generate a unique ruleId body['ruleId'] = str(uuid.uuid4()) @@ -95,11 +135,8 @@ def create_new_rule(body): "title": "Bad Request", "detail": "Invalid endsAt format." }, 400 - - # 6. Set 'updatedBy' metadata from providerSelector - # ps = body.get('providerSelector', {}) - # body['updatedBy'] = ps.get('createdByUser', 'system') - # This prevents a user from putting "User_A" in the JSON while using "User_B" certificate + + body['createdBy'] = cn body['updatedBy'] = cn # Save to MongoDB @@ -111,69 +148,214 @@ def create_new_rule(body): return body, 201 def get_rule_by_id(rule_id): + """ + Retrieve a specific visibility rule by its ID. + - Superadmin: Can view any rule. + - Providers: Can view rules they own (userName) or created (updatedBy). + """ db = get_mongo() col = db.get_col_by_name("visibility_rules") + cn = request.user_cn + + # 1. Fetch the rule from the database + # We exclude the MongoDB internal _id field immediately rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) - # if rule: - # return rule, 200 - # return {"title": "Not Found", "detail": "Rule not found"}, 404 + if not rule: return {"title": "Not Found", "detail": "Rule not found"}, 404 - # SECURITY CHECK: Only Superadmin or the actual owner (CN) can view - if request.user_cn != "superadmin" and rule.get('updatedBy') != request.user_cn: - return {"title": "Unauthorized", "detail": "You do not have permission to view this rule"}, 401 + # 2. Authorization Check: Superadmin bypass + if cn == "superadmin": + return rule, 200 + + # 3. Identity Translation for Providers + # Link the certificate CN to the registered Friendly Username + prov_col = db.get_col_by_name("provider_details") + provider = prov_col.find_one({"apiProvFuncs.apiProvFuncId": cn}) + friendly_name = provider.get('userName') if provider else None + + # 4. Permission Validation + # is_owner: Checks the logical owner in the rule (userName) + # is_creator: Checks the cryptographic signer (updatedBy) + is_owner = rule.get('providerSelector', {}).get('userName') == friendly_name + is_creator = rule.get('updatedBy') == cn + + if is_owner or is_creator: + return rule, 200 + + # 5. Deny access if the requester is neither the owner nor the creator + return { + "title": "Unauthorized", + "detail": "You do not have permission to view this rule" + }, 401 + +# def get_rule_by_id(rule_id): +# db = get_mongo() +# col = db.get_col_by_name("visibility_rules") +# cn = request.user_cn +# rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) +# # if rule: +# # return rule, 200 +# # return {"title": "Not Found", "detail": "Rule not found"}, 404 +# if not rule: +# return {"title": "Not Found", "detail": "Rule not found"}, 404 + +# # SECURITY CHECK: Only Superadmin or the actual owner (CN) can view +# if request.user_cn != "superadmin" and rule.get('updatedBy') != request.user_cn: +# return {"title": "Unauthorized", "detail": "You do not have permission to view this rule"}, 401 - rule.pop('_id', None) - return rule, 200 +# rule.pop('_id', None) +# return rule, 200 + +# def delete_rule_by_id(rule_id): +# db = get_mongo() +# col = db.get_col_by_name("visibility_rules") +# cn = request.user_cn +# # 1. Fetch the rule first to check ownership +# rule = col.find_one({"ruleId": rule_id}) +# if not rule: +# return {"title": "Not Found", "detail": "Rule not found"}, 404 + +# # 2. SECURITY CHECK: Only Superadmin or the actual owner (CN) can delete +# # We compare the current certificate CN against the stored 'updatedBy' +# if request.user_cn != "superadmin" and rule.get('userName') != request.user_cn: +# return {"title": "Unauthorized", "detail": "You do not have permission to delete this rule"}, 401 + +# # 3. Perform the actual deletion +# res = col.delete_one({"ruleId": rule_id}) + +# # 4. Final check on the operation result +# if res.deleted_count > 0: +# return None, 204 + +# return {"title": "Not Found", "detail": "Rule not found"}, 404 def delete_rule_by_id(rule_id): + """ + Delete a specific visibility rule after verifying ownership. + - Superadmin: Can delete any rule. + - Providers: Can only delete rules assigned to them or created by them. + """ db = get_mongo() col = db.get_col_by_name("visibility_rules") - # 1. Fetch the rule first to check ownership + cn = request.user_cn + + # 1. Retrieve the rule to check metadata rule = col.find_one({"ruleId": rule_id}) if not rule: return {"title": "Not Found", "detail": "Rule not found"}, 404 - # 2. SECURITY CHECK: Only Superadmin or the actual owner (CN) can delete - # We compare the current certificate CN against the stored 'updatedBy' - if request.user_cn != "superadmin" and rule.get('updatedBy') != request.user_cn: - return {"title": "Unauthorized", "detail": "You do not have permission to delete this rule"}, 401 + # 2. Authorization Check: Superadmin bypass + if cn == "superadmin": + col.delete_one({"ruleId": rule_id}) + return None, 204 + + # 3. Identity Translation for Providers + # Resolve the certificate ID to the registered friendly username + prov_col = db.get_col_by_name("provider_details") + provider = prov_col.find_one({"apiProvFuncs.apiProvFuncId": cn}) + friendly_name = provider.get('userName') if provider else None + + # 4. Permissions Validation + # is_owner: Checks if the rule's userName matches the provider's registered name. + # is_creator: Checks if the rule was signed by the current certificate ID. + is_owner = rule.get('providerSelector', {}).get('userName') == friendly_name + is_creator = rule.get('updatedBy') == cn - # 3. Perform the actual deletion - res = col.delete_one({"ruleId": rule_id}) + if is_owner or is_creator: + res = col.delete_one({"ruleId": rule_id}) + if res.deleted_count > 0: + return None, 204 - # 4. Final check on the operation result - if res.deleted_count > 0: - return None, 204 - - return {"title": "Not Found", "detail": "Rule not found"}, 404 + # 5. Deny access if no ownership is proven + return { + "title": "Unauthorized", + "detail": "You do not have permission to delete this rule" + }, 401 # def update_rule_patch(rule_id, body): # db = get_mongo() # col = db.get_col_by_name("visibility_rules") +# cn = request.user_cn +# # Fetch existing rule for comparison +# existing_rule = col.find_one({"ruleId": rule_id}) +# if not existing_rule: +# return {"title": "Not Found", "detail": "Rule not found"}, 404 + +# # SECURITY CHECK: Only Superadmin or the actual owner (CN) can update +# if request.user_cn != "superadmin" and existing_rule.get('userName') != request.user_cn: +# return {"title": "Unauthorized", "detail": "You do not have permission to modify this rule"}, 401 + +# # Always update 'updatedAt' timestamp +# now = datetime.now(timezone.utc).isoformat().replace('+00:00', 'Z') +# body['updatedAt'] = now + +# # Re-validate date logic if dates are being modified +# new_start = body.get('startsAt', existing_rule.get('startsAt')) +# new_end = body.get('endsAt', existing_rule.get('endsAt')) + +# if new_start and new_end: +# try: +# s = datetime.fromisoformat(new_start.replace('Z', '+00:00')) +# e = datetime.fromisoformat(new_end.replace('Z', '+00:00')) +# if e <= s: +# return { +# "title": "Bad Request", +# "detail": "Validation Error: endsAt must be later than startsAt" +# }, 400 +# except ValueError: +# return {"title": "Bad Request", "detail": "Invalid date format."}, 400 + +# # # Update metadata if user info is provided +# # if 'providerSelector' in body and 'createdByUser' in body['providerSelector']: +# # body['updatedBy'] = body['providerSelector']['createdByUser'] +# body['updatedBy'] = cn + # col.update_one({"ruleId": rule_id}, {"$set": body}) # updated_rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) # return updated_rule, 200 def update_rule_patch(rule_id, body): + """ + Update a specific visibility rule using PATCH logic. + - Superadmin: Can modify any rule. + - Providers: Can only modify rules they own or created. + """ db = get_mongo() col = db.get_col_by_name("visibility_rules") + cn = request.user_cn - # Fetch existing rule for comparison + # 1. Fetch existing rule to verify existence and check ownership existing_rule = col.find_one({"ruleId": rule_id}) if not existing_rule: return {"title": "Not Found", "detail": "Rule not found"}, 404 - # SECURITY CHECK: Only Superadmin or the actual owner (CN) can update - if request.user_cn != "superadmin" and existing_rule.get('updatedBy') != request.user_cn: - return {"title": "Unauthorized", "detail": "You do not have permission to modify this rule"}, 401 + # 2. Authorization Check: Superadmin bypass + if cn != "superadmin": + # Resolve Certificate CN to the registered Friendly Username + prov_col = db.get_col_by_name("provider_details") + provider = prov_col.find_one({"apiProvFuncs.apiProvFuncId": cn}) + friendly_name = provider.get('userName') if provider else None - # Always update 'updatedAt' timestamp + # Ownership Validation: + # - Check if the rule's userName matches the provider's registered name + # - OR check if the rule was last updated/created by this specific certificate + is_owner = existing_rule.get('providerSelector', {}).get('userName') == friendly_name + is_creator = existing_rule.get('updatedBy') == cn + + if not (is_owner or is_creator): + return { + "title": "Unauthorized", + "detail": "You do not have permission to modify this rule" + }, 401 + + # 3. Metadata Updates now = datetime.now(timezone.utc).isoformat().replace('+00:00', 'Z') body['updatedAt'] = now + body['updatedBy'] = cn # Track who performed the update - # Re-validate date logic if dates are being modified + # 4. Date Logic Validation + # Ensure startsAt is earlier than endsAt, even if only one is being updated new_start = body.get('startsAt', existing_rule.get('startsAt')) new_end = body.get('endsAt', existing_rule.get('endsAt')) @@ -189,10 +371,10 @@ def update_rule_patch(rule_id, body): except ValueError: return {"title": "Bad Request", "detail": "Invalid date format."}, 400 - # Update metadata if user info is provided - if 'providerSelector' in body and 'createdByUser' in body['providerSelector']: - body['updatedBy'] = body['providerSelector']['createdByUser'] - + # 5. Apply changes to Database + # We use $set to only modify the fields provided in the PATCH body col.update_one({"ruleId": rule_id}, {"$set": body}) + + # Return the fully updated object (excluding Mongo's internal _id) updated_rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) return updated_rule, 200 \ No newline at end of file diff --git a/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml index 76ed307b..edb88e8c 100644 --- a/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml +++ b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml @@ -6,7 +6,7 @@ info: (discovery) and whether invokers are allowed to create a security context to access them. - Rules are global and evaluated with "more specific wins" precedence. - If no rule matches, the decision uses OpenCAPIF's global default (outside this API). - - Provider selector is mandatory in rules and must contain at least one selector field (createdByUser is mandatory). + - Provider selector is mandatory in rules and must contain at least one selector field (userName is mandatory). title: OpenCAPIF Visibility Control version: 1.0.0 # servers: @@ -88,7 +88,7 @@ paths: allow_except_some_invokers: value: providerSelector: - createdByUser: userA + userName: userA apiProviderId: - capif-prov-01 - capif-prov-02 @@ -260,7 +260,7 @@ components: apiName: - apiName - apiName - createdByUser: createdByUser + userName: userName aefId: - aefId - aefId @@ -375,7 +375,7 @@ components: apiName: - apiName - apiName - createdByUser: createdByUser + userName: userName aefId: - aefId - aefId @@ -488,7 +488,7 @@ components: apiName: - apiName - apiName - createdByUser: createdByUser + userName: userName aefId: - aefId - aefId @@ -496,9 +496,9 @@ components: - apiId - apiId properties: - createdByUser: + userName: minLength: 1 - title: createdByUser + title: userName type: string apiProviderId: items: @@ -529,7 +529,7 @@ components: type: array uniqueItems: true required: - - createdByUser + - userName title: ProviderSelector type: object InvokerSelector: @@ -1876,7 +1876,7 @@ components: apiName: - apiName - apiName - createdByUser: createdByUser + userName: userName aefId: - aefId - aefId @@ -1905,7 +1905,7 @@ components: apiName: - apiName - apiName - createdByUser: createdByUser + userName: userName aefId: - aefId - aefId diff --git a/tests/features/Helper/Visibility Control Api/visibility_control.robot b/tests/features/Helper/Visibility Control Api/visibility_control.robot index bcf688c7..bc47620b 100644 --- a/tests/features/Helper/Visibility Control Api/visibility_control.robot +++ b/tests/features/Helper/Visibility Control Api/visibility_control.robot @@ -20,7 +20,7 @@ ${SUBSCRIPTION_ID_NOT_VALID} not-valid *** Test Cases *** Get Visibility Control Rules as Superadmin - [Tags] visibility_control_1 + [Tags] visibility_control-1 ${resp}= Get Request Capif ... /helper/visibility-control/rules @@ -31,7 +31,7 @@ Get Visibility Control Rules as Superadmin Length Should Be ${resp.json()['rules']} 0 Create Visibility Control Rule Invalid Dates as Superadmin - [Tags] visibility_control_2 + [Tags] visibility_control-2 ${body}= Create Visibility Control Rule Body Invalid Dates @@ -45,7 +45,7 @@ Create Visibility Control Rule Invalid Dates as Superadmin Status Should Be 400 ${resp} Create Visibility Control Rule - [Tags] visibility_control_3 + [Tags] visibility_control-3 ${body}= Create Visibility Control Rule Body ${resp}= Post Request Capif @@ -80,7 +80,7 @@ Create Visibility Control Rule Length Should Be ${resp.json()['rules']} 0 Get Visibility Control Rule by AMF Provider - [Tags] visibility_control_4 + [Tags] visibility_control-4 ${register_user_info}= Provider Default Registration @@ -92,8 +92,8 @@ Get Visibility Control Rule by AMF Provider Status Should Be 200 ${resp} -Create Visibility Control Rule by AMF Provider - [Tags] visibility_control_5 +Create Visibility Control Rule by AMF Provider and DELETE by useradmin + [Tags] visibility_control-5 ${register_user_info}= Provider Default Registration @@ -110,10 +110,71 @@ Create Visibility Control Rule by AMF Provider ${rule_id}= Set Variable ${resp.json()['ruleId']} + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + Length Should Be ${resp.json()['rules']} 1 + ${resp}= Delete Request Capif ... /helper/visibility-control/rules/${rule_id} ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${SUPERADMIN_USERNAME} + Status Should Be 204 ${resp} + + # Check empty list + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + Length Should Be ${resp.json()['rules']} 0 + +Create and Delete Visibility Control Rule by AMF Provider + [Tags] visibility_control-6 + + ${register_user_info}= Provider Default Registration + + ${body}= Create Visibility Control Rule Body + ${resp}= Post Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + ... json=${body} + + Status Should Be 201 ${resp} + + ${rule_id}= Set Variable ${resp.json()['ruleId']} + + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + + Length Should Be ${resp.json()['rules']} 1 + + ${resp}= Delete Request Capif + ... /helper/visibility-control/rules/${rule_id} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check empty list + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + Length Should Be ${resp.json()['rules']} 0 + diff --git a/tests/libraries/helper_service/bodyRequests.py b/tests/libraries/helper_service/bodyRequests.py index 6f3cdc50..ac0bdc86 100644 --- a/tests/libraries/helper_service/bodyRequests.py +++ b/tests/libraries/helper_service/bodyRequests.py @@ -6,7 +6,7 @@ def create_visibility_control_rule_body_invalid_dates(): "endsAt": "2025-01-23T08:00:00Z", "providerSelector": { "apiName": ["api-test-error"], - "createdByUser": "claudia" + "userName": "AMF_ROBOT_TESTING_PROVIDER" } } @@ -23,6 +23,6 @@ def create_visibility_control_rule_body(): "apiId": ["apiId-999"], "apiName": ["api-test-cli"], "apiProviderId": ["capif-prov-01"], - "createdByUser": "claudia" + "userName": "AMF_ROBOT_TESTING_PROVIDER" } } -- GitLab From d8ebbbeb349d776c2458ab0dea27b44a65e4cbb0 Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Mon, 9 Feb 2026 18:06:37 +0100 Subject: [PATCH 071/101] improving visibility control logic (authorization) and adding new tests --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index c7737031..63fa7fc7 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,4 @@ results helm/capif/*.lock helm/capif/charts/tempo* *.bakresults/ -.venv/ -tests/features/Helper/Visibility Control Api/*.html -tests/features/Helper/Visibility Control Api/*.xml *.bak -- GitLab From 890e48985489fff4ecdf0a399dc5a20474faf026 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 10 Feb 2026 10:23:34 +0100 Subject: [PATCH 072/101] Remove development log --- services/nginx/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index aa12111f..371ed6b2 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -16,7 +16,7 @@ http { include policies/*.conf; include endpoints/*.conf; - log_format debug_map 'política: $uri - $endpoint:$method:$role / $helper_mtls_policy / $invoker_token_policy / $invoker_mtls_policy/ "$service:$has_token:$has_cert" / $active_policy /$auth_allowed // $ssl_client_s_dn_cn'; + # log_format debug_map 'Policy: $uri - $endpoint:$method:$role"$service:$has_token:$has_cert:$active_policy:$auth_allowed:$ssl_client_s_dn_cn' server { listen 8080; @@ -41,7 +41,7 @@ http { ssl_session_tickets off; # (ONLY DEVELOPMENT)Send the log directly to the console (useful in Docker or terminal) - access_log /dev/stdout debug_map; + # access_log /dev/stdout debug_map; location / { proxy_pass $scheme://$http_host/api-invoker-management/v1/ui/; -- GitLab From e688da54fd4e49037ad0800760954b0e8a85f036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Tue, 10 Feb 2026 11:08:36 +0100 Subject: [PATCH 073/101] first version, test failed --- .../api_invoker_management/app.py | 23 +++- .../prepare_invoker.sh | 9 +- .../api_provider_management/app.py | 25 +++- .../prepare_provider.sh | 4 +- .../prepare_security.sh | 8 +- services/helper/helper_service/db/db.py | 3 +- services/nginx/nginx_prepare.sh | 125 +++++++++++------- services/register/register_prepare.sh | 117 +++++++--------- services/register/register_service/app.py | 6 +- .../core/register_operations.py | 2 +- services/run_capif_tests.sh | 1 + services/variables.sh | 3 + services/vault/vault_prepare_certs.sh | 58 +++++--- tests/features/__init__.robot | 18 ++- 14 files changed, 253 insertions(+), 149 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py index abe58596..a1e0648e 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py @@ -22,6 +22,10 @@ from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from cryptography import x509 +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives import serialization + NAME = "Invoker-Service" # Setting log level @@ -115,8 +119,23 @@ def verbose_formatter(): datefmt='%d/%m/%Y %H:%M:%S' ) -with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as pub_file: - pub_data = pub_file.read() +# with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as pub_file: +# pub_data = pub_file.read() + +with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as f: + pem_data = f.read() + +# Extraer el primer certificado del PEM (aunque venga en bundle) +cert = x509.load_pem_x509_certificate(pem_data, default_backend()) + +# Extraer la clave pública +public_key = cert.public_key() + +# Convertir la clave pública a PEM (lo que JWT necesita) +pub_data = public_key.public_bytes( + encoding=serialization.Encoding.PEM, + format=serialization.PublicFormat.SubjectPublicKeyInfo, +) app = connexion.App(__name__, specification_dir='openapi/') app.app.json_encoder = encoder.CustomJSONEncoder diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh index 0e2accbb..65f694b0 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh @@ -15,10 +15,17 @@ while [ $ATTEMPT -lt $MAX_RETRIES ]; do eval "ATTEMPT=\$((ATTEMPT + 1))" echo "Attempt $ATTEMPT of $MAX_RETRIES" + # Make the request to Vault and store the response in a variable + # RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ + # --header "X-Vault-Token: $VAULT_TOKEN" \ + # --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" | jq -r '.data.data.pub_key') + + CCF_ID="CCF11111111-2222-3333-4444-555555555555" + # Make the request to Vault and store the response in a variable RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ --header "X-Vault-Token: $VAULT_TOKEN" \ - --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" | jq -r '.data.data.pub_key') + --request GET "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx" | jq -r '.data.data.server_crt') echo "$RESPONSE" diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py index c4b33c57..e943db49 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py @@ -17,6 +17,10 @@ from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from cryptography import x509 +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives import serialization + from .config import Config NAME = "Provider-Service" @@ -108,8 +112,25 @@ def verbose_formatter(): ) -with open("/usr/src/app/api_provider_management/pubkey.pem", "rb") as pub_file: - pub_data = pub_file.read() +# with open("/usr/src/app/api_provider_management/pubkey.pem", "rb") as pub_file: +# pub_data = pub_file.read() + +with open("/usr/src/app/api_provider_management/pubkey.pem", "rb") as f: + pem_data = f.read() + +# Extraer el primer certificado del PEM (aunque venga en bundle) +cert = x509.load_pem_x509_certificate(pem_data, default_backend()) + +# Extraer la clave pública +public_key = cert.public_key() + +# Convertir la clave pública a PEM (lo que JWT necesita) +pub_data = public_key.public_bytes( + encoding=serialization.Encoding.PEM, + format=serialization.PublicFormat.SubjectPublicKeyInfo, +) + + app = connexion.App(__name__, specification_dir='openapi/') app.app.json_encoder = api_provider_management.encoder.CustomJSONEncoder diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh index edefb582..c5981f07 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh +++ b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh @@ -15,10 +15,12 @@ while [ $ATTEMPT -lt $MAX_RETRIES ]; do eval "ATTEMPT=\$((ATTEMPT + 1))" echo "Attempt $ATTEMPT of $MAX_RETRIES" + CCF_ID="CCF11111111-2222-3333-4444-555555555555" + # Make the request to Vault and store the response in a variable RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ --header "X-Vault-Token: $VAULT_TOKEN" \ - --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" | jq -r '.data.data.pub_key') + --request GET "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx" | jq -r '.data.data.server_crt') echo "$RESPONSE" diff --git a/services/TS29222_CAPIF_Security_API/prepare_security.sh b/services/TS29222_CAPIF_Security_API/prepare_security.sh index c14609ad..c8c48b20 100644 --- a/services/TS29222_CAPIF_Security_API/prepare_security.sh +++ b/services/TS29222_CAPIF_Security_API/prepare_security.sh @@ -53,9 +53,15 @@ while [ $ATTEMPT -lt $MAX_RETRIES ]; do echo "Attempt $ATTEMPT of $MAX_RETRIES" # Make the request to Vault and store the response in a variable + # RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ + # --header "X-Vault-Token: $VAULT_TOKEN" \ + # --request GET "$VAULT_ADDR/v1/secret/data/server_cert/private" | jq -r '.data.data.key') + + CCF_ID="CCF11111111-2222-3333-4444-555555555555" + RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ --header "X-Vault-Token: $VAULT_TOKEN" \ - --request GET "$VAULT_ADDR/v1/secret/data/server_cert/private" | jq -r '.data.data.key') + --request GET "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx" | jq -r '.data.data.server_key') echo "$RESPONSE" diff --git a/services/helper/helper_service/db/db.py b/services/helper/helper_service/db/db.py index 757933d3..8d67bcbc 100644 --- a/services/helper/helper_service/db/db.py +++ b/services/helper/helper_service/db/db.py @@ -91,7 +91,8 @@ class MongoDatabse(): # Ensure ccf_id exists even if config already there existing_config = capif_col.find_one({}, {"_id": 0}) if "ccf_id" not in existing_config: - ccf_id = "CCF" + secrets.token_hex(15) + # ccf_id = "CCF" + secrets.token_hex(15) + ccf_id="CCF11111111-2222-3333-4444-555555555555" capif_col.update_one({}, {"$set": {"ccf_id": ccf_id}}) print(f"Added missing ccf_id={ccf_id} to existing CAPIF configuration") else: diff --git a/services/nginx/nginx_prepare.sh b/services/nginx/nginx_prepare.sh index 661ed49c..50a953ac 100644 --- a/services/nginx/nginx_prepare.sh +++ b/services/nginx/nginx_prepare.sh @@ -5,11 +5,6 @@ cd $CERTS_FOLDER VAULT_ADDR="http://$VAULT_HOSTNAME:$VAULT_PORT" VAULT_TOKEN=$VAULT_ACCESS_TOKEN -CAPIF_HOSTNAME="${CAPIF_HOSTNAME:-capifcore}" - - -HELPER_URL="http://$HELPER_HOST:8080/api/getCcfId" - # Maximum number of retry attempts MAX_RETRIES=30 # Delay between retries (in seconds) @@ -17,62 +12,48 @@ RETRY_DELAY=10 # Attempt counter ATTEMPT=0 # Success check -SUCCESS_OPERATION=false - -while [ $ATTEMPT -lt $MAX_RETRIES ]; do - # Increment ATTEMPT using eval - eval "ATTEMPT=\$((ATTEMPT + 1))" - echo "Attempt $ATTEMPT of $MAX_RETRIES" +SUCCES_OPERATION=false - RESPONSE=$(curl -s --connect-timeout 5 --max-time 10 "$HELPER_URL") - CCF_ID=$(echo "$RESPONSE" | jq -r '.ccf_id') - if [ -n "$CCF_ID" ] && [ "$CCF_ID" != "null" ]; then - echo "CCF ID retrieved successfully: $CCF_ID" - SUCCESS_OPERATION=true - break - else - echo "Invalid response ('null' or empty), retrying in $RETRY_DELAY seconds..." - sleep $RETRY_DELAY - fi -done +# ============================================================== +# TEMP FIX: Force CCF ID (bypass Helper) +# ============================================================== +CCF_ID="CCF11111111-2222-3333-4444-555555555555" +echo "[WARN] Using FORCED CCF_ID=${CCF_ID} (helper bypassed)" -if [ "$SUCCESS_OPERATION" = false ]; then - echo "Error: Failed to retrieve CCF ID after $MAX_RETRIES attempts." - exit 1 -fi - -# Setup inital value to ATTEMPT and SUCCESS_OPERATION -ATTEMPT=0 -SUCCESS_OPERATION=false +echo "[STEP] Fetching CA root certificate from Vault" while [ $ATTEMPT -lt $MAX_RETRIES ]; do - ATTEMPT=$((ATTEMPT + 1)) - echo "Attempt $ATTEMPT of $MAX_RETRIES" + # Increment ATTEMPT using eval + eval "ATTEMPT=\$((ATTEMPT + 1))" + echo "[INFO] Attempt $ATTEMPT/$MAX_RETRIES – GET secret/data/ca" - CA_RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ + # Make the request to Vault and store the response in a variable + RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ --header "X-Vault-Token: $VAULT_TOKEN" \ --request GET "$VAULT_ADDR/v1/secret/data/ca" | jq -r '.data.data.ca') - if [ -n "$CA_RESPONSE" ] && [ "$CA_RESPONSE" != "null" ]; then - echo "$CA_RESPONSE" > $CERTS_FOLDER/ca.crt + echo "[DEBUG] Raw Vault response:" + echo "$RESPONSE" + + # Check if the response is "null" or empty + if [ -n "$RESPONSE" ] && [ "$RESPONSE" != "null" ]; then + echo "$RESPONSE" > $CERTS_FOLDER/ca.crt + openssl verify -CAfile $CERTS_FOLDER/ca.crt $CERTS_FOLDER/ca.crt echo "CA Root successfully saved." - SUCCESS_OPERATION=true + SUCCES_OPERATION=true break else - echo "Invalid response retrieving CA. Retrying in $RETRY_DELAY seconds..." + echo "[ERROR] CA not available yet (null or empty). Retrying in ${RETRY_DELAY}s" sleep $RETRY_DELAY fi done -if [ "$SUCCESS_OPERATION" = false ]; then - echo "Error: Failed to retrieve CA after $MAX_RETRIES attempts." +if [ "$SUCCES_OPERATION" = false ]; then + echo "[ERROR] Unable to retrieve CA certificate from Vault after $MAX_RETRIES attempts" exit 1 fi -# Reset counters -ATTEMPT=0 -SUCCESS_OPERATION=false ############################################################### @@ -91,7 +72,10 @@ fi ############################################################### if [ ! -f server.crt ]; then SUCCESS_OPERATION=false - echo "server.crt not found. Generating CSR..." + + echo "[STEP 3] Server certificate not found" + echo "[STEP 3] Generating CSR for CAPIF service" + echo "[INFO] Common Name (CN): $CAPIF_HOSTNAME" openssl req -new -key server.key \ -subj "/CN=$CAPIF_HOSTNAME" \ @@ -100,21 +84,40 @@ if [ ! -f server.crt ]; then CSR_CONTENT=$(sed ':a;N;$!ba;s/\n/\\n/g' server.csr) - echo "Requesting certificate signing from Vault..." + echo "[STEP 3] CSR generated successfully" + echo "[STEP 3] Requesting certificate signing from Vault" + echo "[INFO] Vault PKI endpoint: $VAULT_ADDR/v1/pki_int/sign/my-ca" ATTEMPT=0 SUCCESS_OPERATION=false while [ $ATTEMPT -lt $MAX_RETRIES ]; do ATTEMPT=$((ATTEMPT + 1)) - echo "Attempt $ATTEMPT of $MAX_RETRIES" + echo "[STEP 3] Attempt $ATTEMPT/$MAX_RETRIES – Signing CSR in Vault" + + echo "---------------- CURL REQUEST ----------------" + echo "curl -X POST \\" + echo " -H \"X-Vault-Token: $VAULT_TOKEN\" \\" + echo " -d '{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\",\"common_name\":\"$CAPIF_HOSTNAME\"}' \\" + echo " \"$VAULT_ADDR/v1/pki_int/sign/my-ca\"" + echo "----------------------------------------------" + SIGN_RESPONSE=$(curl -s -X POST \ -H "X-Vault-Token: $VAULT_TOKEN" \ -d "{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\",\"common_name\":\"$CAPIF_HOSTNAME\"}" \ "$VAULT_ADDR/v1/pki_int/sign/my-ca") + + echo "---------------- VAULT RESPONSE ---------------" + echo "$SIGN_RESPONSE" + echo "----------------------------------------------" + + + # CERT=$(echo "$SIGN_RESPONSE" | jq -r '.data.certificate') + #CERT=$(printf '%s' "$SIGN_RESPONSE" | jq -r '.data.certificate // empty') + CERT=$(printf '%s' "$SIGN_RESPONSE" | jq -er '.data.certificate') + - CERT=$(echo "$SIGN_RESPONSE" | jq -r '.data.certificate') if [ -n "$CERT" ] && [ "$CERT" != "null" ]; then echo "$CERT" > server.crt @@ -128,11 +131,11 @@ if [ ! -f server.crt ]; then done if [ "$SUCCESS_OPERATION" = false ]; then - echo "Error: Failed to sign certificate after $MAX_RETRIES attempts." + echo "[STEP 3][ERROR] Failed to sign server certificate after $MAX_RETRIES attempts" exit 1 fi else - echo "server.crt already exists. Skipping signing." + echo "[STEP 3] server.crt already exists – skipping certificate signing" fi @@ -141,9 +144,28 @@ fi ############################################################### echo "Storing CAPIF certificates in Vault..." -vault kv put secret/capif/$CCF_ID/server crt=@server.crt -vault kv put secret/capif/$CCF_ID/private key=@server.key -vault kv put secret/capif/$CCF_ID/ca ca=@ca.crt +SERVER_CRT_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server.crt) +SERVER_KEY_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server.key) +CA_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' ca.crt) + +VAULT_RESPONSE=$(curl -s -w "%{http_code}" -o /tmp/vault_resp.json \ + -X POST \ + -H "X-Vault-Token: $VAULT_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"data\": { + \"server_crt\": \"${SERVER_CRT_ESCAPED}\", + \"server_key\": \"${SERVER_KEY_ESCAPED}\", + \"ca\": \"${CA_ESCAPED}\" + } + }" \ + "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx") + +if [ "$VAULT_RESPONSE" != "200" ] && [ "$VAULT_RESPONSE" != "204" ]; then + echo "[ERROR] Failed to store certs in Vault" + cat /tmp/vault_resp.json + exit 1 +fi echo "Certificates successfully stored in Vault namespace: secret/capif/$CCF_ID" @@ -151,6 +173,7 @@ echo "Certificates successfully stored in Vault namespace: secret/capif/$CCF_ID" ############################################################### # 5) START NGINX ############################################################### + LOG_LEVEL=$(echo "${LOG_LEVEL}" | tr '[:upper:]' '[:lower:]') case "$LOG_LEVEL" in diff --git a/services/register/register_prepare.sh b/services/register/register_prepare.sh index b0ef1d2e..4f8a7a73 100644 --- a/services/register/register_prepare.sh +++ b/services/register/register_prepare.sh @@ -6,64 +6,44 @@ cd $CERTS_FOLDER VAULT_ADDR="http://$VAULT_HOSTNAME:$VAULT_PORT" VAULT_TOKEN=$VAULT_ACCESS_TOKEN -# NEW: Get CAPIF instance ID from helper -HELPER_URL="http://$HELPER_HOST:8080/api/getCcfId" -echo "Retrieving CCF ID from Helper..." - -CCF_ID=$(curl -s --connect-timeout 5 "$HELPER_URL" | jq -r '.ccf_id') - -if [ -z "$CCF_ID" ] || [ "$CCF_ID" = "null" ]; then - echo "ERROR: Could not retrieve CCF ID from Helper." - exit 1 -fi - -echo "CCF ID for this CAPIF instance: $CCF_ID" - - -COUNTRY="ES" -STATE="Madrid" -LOCALITY="Madrid" -ORGNAME="Telefonica I+D" -ORGUNIT="Innovation" -COMMONNAME=${REGISTER_HOSTNAME:-register} +COUNTRY="ES" # 2 letter country-code +STATE="Madrid" # state or province name +LOCALITY="Madrid" # Locality Name (e.g. city) +ORGNAME="Telefonica I+D" # Organization Name (eg, company) +ORGUNIT="Innovation" # Organizational Unit Name (eg. section) +COMMONNAME=${REGISTER_HOSTNAME:-register} +EMAIL="inno@tid.es" # certificate's email address TTL="4300h" # ============================================================== # 1) GENERATE PRIVATE KEY IF NOT EXISTS # ============================================================== + if [ ! -f register_key.key ]; then echo "Generating private key for Register." openssl genrsa -out register_key.key 2048 else - echo "Private key already exists → skipping generation." + echo "register_key.key already exists. Skipping generation." fi # ============================================================== -# 2) GENERATE CSR ONLY IF CERT DOES NOT EXIST +# 2) GENERATE CSR # ============================================================== -if [ ! -f register_cert.crt ]; then - echo "Creating CSR for CN=${COMMONNAME}." - - openssl req -new -key register_key.key \ - -subj "/C=${COUNTRY}/ST=${STATE}/L=${LOCALITY}/O=${ORGNAME}/OU=${ORGUNIT}/CN=${COMMONNAME}" \ - -addext "subjectAltName=DNS:${COMMONNAME}" \ - -out register.csr - - - echo "CSR created." -else - echo "register_cert.crt already exists → skipping CSR generation." -fi +echo "Creating CSR for CN=${COMMONNAME}." +openssl req -new -key register_key.key \ + -subj "/C=${COUNTRY}/ST=${STATE}/L=${LOCALITY}/O=${ORGNAME}/OU=${ORGUNIT}/CN=${COMMONNAME}/emailAddress=${EMAIL}" \ + -addext "subjectAltName=DNS:${COMMONNAME}" \ + -out register.csr # ============================================================== # 3) DOWNLOAD CA FROM VAULT # ============================================================== -echo "Downloading CA chain from Vault." +echo "Downloading CA chain from Vault." curl -s -H "X-Vault-Token: ${VAULT_TOKEN}" \ "${VAULT_ADDR}/v1/secret/data/ca" | jq -r '.data.data.ca' > ca_root.crt - + if [ ! -s ca_root.crt ]; then echo "ERROR: could not retrieve CA from Vault." exit 1 @@ -71,52 +51,53 @@ fi echo "CA chain retrieved successfully." +echo "Extracting Root CA only." +awk ' + /BEGIN CERTIFICATE/ {cert=""; collecting=1} + collecting {cert = cert $0 ORS} + /END CERTIFICATE/ { + collecting=0 + certs[++i]=cert + } + END { + print certs[1] + } +' ca_root.crt > ca_root_only.crt + + # ============================================================== -# 4) REQUEST SIGNATURE ONLY IF CERT DOES NOT EXIST +# 4) REQUEST SIGNATURE # ============================================================== -if [ ! -f register_cert.crt ]; then - echo "Requesting certificate signature from Vault..." - CSR_CONTENT=$(sed ':a;N;$!ba;s/\n/\\n/g' register.csr) - - curl -s -X POST \ - -H "X-Vault-Token: ${VAULT_TOKEN}" \ - -d "{\"csr\": \"${CSR_CONTENT}\", \"common_name\": \"${COMMONNAME}\", \"format\": \"pem_bundle\", \"ttl\": \"${TTL}\"}" \ - "${VAULT_ADDR}/v1/pki_int/sign/my-ca" \ - | jq -r '.data.certificate' | awk '{gsub("\\\\n","\n")}1' > register_cert.crt - - if [ ! -s register_cert.crt ]; then - echo "ERROR: could not retrieve signed certificate from Vault." - exit 1 - fi - - echo "Certificate signed successfully by Vault intermediate CA." -else - echo "register_cert.crt already exists → skipping signing step." + +echo "Requesting certificate signature from Vault..." +CSR_CONTENT=$(awk '{printf "%s\\n", $0}' register.csr) + +curl -s -X POST \ + -H "X-Vault-Token: ${VAULT_TOKEN}" \ + -d "{\"csr\": \"${CSR_CONTENT}\", \"common_name\": \"${COMMONNAME}\", \"format\": \"pem_bundle\", \"ttl\": \"${TTL}\"}" \ + "${VAULT_ADDR}/v1/pki_int/sign/my-ca" \ + | jq -r '.data.certificate' | awk '{gsub("\\\\n","\n")}1' > register_cert.crt + +if [ ! -s register_cert.crt ]; then + echo "ERROR: could not retrieve signed certificate from Vault." + exit 1 fi +echo "Certificate signed successfully by Vault intermediate CA." + # ============================================================== # 5) VERIFY CERTIFICATE CHAIN # ============================================================== + echo "Verifying certificate chain." openssl verify -CAfile ca_root.crt register_cert.crt || { echo "WARNING: certificate verification failed" } -# ============================================================== -# 6) NEW → STORE REGISTER CERTIFICATES IN VAULT -# ============================================================== -echo "Storing Register certificates under secret/capif/${CCF_ID}/register" - -vault kv put secret/capif/$CCF_ID/register/server crt=@register_cert.crt -vault kv put secret/capif/$CCF_ID/register/private key=@register_key.key -vault kv put secret/capif/$CCF_ID/register/ca ca=@ca_root.crt - -echo "Certificates stored successfully." - - # ============================================================== # 7) START REGISTER SERVICE # ============================================================== + echo "Starting Register service with signed certificate." gunicorn --certfile=/usr/src/app/register_service/certs/register_cert.crt \ --keyfile=/usr/src/app/register_service/certs/register_key.key \ diff --git a/services/register/register_service/app.py b/services/register/register_service/app.py index 60447746..35da0ac0 100644 --- a/services/register/register_service/app.py +++ b/services/register/register_service/app.py @@ -80,11 +80,13 @@ cert_file.write(bytes(ca_root, 'utf-8')) cert_file.close() # Request CAPIF private key to encode the CAPIF token -url = 'http://{}:{}/v1/secret/data/server_cert/private'.format(config["ca_factory"]["url"], config["ca_factory"]["port"]) +CCF_ID = "CCF11111111-2222-3333-4444-555555555555" + +url = 'http://{}:{}/v1/secret/data/capif/{}/nginx'.format(config["ca_factory"]["url"], config["ca_factory"]["port"], CCF_ID) headers = {'X-Vault-Token': f"{config["ca_factory"]["token"]}"} response = requests.request("GET", url, headers=headers, verify = config["ca_factory"].get("verify", False)) -key_data = json.loads(response.text)["data"]["data"]["key"] +key_data = json.loads(response.text)["data"]["data"]["server_key"] # Create an Admin in the Admin Collection client = MongoDatabse() diff --git a/services/register/register_service/core/register_operations.py b/services/register/register_service/core/register_operations.py index 8dc4a2ea..5da506c4 100644 --- a/services/register/register_service/core/register_operations.py +++ b/services/register/register_service/core/register_operations.py @@ -79,7 +79,7 @@ class RegisterOperations: current_app.logger.debug(f"Request Helper service to remove user related information") url = f"https://{self.config["ccf"]["url"]}{self.config["ccf"]["helper_remove_user"]}{uuid}" current_app.logger.debug(f"Url {url}") - requests.delete(url, cert=("certs/superadmin.crt", "certs/superadmin.key"), verify="certs/ca_root.crt", timeout=int(os.getenv("TIMEOUT", "30"))) + requests.delete(url, cert=("certs/superadmin.crt", "certs/superadmin.key"), verify="certs/ca_root_only.crt", timeout=int(os.getenv("TIMEOUT", "30"))) current_app.logger.debug(f"Removing User with uuid {uuid} from db") mycol.delete_one({"uuid": uuid}) diff --git a/services/run_capif_tests.sh b/services/run_capif_tests.sh index 65c9a45f..cc674e72 100755 --- a/services/run_capif_tests.sh +++ b/services/run_capif_tests.sh @@ -67,5 +67,6 @@ docker run $DOCKER_ROBOT_TTY_OPTIONS --rm --network="host" \ --variable CAPIF_VAULT:$CAPIF_VAULT \ --variable CAPIF_VAULT_PORT:$CAPIF_VAULT_PORT \ --variable CAPIF_VAULT_TOKEN:$CAPIF_VAULT_TOKEN \ + --variable CCF_ID:$CCF_ID \ --variable NOTIFICATION_DESTINATION_URL:$NOTIFICATION_DESTINATION_URL \ --variable MOCK_SERVER_URL:$MOCK_SERVER_URL $INPUT_OPTIONS diff --git a/services/variables.sh b/services/variables.sh index dd99ae30..663f53bd 100755 --- a/services/variables.sh +++ b/services/variables.sh @@ -51,3 +51,6 @@ export DOCKER_ROBOT_TTY_OPTIONS="-ti" export MOCK_SERVER_URL=http://mock-server:${MOCK_SERVER_PORT} export NOTIFICATION_DESTINATION_URL=http://mock-server:${MOCK_SERVER_PORT} +# CAPIF Core Federation ID +export CCF_ID=CCF11111111-2222-3333-4444-555555555555 + diff --git a/services/vault/vault_prepare_certs.sh b/services/vault/vault_prepare_certs.sh index 3a5d0a7a..1b99800a 100755 --- a/services/vault/vault_prepare_certs.sh +++ b/services/vault/vault_prepare_certs.sh @@ -11,26 +11,29 @@ echo "VAULT_TOKEN: $VAULT_TOKEN" vault secrets enable pki + ############################################################ -# 1) ENABLE ROOT PKI +# 1) ROOT CA ############################################################ +# Generate a root CA vault secrets tune -max-lease-ttl=87600h pki vault write -field=certificate pki/root/generate/internal \ common_name="capif" \ - issuer_name="root-2025" \ - ttl=87600h > root_ca.crt + issuer_name="root-2023" \ + ttl=87600h > root_2023_ca.crt vault write pki/config/urls \ issuing_certificates="$VAULT_ADDR/v1/pki/ca" \ crl_distribution_points="$VAULT_ADDR/v1/pki/crl" - ############################################################ -# 2) ENABLE INTERMEDIATE PKI +# 2) INTERMEDIATE CA ############################################################ + +# Generate an intermediate CA vault secrets enable -path=pki_int pki vault secrets tune -max-lease-ttl=43800h pki_int @@ -42,7 +45,7 @@ vault write -format=json pki_int/intermediate/generate/internal \ # Sign the intermediate CA vault write -format=json pki/root/sign-intermediate \ - issuer_ref="root-2025" \ + issuer_ref="root-2023" \ csr=@pki_intermediate.csr \ format=pem_bundle ttl="43800h" \ | jq -r '.data.certificate' > capif_intermediate.cert.pem @@ -50,8 +53,6 @@ vault write -format=json pki/root/sign-intermediate \ # Configure the intermediate CA vault write pki_int/intermediate/set-signed certificate=@capif_intermediate.cert.pem - - ############################################################ # 3) CONFIGURE SIGNING ROLE ############################################################ @@ -66,14 +67,39 @@ vault write pki_int/roles/my-ca \ allow_subdomains=true \ max_ttl=4300h -# Note: CAPIF hostname is no longer needed here. The role is "open". +# ============================================================ +# 4) CA BUNDLE +# ============================================================ +openssl x509 -in capif_intermediate.cert.pem -out intermediate_ca.crt -############################################################ -# 4) STORE ROOT + INTERMEDIATE IN A SINGLE BUNDLE -############################################################ -cat root_ca.crt capif_intermediate.cert.pem > capif_ca_bundle.crt +cat > certificados_concatenados.crt << EOF +$(cat root_2023_ca.crt) +$(cat intermediate_ca.crt) +EOF + +vault kv put secret/ca ca=@certificados_concatenados.crt + +echo "[INFO] CA bundle stored at secret/ca" + + +# ============================================================ +# OPTIONAL: Create read-only token for CA access +# (Not required in local dev, required in prod) +# ============================================================ + +POLICY_NAME="my-policy" +POLICY_FILE="my-policy.hcl" +TOKEN_ID="read-ca-token" + +# Create a policy to read the CA +echo "path \"secret/data/ca\" { + capabilities = [\"read\"] +}" > "$POLICY_FILE" + +vault policy write "$POLICY_NAME" "$POLICY_FILE" -vault kv put secret/ca ca=@capif_ca_bundle.crt +# Create a token with the policy +TOKEN=$(vault token create -id="$TOKEN_ID" -policy="$POLICY_NAME" -format=json | jq -r '.auth.client_token') -echo "[INFO] Vault PKI ready: Root + Intermediate created." -echo "[INFO] CAPIF CA bundle stored at secret/ca" +echo "Generated Token:" +echo "$TOKEN" \ No newline at end of file diff --git a/tests/features/__init__.robot b/tests/features/__init__.robot index 3ac73ab8..672a481b 100644 --- a/tests/features/__init__.robot +++ b/tests/features/__init__.robot @@ -13,6 +13,7 @@ Prepare environment Log ${CAPIF_HOSTNAME} Log "${CAPIF_HTTP_PORT}" Log "${CAPIF_HTTPS_PORT}" + Log Using CCF_ID: ${CCF_ID} Set Global Variable ${CAPIF_HTTP_VAULT_URL} http://${CAPIF_VAULT}/ IF "${CAPIF_VAULT_PORT}" != "" @@ -50,12 +51,16 @@ Prepare environment Reset Testing Environment + Retrieve Ca Root [Documentation] This keyword retrieve ca.root from CAPIF and store it at ca.crt in order to use at TLS communications - ${resp}= Get CA Vault /v1/secret/data/ca ${CAPIF_HTTP_VAULT_URL} + ${resp}= Get CA Vault /v1/secret/data/capif/${CCF_ID}/nginx ${CAPIF_HTTP_VAULT_URL} Status Should Be 200 ${resp} - Log ${resp.json()['data']['data']['ca']} - Store In File ca.crt ${resp.json()['data']['data']['ca']} + ${ca_bundle}= Set Variable ${resp.json()['data']['data']['ca']} + Log ${ca_bundle} + ${root_ca}= Extract First Pem Certificate ${ca_bundle} + Store In File ca.crt ${root_ca} + Log Dictionary ${resp.json()} Retrieve Superadmin Cert [Documentation] This keyword retrieve ca.root from CAPIF and store it at ca.crt in order to use at TLS communications @@ -65,3 +70,10 @@ Retrieve Superadmin Cert Log ${resp.json()['data']['certificate']} Store In File ${SUPERADMIN_USERNAME}.crt ${resp.json()['data']['certificate']} +Extract First Pem Certificate + [Arguments] ${pem_bundle} + ${parts}= Split String ${pem_bundle} -----END CERTIFICATE----- + ${root_ca}= Catenate + ... ${parts[0]} + ... -----END CERTIFICATE----- + RETURN ${root_ca} \ No newline at end of file -- GitLab From a045129adc8cb23f237085ecc34162cc8d227dcd Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Tue, 10 Feb 2026 12:24:15 +0100 Subject: [PATCH 074/101] Updating userName schema and adding new tests for PATCH method --- .../openapi_helper_visibility_control.yaml | 3 + .../services/visibility_control/auth.py | 6 +- .../visibility_control/openapi/openapi.yaml | 15 ++++- services/nginx/nginx.conf | 2 +- .../visibility_control.robot | 56 ++++++++++++++++++- .../libraries/helper_service/bodyRequests.py | 16 ++++++ 6 files changed, 91 insertions(+), 7 deletions(-) diff --git a/services/helper/helper_service/openapi_helper_visibility_control.yaml b/services/helper/helper_service/openapi_helper_visibility_control.yaml index fc4817e7..43d181fe 100644 --- a/services/helper/helper_service/openapi_helper_visibility_control.yaml +++ b/services/helper/helper_service/openapi_helper_visibility_control.yaml @@ -285,6 +285,9 @@ components: items: { type: string } minItems: 0 uniqueItems: true + userName: + type: string + minLength: 1 additionalProperties: false ProviderSelector: diff --git a/services/helper/helper_service/services/visibility_control/auth.py b/services/helper/helper_service/services/visibility_control/auth.py index de01e3c0..d3abf6e7 100644 --- a/services/helper/helper_service/services/visibility_control/auth.py +++ b/services/helper/helper_service/services/visibility_control/auth.py @@ -13,14 +13,16 @@ def cert_validation(): @wraps(f) def __cert_validation(*args, **kwargs): # 1. Get certificate header safely - cert_tmp = request.headers.get('X-Ssl-Client-Cert') + # cert_tmp = request.headers.get('X-Ssl-Client-Cert') + cert_tmp = request.headers.get('X-Ssl-Client-Cert') or request.headers.get('X-SSL-Client-Cert') or request.headers.get('x-ssl-client-cert') if not cert_tmp: return {"title": "Unauthorized", "detail": "Certificate header missing"}, 401 try: # 2. Process certificate - cert_raw = cert_tmp.replace('\\t', '') + # cert_raw = cert_tmp.replace('\\t', '') + cert_raw = cert_tmp.replace('\\t', '').replace('\\n', '\n').replace('\\\\n', '\n').replace('\"', '') cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) cn = cert.subject.get_attributes_for_oid(x509.OID_COMMON_NAME)[0].value.strip() diff --git a/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml index edb88e8c..1ca09142 100644 --- a/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml +++ b/services/helper/helper_service/services/visibility_control/openapi/openapi.yaml @@ -260,7 +260,8 @@ components: apiName: - apiName - apiName - userName: userName + userName: + - userName aefId: - aefId - aefId @@ -375,7 +376,8 @@ components: apiName: - apiName - apiName - userName: userName + userName: + - userName aefId: - aefId - aefId @@ -445,7 +447,13 @@ components: apiId: - apiId - apiId + userName: + - userName properties: + userName: + minLength: 1 + title: userName + type: string apiProviderId: items: type: string @@ -488,7 +496,8 @@ components: apiName: - apiName - apiName - userName: userName + userName: + - userName aefId: - aefId - aefId diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index 9fbe7031..8848b4c1 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -14,7 +14,7 @@ http { } map "$request_method:$uri:$ssl_client_s_dn_cn" $helper_error_message { default 'SUCCESS'; - "~*(GET|DELETE|POST):.*:(?!(superadmin|AMF))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; + "~*(GET|DELETE|POST|PATCH):.*:(?!(superadmin|AMF))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; } map "$request_method:$uri:$ssl_client_s_dn_cn" $invoker_error_message { default 'SUCCESS'; diff --git a/tests/features/Helper/Visibility Control Api/visibility_control.robot b/tests/features/Helper/Visibility Control Api/visibility_control.robot index bc47620b..891a8f56 100644 --- a/tests/features/Helper/Visibility Control Api/visibility_control.robot +++ b/tests/features/Helper/Visibility Control Api/visibility_control.robot @@ -174,7 +174,61 @@ Create and Delete Visibility Control Rule by AMF Provider ... /helper/visibility-control/rules ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt - ... username=${SUPERADMIN_USERNAME} + ... username=${AMF_PROVIDER_USERNAME} + + Length Should Be ${resp.json()['rules']} 0 + +Create Update and Delete Visibility Control Rule by AMF Provider + [Tags] visibility_control-7 + + ${register_user_info}= Provider Default Registration + + ${body}= Create Visibility Control Rule Body + + ${resp}= Post Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + ... json=${body} + + Status Should Be 201 ${resp} + + ${rule_id}= Set Variable ${resp.json()['ruleId']} + + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + + Length Should Be ${resp.json()['rules']} 1 + + ${body}= Create Visibility Control Rule body 2 + + ${resp}= Patch Request Capif + ... /helper/visibility-control/rules/${rule_id} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + ... json=${body} + + Status Should Be 200 ${resp} + + ${resp}= Delete Request Capif + ... /helper/visibility-control/rules/${rule_id} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check empty list + ${resp}= Get Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} Length Should Be ${resp.json()['rules']} 0 diff --git a/tests/libraries/helper_service/bodyRequests.py b/tests/libraries/helper_service/bodyRequests.py index ac0bdc86..ffa99603 100644 --- a/tests/libraries/helper_service/bodyRequests.py +++ b/tests/libraries/helper_service/bodyRequests.py @@ -26,3 +26,19 @@ def create_visibility_control_rule_body(): "userName": "AMF_ROBOT_TESTING_PROVIDER" } } + +def create_visibility_control_rule_body_2(): + return { + "default_access": "DENY", + "enabled": True, + "invokerExceptions": { + "apiInvokerId": ["invk-X77"] + }, + "providerSelector": { + "aefId": ["aef-002"], + "apiId": ["apiId-999"], + "apiName": ["api-test-cli"], + "apiProviderId": ["capif-prov-01"], + "userName": "AMF_ROBOT_TESTING_PROVIDER" + } + } \ No newline at end of file -- GitLab From 23534279bca3032fc3378c6b98ffea65dc782d66 Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Tue, 10 Feb 2026 12:38:26 +0100 Subject: [PATCH 075/101] Adding new tests for Visibility Control API --- .../visibility_control.robot | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tests/features/Helper/Visibility Control Api/visibility_control.robot b/tests/features/Helper/Visibility Control Api/visibility_control.robot index 891a8f56..e1436d9d 100644 --- a/tests/features/Helper/Visibility Control Api/visibility_control.robot +++ b/tests/features/Helper/Visibility Control Api/visibility_control.robot @@ -79,6 +79,7 @@ Create Visibility Control Rule Length Should Be ${resp.json()['rules']} 0 + Get Visibility Control Rule by AMF Provider [Tags] visibility_control-4 @@ -232,3 +233,53 @@ Create Update and Delete Visibility Control Rule by AMF Provider Length Should Be ${resp.json()['rules']} 0 +Create and Get Specific Visibility Control Rule + [Tags] visibility_control-8 + + # 1. Prepare the request body + ${body}= Create Visibility Control Rule Body + + # 2. Create a new rule using superadmin + ${resp}= Post Request Capif + ... /helper/visibility-control/rules + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + ... json=${body} + + # Verify creation was successful (201 Created) + Status Should Be 201 ${resp} + ${rule_id}= Set Variable ${resp.json()['ruleId']} + + # 3. Get the specific rule by its ID + ${resp}= Get Request Capif + ... /helper/visibility-control/rules/${rule_id} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + # Validation: Specific GET returns the rule object directly. + # We verify the status is 200 OK and the ruleId matches. + Status Should Be 200 ${resp} + Should Be Equal As Strings ${resp.json()['ruleId']} ${rule_id} + + # 4. Delete the specific rule + ${resp}= Delete Request Capif + ... /helper/visibility-control/rules/${rule_id} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + # Verify deletion was successful (204 No Content) + Status Should Be 204 ${resp} + + # 5. Verify the rule no longer exists + ${resp}= Get Request Capif + ... /helper/visibility-control/rules/${rule_id} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + # After deletion, the server must return 404 Not Found. + # This is the correct way to confirm the resource is gone. + Status Should Be 404 ${resp} -- GitLab From ea105112da074a20103559da100f80790953e13e Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 10 Feb 2026 16:36:37 +0100 Subject: [PATCH 076/101] Include a rule to allow customer to see swagger UI --- services/helper/helper_service/app.py | 2 +- services/nginx/nginx.conf | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/services/helper/helper_service/app.py b/services/helper/helper_service/app.py index cb7a3d51..fcb9b8cd 100644 --- a/services/helper/helper_service/app.py +++ b/services/helper/helper_service/app.py @@ -120,7 +120,7 @@ for name, pkg in package_paths.items(): openapi_file, # relative to specification_dir (SERVICES_DIR) arguments={"title": title}, pythonic_params=True, - base_path=base_path + base_path="/helper/" + base_path ) diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index 371ed6b2..b6453b45 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -43,8 +43,12 @@ http { # (ONLY DEVELOPMENT)Send the log directly to the console (useful in Docker or terminal) # access_log /dev/stdout debug_map; - location / { - proxy_pass $scheme://$http_host/api-invoker-management/v1/ui/; + location ~^/(?[^/]+)(?:/(?[^/]+))?/(ui|openapi\.json|swagger\.json) { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + proxy_pass http://$service_forwarding:8080; } location /api-invoker-management { @@ -159,7 +163,7 @@ http { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://helper:8080/; + proxy_pass http://helper:8080; } } -- GitLab From 7ec94d4516aab5968177e5c5932f97cc96209340 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 10 Feb 2026 17:01:19 +0100 Subject: [PATCH 077/101] Minor fix on rules_controller.py --- .../services/visibility_control/controllers/rules_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py b/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py index 07ac3cd4..cb54ac76 100644 --- a/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py +++ b/services/helper/helper_service/services/visibility_control/controllers/rules_controller.py @@ -50,7 +50,7 @@ def rules_rule_id_get(rule_id): return get_rule_by_id(rule_id) @cert_validation() -def rules_rule_id_patch(rule_id, rule_patch_request): +def rules_rule_id_patch(rule_id, body): """Update a rule (partial)""" if connexion.request.is_json: body = connexion.request.get_json() -- GitLab From 87d4589bd2e4d4cbd1d83723a8af25c59daf2bd8 Mon Sep 17 00:00:00 2001 From: "claudia.carballo" Date: Tue, 10 Feb 2026 18:10:56 +0100 Subject: [PATCH 078/101] minor changes in nginx for AMF role and in the helper service logic --- services/helper/helper_service/app.py | 3 +- .../core/visibility_control_core.py | 110 ----------------- services/nginx/Dockerfile | 3 + services/nginx/endpoints/endpoints.conf | 40 +++++++ services/nginx/maps/00-services.conf | 13 ++ services/nginx/maps/20-methods.conf | 8 ++ services/nginx/maps/30-auth-type.conf | 9 ++ services/nginx/maps/40-roles.conf | 9 ++ services/nginx/maps/90-policy-dispatch.conf | 38 ++++++ services/nginx/maps/95-auth-error.conf | 19 +++ services/nginx/maps/99-auth-decision.conf | 4 + services/nginx/nginx.conf | 113 +++++++----------- services/nginx/nginx_prepare.sh | 2 + services/nginx/policies/acl-mtls.conf | 7 ++ services/nginx/policies/auditing-mtls.conf | 6 + services/nginx/policies/discover-mtls.conf | 6 + services/nginx/policies/events-mtls.conf | 6 + services/nginx/policies/helper-mtls.conf | 5 + services/nginx/policies/invoker-mtls.conf | 7 ++ services/nginx/policies/invoker-token.conf | 4 + services/nginx/policies/logging-mtls.conf | 6 + services/nginx/policies/provider-mtls.conf | 7 ++ services/nginx/policies/provider-token.conf | 4 + services/nginx/policies/publish-mtls.conf | 6 + services/nginx/policies/security-mtls.conf | 14 +++ 25 files changed, 270 insertions(+), 179 deletions(-) create mode 100644 services/nginx/endpoints/endpoints.conf create mode 100644 services/nginx/maps/00-services.conf create mode 100644 services/nginx/maps/20-methods.conf create mode 100644 services/nginx/maps/30-auth-type.conf create mode 100644 services/nginx/maps/40-roles.conf create mode 100644 services/nginx/maps/90-policy-dispatch.conf create mode 100644 services/nginx/maps/95-auth-error.conf create mode 100644 services/nginx/maps/99-auth-decision.conf create mode 100644 services/nginx/policies/acl-mtls.conf create mode 100644 services/nginx/policies/auditing-mtls.conf create mode 100644 services/nginx/policies/discover-mtls.conf create mode 100644 services/nginx/policies/events-mtls.conf create mode 100644 services/nginx/policies/helper-mtls.conf create mode 100644 services/nginx/policies/invoker-mtls.conf create mode 100644 services/nginx/policies/invoker-token.conf create mode 100644 services/nginx/policies/logging-mtls.conf create mode 100644 services/nginx/policies/provider-mtls.conf create mode 100644 services/nginx/policies/provider-token.conf create mode 100644 services/nginx/policies/publish-mtls.conf create mode 100644 services/nginx/policies/security-mtls.conf diff --git a/services/helper/helper_service/app.py b/services/helper/helper_service/app.py index cb7a3d51..489ec42f 100644 --- a/services/helper/helper_service/app.py +++ b/services/helper/helper_service/app.py @@ -120,7 +120,8 @@ for name, pkg in package_paths.items(): openapi_file, # relative to specification_dir (SERVICES_DIR) arguments={"title": title}, pythonic_params=True, - base_path=base_path + # base_path=base_path + base_path="/helper/" + base_path ) diff --git a/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py index 14ad7a09..7a19f618 100644 --- a/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py +++ b/services/helper/helper_service/services/visibility_control/core/visibility_control_core.py @@ -8,33 +8,6 @@ from visibility_control.core.validate_user import ControlAccess valid_user = ControlAccess() -# def get_all_rules(): -# db = get_mongo() -# # Usamos la colección configurada en el helper -# col = db.get_col_by_name("visibility_rules") -# rules = list(col.find({}, {"_id": 0})) -# return {"rules": rules}, 200 - -# def get_all_rules(): -# """ -# Retrieve visibility rules. -# - If superadmin: Returns all rules without filtering. -# - If provider: Returns only rules matching the certificate identity (CN). -# """ -# db = get_mongo() -# col = db.get_col_by_name("visibility_rules") - -# # Safely retrieve identity from request object -# cn = request.user_cn - -# # Professional logic tree: -# # 1. Bypass security filters for Superadmin -# if cn != "superadmin": -# rules = list(col.find({"userName": cn}, {"_id": 0})) -# return {"rules": rules}, 200 - -# rules = list(col.find({}, {"_id": 0})) -# return {"rules": rules}, 200 def get_all_rules(): db = get_mongo() @@ -189,47 +162,6 @@ def get_rule_by_id(rule_id): "detail": "You do not have permission to view this rule" }, 401 -# def get_rule_by_id(rule_id): -# db = get_mongo() -# col = db.get_col_by_name("visibility_rules") -# cn = request.user_cn -# rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) -# # if rule: -# # return rule, 200 -# # return {"title": "Not Found", "detail": "Rule not found"}, 404 -# if not rule: -# return {"title": "Not Found", "detail": "Rule not found"}, 404 - -# # SECURITY CHECK: Only Superadmin or the actual owner (CN) can view -# if request.user_cn != "superadmin" and rule.get('updatedBy') != request.user_cn: -# return {"title": "Unauthorized", "detail": "You do not have permission to view this rule"}, 401 - -# rule.pop('_id', None) -# return rule, 200 - -# def delete_rule_by_id(rule_id): -# db = get_mongo() -# col = db.get_col_by_name("visibility_rules") -# cn = request.user_cn -# # 1. Fetch the rule first to check ownership -# rule = col.find_one({"ruleId": rule_id}) -# if not rule: -# return {"title": "Not Found", "detail": "Rule not found"}, 404 - -# # 2. SECURITY CHECK: Only Superadmin or the actual owner (CN) can delete -# # We compare the current certificate CN against the stored 'updatedBy' -# if request.user_cn != "superadmin" and rule.get('userName') != request.user_cn: -# return {"title": "Unauthorized", "detail": "You do not have permission to delete this rule"}, 401 - -# # 3. Perform the actual deletion -# res = col.delete_one({"ruleId": rule_id}) - -# # 4. Final check on the operation result -# if res.deleted_count > 0: -# return None, 204 - -# return {"title": "Not Found", "detail": "Rule not found"}, 404 - def delete_rule_by_id(rule_id): """ Delete a specific visibility rule after verifying ownership. @@ -273,48 +205,6 @@ def delete_rule_by_id(rule_id): "detail": "You do not have permission to delete this rule" }, 401 -# def update_rule_patch(rule_id, body): -# db = get_mongo() -# col = db.get_col_by_name("visibility_rules") -# cn = request.user_cn -# # Fetch existing rule for comparison -# existing_rule = col.find_one({"ruleId": rule_id}) -# if not existing_rule: -# return {"title": "Not Found", "detail": "Rule not found"}, 404 - -# # SECURITY CHECK: Only Superadmin or the actual owner (CN) can update -# if request.user_cn != "superadmin" and existing_rule.get('userName') != request.user_cn: -# return {"title": "Unauthorized", "detail": "You do not have permission to modify this rule"}, 401 - -# # Always update 'updatedAt' timestamp -# now = datetime.now(timezone.utc).isoformat().replace('+00:00', 'Z') -# body['updatedAt'] = now - -# # Re-validate date logic if dates are being modified -# new_start = body.get('startsAt', existing_rule.get('startsAt')) -# new_end = body.get('endsAt', existing_rule.get('endsAt')) - -# if new_start and new_end: -# try: -# s = datetime.fromisoformat(new_start.replace('Z', '+00:00')) -# e = datetime.fromisoformat(new_end.replace('Z', '+00:00')) -# if e <= s: -# return { -# "title": "Bad Request", -# "detail": "Validation Error: endsAt must be later than startsAt" -# }, 400 -# except ValueError: -# return {"title": "Bad Request", "detail": "Invalid date format."}, 400 - -# # # Update metadata if user info is provided -# # if 'providerSelector' in body and 'createdByUser' in body['providerSelector']: -# # body['updatedBy'] = body['providerSelector']['createdByUser'] -# body['updatedBy'] = cn - -# col.update_one({"ruleId": rule_id}, {"$set": body}) -# updated_rule = col.find_one({"ruleId": rule_id}, {"_id": 0}) -# return updated_rule, 200 - def update_rule_patch(rule_id, body): """ Update a specific visibility rule using PATCH logic. diff --git a/services/nginx/Dockerfile b/services/nginx/Dockerfile index b163386e..f8bb5356 100644 --- a/services/nginx/Dockerfile +++ b/services/nginx/Dockerfile @@ -9,6 +9,9 @@ RUN mkdir -p /etc/nginx/certs COPY ./certs/sign_req_body_tmp.json /etc/nginx/certs/sign_req_body_tmp.json COPY ./nginx.conf /etc/nginx/nginx.conf +COPY ./endpoints /etc/nginx/endpoints +COPY ./maps /etc/nginx/maps +COPY ./policies /etc/nginx/policies COPY ./nginx_prepare.sh . RUN chmod a+x nginx_prepare.sh diff --git a/services/nginx/endpoints/endpoints.conf b/services/nginx/endpoints/endpoints.conf new file mode 100644 index 00000000..76448f7e --- /dev/null +++ b/services/nginx/endpoints/endpoints.conf @@ -0,0 +1,40 @@ +map $uri $endpoint { + default "NO MATCH"; + + # Exact matches for endpoints that require specific handling (Must be on top of the regex matches) + /api-invoker-management/v1/onboardedInvokers invoker_onboarding_exact; + /api-provider-management/v1/registrations provider_registrations_exact; + /service-apis/v1/allServiceAPIs discover_service_exact; + + # Regex matches for endpoints that can be grouped by common patterns + # Helper related endpoints + ~^/helper/ helper_base_tree; + + # Invoker management related endpoints + ~^/api-invoker-management/v1/onboardedInvokers/ invoker_onboarding_tree; + + # Provider management related endpoints + ~^/api-provider-management/v1/registrations/ provider_registrations_tree; + + # Published APIs related endpoints + ~^/published-apis/v1/ published_apis_tree; + + # Logging related endpoints + ~^/api-invocation-logs/v1/ logging_tree; + + # Auditing related endpoints + ~^/logs/v1/ auditing_tree; + + # Security related endpoints + ~^/capif-security/v1/trustedInvokers/.+/update security_update; + ~^/capif-security/v1/trustedInvokers/.+/delete security_delete; + ~^/capif-security/v1/trustedInvokers/.+ security_trusted_invokers_exact; + ~^/capif-security/v1/securities/.+/token security_token; + ~^/capif-security/v1/ security_tree; + + # Events related endpoints + ~^/capif-events/v1/ events_tree; + + # Access control policy related endpoints + ~^/access-control-policy/v1/ acl_tree; +} diff --git a/services/nginx/maps/00-services.conf b/services/nginx/maps/00-services.conf new file mode 100644 index 00000000..44ec4730 --- /dev/null +++ b/services/nginx/maps/00-services.conf @@ -0,0 +1,13 @@ +map $uri $service { + default ""; + ~^/helper(/|$) helper; + ~^/api-invoker-management(/|$) invoker-management; + ~^/api-provider-management(/|$) provider-management; + ~^/service-apis(/|$) discover-service; + ~^/published-apis(/|$) publish-service; + ~^/api-invocation-logs(/|$) logging-service; + ~^/logs(/|$) auditing-service; + ~^/capif-security(/|$) security-service; + ~^/capif-events(/|$) events-service; + ~^/access-control-policy(/|$) access-control-policy; +} diff --git a/services/nginx/maps/20-methods.conf b/services/nginx/maps/20-methods.conf new file mode 100644 index 00000000..2f3bd120 --- /dev/null +++ b/services/nginx/maps/20-methods.conf @@ -0,0 +1,8 @@ +map $request_method $method { + default OTHER; + GET GET; + POST POST; + PUT PUT; + DELETE DELETE; + PATCH PATCH; +} diff --git a/services/nginx/maps/30-auth-type.conf b/services/nginx/maps/30-auth-type.conf new file mode 100644 index 00000000..90309a9a --- /dev/null +++ b/services/nginx/maps/30-auth-type.conf @@ -0,0 +1,9 @@ +map $ssl_client_verify $has_cert { + default 0; + SUCCESS 1; +} + +map $http_authorization $has_token { + default 0; + ~^Bearer\s+.+ 1; +} diff --git a/services/nginx/maps/40-roles.conf b/services/nginx/maps/40-roles.conf new file mode 100644 index 00000000..7984b351 --- /dev/null +++ b/services/nginx/maps/40-roles.conf @@ -0,0 +1,9 @@ +map $ssl_client_s_dn_cn $role { + default unknown; + superadmin superadmin; + "~^INV[a-zA-Z0-9]+$" invoker; + "~^AMF[a-zA-Z0-9]+$" amf; + "~^APF[a-zA-Z0-9]+$" apf; + "~^AEF[a-zA-Z0-9]+$" aef; + "~^CCF[a-zA-Z0-9]+$" ccf; +} \ No newline at end of file diff --git a/services/nginx/maps/90-policy-dispatch.conf b/services/nginx/maps/90-policy-dispatch.conf new file mode 100644 index 00000000..6c856570 --- /dev/null +++ b/services/nginx/maps/90-policy-dispatch.conf @@ -0,0 +1,38 @@ +map "$service:$has_token:$has_cert" $active_policy { + default DENY; + # Define policies for each service, based on the presence of a token and/or client certificate + # The format is: service_name:has_token:has_cert + + # Helper Service + helper:0:1 $helper_mtls_policy; + + # Api Invoker Management Service + invoker-management:1:0 $invoker_token_policy; + invoker-management:0:1 $invoker_mtls_policy; + + # Api Provider Management Service + provider-management:1:0 $provider_token_policy; + provider-management:0:1 $provider_mtls_policy; + + # Discover Service + discover-service:0:1 $discover_service_mtls_policy; + + # Published APIs Service + publish-service:0:1 $publish_service_mtls_policy; + + # Logging Service + logging-service:0:1 $logging_service_mtls_policy; + + # Auditing Service + auditing-service:0:1 $auditing_service_mtls_policy; + + # Security Service + security-service:0:1 $security_service_mtls_policy; + + # Events Service + events-service:0:1 $events_service_mtls_policy; + + # Access Control Policy Service + access-control-policy:0:1 $access_control_policy_mtls_policy; + +} diff --git a/services/nginx/maps/95-auth-error.conf b/services/nginx/maps/95-auth-error.conf new file mode 100644 index 00000000..9b0b713c --- /dev/null +++ b/services/nginx/maps/95-auth-error.conf @@ -0,0 +1,19 @@ +map "$service:$endpoint:$method:$has_token:$has_cert:$role" $auth_error { + default '{"status":401,"title":"Unauthorized","detail":"Operation not allowed","cause":"Access denied by policy"}'; + ~^.*:.*:.*:0:0:.*$ '{"status":401, "title":"Unauthorized" ,"detail":"Certifcate not present", "cause":"Certificate is required for this API route"}'; + ~^helper:.*:.*:0:1:(invoker|apf|aef)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; + ~^invoker-management:.*:.*:0:1:(amf|apf|aef|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; + ~^provider-management:.*:.*:0:1:(invoker|apf|aef|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be amf"}'; + ~^discover-service:.*:.*:0:1:(amf|apf|aef)$ '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; + ~^publish-service:.*:.*:0:1:(invoker|amf|aef)$ '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; + ~^events-service:.*:.*:0:1:(ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; + ~^access-control-policy:.*:.*:0:1:(amf|apf|invoker)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"Certificate not authorized"}'; + + ~^security-service:security_trusted_invokers_exact:GET:0:1:(invoker|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; + ~^security-service:security_trusted_invokers_exact:DELETE:0:1:(invoker|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; + ~^security-service:security_trusted_invokers_exact:PUT:0:1:(aef|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; + ~^security-service:security_update:POST:0:1:(aef|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; + ~^security-service:security_delete:POST:0:1:(invoker|amf|apf|ccf)$ '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; + ~^security-service:security_token:POST:0:1:(aef|amf|apf|ccf)$ '{"error":"unauthorized_client", "error_description":"Role not authorized for this API route"}'; + +} diff --git a/services/nginx/maps/99-auth-decision.conf b/services/nginx/maps/99-auth-decision.conf new file mode 100644 index 00000000..82aa8bf0 --- /dev/null +++ b/services/nginx/maps/99-auth-decision.conf @@ -0,0 +1,4 @@ +map $active_policy $auth_allowed { + default 0; + ALLOW 1; +} diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index 8848b4c1..3681f58c 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -1,6 +1,6 @@ worker_processes auto; -error_log /var/log/nginx/error.log warn; +error_log /var/log/nginx/error.log ${LOG_LEVEL}; pid /tmp/nginx.pid; events { @@ -12,43 +12,11 @@ http { default ""; ~(^|,)CN=(?[^,]+) $CN; } - map "$request_method:$uri:$ssl_client_s_dn_cn" $helper_error_message { - default 'SUCCESS'; - "~*(GET|DELETE|POST|PATCH):.*:(?!(superadmin|AMF))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be superadmin"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $invoker_error_message { - default 'SUCCESS'; - "~*(PUT|DELETE):.*:(?!(INV|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $provider_error_message { - default 'SUCCESS'; - "~*(PUT|DELETE|PATCH):.*:(?!(AMF|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be amf"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $publish_error_message { - default 'SUCCESS'; - "~*.*:.*:(?!(APF|ccf|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $acl_error_message { - default 'SUCCESS'; - "~*.*:.*:(?!(AEF|ccf|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"Certificate not authorized"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $discover_error_message { - default 'SUCCESS'; - "~*.*:.*:(?!(INV|ccf|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $security_error_message { - default 'SUCCESS'; - "~*DELETE:.*:(?!(AEF|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; - "~*PUT:.*:(?!(INV|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; - "~*GET:.*:(?!(AEF|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; - "~*POST:.*/update:(?!(INV|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}'; - "~*POST:.*/delete:(?!(AEF|superadmin))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}'; - "~*POST:.*/token:(?!(INV|superadmin))(.*)" '{"error":"unauthorized_client", "error_description":"Role not authorized for this API route"}'; - } - map "$request_method:$uri:$ssl_client_s_dn_cn" $events_error_message { - default 'SUCCESS'; - "~*.*:.*:ccf" '{"status":401, "title":"Unauthorized" ,"detail":"User not authorized", "cause":"Certificate not authorized"}'; - } + include maps/*.conf; + include policies/*.conf; + include endpoints/*.conf; + + # log_format debug_map 'Policy: $uri - $endpoint:$method:$role"$service:$has_token:$has_cert:$active_policy:$auth_allowed:$ssl_client_s_dn_cn' server { listen 8080; @@ -72,23 +40,30 @@ http { ssl_verify_depth 2; ssl_session_tickets off; - location / { - proxy_pass $scheme://$http_host/api-invoker-management/v1/ui/; + # (ONLY DEVELOPMENT)Send the log directly to the console (useful in Docker or terminal) + # access_log /dev/stdout debug_map; + + location ~^/(?[^/]+)(?:/(?[^/]+))?/(ui|openapi\.json|swagger\.json) { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + proxy_pass http://$service_forwarding:8080; } location /api-invoker-management { - if ( $invoker_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $invoker_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://api-invoker-management:8080; } location /api-provider-management { - if ( $provider_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $provider_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://api-provider-management:8080; @@ -98,9 +73,9 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } - if ( $discover_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $discover_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://service-apis:8080; @@ -110,9 +85,9 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } - if ( $publish_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $publish_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://published-apis:8080; @@ -122,6 +97,10 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } + if ($auth_allowed = 0) { + add_header Content-Type 'application/problem+json'; + return 401 $auth_error; + } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://api-invocation-logs:8080; } @@ -130,6 +109,10 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } + if ($auth_allowed = 0) { + add_header Content-Type 'application/problem+json'; + return 401 $auth_error; + } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://logs:8080; } @@ -138,9 +121,9 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } - if ( $security_error_message != SUCCESS ) { - add_header Content-Type 'application/problem+json'; - return 401 $security_error_message; + if ($auth_allowed = 0) { + add_header Content-Type 'application/problem+json'; + return 401 $auth_error; } proxy_set_header X-TLS-Protocol $ssl_protocol; @@ -155,41 +138,35 @@ http { if ($ssl_client_verify != SUCCESS) { return 403; } - if ( $events_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $events_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://capif-events:8080; } location /access-control-policy { - if ( $acl_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $acl_error_message; + return 401 $auth_error; } proxy_set_header X-SSL-Client-Cert $ssl_client_cert; proxy_pass http://access-control-policy:8080; } location /helper { - if ( $helper_error_message != SUCCESS ) { + if ($auth_allowed = 0) { add_header Content-Type 'application/problem+json'; - return 401 $helper_error_message; + return 401 $auth_error; } - # proxy_set_header Host $host; - # proxy_set_header X-Real-IP $remote_addr; - # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-SSL-Client-Cert $ssl_client_cert; - proxy_pass http://helper:8080/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Ssl-Client-Cert $ssl_client_cert; + proxy_pass http://helper:8080; } - # location /visibility-control/ { - # proxy_set_header Host $host; - # proxy_set_header X-Real-IP $remote_addr; - # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # proxy_pass http://helper:8080/visibility-control/; - # } } } diff --git a/services/nginx/nginx_prepare.sh b/services/nginx/nginx_prepare.sh index 91884863..5d2179e9 100644 --- a/services/nginx/nginx_prepare.sh +++ b/services/nginx/nginx_prepare.sh @@ -126,6 +126,8 @@ case "$LOG_LEVEL" in ;; esac +echo "Using log level: $LOG_LEVEL" envsubst '$LOG_LEVEL' < /etc/nginx/nginx.conf > /etc/nginx/nginx.conf.tmp mv /etc/nginx/nginx.conf.tmp /etc/nginx/nginx.conf +echo "Saving nginx configuration with log level: $LOG_LEVEL" nginx diff --git a/services/nginx/policies/acl-mtls.conf b/services/nginx/policies/acl-mtls.conf new file mode 100644 index 00000000..67d8a4a5 --- /dev/null +++ b/services/nginx/policies/acl-mtls.conf @@ -0,0 +1,7 @@ +map "$endpoint:$method:$role" $access_control_policy_mtls_policy { + default DENY; + # Security policies that use mTLS for authentication + ~^acl_tree:GET:(aef|superadmin)$ ALLOW; + +} + diff --git a/services/nginx/policies/auditing-mtls.conf b/services/nginx/policies/auditing-mtls.conf new file mode 100644 index 00000000..3c1379fa --- /dev/null +++ b/services/nginx/policies/auditing-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $auditing_service_mtls_policy { + default DENY; + # Auditing policies that use mTLS for authentication + ~^auditing_tree:(GET):(amf|superadmin)$ ALLOW; +} + diff --git a/services/nginx/policies/discover-mtls.conf b/services/nginx/policies/discover-mtls.conf new file mode 100644 index 00000000..ba07065a --- /dev/null +++ b/services/nginx/policies/discover-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $discover_service_mtls_policy { + default DENY; + # Discover policies that use mTLS for authentication + ~^discover_service_exact:GET:(invoker|ccf|superadmin)$ ALLOW; +} + diff --git a/services/nginx/policies/events-mtls.conf b/services/nginx/policies/events-mtls.conf new file mode 100644 index 00000000..2000826a --- /dev/null +++ b/services/nginx/policies/events-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $events_service_mtls_policy { + default DENY; + #Publish policies that use mTLS for authentication + ~^events_tree:(POST|DELETE|PUT|PATCH):(amf|apf|aef|invoker|superadmin)$ ALLOW; +} + diff --git a/services/nginx/policies/helper-mtls.conf b/services/nginx/policies/helper-mtls.conf new file mode 100644 index 00000000..fdd096c7 --- /dev/null +++ b/services/nginx/policies/helper-mtls.conf @@ -0,0 +1,5 @@ +map "$endpoint:$method:$role" $helper_mtls_policy { + default "DENY"; + ~^helper_base_tree:.*:superadmin$ ALLOW; + ~^helper_base_tree:.*:amf$ ALLOW; # +} diff --git a/services/nginx/policies/invoker-mtls.conf b/services/nginx/policies/invoker-mtls.conf new file mode 100644 index 00000000..ccd479a6 --- /dev/null +++ b/services/nginx/policies/invoker-mtls.conf @@ -0,0 +1,7 @@ +map "$endpoint:$method:$role" $invoker_mtls_policy { + default DENY; + # Invoker policies that use mTLS for authentication + ~^invoker_onboarding_tree:(PUT|DELETE|PATCH):superadmin$ ALLOW; + ~^invoker_onboarding_tree:(PUT|DELETE|PATCH):invoker$ ALLOW; +} + diff --git a/services/nginx/policies/invoker-token.conf b/services/nginx/policies/invoker-token.conf new file mode 100644 index 00000000..8f385e02 --- /dev/null +++ b/services/nginx/policies/invoker-token.conf @@ -0,0 +1,4 @@ +map "$endpoint:$method" $invoker_token_policy { + default DENY; + invoker_onboarding_exact:POST ALLOW; +} diff --git a/services/nginx/policies/logging-mtls.conf b/services/nginx/policies/logging-mtls.conf new file mode 100644 index 00000000..dc66bb49 --- /dev/null +++ b/services/nginx/policies/logging-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $logging_service_mtls_policy { + default DENY; + # Logging policies that use mTLS for authentication + ~^logging_tree:POST:(aef|superadmin)$ ALLOW; +} + diff --git a/services/nginx/policies/provider-mtls.conf b/services/nginx/policies/provider-mtls.conf new file mode 100644 index 00000000..d8db996e --- /dev/null +++ b/services/nginx/policies/provider-mtls.conf @@ -0,0 +1,7 @@ +map "$endpoint:$method:$role" $provider_mtls_policy { + default DENY; + #Provider policies that use mTLS for authentication + ~^provider_registrations_tree:(PUT|DELETE|PATCH):superadmin$ ALLOW; + ~^provider_registrations_tree:(PUT|DELETE|PATCH):amf$ ALLOW; +} + diff --git a/services/nginx/policies/provider-token.conf b/services/nginx/policies/provider-token.conf new file mode 100644 index 00000000..3dac3cf3 --- /dev/null +++ b/services/nginx/policies/provider-token.conf @@ -0,0 +1,4 @@ +map "$endpoint:$method" $provider_token_policy { + default DENY; + provider_registrations_exact:POST ALLOW; +} diff --git a/services/nginx/policies/publish-mtls.conf b/services/nginx/policies/publish-mtls.conf new file mode 100644 index 00000000..368089f7 --- /dev/null +++ b/services/nginx/policies/publish-mtls.conf @@ -0,0 +1,6 @@ +map "$endpoint:$method:$role" $publish_service_mtls_policy { + default DENY; + #Publish policies that use mTLS for authentication + ~^published_apis_tree:(GET|POST|PUT|DELETE|PATCH):(apf|superadmin|ccf)$ ALLOW; +} + diff --git a/services/nginx/policies/security-mtls.conf b/services/nginx/policies/security-mtls.conf new file mode 100644 index 00000000..f1879835 --- /dev/null +++ b/services/nginx/policies/security-mtls.conf @@ -0,0 +1,14 @@ +map "$endpoint:$method:$role" $security_service_mtls_policy { + default DENY; + # Security policies that use mTLS for authentication + security_trusted_invokers_exact:DELETE:aef ALLOW; + security_trusted_invokers_exact:PUT:invoker ALLOW; + security_trusted_invokers_exact:GET:aef ALLOW; + security_update:POST:invoker ALLOW; + security_delete:POST:aef ALLOW; + security_token:POST:invoker ALLOW; + + ~^.*:.*:superadmin$ ALLOW; + +} + -- GitLab From 4658c29f75153fb7be77de28969bc389dc70f77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Thu, 12 Feb 2026 10:17:12 +0100 Subject: [PATCH 079/101] working with 11 test errors --- .../prepare_invoker.sh | 32 +++++++++- .../prepare_provider.sh | 31 +++++++++- .../prepare_security.sh | 31 +++++++++- services/docker-compose-capif.yml | 4 +- services/helper/helper_service/certs/.gitkeep | 0 services/helper/helper_service/db/db.py | 3 +- services/nginx/nginx_prepare.sh | 58 +++++++++++++++++-- services/register/register_prepare.sh | 16 ++--- services/register/register_service/app.py | 32 +++++++++- .../core/register_operations.py | 2 +- services/run_capif_tests.sh | 1 - services/variables.sh | 4 -- services/vault/vault_prepare_certs.sh | 49 ++++++++++------ tests/features/__init__.robot | 10 +--- tests/resources/common/basicRequests.robot | 2 +- 15 files changed, 217 insertions(+), 58 deletions(-) delete mode 100644 services/helper/helper_service/certs/.gitkeep diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh index 65f694b0..b501b514 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh @@ -20,7 +20,37 @@ while [ $ATTEMPT -lt $MAX_RETRIES ]; do # --header "X-Vault-Token: $VAULT_TOKEN" \ # --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" | jq -r '.data.data.pub_key') - CCF_ID="CCF11111111-2222-3333-4444-555555555555" + # CCF_ID="CCF11111111-2222-3333-4444-555555555555" + + # -------------------------------------------------------------- + # 0) Get CCF_ID from helper + # -------------------------------------------------------------- + HELPER_URL="http://helper:8080/api/getCcfId" + ATTEMPT_CCFID=0 + CCF_ID="" + + echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" + while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do + ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) + echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" + + RAW=$(curl -sS --fail --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) + CCF_ID=$(echo "$RAW" | jq -r '.ccf_id // empty' 2>/dev/null) + + if [ -n "$CCF_ID" ]; then + echo "[INFO] Got CCF_ID=$CCF_ID" + break + fi + + echo "[WARN] Helper not ready or invalid response. Retrying in ${RETRY_DELAY}s..." + sleep $RETRY_DELAY + done + + if [ -z "$CCF_ID" ]; then + echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" + exit 1 + fi + # Make the request to Vault and store the response in a variable RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh index c5981f07..4f052874 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh +++ b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh @@ -15,7 +15,36 @@ while [ $ATTEMPT -lt $MAX_RETRIES ]; do eval "ATTEMPT=\$((ATTEMPT + 1))" echo "Attempt $ATTEMPT of $MAX_RETRIES" - CCF_ID="CCF11111111-2222-3333-4444-555555555555" + # CCF_ID="CCF11111111-2222-3333-4444-555555555555" + + # -------------------------------------------------------------- + # 0) Get CCF_ID from helper + # -------------------------------------------------------------- + HELPER_URL="http://helper:8080/api/getCcfId" + ATTEMPT_CCFID=0 + CCF_ID="" + + echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" + while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do + ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) + echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" + + RAW=$(curl -sS --fail --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) + CCF_ID=$(echo "$RAW" | jq -r '.ccf_id // empty' 2>/dev/null) + + if [ -n "$CCF_ID" ]; then + echo "[INFO] Got CCF_ID=$CCF_ID" + break + fi + + echo "[WARN] Helper not ready or invalid response. Retrying in ${RETRY_DELAY}s..." + sleep $RETRY_DELAY + done + + if [ -z "$CCF_ID" ]; then + echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" + exit 1 + fi # Make the request to Vault and store the response in a variable RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ diff --git a/services/TS29222_CAPIF_Security_API/prepare_security.sh b/services/TS29222_CAPIF_Security_API/prepare_security.sh index c8c48b20..339188b4 100644 --- a/services/TS29222_CAPIF_Security_API/prepare_security.sh +++ b/services/TS29222_CAPIF_Security_API/prepare_security.sh @@ -57,7 +57,36 @@ while [ $ATTEMPT -lt $MAX_RETRIES ]; do # --header "X-Vault-Token: $VAULT_TOKEN" \ # --request GET "$VAULT_ADDR/v1/secret/data/server_cert/private" | jq -r '.data.data.key') - CCF_ID="CCF11111111-2222-3333-4444-555555555555" + # CCF_ID="CCF11111111-2222-3333-4444-555555555555" + # -------------------------------------------------------------- + # 0) Get CCF_ID from helper + # -------------------------------------------------------------- + HELPER_URL="http://helper:8080/api/getCcfId" + ATTEMPT_CCFID=0 + CCF_ID="" + + echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" + while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do + ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) + echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" + + RAW=$(curl -sS --fail --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) + CCF_ID=$(echo "$RAW" | jq -r '.ccf_id // empty' 2>/dev/null) + + if [ -n "$CCF_ID" ]; then + echo "[INFO] Got CCF_ID=$CCF_ID" + break + fi + + echo "[WARN] Helper not ready or invalid response. Retrying in ${RETRY_DELAY}s..." + sleep $RETRY_DELAY + done + + if [ -z "$CCF_ID" ]; then + echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" + exit 1 + fi + RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ --header "X-Vault-Token: $VAULT_TOKEN" \ diff --git a/services/docker-compose-capif.yml b/services/docker-compose-capif.yml index 01a34a6c..190155ec 100644 --- a/services/docker-compose-capif.yml +++ b/services/docker-compose-capif.yml @@ -34,8 +34,8 @@ services: - VAULT_PORT=8200 - LOG_LEVEL=${LOG_LEVEL} image: ${REGISTRY_BASE_URL}/helper:${OCF_VERSION} - depends_on: - - nginx + # depends_on: + # - nginx access-control-policy: build: diff --git a/services/helper/helper_service/certs/.gitkeep b/services/helper/helper_service/certs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/services/helper/helper_service/db/db.py b/services/helper/helper_service/db/db.py index 8d67bcbc..757933d3 100644 --- a/services/helper/helper_service/db/db.py +++ b/services/helper/helper_service/db/db.py @@ -91,8 +91,7 @@ class MongoDatabse(): # Ensure ccf_id exists even if config already there existing_config = capif_col.find_one({}, {"_id": 0}) if "ccf_id" not in existing_config: - # ccf_id = "CCF" + secrets.token_hex(15) - ccf_id="CCF11111111-2222-3333-4444-555555555555" + ccf_id = "CCF" + secrets.token_hex(15) capif_col.update_one({}, {"$set": {"ccf_id": ccf_id}}) print(f"Added missing ccf_id={ccf_id} to existing CAPIF configuration") else: diff --git a/services/nginx/nginx_prepare.sh b/services/nginx/nginx_prepare.sh index 50a953ac..9a39718c 100644 --- a/services/nginx/nginx_prepare.sh +++ b/services/nginx/nginx_prepare.sh @@ -18,8 +18,8 @@ SUCCES_OPERATION=false # ============================================================== # TEMP FIX: Force CCF ID (bypass Helper) # ============================================================== -CCF_ID="CCF11111111-2222-3333-4444-555555555555" -echo "[WARN] Using FORCED CCF_ID=${CCF_ID} (helper bypassed)" +# CCF_ID="CCF11111111-2222-3333-4444-555555555555" +# echo "[WARN] Using FORCED CCF_ID=${CCF_ID} (helper bypassed)" echo "[STEP] Fetching CA root certificate from Vault" @@ -77,11 +77,13 @@ if [ ! -f server.crt ]; then echo "[STEP 3] Generating CSR for CAPIF service" echo "[INFO] Common Name (CN): $CAPIF_HOSTNAME" + # genera un csr usando servery.key openssl req -new -key server.key \ -subj "/CN=$CAPIF_HOSTNAME" \ -addext "subjectAltName=DNS:$CAPIF_HOSTNAME" \ -out server.csr + # convierte el csr a una sola línea con \n para que se pueda enviar en el cuerpo del request a Vault (que espera un JSON) CSR_CONTENT=$(sed ':a;N;$!ba;s/\n/\\n/g' server.csr) echo "[STEP 3] CSR generated successfully" @@ -95,6 +97,7 @@ if [ ! -f server.crt ]; then ATTEMPT=$((ATTEMPT + 1)) echo "[STEP 3] Attempt $ATTEMPT/$MAX_RETRIES – Signing CSR in Vault" + echo "---------------- CURL REQUEST ----------------" echo "curl -X POST \\" echo " -H \"X-Vault-Token: $VAULT_TOKEN\" \\" @@ -102,16 +105,22 @@ if [ ! -f server.crt ]; then echo " \"$VAULT_ADDR/v1/pki_int/sign/my-ca\"" echo "----------------------------------------------" - + # POST /v1/pki_int/sign/my-ca (endpoint del intermediate CA para firmar el CSR)) SIGN_RESPONSE=$(curl -s -X POST \ -H "X-Vault-Token: $VAULT_TOKEN" \ - -d "{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\",\"common_name\":\"$CAPIF_HOSTNAME\"}" \ + -d "{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\"}" \ "$VAULT_ADDR/v1/pki_int/sign/my-ca") + + # SIGN_RESPONSE, te devuelve un formato PEM bundle con el certificado firmado + la cadena de certificados intermedios (pero sin el root). echo "---------------- VAULT RESPONSE ---------------" echo "$SIGN_RESPONSE" echo "----------------------------------------------" + # el responde contiene un campo dato formado por: + # ca_chain => bundle con intermediate + root. Basicamnete lo mismo que bundle.crt pero separados por comillas en vez de concatenados en un solo archivo + # certificate => el certificado firmado para el servidor. Incluye Certificado del servidor, Intermediate CA y Root CA (en ese orden) pero todo en un MISMO bloque PEM. + # issuing_ca => el certificado del intermediate CA que ha firmado el CSR (sin el root CA, sin concatenar, solo el intermediate). # CERT=$(echo "$SIGN_RESPONSE" | jq -r '.data.certificate') #CERT=$(printf '%s' "$SIGN_RESPONSE" | jq -r '.data.certificate // empty') @@ -122,6 +131,7 @@ if [ ! -f server.crt ]; then if [ -n "$CERT" ] && [ "$CERT" != "null" ]; then echo "$CERT" > server.crt echo "Server certificate successfully signed and saved." + # osea en server.crt tengo. Server.crt + intermediate CA + root CA (en ese orden) pero todo en un MISMO bloque PEM. SUCCESS_OPERATION=true break else @@ -140,7 +150,43 @@ fi ############################################################### -# 4) STORE CERTIFICATES IN VAULT UNDER capif/ +# 4) CCF_ID RETRIEVAL (from helper, inside docker network) +############################################################### +HELPER_URL="http://helper:8080/api/getCcfId" +ATTEMPT_CCFID=0 +CCF_ID="" + +echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" + +while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do + ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) + echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" + + RESP=$(curl -s --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) + + # Si tienes jq en nginx: + CCF_ID=$(printf '%s' "$RESP" | jq -r '.ccf_id // empty' 2>/dev/null || true) + + if [ -n "$CCF_ID" ]; then + echo "[INFO] Got CCF_ID=$CCF_ID" + break + fi + + echo "[WARN] Helper not ready or invalid response: $RESP" + echo "[WARN] Retrying in ${RETRY_DELAY}s..." + sleep $RETRY_DELAY +done + +if [ -z "$CCF_ID" ]; then + echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" + exit 1 +fi + + + + +############################################################### +# 5) STORE CERTIFICATES IN VAULT UNDER capif/ ############################################################### echo "Storing CAPIF certificates in Vault..." @@ -171,7 +217,7 @@ echo "Certificates successfully stored in Vault namespace: secret/capif/$CCF_ID" ############################################################### -# 5) START NGINX +# 6) START NGINX ############################################################### LOG_LEVEL=$(echo "${LOG_LEVEL}" | tr '[:upper:]' '[:lower:]') diff --git a/services/register/register_prepare.sh b/services/register/register_prepare.sh index 4f8a7a73..740cc241 100644 --- a/services/register/register_prepare.sh +++ b/services/register/register_prepare.sh @@ -51,18 +51,10 @@ fi echo "CA chain retrieved successfully." -echo "Extracting Root CA only." -awk ' - /BEGIN CERTIFICATE/ {cert=""; collecting=1} - collecting {cert = cert $0 ORS} - /END CERTIFICATE/ { - collecting=0 - certs[++i]=cert - } - END { - print certs[1] - } -' ca_root.crt > ca_root_only.crt +echo "CA certificate content:" +echo "-----------------------------------" +cat ca_root.crt +echo "-----------------------------------" # ============================================================== diff --git a/services/register/register_service/app.py b/services/register/register_service/app.py index 35da0ac0..6b2c90f1 100644 --- a/services/register/register_service/app.py +++ b/services/register/register_service/app.py @@ -2,6 +2,7 @@ import json import logging import os +import time import requests from config import Config @@ -80,12 +81,39 @@ cert_file.write(bytes(ca_root, 'utf-8')) cert_file.close() # Request CAPIF private key to encode the CAPIF token -CCF_ID = "CCF11111111-2222-3333-4444-555555555555" +# CCF_ID = "CCF11111111-2222-3333-4444-555555555555" + +# ------------------------------------------------------------ +# Get CCF_ID from helper (internal docker network) +# ------------------------------------------------------------ + +helper_url = "http://helper:8080/api/getCcfId" + +CCF_ID = None +max_retries = 30 +retry_delay = 2 + +for attempt in range(1, max_retries + 1): + try: + ccf_resp = requests.get(helper_url, timeout=5) + ccf_resp.raise_for_status() + CCF_ID = ccf_resp.json().get("ccf_id") + if CCF_ID: + print(f"[INFO] Got CCF_ID={CCF_ID}") + break + except Exception as e: + print(f"[WARN] Helper not ready (attempt {attempt}/{max_retries}): {e}") + + time.sleep(retry_delay) + +if not CCF_ID: + raise RuntimeError("Helper did not return ccf_id after retries") + url = 'http://{}:{}/v1/secret/data/capif/{}/nginx'.format(config["ca_factory"]["url"], config["ca_factory"]["port"], CCF_ID) headers = {'X-Vault-Token': f"{config["ca_factory"]["token"]}"} response = requests.request("GET", url, headers=headers, verify = config["ca_factory"].get("verify", False)) - +response.raise_for_status() key_data = json.loads(response.text)["data"]["data"]["server_key"] # Create an Admin in the Admin Collection diff --git a/services/register/register_service/core/register_operations.py b/services/register/register_service/core/register_operations.py index 5da506c4..8dc4a2ea 100644 --- a/services/register/register_service/core/register_operations.py +++ b/services/register/register_service/core/register_operations.py @@ -79,7 +79,7 @@ class RegisterOperations: current_app.logger.debug(f"Request Helper service to remove user related information") url = f"https://{self.config["ccf"]["url"]}{self.config["ccf"]["helper_remove_user"]}{uuid}" current_app.logger.debug(f"Url {url}") - requests.delete(url, cert=("certs/superadmin.crt", "certs/superadmin.key"), verify="certs/ca_root_only.crt", timeout=int(os.getenv("TIMEOUT", "30"))) + requests.delete(url, cert=("certs/superadmin.crt", "certs/superadmin.key"), verify="certs/ca_root.crt", timeout=int(os.getenv("TIMEOUT", "30"))) current_app.logger.debug(f"Removing User with uuid {uuid} from db") mycol.delete_one({"uuid": uuid}) diff --git a/services/run_capif_tests.sh b/services/run_capif_tests.sh index cc674e72..65c9a45f 100755 --- a/services/run_capif_tests.sh +++ b/services/run_capif_tests.sh @@ -67,6 +67,5 @@ docker run $DOCKER_ROBOT_TTY_OPTIONS --rm --network="host" \ --variable CAPIF_VAULT:$CAPIF_VAULT \ --variable CAPIF_VAULT_PORT:$CAPIF_VAULT_PORT \ --variable CAPIF_VAULT_TOKEN:$CAPIF_VAULT_TOKEN \ - --variable CCF_ID:$CCF_ID \ --variable NOTIFICATION_DESTINATION_URL:$NOTIFICATION_DESTINATION_URL \ --variable MOCK_SERVER_URL:$MOCK_SERVER_URL $INPUT_OPTIONS diff --git a/services/variables.sh b/services/variables.sh index 663f53bd..e787e0f5 100755 --- a/services/variables.sh +++ b/services/variables.sh @@ -50,7 +50,3 @@ export DOCKER_ROBOT_TTY_OPTIONS="-ti" # Mock server variables export MOCK_SERVER_URL=http://mock-server:${MOCK_SERVER_PORT} export NOTIFICATION_DESTINATION_URL=http://mock-server:${MOCK_SERVER_PORT} - -# CAPIF Core Federation ID -export CCF_ID=CCF11111111-2222-3333-4444-555555555555 - diff --git a/services/vault/vault_prepare_certs.sh b/services/vault/vault_prepare_certs.sh index 1b99800a..2a33849a 100755 --- a/services/vault/vault_prepare_certs.sh +++ b/services/vault/vault_prepare_certs.sh @@ -9,6 +9,7 @@ echo "CAPIF_HOSTNAME: $CAPIF_HOSTNAME" echo "VAULT_ADDR: $VAULT_ADDR" echo "VAULT_TOKEN: $VAULT_TOKEN" +# Enable PKI secrets engine, default path is pki/ vault secrets enable pki @@ -16,14 +17,20 @@ vault secrets enable pki # 1) ROOT CA ############################################################ -# Generate a root CA +# Modify pki engine settings vault secrets tune -max-lease-ttl=87600h pki -vault write -field=certificate pki/root/generate/internal \ +# Crea un root CA interno de VAULT, endpoint pki/root/generate/internal +# internal = Vault genera y guarda la clave privada del root internamente. +vault write -field=certificate \ + pki/root/generate/internal \ common_name="capif" \ - issuer_name="root-2023" \ - ttl=87600h > root_2023_ca.crt + issuer_name="root-2026" \ + ttl=87600h > root_2026_ca.crt +# Configura URLs que VAULT meterá en los certificados emitidos +# issuing_certificates: dónde se publica el certificado de la CA. +# crl_distribution_points: dónde se publica la CRL (revocaciones). vault write pki/config/urls \ issuing_certificates="$VAULT_ADDR/v1/pki/ca" \ crl_distribution_points="$VAULT_ADDR/v1/pki/crl" @@ -33,30 +40,42 @@ vault write pki/config/urls \ # 2) INTERMEDIATE CA ############################################################ -# Generate an intermediate CA +# Habilita otro engine PKI, pero en ruta pki_int/. vault secrets enable -path=pki_int pki +# Ajusta el TTL máximo del engine intermediate. vault secrets tune -max-lease-ttl=43800h pki_int + vault write -format=json pki_int/intermediate/generate/internal \ common_name="capif Intermediate Authority" \ issuer_name="capif-intermediate" \ | jq -r '.data.csr' > pki_intermediate.csr -# Sign the intermediate CA -vault write -format=json pki/root/sign-intermediate \ - issuer_ref="root-2023" \ +# Explicación de este comando: +# vault write --> haz una llamada al API de Vault para escribir/ejecutar algo (normalemente equivale a un POST) +# -format=json --> devuélveme la respuesta en JSON completo +# pki_int/intermediate/generate/internal \ --> Es la ruta del endpoint dentro de Vault (la “API path” del motor PKI). intermediate/generate/internal= genera una CA intermedia con clave privada interna y devuélveme un CSR”. +# common_name="capif Intermediate Authority" \ +# issuer_name="capif-intermediate" \ +# | jq -r '.data.csr' > pki_intermediate.csr --> Toma la respuesta JSON, extrae el campo .data.csr (que es el CSR generado por Vault) y guárdalo en un archivo llamado pki_intermediate.csr. + +# Sign the intermediate CA with the root CA --> obtiene capif_intermediate.cert.pem +vault write -format=json \ + pki/root/sign-intermediate \ + issuer_ref="root-2026" \ csr=@pki_intermediate.csr \ format=pem_bundle ttl="43800h" \ | jq -r '.data.certificate' > capif_intermediate.cert.pem -# Configure the intermediate CA +# vault write pki_int/intermediate/set-signed certificate=@capif_intermediate.cert.pem vault write pki_int/intermediate/set-signed certificate=@capif_intermediate.cert.pem ############################################################ # 3) CONFIGURE SIGNING ROLE ############################################################ +# Crea un “role” llamado my-ca dentro de pki_int. Ese role define las reglas para emitir certificados. vault write pki_int/roles/my-ca \ use_csr_common_name=true \ require_cn=true \ @@ -70,14 +89,9 @@ vault write pki_int/roles/my-ca \ # ============================================================ # 4) CA BUNDLE # ============================================================ -openssl x509 -in capif_intermediate.cert.pem -out intermediate_ca.crt - -cat > certificados_concatenados.crt << EOF -$(cat root_2023_ca.crt) -$(cat intermediate_ca.crt) -EOF -vault kv put secret/ca ca=@certificados_concatenados.crt +# Guarda el certificado intermedio y el root en un mismo fichero (CA bundle) para que nginx pueda usarlo como cadena de confianza. +vault kv put secret/ca ca=@capif_intermediate.cert.pem echo "[INFO] CA bundle stored at secret/ca" @@ -87,11 +101,12 @@ echo "[INFO] CA bundle stored at secret/ca" # (Not required in local dev, required in prod) # ============================================================ +# vriables para crear una política y token de solo lectura para el CA POLICY_NAME="my-policy" POLICY_FILE="my-policy.hcl" TOKEN_ID="read-ca-token" -# Create a policy to read the CA +# Crea un fichero HCL con la política de solo lectura para el CA echo "path \"secret/data/ca\" { capabilities = [\"read\"] }" > "$POLICY_FILE" diff --git a/tests/features/__init__.robot b/tests/features/__init__.robot index 672a481b..0796fcdc 100644 --- a/tests/features/__init__.robot +++ b/tests/features/__init__.robot @@ -13,7 +13,6 @@ Prepare environment Log ${CAPIF_HOSTNAME} Log "${CAPIF_HTTP_PORT}" Log "${CAPIF_HTTPS_PORT}" - Log Using CCF_ID: ${CCF_ID} Set Global Variable ${CAPIF_HTTP_VAULT_URL} http://${CAPIF_VAULT}/ IF "${CAPIF_VAULT_PORT}" != "" @@ -54,13 +53,10 @@ Prepare environment Retrieve Ca Root [Documentation] This keyword retrieve ca.root from CAPIF and store it at ca.crt in order to use at TLS communications - ${resp}= Get CA Vault /v1/secret/data/capif/${CCF_ID}/nginx ${CAPIF_HTTP_VAULT_URL} + ${resp}= Get CA Vault /v1/secret/data/ca ${CAPIF_HTTP_VAULT_URL} Status Should Be 200 ${resp} - ${ca_bundle}= Set Variable ${resp.json()['data']['data']['ca']} - Log ${ca_bundle} - ${root_ca}= Extract First Pem Certificate ${ca_bundle} - Store In File ca.crt ${root_ca} - Log Dictionary ${resp.json()} + Log ${resp.json()['data']['data']['ca']} + Store In File ca.crt ${resp.json()['data']['data']['ca']} Retrieve Superadmin Cert [Documentation] This keyword retrieve ca.root from CAPIF and store it at ca.crt in order to use at TLS communications diff --git a/tests/resources/common/basicRequests.robot b/tests/resources/common/basicRequests.robot index b1b350e2..e02a9c93 100644 --- a/tests/resources/common/basicRequests.robot +++ b/tests/resources/common/basicRequests.robot @@ -970,7 +970,7 @@ Get Number Of Services Get Capif Ccf Id ${resp}= Get Request Capif - ... /helper/getCcfId + ... /helper/api/getCcfId ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${SUPERADMIN_USERNAME} -- GitLab From 58d4a68e94157a44f921f55fdc0a10cc3b6b5d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Thu, 12 Feb 2026 11:56:52 +0100 Subject: [PATCH 080/101] fix common name signatur in vault and change spanish comments --- services/nginx/nginx_prepare.sh | 45 ++++++--------------------- services/vault/vault_prepare_certs.sh | 40 +++++++++--------------- 2 files changed, 25 insertions(+), 60 deletions(-) diff --git a/services/nginx/nginx_prepare.sh b/services/nginx/nginx_prepare.sh index 9a39718c..7c1f5aeb 100644 --- a/services/nginx/nginx_prepare.sh +++ b/services/nginx/nginx_prepare.sh @@ -15,12 +15,9 @@ ATTEMPT=0 SUCCES_OPERATION=false -# ============================================================== -# TEMP FIX: Force CCF ID (bypass Helper) -# ============================================================== -# CCF_ID="CCF11111111-2222-3333-4444-555555555555" -# echo "[WARN] Using FORCED CCF_ID=${CCF_ID} (helper bypassed)" - +############################################################### +# 1) FETCH CA ROOT CERTIFICATE FROM VAULT +############################################################### echo "[STEP] Fetching CA root certificate from Vault" while [ $ATTEMPT -lt $MAX_RETRIES ]; do @@ -77,13 +74,13 @@ if [ ! -f server.crt ]; then echo "[STEP 3] Generating CSR for CAPIF service" echo "[INFO] Common Name (CN): $CAPIF_HOSTNAME" - # genera un csr usando servery.key + # Generate CSR using the previously generated server.key openssl req -new -key server.key \ -subj "/CN=$CAPIF_HOSTNAME" \ -addext "subjectAltName=DNS:$CAPIF_HOSTNAME" \ -out server.csr - # convierte el csr a una sola línea con \n para que se pueda enviar en el cuerpo del request a Vault (que espera un JSON) + # Convert the CSR to a single line with \n so it can be sent in the body of the request to Vault (which expects JSON) CSR_CONTENT=$(sed ':a;N;$!ba;s/\n/\\n/g' server.csr) echo "[STEP 3] CSR generated successfully" @@ -97,41 +94,19 @@ if [ ! -f server.crt ]; then ATTEMPT=$((ATTEMPT + 1)) echo "[STEP 3] Attempt $ATTEMPT/$MAX_RETRIES – Signing CSR in Vault" - - echo "---------------- CURL REQUEST ----------------" - echo "curl -X POST \\" - echo " -H \"X-Vault-Token: $VAULT_TOKEN\" \\" - echo " -d '{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\",\"common_name\":\"$CAPIF_HOSTNAME\"}' \\" - echo " \"$VAULT_ADDR/v1/pki_int/sign/my-ca\"" - echo "----------------------------------------------" - - # POST /v1/pki_int/sign/my-ca (endpoint del intermediate CA para firmar el CSR)) + # POST /v1/pki_int/sign/my-ca intermediate's endpoint to sign the CSR SIGN_RESPONSE=$(curl -s -X POST \ -H "X-Vault-Token: $VAULT_TOKEN" \ - -d "{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\"}" \ + -d "{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\",\"common_name\":\"$CAPIF_HOSTNAME\"}" \ "$VAULT_ADDR/v1/pki_int/sign/my-ca") - # SIGN_RESPONSE, te devuelve un formato PEM bundle con el certificado firmado + la cadena de certificados intermedios (pero sin el root). - - echo "---------------- VAULT RESPONSE ---------------" - echo "$SIGN_RESPONSE" - echo "----------------------------------------------" + # SIGN_RESPONSE; return a PEM bundle format with the signed certificate + intermediate certificate chain (but without the root). - # el responde contiene un campo dato formado por: - # ca_chain => bundle con intermediate + root. Basicamnete lo mismo que bundle.crt pero separados por comillas en vez de concatenados en un solo archivo - # certificate => el certificado firmado para el servidor. Incluye Certificado del servidor, Intermediate CA y Root CA (en ese orden) pero todo en un MISMO bloque PEM. - # issuing_ca => el certificado del intermediate CA que ha firmado el CSR (sin el root CA, sin concatenar, solo el intermediate). - - # CERT=$(echo "$SIGN_RESPONSE" | jq -r '.data.certificate') - #CERT=$(printf '%s' "$SIGN_RESPONSE" | jq -r '.data.certificate // empty') CERT=$(printf '%s' "$SIGN_RESPONSE" | jq -er '.data.certificate') - - if [ -n "$CERT" ] && [ "$CERT" != "null" ]; then echo "$CERT" > server.crt echo "Server certificate successfully signed and saved." - # osea en server.crt tengo. Server.crt + intermediate CA + root CA (en ese orden) pero todo en un MISMO bloque PEM. SUCCESS_OPERATION=true break else @@ -158,13 +133,13 @@ CCF_ID="" echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" +# Retry loop to get CCF_ID from Helper while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" RESP=$(curl -s --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) - # Si tienes jq en nginx: CCF_ID=$(printf '%s' "$RESP" | jq -r '.ccf_id // empty' 2>/dev/null || true) if [ -n "$CCF_ID" ]; then @@ -184,7 +159,6 @@ fi - ############################################################### # 5) STORE CERTIFICATES IN VAULT UNDER capif/ ############################################################### @@ -194,6 +168,7 @@ SERVER_CRT_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server.crt) SERVER_KEY_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server.key) CA_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' ca.crt) +# Store the server certificate, private key and CA certificate in Vault under secret/data/capif//nginx VAULT_RESPONSE=$(curl -s -w "%{http_code}" -o /tmp/vault_resp.json \ -X POST \ -H "X-Vault-Token: $VAULT_TOKEN" \ diff --git a/services/vault/vault_prepare_certs.sh b/services/vault/vault_prepare_certs.sh index 2a33849a..0be8b85d 100755 --- a/services/vault/vault_prepare_certs.sh +++ b/services/vault/vault_prepare_certs.sh @@ -20,17 +20,16 @@ vault secrets enable pki # Modify pki engine settings vault secrets tune -max-lease-ttl=87600h pki -# Crea un root CA interno de VAULT, endpoint pki/root/generate/internal -# internal = Vault genera y guarda la clave privada del root internamente. +# Create a root CA with a common name of "capif" and an issuer name of "root-2026". The certificate will be valid for 87600 hours (10 years). +# pki/root/generate/internal => vault generates and store the root CA private key internally and returns the certificate. vault write -field=certificate \ pki/root/generate/internal \ common_name="capif" \ issuer_name="root-2026" \ ttl=87600h > root_2026_ca.crt -# Configura URLs que VAULT meterá en los certificados emitidos -# issuing_certificates: dónde se publica el certificado de la CA. -# crl_distribution_points: dónde se publica la CRL (revocaciones). +# Configure the URLs that Vault will include in the issued certificates: +# issuing_certificates: where the CA certificate is published. crl_distribution_points: where the CRL (Certificate Revocation List) is published. vault write pki/config/urls \ issuing_certificates="$VAULT_ADDR/v1/pki/ca" \ crl_distribution_points="$VAULT_ADDR/v1/pki/crl" @@ -40,27 +39,19 @@ vault write pki/config/urls \ # 2) INTERMEDIATE CA ############################################################ -# Habilita otro engine PKI, pero en ruta pki_int/. +# Enable another PKI engine, but at path pki_int. vault secrets enable -path=pki_int pki -# Ajusta el TTL máximo del engine intermediate. +# Adjust the maximum TTL of the intermediate engine. vault secrets tune -max-lease-ttl=43800h pki_int - +# Generate a CSR for the intermediate CA. This will create a new private key for the intermediate CA and return a CSR that we will sign with the root CA. The CSR is saved in a file called pki_intermediate.csr. vault write -format=json pki_int/intermediate/generate/internal \ common_name="capif Intermediate Authority" \ issuer_name="capif-intermediate" \ | jq -r '.data.csr' > pki_intermediate.csr -# Explicación de este comando: -# vault write --> haz una llamada al API de Vault para escribir/ejecutar algo (normalemente equivale a un POST) -# -format=json --> devuélveme la respuesta en JSON completo -# pki_int/intermediate/generate/internal \ --> Es la ruta del endpoint dentro de Vault (la “API path” del motor PKI). intermediate/generate/internal= genera una CA intermedia con clave privada interna y devuélveme un CSR”. -# common_name="capif Intermediate Authority" \ -# issuer_name="capif-intermediate" \ -# | jq -r '.data.csr' > pki_intermediate.csr --> Toma la respuesta JSON, extrae el campo .data.csr (que es el CSR generado por Vault) y guárdalo en un archivo llamado pki_intermediate.csr. - -# Sign the intermediate CA with the root CA --> obtiene capif_intermediate.cert.pem +# Sign the intermediate CA with the root CA --> capif_intermediate.cert.pem vault write -format=json \ pki/root/sign-intermediate \ issuer_ref="root-2026" \ @@ -75,11 +66,11 @@ vault write pki_int/intermediate/set-signed certificate=@capif_intermediate.cert # 3) CONFIGURE SIGNING ROLE ############################################################ -# Crea un “role” llamado my-ca dentro de pki_int. Ese role define las reglas para emitir certificados. +# Creates a role named my-ca within pki_int. This role defines the rules for issuing certificates. vault write pki_int/roles/my-ca \ - use_csr_common_name=true \ - require_cn=true \ - use_csr_sans=true \ + use_csr_common_name=false \ + require_cn=false \ + use_csr_sans=false \ allow_any_name=true \ allow_bare_domains=true \ allow_glob_domains=true \ @@ -90,7 +81,7 @@ vault write pki_int/roles/my-ca \ # 4) CA BUNDLE # ============================================================ -# Guarda el certificado intermedio y el root en un mismo fichero (CA bundle) para que nginx pueda usarlo como cadena de confianza. +# Save the intermediate and root certificates in a single file (CA bundle) so that nginx can use it as a trust chain. vault kv put secret/ca ca=@capif_intermediate.cert.pem echo "[INFO] CA bundle stored at secret/ca" @@ -98,15 +89,14 @@ echo "[INFO] CA bundle stored at secret/ca" # ============================================================ # OPTIONAL: Create read-only token for CA access -# (Not required in local dev, required in prod) # ============================================================ -# vriables para crear una política y token de solo lectura para el CA +# variables for creating a read-only policy and token for the CA POLICY_NAME="my-policy" POLICY_FILE="my-policy.hcl" TOKEN_ID="read-ca-token" -# Crea un fichero HCL con la política de solo lectura para el CA +# Create a HCL file with the read-only policy for the CA echo "path \"secret/data/ca\" { capabilities = [\"read\"] }" > "$POLICY_FILE" -- GitLab From 40f0957495a576185ba4f02b95d79de2c0aa3e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Thu, 12 Feb 2026 12:07:14 +0100 Subject: [PATCH 081/101] fix some code style --- .../api_invoker_management/app.py | 9 ++-- .../prepare_invoker.sh | 43 ++++++++----------- .../api_provider_management/app.py | 9 ++-- .../prepare_provider.sh | 37 ++++++++-------- .../prepare_security.sh | 42 ++++++++---------- services/docker-compose-capif.yml | 2 - services/register/register_service/app.py | 4 -- tests/features/__init__.robot | 8 ---- 8 files changed, 57 insertions(+), 97 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py index a1e0648e..634e4f07 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py @@ -119,19 +119,16 @@ def verbose_formatter(): datefmt='%d/%m/%Y %H:%M:%S' ) -# with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as pub_file: -# pub_data = pub_file.read() - with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as f: pem_data = f.read() -# Extraer el primer certificado del PEM (aunque venga en bundle) +# Extract the first certificate from the PEM (even if it comes in a bundle) cert = x509.load_pem_x509_certificate(pem_data, default_backend()) -# Extraer la clave pública +# Extract the public key public_key = cert.public_key() -# Convertir la clave pública a PEM (lo que JWT necesita) +# Convert the public key to PEM (which JWT needs) pub_data = public_key.public_bytes( encoding=serialization.Encoding.PEM, format=serialization.PublicFormat.SubjectPublicKeyInfo, diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh index b501b514..e11f9d6b 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh @@ -10,45 +10,36 @@ RETRY_DELAY=10 # Attempt counter ATTEMPT=0 +HELPER_URL="http://helper:8080/api/getCcfId" +ATTEMPT_CCFID=0 +CCF_ID="" + while [ $ATTEMPT -lt $MAX_RETRIES ]; do # Increment ATTEMPT using eval eval "ATTEMPT=\$((ATTEMPT + 1))" echo "Attempt $ATTEMPT of $MAX_RETRIES" - # Make the request to Vault and store the response in a variable - # RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ - # --header "X-Vault-Token: $VAULT_TOKEN" \ - # --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" | jq -r '.data.data.pub_key') - - # CCF_ID="CCF11111111-2222-3333-4444-555555555555" - - # -------------------------------------------------------------- - # 0) Get CCF_ID from helper - # -------------------------------------------------------------- - HELPER_URL="http://helper:8080/api/getCcfId" - ATTEMPT_CCFID=0 - CCF_ID="" - + # Get CCF_ID from helper echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do - ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) - echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" + ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) + echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" - RAW=$(curl -sS --fail --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) - CCF_ID=$(echo "$RAW" | jq -r '.ccf_id // empty' 2>/dev/null) + RAW=$(curl -sS --fail --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) + CCF_ID=$(echo "$RAW" | jq -r '.ccf_id // empty' 2>/dev/null) - if [ -n "$CCF_ID" ]; then - echo "[INFO] Got CCF_ID=$CCF_ID" - break - fi + if [ -n "$CCF_ID" ]; then + echo "[INFO] Got CCF_ID=$CCF_ID" + break + fi - echo "[WARN] Helper not ready or invalid response. Retrying in ${RETRY_DELAY}s..." - sleep $RETRY_DELAY + echo "[WARN] Helper not ready or invalid response. Retrying in ${RETRY_DELAY}s..." + sleep $RETRY_DELAY done if [ -z "$CCF_ID" ]; then - echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" - exit 1 + echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" + exit 1 fi diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py index e943db49..0c27cb64 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py @@ -112,19 +112,16 @@ def verbose_formatter(): ) -# with open("/usr/src/app/api_provider_management/pubkey.pem", "rb") as pub_file: -# pub_data = pub_file.read() - with open("/usr/src/app/api_provider_management/pubkey.pem", "rb") as f: pem_data = f.read() -# Extraer el primer certificado del PEM (aunque venga en bundle) +# Extract the first certificate from the PEM (even if it comes in a bundle) cert = x509.load_pem_x509_certificate(pem_data, default_backend()) -# Extraer la clave pública +# Extract the public key public_key = cert.public_key() -# Convertir la clave pública a PEM (lo que JWT necesita) +# Convert the public key to PEM (which JWT needs) pub_data = public_key.public_bytes( encoding=serialization.Encoding.PEM, format=serialization.PublicFormat.SubjectPublicKeyInfo, diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh index 4f052874..fe376415 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh +++ b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh @@ -10,40 +10,37 @@ RETRY_DELAY=10 # Attempt counter ATTEMPT=0 +HELPER_URL="http://helper:8080/api/getCcfId" +ATTEMPT_CCFID=0 +CCF_ID="" + while [ $ATTEMPT -lt $MAX_RETRIES ]; do # Increment ATTEMPT using eval eval "ATTEMPT=\$((ATTEMPT + 1))" echo "Attempt $ATTEMPT of $MAX_RETRIES" - # CCF_ID="CCF11111111-2222-3333-4444-555555555555" - - # -------------------------------------------------------------- - # 0) Get CCF_ID from helper - # -------------------------------------------------------------- - HELPER_URL="http://helper:8080/api/getCcfId" - ATTEMPT_CCFID=0 - CCF_ID="" + # Get CCF_ID from helper echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do - ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) - echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" + ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) + echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" - RAW=$(curl -sS --fail --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) - CCF_ID=$(echo "$RAW" | jq -r '.ccf_id // empty' 2>/dev/null) + RAW=$(curl -sS --fail --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) + CCF_ID=$(echo "$RAW" | jq -r '.ccf_id // empty' 2>/dev/null) - if [ -n "$CCF_ID" ]; then - echo "[INFO] Got CCF_ID=$CCF_ID" - break - fi + if [ -n "$CCF_ID" ]; then + echo "[INFO] Got CCF_ID=$CCF_ID" + break + fi - echo "[WARN] Helper not ready or invalid response. Retrying in ${RETRY_DELAY}s..." - sleep $RETRY_DELAY + echo "[WARN] Helper not ready or invalid response. Retrying in ${RETRY_DELAY}s..." + sleep $RETRY_DELAY done if [ -z "$CCF_ID" ]; then - echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" - exit 1 + echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" + exit 1 fi # Make the request to Vault and store the response in a variable diff --git a/services/TS29222_CAPIF_Security_API/prepare_security.sh b/services/TS29222_CAPIF_Security_API/prepare_security.sh index 339188b4..5dc12c9b 100644 --- a/services/TS29222_CAPIF_Security_API/prepare_security.sh +++ b/services/TS29222_CAPIF_Security_API/prepare_security.sh @@ -47,44 +47,36 @@ fi ATTEMPT=0 SUCCES_OPERATION=false +HELPER_URL="http://helper:8080/api/getCcfId" +ATTEMPT_CCFID=0 +CCF_ID="" + while [ $ATTEMPT -lt $MAX_RETRIES ]; do # Increment ATTEMPT using eval eval "ATTEMPT=\$((ATTEMPT + 1))" echo "Attempt $ATTEMPT of $MAX_RETRIES" - # Make the request to Vault and store the response in a variable - # RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ - # --header "X-Vault-Token: $VAULT_TOKEN" \ - # --request GET "$VAULT_ADDR/v1/secret/data/server_cert/private" | jq -r '.data.data.key') - - # CCF_ID="CCF11111111-2222-3333-4444-555555555555" - # -------------------------------------------------------------- - # 0) Get CCF_ID from helper - # -------------------------------------------------------------- - HELPER_URL="http://helper:8080/api/getCcfId" - ATTEMPT_CCFID=0 - CCF_ID="" - + # Get CCF_ID from helper echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do - ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) - echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" + ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) + echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" - RAW=$(curl -sS --fail --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) - CCF_ID=$(echo "$RAW" | jq -r '.ccf_id // empty' 2>/dev/null) + RAW=$(curl -sS --fail --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) + CCF_ID=$(echo "$RAW" | jq -r '.ccf_id // empty' 2>/dev/null) - if [ -n "$CCF_ID" ]; then - echo "[INFO] Got CCF_ID=$CCF_ID" - break - fi + if [ -n "$CCF_ID" ]; then + echo "[INFO] Got CCF_ID=$CCF_ID" + break + fi - echo "[WARN] Helper not ready or invalid response. Retrying in ${RETRY_DELAY}s..." - sleep $RETRY_DELAY + echo "[WARN] Helper not ready or invalid response. Retrying in ${RETRY_DELAY}s..." + sleep $RETRY_DELAY done if [ -z "$CCF_ID" ]; then - echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" - exit 1 + echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" + exit 1 fi diff --git a/services/docker-compose-capif.yml b/services/docker-compose-capif.yml index 190155ec..dee5cf7b 100644 --- a/services/docker-compose-capif.yml +++ b/services/docker-compose-capif.yml @@ -34,8 +34,6 @@ services: - VAULT_PORT=8200 - LOG_LEVEL=${LOG_LEVEL} image: ${REGISTRY_BASE_URL}/helper:${OCF_VERSION} - # depends_on: - # - nginx access-control-policy: build: diff --git a/services/register/register_service/app.py b/services/register/register_service/app.py index 6b2c90f1..e44771e2 100644 --- a/services/register/register_service/app.py +++ b/services/register/register_service/app.py @@ -80,15 +80,11 @@ cert_file = open("certs/ca_root.crt", 'wb') cert_file.write(bytes(ca_root, 'utf-8')) cert_file.close() -# Request CAPIF private key to encode the CAPIF token -# CCF_ID = "CCF11111111-2222-3333-4444-555555555555" # ------------------------------------------------------------ # Get CCF_ID from helper (internal docker network) # ------------------------------------------------------------ - helper_url = "http://helper:8080/api/getCcfId" - CCF_ID = None max_retries = 30 retry_delay = 2 diff --git a/tests/features/__init__.robot b/tests/features/__init__.robot index 0796fcdc..294f59b2 100644 --- a/tests/features/__init__.robot +++ b/tests/features/__init__.robot @@ -65,11 +65,3 @@ Retrieve Superadmin Cert Log Dictionary ${resp.json()} Log ${resp.json()['data']['certificate']} Store In File ${SUPERADMIN_USERNAME}.crt ${resp.json()['data']['certificate']} - -Extract First Pem Certificate - [Arguments] ${pem_bundle} - ${parts}= Split String ${pem_bundle} -----END CERTIFICATE----- - ${root_ca}= Catenate - ... ${parts[0]} - ... -----END CERTIFICATE----- - RETURN ${root_ca} \ No newline at end of file -- GitLab From e3a0212a02edd6103144844a7b5f8fd23611daf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Thu, 12 Feb 2026 12:09:26 +0100 Subject: [PATCH 082/101] fix some code style --- services/variables.sh | 1 + tests/features/__init__.robot | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/services/variables.sh b/services/variables.sh index e787e0f5..dd99ae30 100755 --- a/services/variables.sh +++ b/services/variables.sh @@ -50,3 +50,4 @@ export DOCKER_ROBOT_TTY_OPTIONS="-ti" # Mock server variables export MOCK_SERVER_URL=http://mock-server:${MOCK_SERVER_PORT} export NOTIFICATION_DESTINATION_URL=http://mock-server:${MOCK_SERVER_PORT} + diff --git a/tests/features/__init__.robot b/tests/features/__init__.robot index 294f59b2..7bfc08e1 100644 --- a/tests/features/__init__.robot +++ b/tests/features/__init__.robot @@ -50,7 +50,6 @@ Prepare environment Reset Testing Environment - Retrieve Ca Root [Documentation] This keyword retrieve ca.root from CAPIF and store it at ca.crt in order to use at TLS communications ${resp}= Get CA Vault /v1/secret/data/ca ${CAPIF_HTTP_VAULT_URL} -- GitLab From 0ee76031fc84599185e1bf8a04207af354b3f92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Thu, 12 Feb 2026 12:09:51 +0100 Subject: [PATCH 083/101] fix some code style --- tests/features/__init__.robot | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/features/__init__.robot b/tests/features/__init__.robot index 7bfc08e1..3ac73ab8 100644 --- a/tests/features/__init__.robot +++ b/tests/features/__init__.robot @@ -64,3 +64,4 @@ Retrieve Superadmin Cert Log Dictionary ${resp.json()} Log ${resp.json()['data']['certificate']} Store In File ${SUPERADMIN_USERNAME}.crt ${resp.json()['data']['certificate']} + -- GitLab From ccddea9703e840dad625e6a7f353674f6678a50c Mon Sep 17 00:00:00 2001 From: Castanheta Date: Thu, 12 Feb 2026 12:57:11 +0000 Subject: [PATCH 084/101] Update werkzeug version to 3.1.4 in requirements.txt --- .../TS29222_CAPIF_API_Invoker_Management_API/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt index feb93b7f..7ecb4edb 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt @@ -21,6 +21,6 @@ opentelemetry-api == 1.20.0 opentelemetry-sdk == 1.20.0 flask_executor == 1.0.0 Flask-APScheduler == 1.13.1 -werkzeug == 3.0.6 +werkzeug == 3.1.4 gunicorn == 23.0.0 packaging == 24.0 \ No newline at end of file -- GitLab From 4ec828773c32ac5476925e05d1810b2df0855380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Fri, 13 Feb 2026 12:48:00 +0100 Subject: [PATCH 085/101] add /helper before helper's urls --- .../TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh | 2 +- .../prepare_provider.sh | 2 +- services/TS29222_CAPIF_Security_API/prepare_security.sh | 2 +- services/nginx/nginx_prepare.sh | 2 +- services/register/register_service/app.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh index e11f9d6b..bde3c695 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh @@ -10,7 +10,7 @@ RETRY_DELAY=10 # Attempt counter ATTEMPT=0 -HELPER_URL="http://helper:8080/api/getCcfId" +HELPER_URL="http://helper:8080/helper/api/getCcfId" ATTEMPT_CCFID=0 CCF_ID="" diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh index fe376415..76b3dd82 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh +++ b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh @@ -10,7 +10,7 @@ RETRY_DELAY=10 # Attempt counter ATTEMPT=0 -HELPER_URL="http://helper:8080/api/getCcfId" +HELPER_URL="http://helper:8080/helper/api/getCcfId" ATTEMPT_CCFID=0 CCF_ID="" diff --git a/services/TS29222_CAPIF_Security_API/prepare_security.sh b/services/TS29222_CAPIF_Security_API/prepare_security.sh index 5dc12c9b..30b0c557 100644 --- a/services/TS29222_CAPIF_Security_API/prepare_security.sh +++ b/services/TS29222_CAPIF_Security_API/prepare_security.sh @@ -47,7 +47,7 @@ fi ATTEMPT=0 SUCCES_OPERATION=false -HELPER_URL="http://helper:8080/api/getCcfId" +HELPER_URL="http://helper:8080/helper/api/getCcfId" ATTEMPT_CCFID=0 CCF_ID="" diff --git a/services/nginx/nginx_prepare.sh b/services/nginx/nginx_prepare.sh index af6f61ef..0f237837 100644 --- a/services/nginx/nginx_prepare.sh +++ b/services/nginx/nginx_prepare.sh @@ -127,7 +127,7 @@ fi ############################################################### # 4) CCF_ID RETRIEVAL (from helper, inside docker network) ############################################################### -HELPER_URL="http://helper:8080/api/getCcfId" +HELPER_URL="http://helper:8080/helper/api/getCcfId" ATTEMPT_CCFID=0 CCF_ID="" diff --git a/services/register/register_service/app.py b/services/register/register_service/app.py index 85eda6d0..839b3fd0 100644 --- a/services/register/register_service/app.py +++ b/services/register/register_service/app.py @@ -85,7 +85,7 @@ cert_file.close() # ------------------------------------------------------------ # Get CCF_ID from helper (internal docker network) # ------------------------------------------------------------ -helper_url = "http://helper:8080/api/getCcfId" +helper_url = "http://helper:8080/helper/api/getCcfId" CCF_ID = None max_retries = 30 retry_delay = 2 -- GitLab From fee116d7879d821db9f175fe67882f6e15fe75bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Fri, 13 Feb 2026 13:03:11 +0100 Subject: [PATCH 086/101] adapt vault job for new development --- helm/vault-job/vault-job.yaml | 126 ++++------------------------------ 1 file changed, 13 insertions(+), 113 deletions(-) diff --git a/helm/vault-job/vault-job.yaml b/helm/vault-job/vault-job.yaml index a68f2f9e..215b2254 100644 --- a/helm/vault-job/vault-job.yaml +++ b/helm/vault-job/vault-job.yaml @@ -42,11 +42,11 @@ data: vault write -field=certificate pki/root/generate/internal \ common_name="capif" \ - issuer_name="root-2023" \ - ttl=87600h > root_2023_ca.crt + issuer_name="root-2026" \ + ttl=87600h > root_2026_ca.crt - echo "# check root_2023_ca.crt #" - cat root_2023_ca.crt + echo "# check root_2026_ca.crt #" + cat root_2026_ca.crt vault write pki/config/urls \ issuing_certificates="$VAULT_ADDR/v1/pki/ca" \ @@ -67,7 +67,7 @@ data: # Firmar la CA intermedia con la CA raíz vault write -format=json pki/root/sign-intermediate \ - issuer_ref="root-2023" \ + issuer_ref="root-2026" \ csr=@pki_intermediate.csr \ format=pem_bundle ttl="43800h" \ | jq -r '.data.certificate' > capif_intermediate.cert.pem @@ -92,118 +92,18 @@ data: # | jq -r '.data.private_key as $private_key | .data.issuing_ca as $issuing_ca | .data.certificate as $certificate | [$private_key, $issuing_ca, $certificate]' > cert_data.json - #Create CSR - openssl genrsa -out ./server.key 2048 - - cat > ./foo.cnf < cert_data.json - - vault write -format=json pki_int/sign/my-ca format=pem_bundle ttl="43000h" csr=@server.csr | jq -r '.data.issuing_ca as $issuing_ca | .data.certificate as $certificate | [$issuing_ca, $certificate]' > cert_data.json - - jq -r '.[0]' cert_data.json > root_ca.crt.pem - echo "### content root_ca.crt.pem ###" - cat root_ca.crt.pem - - echo "### content server_certificate.crt.pem ###" - jq -r '.[1]' cert_data.json > server_certificate.crt.pem - - openssl x509 -pubkey -noout -in server_certificate.crt.pem > server_certificate_pub.pem - - #vault kv put secret/ca ca=@root_helm.pem root_2023_ca.crt - - #cat root_2023_ca.crt root_2023_ca.crt > ca.crt - - cat > certificados_concatenados.crt << EOF - $(cat "root_2023_ca.crt") - $(cat "root_ca.crt.pem") - EOF - echo "### content of root_2023_ca.crt ###" - cat root_2023_ca.crt - - echo "### content of root_ca.crt.pem ###" - cat root_ca.crt.pem - - echo "### content of certificados_concatenados.crt ###" - cat certificados_concatenados.crt - - # vault kv put secret/ca ca=@root_2023_ca.crt + ############################################################ + # 4) CA BUNDLE (KV v2) + ############################################################ echo "### enable secrets kv ###" vault secrets enable -path=secret -version=2 kv - vault kv put secret/ca ca=@certificados_concatenados.crt - - vault kv put secret/server_cert cert=@server_certificate.crt.pem - - vault kv put secret/server_cert/pub pub_key=@server_certificate_pub.pem - - vault kv put secret/server_cert/private key=@server.key + # Store CA bundle at secret/ca (same as docker script) + vault kv put secret/ca ca=@capif_intermediate.cert.pem + + echo "[INFO] CA bundle stored at secret/ca" + #POLICY_NAME="my-policy" #POLICY_FILE="my-policy.hcl" -- GitLab From 7fbb2754a932f6c2fc519b156d6d63591140c526 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 16 Feb 2026 11:01:45 +0100 Subject: [PATCH 087/101] Fix config map --- .../charts/ocf-helper/templates/ocf-helper-configmap.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml b/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml index 2ca7ca43..ac7f1042 100644 --- a/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml +++ b/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml @@ -36,5 +36,9 @@ data: "configuration_api": { "path": "/configuration", "openapi_file": "configuration/openapi/openapi.yaml" + }, + "visibility_control": { + "path": "/visibility-control", + "openapi_file": "visibility-control/openapi/openapi.yaml" } } \ No newline at end of file -- GitLab From 340ddaeac7eacfe3b96c2592c3dce4b881594676 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 16 Feb 2026 11:35:09 +0100 Subject: [PATCH 088/101] Fix helper config map --- .../capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml b/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml index ac7f1042..f422d446 100644 --- a/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml +++ b/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml @@ -39,6 +39,6 @@ data: }, "visibility_control": { "path": "/visibility-control", - "openapi_file": "visibility-control/openapi/openapi.yaml" + "openapi_file": "visibility_control/openapi/openapi.yaml" } } \ No newline at end of file -- GitLab From 6040f827a8f9c3f9de8464e4d9816e6337da4e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Mon, 16 Feb 2026 17:26:19 +0100 Subject: [PATCH 089/101] stronger create superadmin --- services/helper/helper_service/app.py | 43 ++++++++++++++++++++------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/services/helper/helper_service/app.py b/services/helper/helper_service/app.py index fcb9b8cd..1218db6b 100644 --- a/services/helper/helper_service/app.py +++ b/services/helper/helper_service/app.py @@ -56,10 +56,35 @@ csr_request = dump_certificate_request(FILETYPE_PEM, req) private_key = dump_privatekey(FILETYPE_PEM, key) # Save superadmin private key -key_file = open("certs/superadmin.key", 'wb+') -key_file.write(bytes(private_key)) -logger.info(f"Superadmin key:\n{private_key}") -key_file.close() +CERTS_DIR = Path(__file__).resolve().parent / "certs" + +try: + # If it exists but it's not a directory -> fail early with a clear error + if CERTS_DIR.exists() and not CERTS_DIR.is_dir(): + raise RuntimeError(f"'certs' exists but is not a directory: {CERTS_DIR}") + + CERTS_DIR.mkdir(parents=True, exist_ok=True) + + # Quick sanity check: can we write there? + if not os.access(CERTS_DIR, os.W_OK): + raise PermissionError(f"No write permission on certs dir: {CERTS_DIR}") + + key_path = CERTS_DIR / "superadmin.key" + with open(key_path, "wb") as f: + f.write(private_key) + + # Restrict permissions (best-effort; may be limited by FS/umask) + try: + os.chmod(key_path, 0o600) + except Exception as e: + logger.warning(f"Could not chmod {key_path} to 600: {e}") + + logger.info(f"Superadmin key written to {key_path}") + +except Exception: + logger.exception(f"Failed to write superadmin key under {CERTS_DIR}") + raise + # Request superadmin certificate url = 'http://{}:{}/v1/pki_int/sign/my-ca'.format(config["ca_factory"]["url"], config["ca_factory"]["port"]) @@ -76,9 +101,8 @@ superadmin_cert = json.loads(response.text)['data']['certificate'] logger.info(f"Superadmin Cert:\n{superadmin_cert}") # Save the superadmin certificate -cert_file = open("certs/superadmin.crt", 'wb') -cert_file.write(bytes(superadmin_cert, 'utf-8')) -cert_file.close() +with open(CERTS_DIR / "superadmin.crt", "wb") as cert_file: + cert_file.write(superadmin_cert.encode("utf-8")) url = f"http://{config['ca_factory']['url']}:{config['ca_factory']['port']}/v1/secret/data/ca" headers = { @@ -89,9 +113,8 @@ response = requests.request("GET", url, headers=headers, verify = config["ca_fac ca_root = json.loads(response.text)['data']['data']['ca'] logger.info(f"CA root:\n{ca_root}") -cert_file = open("certs/ca_root.crt", 'wb') -cert_file.write(bytes(ca_root, 'utf-8')) -cert_file.close() +with open(CERTS_DIR / "ca_root.crt", "wb") as cert_file: + cert_file.write(ca_root.encode("utf-8")) package_paths = config.get("package_paths", {}) -- GitLab From 8997f5b13933c3105310002f694044dcc639a8f1 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 17 Feb 2026 10:28:58 +0100 Subject: [PATCH 090/101] Comment certs volumes at helper and nginx service --- services/docker-compose-capif.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/docker-compose-capif.yml b/services/docker-compose-capif.yml index dee5cf7b..2c0add10 100644 --- a/services/docker-compose-capif.yml +++ b/services/docker-compose-capif.yml @@ -20,7 +20,7 @@ services: restart: unless-stopped volumes: - ${SERVICES_DIR}/helper/config.yaml:/usr/src/app/config.yaml - - ${SERVICES_DIR}/helper/helper_service/certs:/usr/src/app/helper_service/certs + # - ${SERVICES_DIR}/helper/helper_service/certs:/usr/src/app/helper_service/certs extra_hosts: - host.docker.internal:host-gateway - fluent-bit:host-gateway @@ -316,7 +316,7 @@ services: - LOG_LEVEL=${LOG_LEVEL} hostname: ${CAPIF_HOSTNAME} volumes: - - ${SERVICES_DIR}/nginx/certs:/etc/nginx/certs + # - ${SERVICES_DIR}/nginx/certs:/etc/nginx/certs - ${SERVICES_DIR}/nginx/nginx_prepare.sh:/nginx_prepare.sh extra_hosts: - host.docker.internal:host-gateway -- GitLab From 068426df4f495bf1077a5dd01be8a7364e4cbadc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Tue, 17 Feb 2026 15:55:29 +0100 Subject: [PATCH 091/101] revert invoker mgmt changes and nginx debug log --- .../api_invoker_management/app.py | 25 +++++++++++-------- services/nginx/nginx.conf | 4 ++- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py index 8f8eff4e..587bac5b 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py @@ -121,20 +121,23 @@ def verbose_formatter(): datefmt='%d/%m/%Y %H:%M:%S' ) -with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as f: - pem_data = f.read() +with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as pub_file: + pub_data = pub_file.read() -# Extract the first certificate from the PEM (even if it comes in a bundle) -cert = x509.load_pem_x509_certificate(pem_data, default_backend()) +# with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as f: +# pem_data = f.read() -# Extract the public key -public_key = cert.public_key() +# # Extract the first certificate from the PEM (even if it comes in a bundle) +# cert = x509.load_pem_x509_certificate(pem_data, default_backend()) -# Convert the public key to PEM (which JWT needs) -pub_data = public_key.public_bytes( - encoding=serialization.Encoding.PEM, - format=serialization.PublicFormat.SubjectPublicKeyInfo, -) +# # Extract the public key +# public_key = cert.public_key() + +# # Convert the public key to PEM (which JWT needs) +# pub_data = public_key.public_bytes( +# encoding=serialization.Encoding.PEM, +# format=serialization.PublicFormat.SubjectPublicKeyInfo, +# ) app = connexion.App(__name__, specification_dir='openapi/') app.app.json_encoder = encoder.CustomJSONEncoder diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index b6453b45..af191733 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -1,6 +1,8 @@ worker_processes auto; -error_log /var/log/nginx/error.log ${LOG_LEVEL}; +# error_log /var/log/nginx/error.log ${LOG_LEVEL}; +error_log /var/log/nginx/error.log debug; + pid /tmp/nginx.pid; events { -- GitLab From dbc9aa7229ea0fbc200234dd3d767f842b6f3100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Tue, 17 Feb 2026 16:25:07 +0100 Subject: [PATCH 092/101] fix indent --- .../api_invoker_management/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py index 587bac5b..351bc679 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/app.py @@ -122,7 +122,7 @@ def verbose_formatter(): ) with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as pub_file: - pub_data = pub_file.read() + pub_data = pub_file.read() # with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as f: # pem_data = f.read() -- GitLab From d01b21ede9e6ece44717ff66c0a387c39e9facf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Tue, 17 Feb 2026 16:52:27 +0100 Subject: [PATCH 093/101] create pubkey in nginx --- .../prepare_invoker.sh | 2 +- .../api_provider_management/app.py | 31 ++++++++++--------- .../prepare_provider.sh | 2 +- services/nginx/nginx_prepare.sh | 13 ++++++-- 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh index bde3c695..b1258795 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh @@ -46,7 +46,7 @@ while [ $ATTEMPT -lt $MAX_RETRIES ]; do # Make the request to Vault and store the response in a variable RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ --header "X-Vault-Token: $VAULT_TOKEN" \ - --request GET "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx" | jq -r '.data.data.server_crt') + --request GET "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx" | jq -r '.data.data.server_pub') echo "$RESPONSE" diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py index 8ae5fa59..854b1a59 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/app.py @@ -114,20 +114,23 @@ def verbose_formatter(): ) -with open("/usr/src/app/api_provider_management/pubkey.pem", "rb") as f: - pem_data = f.read() - -# Extract the first certificate from the PEM (even if it comes in a bundle) -cert = x509.load_pem_x509_certificate(pem_data, default_backend()) - -# Extract the public key -public_key = cert.public_key() - -# Convert the public key to PEM (which JWT needs) -pub_data = public_key.public_bytes( - encoding=serialization.Encoding.PEM, - format=serialization.PublicFormat.SubjectPublicKeyInfo, -) +with open("/usr/src/app/api_provider_management/pubkey.pem", "rb") as pub_file: + pub_data = pub_file.read() + +# with open("/usr/src/app/api_provider_management/pubkey.pem", "rb") as f: +# pem_data = f.read() + +# # Extract the first certificate from the PEM (even if it comes in a bundle) +# cert = x509.load_pem_x509_certificate(pem_data, default_backend()) + +# # Extract the public key +# public_key = cert.public_key() + +# # Convert the public key to PEM (which JWT needs) +# pub_data = public_key.public_bytes( +# encoding=serialization.Encoding.PEM, +# format=serialization.PublicFormat.SubjectPublicKeyInfo, +# ) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh index 76b3dd82..b13dadaa 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh +++ b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh @@ -46,7 +46,7 @@ while [ $ATTEMPT -lt $MAX_RETRIES ]; do # Make the request to Vault and store the response in a variable RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ --header "X-Vault-Token: $VAULT_TOKEN" \ - --request GET "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx" | jq -r '.data.data.server_crt') + --request GET "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx" | jq -r '.data.data.server_pub') echo "$RESPONSE" diff --git a/services/nginx/nginx_prepare.sh b/services/nginx/nginx_prepare.sh index 0f237837..99e49fe5 100644 --- a/services/nginx/nginx_prepare.sh +++ b/services/nginx/nginx_prepare.sh @@ -125,7 +125,12 @@ fi ############################################################### -# 4) CCF_ID RETRIEVAL (from helper, inside docker network) +# 4) Extract the public key from server.crt +############################################################### +openssl x509 -pubkey -noout -in server.crt > server_pub.pem + +############################################################### +# 5) CCF_ID RETRIEVAL (from helper, inside docker network) ############################################################### HELPER_URL="http://helper:8080/helper/api/getCcfId" ATTEMPT_CCFID=0 @@ -160,12 +165,13 @@ fi ############################################################### -# 5) STORE CERTIFICATES IN VAULT UNDER capif/ +# 6) STORE CERTIFICATES IN VAULT UNDER capif/ ############################################################### echo "Storing CAPIF certificates in Vault..." SERVER_CRT_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server.crt) SERVER_KEY_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server.key) +SERVER_PUB_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server_pub.pem) CA_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' ca.crt) # Store the server certificate, private key and CA certificate in Vault under secret/data/capif//nginx @@ -177,6 +183,7 @@ VAULT_RESPONSE=$(curl -s -w "%{http_code}" -o /tmp/vault_resp.json \ \"data\": { \"server_crt\": \"${SERVER_CRT_ESCAPED}\", \"server_key\": \"${SERVER_KEY_ESCAPED}\", + \"server_pub\": \"${SERVER_PUB_ESCAPED}\", \"ca\": \"${CA_ESCAPED}\" } }" \ @@ -192,7 +199,7 @@ echo "Certificates successfully stored in Vault namespace: secret/capif/$CCF_ID" ############################################################### -# 6) START NGINX +# 7) START NGINX ############################################################### LOG_LEVEL=$(echo "${LOG_LEVEL}" | tr '[:upper:]' '[:lower:]') -- GitLab From 566ee6bc49a860f8a328ae1604d080b63c89e948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Wed, 18 Feb 2026 09:58:31 +0100 Subject: [PATCH 094/101] set log level --- services/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index af191733..647792ce 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -1,7 +1,6 @@ worker_processes auto; -# error_log /var/log/nginx/error.log ${LOG_LEVEL}; -error_log /var/log/nginx/error.log debug; +error_log /var/log/nginx/error.log ${LOG_LEVEL}; pid /tmp/nginx.pid; -- GitLab From 6424a59a0f6849f44fbf69563ece96782a13f7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Sanz=20L=C3=B3pez?= Date: Wed, 18 Feb 2026 10:37:11 +0100 Subject: [PATCH 095/101] translate --- helm/vault-job/vault-job.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/helm/vault-job/vault-job.yaml b/helm/vault-job/vault-job.yaml index 215b2254..399aec0c 100644 --- a/helm/vault-job/vault-job.yaml +++ b/helm/vault-job/vault-job.yaml @@ -16,7 +16,7 @@ data: echo "install dependencies" apk add --no-cache jq openssl - # Establecer las variables de entorno de Vault + # Set Vault environment variables export VAULT_ADDR='http://vault-internal:8200' @@ -37,7 +37,7 @@ data: vault secrets enable pki - echo "# Generar una CA en Vault #" + echo "# Generate a CA in Vault #" vault secrets tune -max-lease-ttl=87600h pki vault write -field=certificate pki/root/generate/internal \ @@ -52,7 +52,7 @@ data: issuing_certificates="$VAULT_ADDR/v1/pki/ca" \ crl_distribution_points="$VAULT_ADDR/v1/pki/crl" - # # Generar una CA intermedia en Vault + # # Generate an intermediate CA in Vault vault secrets enable -path=pki_int pki vault secrets tune -max-lease-ttl=43800h pki_int @@ -65,20 +65,20 @@ data: echo "### content pki_intermediate.csr ###" cat pki_intermediate.csr - # Firmar la CA intermedia con la CA raíz + # Sign the intermediate CA with the root CA vault write -format=json pki/root/sign-intermediate \ issuer_ref="root-2026" \ csr=@pki_intermediate.csr \ format=pem_bundle ttl="43800h" \ | jq -r '.data.certificate' > capif_intermediate.cert.pem - # Configurar la CA intermedia en Vault + # Configure the intermediate AC in Vault vault write pki_int/intermediate/set-signed certificate=@capif_intermediate.cert.pem - #Crear rol en Vault + # Create a role in Vault vault write pki_int/roles/my-ca use_csr_common_name=false require_cn=false allowed_domains="*" allow_any_name=true allow_bare_domains=true allow_glob_domains=true allow_subdomains=true max_ttl=4300h ttl=4300h - # Emitir un certificado firmado por la CA intermedia + # Issue a certificate signed by the intermediary CA # vault write -format=json pki_int/issue/my-ca \ # common_name="nginx.mon.svc.cluster.local" \ # format=pem_bundle ttl="438h" \ @@ -109,14 +109,14 @@ data: #POLICY_FILE="my-policy.hcl" #TOKEN_ID="read-ca-token" - # Crear la política en Vault + # Create the policy in Vault #echo "path \"secret/data/ca\" { # capabilities = [\"read\"] #}" > "$POLICY_FILE" #vault policy write "$POLICY_NAME" "$POLICY_FILE" - # Generar un nuevo token y asignar la política + # Generate a new token and assign the policy #TOKEN=$(vault token create -id="$TOKEN_ID" -policy="$POLICY_NAME" -format=json | jq -r '.auth.client_token') #echo "Token generado:" -- GitLab From a32a4955406c12a48ed8d50a5e1a3391ffaae4d0 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 23 Feb 2026 10:37:25 +0100 Subject: [PATCH 096/101] Fix minor issue at remove users by prefix script --- tests/tasks/Users Management/users.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tasks/Users Management/users.robot b/tests/tasks/Users Management/users.robot index 64991b50..a504f9de 100644 --- a/tests/tasks/Users Management/users.robot +++ b/tests/tasks/Users Management/users.robot @@ -99,7 +99,7 @@ Remove Client Users By Prefix ${users_to_remove}= Filter Users By Prefix Username users=${users} prefix=${USERNAME_PREFIX} - Log Dictionary ${users_to_remove} + Log List ${users_to_remove} FOR ${username} IN @{users_to_remove} Log Removing ${username} -- GitLab From 7e5593bc5fa4e14e97112e5918b811337a2ccd5a Mon Sep 17 00:00:00 2001 From: Alex Kakyris Date: Tue, 24 Feb 2026 10:59:39 +0200 Subject: [PATCH 097/101] Refine log levels in register service --- .../controllers/register_controller.py | 20 +++++++++++-------- .../core/register_operations.py | 16 +++++++++++---- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/services/register/register_service/controllers/register_controller.py b/services/register/register_service/controllers/register_controller.py index 031185eb..7eec76a1 100644 --- a/services/register/register_service/controllers/register_controller.py +++ b/services/register/register_service/controllers/register_controller.py @@ -31,6 +31,7 @@ def generate_tokens(username): } access_token = jwt.encode(access_payload, current_app.config['REGISTRE_SECRET_KEY'], algorithm='HS256') refresh_token = jwt.encode(refresh_payload, current_app.config['REGISTRE_SECRET_KEY'], algorithm='HS256') + # TODO: should we remove this log to avoid logging access/refresh tokens? current_app.logger.debug(f"Access token : {access_token}\nRefresh token : {refresh_token}") return access_token, refresh_token @@ -42,11 +43,11 @@ def verify_password(username, password): client = MongoDatabse() admin = client.get_col_by_name(client.capif_admins).find_one({"admin_name": username}) if admin and check_password(password, admin["admin_pass"]): - current_app.logger.debug(f"Verified admin {username}") + current_app.logger.info(f"Verified admin {username}") return username, "admin" for user in users: if user["username"] == username and check_password(password, user["password"]): - current_app.logger.debug(f"Verified user {username}") + current_app.logger.info(f"Verified user {username}") return username, "client" @@ -58,15 +59,16 @@ def admin_required(): current_app.logger.debug("Checking admin token...") token = request.headers.get('Authorization') if not token: - current_app.logger.debug("Token is missing.") + current_app.logger.warning("Token is missing.") return jsonify({'message': 'Token is missing'}), 401 if token.startswith('Bearer '): + # Token is not missing but provided with the "Bearer " prefix. Consider changing the following message accordingly or remove it. current_app.logger.debug("Token is missing.") token = token.split('Bearer ')[1] if not token: - current_app.logger.debug("Token is missing.") + current_app.logger.warning("Token is missing.") return jsonify({'message': 'Token is missing'}), 401 try: @@ -85,7 +87,7 @@ def admin_required(): def login(): username, rol = auth.current_user() if rol != "admin": - current_app.logger.debug(f"User {username} trying to log in as admin") + current_app.logger.warning(f"User {username} trying to log in as admin") return jsonify(message="Unauthorized. Administrator privileges required."), 401 access_token, refresh_token = generate_tokens(username) return jsonify({'access_token': access_token, 'refresh_token': refresh_token}) @@ -117,24 +119,26 @@ def register(username): } user_info = request.get_json() + # TODO: consider excluding sensitive fields (e.g. password) from logged user info even in debug mode. + # Example: log_user_info = {k: v for k, v in user_info.items() if k != "password"} current_app.logger.debug(f"User Info: {user_info}") missing_fields = [] for field, field_type in required_fields.items(): if field not in user_info: missing_fields.append(field) elif not isinstance(user_info[field], field_type): - current_app.logger.debug(f"Error: Field {field} must be of type {field_type.__name__}") + current_app.logger.warning(f"Error: Field {field} must be of type {field_type.__name__}") return jsonify({"error": f"Field '{field}' must be of type {field_type.__name__}"}), 400 for field, field_type in optional_fields.items(): if field in user_info and not isinstance(user_info[field], field_type): - current_app.logger.debug(f"Error: Field {field} must be of type {field_type.__name__}") + current_app.logger.warning(f"Error: Field {field} must be of type {field_type.__name__}") return jsonify({"error": f"Optional field '{field}' must be of type {field_type.__name__}"}), 400 if field not in user_info: user_info[field] = None if missing_fields: - current_app.logger.debug(f"Error: missing requuired fields : {missing_fields}") + current_app.logger.warning(f"Error: missing requuired fields : {missing_fields}") return jsonify({"error": "Missing required fields", "fields": missing_fields}), 400 return register_operation.register_user(user_info) diff --git a/services/register/register_service/core/register_operations.py b/services/register/register_service/core/register_operations.py index 6cbe6c60..2244d302 100644 --- a/services/register/register_service/core/register_operations.py +++ b/services/register/register_service/core/register_operations.py @@ -24,7 +24,7 @@ class RegisterOperations: mycol = self.db.get_col_by_name(self.db.capif_users) exist_user = mycol.find_one({"username": user_info["username"]}) if exist_user: - current_app.logger.debug(f"User already exists : {user_info["username"]}") + current_app.logger.warning(f"User already exists : {user_info["username"]}") return jsonify("user already exists"), 409 name_space = uuid.UUID(self.config["register"]["register_uuid"]) @@ -36,7 +36,7 @@ class RegisterOperations: user_info["password"] = hash_password(user_info["password"]) mycol.insert_one(user_info) - current_app.logger.debug(f"User with uuid {user_uuid} and username {user_info["username"]} registered successfully") + current_app.logger.info(f"User with uuid {user_uuid} and username {user_info["username"]} registered successfully") return jsonify(message="User registered successfully", uuid=user_uuid), 201 @@ -49,10 +49,11 @@ class RegisterOperations: exist_user = mycol.find_one({"username": username}) if exist_user is None: - current_app.logger.debug(f"No user exists with these credentials: {username}") + current_app.logger.warning(f"No user exists with these credentials: {username}") return jsonify("No user exists with these credentials"), 400 access_token = create_access_token(identity=(username + " " + exist_user["uuid"])) + # TODO: should we remove this log to avoid logging access/refresh tokens? current_app.logger.debug(f"Access token generated for user {username} : {access_token}") cert_file = open("certs/ca_root.crt", 'rb') @@ -71,6 +72,8 @@ class RegisterOperations: ccf_security_url="capif-security/v1/trustedInvokers/"), 200 except Exception as e: + # TODO: consider logging exceptions here for troubleshooting. + # Example: current_app.logger.exception(f"Unexpected error in get_auth for user {username}") return jsonify(message=f"Errors when try getting auth: {e}"), 500 def remove_user(self, uuid): @@ -84,20 +87,25 @@ class RegisterOperations: current_app.logger.debug(f"Removing User with uuid {uuid} from db") mycol.delete_one({"uuid": uuid}) - current_app.logger.debug(f"User with uuid {uuid} removed successfully") + current_app.logger.info(f"User with uuid {uuid} removed successfully") return jsonify(message="User removed successfully"), 204 except Exception as e: + # TODO: consider logging exceptions here for troubleshooting. + # Example: current_app.logger.exception(f"Unexpected error in remove_user for uuid {uuid}") return jsonify(message=f"Errors when try remove user: {e}"), 500 def get_users(self): mycol = self.db.get_col_by_name(self.db.capif_users) try: + # TODO: consider excluding sensitive fields (e.g. password) from logged user info even in debug mode. current_app.logger.debug(f"users") users=list(mycol.find({}, {"_id":0})) current_app.logger.debug(f"{users}") return jsonify(message="Users successfully obtained", users=users), 200 except Exception as e: + # TODO: consider logging exceptions here for troubleshooting. + # Example: current_app.logger.exception(f"Unexpected error in get_users") return jsonify(message=f"Error trying to get users: {e}"), 500 -- GitLab From 1832466aae0974e1ae31dc3a7b8bfb8fbebc720f Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Tue, 24 Feb 2026 17:16:34 +0100 Subject: [PATCH 098/101] Upgrade setuptools to 80.9.0 version to solve security issue --- .../TS29222_CAPIF_API_Invoker_Management_API/requirements.txt | 2 +- .../TS29222_CAPIF_Open_Discover_Service_API/requirements.txt | 2 +- services/helper/requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt index 7ecb4edb..7df2a2b7 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt @@ -2,7 +2,7 @@ connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 urllib3 >= 2.6.0 -setuptools == 74.0.0 +setuptools == 80.9.0 Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 diff --git a/services/TS29222_CAPIF_Open_Discover_Service_API/requirements.txt b/services/TS29222_CAPIF_Open_Discover_Service_API/requirements.txt index 2cb06891..bad8612c 100644 --- a/services/TS29222_CAPIF_Open_Discover_Service_API/requirements.txt +++ b/services/TS29222_CAPIF_Open_Discover_Service_API/requirements.txt @@ -9,5 +9,5 @@ connexion[swagger-ui] <= 2.14.2; python_version>"3.4" werkzeug == 0.16.1; python_version=="3.5" or python_version=="3.4" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools >= 21.0.0 +setuptools == 80.9.0 Flask == 2.1.1 diff --git a/services/helper/requirements.txt b/services/helper/requirements.txt index e240c8ae..c2945f6f 100644 --- a/services/helper/requirements.txt +++ b/services/helper/requirements.txt @@ -9,7 +9,7 @@ connexion[swagger-ui] <= 2.14.2; python_version>"3.4" werkzeug == 0.16.1; python_version=="3.5" or python_version=="3.4" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools >= 21.0.0 +setuptools == 80.9.0 Flask == 2.1.1 gunicorn == 23.0.0 uvicorn == 0.34.2 -- GitLab From 2985249efa82fb7bb7b60d4411f1aad3d103bafb Mon Sep 17 00:00:00 2001 From: Afonso Castanheta Date: Wed, 25 Feb 2026 11:36:24 +0000 Subject: [PATCH 099/101] Add unauthorized error handling for missing client certificate header --- ...ividual_on_boarded_api_invoker_document_controller.py | 8 +++++++- .../api_invoker_management/core/responses.py | 7 +++++++ .../controllers/default_controller.py | 8 +++++++- ...dividual_api_provider_enrolment_details_controller.py | 8 +++++++- .../api_provider_management/core/responses.py | 7 +++++++ .../capif_acl/controllers/default_controller.py | 8 +++++++- .../capif_acl/core/responses.py | 9 ++++++++- .../logs/controllers/default_controller.py | 8 +++++++- .../TS29222_CAPIF_Auditing_API/logs/core/responses.py | 9 ++++++++- .../service_apis/controllers/default_controller.py | 8 +++++++- .../service_apis/core/responses.py | 9 ++++++++- .../capifs_events_subscriptions_collection_controller.py | 8 +++++++- ...ual_capifs_events_subscription_document_controller.py | 8 +++++++- .../capif_events/core/responses.py | 9 ++++++++- .../controllers/default_controller.py | 8 +++++++- .../published_apis/controllers/default_controller.py | 8 +++++++- .../individual_apf_published_api_controller.py | 8 +++++++- .../capif_security/controllers/default_controller.py | 8 +++++++- 18 files changed, 130 insertions(+), 16 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py index 69c78c3d..aaff12d0 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_on_boarded_api_invoker_document_controller.py @@ -6,6 +6,8 @@ from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request +from ..core.responses import unauthorized_error + from ..core.apiinvokerenrolmentdetails import InvokerManagementOperations from ..core.validate_user import ControlAccess from ..models.api_invoker_enrolment_details import \ @@ -20,7 +22,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py index ad4e191d..7e983407 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py @@ -41,3 +41,10 @@ def not_found_error(detail, cause): prob = serialize_clean_camel_case(prob) return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) + + +def unauthorized_error(detail, cause): + prob = ProblemDetails(title="Unauthorized", status=401, detail=detail, cause=cause) + prob = serialize_clean_camel_case(prob) + + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype=mimetype) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py index 4a58db7f..cbe36042 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/default_controller.py @@ -9,6 +9,8 @@ from cryptography.hazmat.backends import default_backend from flask import current_app, request from flask_jwt_extended import get_jwt_identity, jwt_required +from ..core.responses import unauthorized_error + from ..core.provider_enrolment_details_api import ProviderManagementOperations from ..core.validate_user import ControlAccess @@ -21,7 +23,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py index bb76af31..9305c73b 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py @@ -3,6 +3,8 @@ from flask import current_app, request from cryptography import x509 from cryptography.hazmat.backends import default_backend +from ..core.responses import unauthorized_error + from ..core.provider_enrolment_details_api import ProviderManagementOperations from ..core.validate_user import ControlAccess from ..models.api_provider_enrolment_details_patch import \ @@ -17,7 +19,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py index ad4e191d..7e983407 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py @@ -41,3 +41,10 @@ def not_found_error(detail, cause): prob = serialize_clean_camel_case(prob) return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) + + +def unauthorized_error(detail, cause): + prob = ProblemDetails(title="Unauthorized", status=401, detail=detail, cause=cause) + prob = serialize_clean_camel_case(prob) + + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype=mimetype) diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py index 256c17d8..ed6cb97b 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/default_controller.py @@ -7,6 +7,8 @@ from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request +from ..core.responses import unauthorized_error + from ..core.accesscontrolpolicyapi import accessControlPolicyApi @@ -16,7 +18,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/responses.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/responses.py index 8f975cbf..1f0302f6 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/responses.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/responses.py @@ -40,4 +40,11 @@ def not_found_error(detail, cause): prob = ProblemDetails(title="Not Found", status=404, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) + + +def unauthorized_error(detail, cause): + prob = ProblemDetails(title="Unauthorized", status=401, detail=detail, cause=cause) + prob = serialize_clean_camel_case(prob) + + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py b/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py index acf154aa..e5ac1ef7 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py @@ -3,6 +3,8 @@ from functools import wraps from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request + +from ..core.responses import bad_request_error, unauthorized_error from logs import util from logs.models.interface_description import \ InterfaceDescription # noqa: E501 @@ -27,7 +29,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) diff --git a/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py b/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py index 8f975cbf..1f0302f6 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py @@ -40,4 +40,11 @@ def not_found_error(detail, cause): prob = ProblemDetails(title="Not Found", status=404, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) + + +def unauthorized_error(detail, cause): + prob = ProblemDetails(title="Unauthorized", status=401, detail=detail, cause=cause) + prob = serialize_clean_camel_case(prob) + + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py index a9c52362..457716d5 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/default_controller.py @@ -14,6 +14,8 @@ from service_apis.models.net_slice_id import NetSliceId # noqa: E501 from service_apis.models.o_auth_grant_type import OAuthGrantType # noqa: E501 from service_apis.models.problem_details import ProblemDetails # noqa: E501 from service_apis.models.protocol import Protocol # noqa: E501 + +from ..core.responses import unauthorized_error from service_apis.models.res_oper_info import ResOperInfo # noqa: E501 from service_apis.models.service_kpis import ServiceKpis # noqa: E501 @@ -30,7 +32,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/responses.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/responses.py index 0aafcc67..849e7f86 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/responses.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/responses.py @@ -40,4 +40,11 @@ def not_found_error(detail, cause): prob = ProblemDetails(title="Not Found", status=404, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) + + +def unauthorized_error(detail, cause): + prob = ProblemDetails(title="Unauthorized", status=401, detail=detail, cause=cause) + prob = serialize_clean_camel_case(prob) + + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py index 59d82a7b..d4fc1c3a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/capifs_events_subscriptions_collection_controller.py @@ -7,6 +7,8 @@ from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request +from ..core.responses import unauthorized_error + from ..core.events_apis import EventSubscriptionsOperations from ..core.validate_user import ControlAccess @@ -19,7 +21,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) diff --git a/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py index cac833f9..3339992a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/individual_capifs_events_subscription_document_controller.py @@ -9,6 +9,8 @@ from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request +from ..core.responses import unauthorized_error + from ..core.events_apis import EventSubscriptionsOperations from ..core.validate_user import ControlAccess @@ -21,7 +23,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py b/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py index 8f975cbf..1f0302f6 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py @@ -40,4 +40,11 @@ def not_found_error(detail, cause): prob = ProblemDetails(title="Not Found", status=404, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) + + +def unauthorized_error(detail, cause): + prob = ProblemDetails(title="Unauthorized", status=401, detail=detail, cause=cause) + prob = serialize_clean_camel_case(prob) + + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py index dc120879..ce62116b 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/default_controller.py @@ -8,6 +8,8 @@ from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request +from ..core.responses import unauthorized_error + from ..core.invocationlogs import LoggingInvocationOperations from ..core.validate_user import ControlAccess @@ -22,7 +24,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate(str.encode(cert_raw), default_backend()) diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py index a7c06cdd..7908b28e 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/default_controller.py @@ -3,6 +3,8 @@ from functools import wraps from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request + +from ..core.responses import bad_request_error, unauthorized_error from published_apis.models.problem_details import ProblemDetails # noqa: E501 from published_apis.vendor_specific import (find_attribute_in_body, vendor_specific_key_n_value) @@ -24,7 +26,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate( diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/individual_apf_published_api_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/individual_apf_published_api_controller.py index d8098277..291ca99c 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/individual_apf_published_api_controller.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/individual_apf_published_api_controller.py @@ -3,6 +3,8 @@ from functools import wraps from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request + +from ..core.responses import unauthorized_error from published_apis.models.service_api_description_patch import \ ServiceAPIDescriptionPatch # noqa: E501 @@ -18,7 +20,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate( diff --git a/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py b/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py index 21a51cfc..7a65eb7d 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/controllers/default_controller.py @@ -9,6 +9,8 @@ from cryptography import x509 from cryptography.hazmat.backends import default_backend from flask import current_app, request +from ..core.responses import unauthorized_error + from ..core.publisher import Publisher from ..core.redis_internal_event import RedisInternalEvent from ..core.servicesecurity import SecurityOperations @@ -25,7 +27,11 @@ def cert_validation(): def __cert_validation(*args, **kwargs): args = request.view_args - cert_tmp = request.headers['X-Ssl-Client-Cert'] + cert_tmp = request.headers.get('X-Ssl-Client-Cert') + + if not cert_tmp: + return unauthorized_error("Client certificate required", "X-Ssl-Client-Cert header is missing") + cert_raw = cert_tmp.replace('\t', '') cert = x509.load_pem_x509_certificate( -- GitLab From efa2f244e114c629abec48456f762cd4e7b06a1a Mon Sep 17 00:00:00 2001 From: Afonso Castanheta Date: Wed, 25 Feb 2026 11:54:16 +0000 Subject: [PATCH 100/101] Fix bad_request_error response mimetype handling across multiple APIs --- .../api_invoker_management/core/responses.py | 2 +- .../api_provider_management/core/responses.py | 2 +- .../capif_acl/core/responses.py | 2 +- services/TS29222_CAPIF_Auditing_API/logs/core/responses.py | 2 +- .../service_apis/core/responses.py | 2 +- .../TS29222_CAPIF_Events_API/capif_events/core/responses.py | 2 +- .../api_invocation_logs/core/responses.py | 2 +- .../published_apis/core/responses.py | 2 +- .../TS29222_CAPIF_Security_API/capif_security/core/responses.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py index 7e983407..82305f4b 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/responses.py @@ -33,7 +33,7 @@ def bad_request_error(detail, cause, invalid_params): prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=mimetype) def not_found_error(detail, cause): diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py index 7e983407..82305f4b 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/responses.py @@ -33,7 +33,7 @@ def bad_request_error(detail, cause, invalid_params): prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=mimetype) def not_found_error(detail, cause): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/responses.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/responses.py index 1f0302f6..8ba055f9 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/responses.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/responses.py @@ -33,7 +33,7 @@ def bad_request_error(detail, cause, invalid_params): prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=mimetype) def not_found_error(detail, cause): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py b/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py index 1f0302f6..8ba055f9 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py @@ -33,7 +33,7 @@ def bad_request_error(detail, cause, invalid_params): prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=mimetype) def not_found_error(detail, cause): diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/responses.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/responses.py index 849e7f86..1de771cd 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/responses.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/responses.py @@ -33,7 +33,7 @@ def bad_request_error(detail, cause, invalid_params): prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=mimetype) def not_found_error(detail, cause): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py b/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py index 1f0302f6..8ba055f9 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py @@ -33,7 +33,7 @@ def bad_request_error(detail, cause, invalid_params): prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=mimetype) def not_found_error(detail, cause): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/responses.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/responses.py index 1f0302f6..8ba055f9 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/responses.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/responses.py @@ -33,7 +33,7 @@ def bad_request_error(detail, cause, invalid_params): prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=mimetype) def not_found_error(detail, cause): diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/responses.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/responses.py index 1f0302f6..8ba055f9 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/responses.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/responses.py @@ -33,7 +33,7 @@ def bad_request_error(detail, cause, invalid_params): prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=mimetype) def not_found_error(detail, cause): diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/responses.py b/services/TS29222_CAPIF_Security_API/capif_security/core/responses.py index 849e7f86..1de771cd 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/responses.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/responses.py @@ -33,7 +33,7 @@ def bad_request_error(detail, cause, invalid_params): prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=mimetype) def not_found_error(detail, cause): -- GitLab From 785c7f771cc5ea33032bf977d5ad8cf230b372e4 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Thu, 26 Feb 2026 23:46:16 +0100 Subject: [PATCH 101/101] Improve prepare_nginx script --- services/nginx/nginx_prepare.sh | 387 +++++++++++++++++++------------- 1 file changed, 228 insertions(+), 159 deletions(-) diff --git a/services/nginx/nginx_prepare.sh b/services/nginx/nginx_prepare.sh index 99e49fe5..71381d56 100644 --- a/services/nginx/nginx_prepare.sh +++ b/services/nginx/nginx_prepare.sh @@ -14,189 +14,258 @@ ATTEMPT=0 # Success check SUCCES_OPERATION=false +# Variable to store CCF_ID retrieved from Helper +CCF_ID="" -############################################################### -# 1) FETCH CA ROOT CERTIFICATE FROM VAULT -############################################################### - -echo "[STEP] Fetching CA root certificate from Vault" -while [ $ATTEMPT -lt $MAX_RETRIES ]; do - # Increment ATTEMPT using eval - eval "ATTEMPT=\$((ATTEMPT + 1))" - echo "[INFO] Attempt $ATTEMPT/$MAX_RETRIES – GET secret/data/ca" - - # Make the request to Vault and store the response in a variable - RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ - --header "X-Vault-Token: $VAULT_TOKEN" \ - --request GET "$VAULT_ADDR/v1/secret/data/ca" | jq -r '.data.data.ca') - - echo "[DEBUG] Raw Vault response:" - echo "$RESPONSE" - - # Check if the response is "null" or empty - if [ -n "$RESPONSE" ] && [ "$RESPONSE" != "null" ]; then - echo "$RESPONSE" > $CERTS_FOLDER/ca.crt - openssl verify -CAfile $CERTS_FOLDER/ca.crt $CERTS_FOLDER/ca.crt - echo "CA Root successfully saved." - SUCCES_OPERATION=true - break +fetch_ca_root_cert_from_vault() { + if [ ! -f $CERTS_FOLDER/ca.crt ]; then + ############################################################### + # 1) FETCH CA ROOT CERTIFICATE FROM VAULT + ############################################################### + + echo "[STEP] Fetching CA root certificate from Vault" + while [ $ATTEMPT -lt $MAX_RETRIES ]; do + # Increment ATTEMPT using eval + eval "ATTEMPT=\$((ATTEMPT + 1))" + echo "[INFO] Attempt $ATTEMPT/$MAX_RETRIES – GET secret/data/ca" + + # Make the request to Vault and store the response in a variable + RESPONSE=$(curl -s -k --connect-timeout 5 --max-time 10 \ + --header "X-Vault-Token: $VAULT_TOKEN" \ + --request GET "$VAULT_ADDR/v1/secret/data/ca" | jq -r '.data.data.ca') + + echo "[DEBUG] Raw Vault response:" + echo "$RESPONSE" + + # Check if the response is "null" or empty + if [ -n "$RESPONSE" ] && [ "$RESPONSE" != "null" ]; then + echo "$RESPONSE" > $CERTS_FOLDER/ca.crt + openssl verify -CAfile $CERTS_FOLDER/ca.crt $CERTS_FOLDER/ca.crt + echo "CA Root successfully saved." + SUCCES_OPERATION=true + break + else + echo "[ERROR] CA not available yet (null or empty). Retrying in ${RETRY_DELAY}s" + sleep $RETRY_DELAY + fi + done + + if [ "$SUCCES_OPERATION" = false ]; then + echo "[ERROR] Unable to retrieve CA certificate from Vault after $MAX_RETRIES attempts" + exit 1 + fi + else + echo "CA certificate already exists. Skipping retrieval from Vault." + fi +} + +generate_server_key_if_missing() { + ############################################################### + # 2) GENERATE SERVER KEY IF MISSING + ############################################################### + if [ ! -f $CERTS_FOLDER/server.key ]; then + echo "server.key not found. Generating new private key..." + openssl genrsa -out $CERTS_FOLDER/server.key 2048 + else + echo "server.key already exists. Skipping generation." + fi +} + + +generate_server_key_and_sign() { + ############################################################### + # 3) IF NO SERVER CERT → GENERATE CSR + REQUEST SIGNING IN VAULT + ############################################################### + if [ ! -f $CERTS_FOLDER/server.crt ]; then + SUCCESS_OPERATION=false + + echo "[STEP 3] Server certificate not found" + echo "[STEP 3] Generating CSR for CAPIF service" + echo "[INFO] Common Name (CN): $CAPIF_HOSTNAME" + + # Generate CSR using the previously generated server.key + openssl req -new -key $CERTS_FOLDER/server.key \ + -subj "/CN=$CAPIF_HOSTNAME" \ + -addext "subjectAltName=DNS:$CAPIF_HOSTNAME" \ + -out $CERTS_FOLDER/server.csr + + # Convert the CSR to a single line with \n so it can be sent in the body of the request to Vault (which expects JSON) + CSR_CONTENT=$(sed ':a;N;$!ba;s/\n/\\n/g' $CERTS_FOLDER/server.csr) + + echo "[STEP 3] CSR generated successfully" + echo "[STEP 3] Requesting certificate signing from Vault" + echo "[INFO] Vault PKI endpoint: $VAULT_ADDR/v1/pki_int/sign/my-ca" + + ATTEMPT=0 + SUCCESS_OPERATION=false + + while [ $ATTEMPT -lt $MAX_RETRIES ]; do + ATTEMPT=$((ATTEMPT + 1)) + echo "[STEP 3] Attempt $ATTEMPT/$MAX_RETRIES – Signing CSR in Vault" + + # POST /v1/pki_int/sign/my-ca intermediate's endpoint to sign the CSR + SIGN_RESPONSE=$(curl -s -X POST \ + -H "X-Vault-Token: $VAULT_TOKEN" \ + -d "{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\",\"common_name\":\"$CAPIF_HOSTNAME\"}" \ + "$VAULT_ADDR/v1/pki_int/sign/my-ca") + + # SIGN_RESPONSE; return a PEM bundle format with the signed certificate + intermediate certificate chain (but without the root). + + CERT=$(printf '%s' "$SIGN_RESPONSE" | jq -er '.data.certificate') + + if [ -n "$CERT" ] && [ "$CERT" != "null" ]; then + echo "$CERT" > $CERTS_FOLDER/server.crt + echo "Server certificate successfully signed and saved." + SUCCESS_OPERATION=true + break + else + echo "Invalid certificate response. Retrying in $RETRY_DELAY seconds..." + sleep $RETRY_DELAY + fi + done + + if [ "$SUCCESS_OPERATION" = false ]; then + echo "[STEP 3][ERROR] Failed to sign server certificate after $MAX_RETRIES attempts" + exit 1 + fi + else + echo "[STEP 3] $CERTS_FOLDER/server.crt already exists – skipping certificate signing" + fi +} + +extract_public_key() { + if [ ! -f $CERTS_FOLDER/server_pub.pem ]; then + ############################################################### + # 4) Extract the public key from server.crt and save it as server_pub.pem + ############################################################### + openssl x509 -pubkey -noout -in $CERTS_FOLDER/server.crt > $CERTS_FOLDER/server_pub.pem else - echo "[ERROR] CA not available yet (null or empty). Retrying in ${RETRY_DELAY}s" - sleep $RETRY_DELAY + echo "Public key already extracted. Skipping extraction." fi -done +} + +get_ccf_id_from_helper() { + ############################################################### + # 5) CCF_ID RETRIEVAL (from helper, inside docker network) + ############################################################### + HELPER_URL="http://helper:8080/helper/api/getCcfId" + ATTEMPT_CCFID=0 + -if [ "$SUCCES_OPERATION" = false ]; then - echo "[ERROR] Unable to retrieve CA certificate from Vault after $MAX_RETRIES attempts" - exit 1 -fi + echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" + # Retry loop to get CCF_ID from Helper + while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do + ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) + echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" + RESP=$(curl -s --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) -############################################################### -# 2) GENERATE SERVER KEY IF MISSING -############################################################### -if [ ! -f server.key ]; then - echo "server.key not found. Generating new private key..." - openssl genrsa -out server.key 2048 -else - echo "server.key already exists. Skipping generation." -fi + CCF_ID=$(printf '%s' "$RESP" | jq -r '.ccf_id // empty' 2>/dev/null || true) + if [ -n "$CCF_ID" ]; then + echo "[INFO] Got CCF_ID=$CCF_ID" + break + fi -############################################################### -# 3) IF NO SERVER CERT → GENERATE CSR + REQUEST SIGNING IN VAULT -############################################################### -if [ ! -f server.crt ]; then - SUCCESS_OPERATION=false - - echo "[STEP 3] Server certificate not found" - echo "[STEP 3] Generating CSR for CAPIF service" - echo "[INFO] Common Name (CN): $CAPIF_HOSTNAME" - - # Generate CSR using the previously generated server.key - openssl req -new -key server.key \ - -subj "/CN=$CAPIF_HOSTNAME" \ - -addext "subjectAltName=DNS:$CAPIF_HOSTNAME" \ - -out server.csr - - # Convert the CSR to a single line with \n so it can be sent in the body of the request to Vault (which expects JSON) - CSR_CONTENT=$(sed ':a;N;$!ba;s/\n/\\n/g' server.csr) - - echo "[STEP 3] CSR generated successfully" - echo "[STEP 3] Requesting certificate signing from Vault" - echo "[INFO] Vault PKI endpoint: $VAULT_ADDR/v1/pki_int/sign/my-ca" - - ATTEMPT=0 - SUCCESS_OPERATION=false - - while [ $ATTEMPT -lt $MAX_RETRIES ]; do - ATTEMPT=$((ATTEMPT + 1)) - echo "[STEP 3] Attempt $ATTEMPT/$MAX_RETRIES – Signing CSR in Vault" - - # POST /v1/pki_int/sign/my-ca intermediate's endpoint to sign the CSR - SIGN_RESPONSE=$(curl -s -X POST \ - -H "X-Vault-Token: $VAULT_TOKEN" \ - -d "{\"csr\":\"$CSR_CONTENT\",\"format\":\"pem_bundle\",\"common_name\":\"$CAPIF_HOSTNAME\"}" \ - "$VAULT_ADDR/v1/pki_int/sign/my-ca") - - # SIGN_RESPONSE; return a PEM bundle format with the signed certificate + intermediate certificate chain (but without the root). - - CERT=$(printf '%s' "$SIGN_RESPONSE" | jq -er '.data.certificate') - - if [ -n "$CERT" ] && [ "$CERT" != "null" ]; then - echo "$CERT" > server.crt - echo "Server certificate successfully signed and saved." - SUCCESS_OPERATION=true - break - else - echo "Invalid certificate response. Retrying in $RETRY_DELAY seconds..." - sleep $RETRY_DELAY - fi + echo "[WARN] Helper not ready or invalid response: $RESP" + echo "[WARN] Retrying in ${RETRY_DELAY}s..." + sleep $RETRY_DELAY done - if [ "$SUCCESS_OPERATION" = false ]; then - echo "[STEP 3][ERROR] Failed to sign server certificate after $MAX_RETRIES attempts" - exit 1 + if [ -z "$CCF_ID" ]; then + echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" + exit 1 + fi +} + + +store_certs_in_vault() { + ############################################################### + # 6) STORE CERTIFICATES IN VAULT UNDER capif/ + ############################################################### + echo "Storing CAPIF certificates in Vault..." + + SERVER_CRT_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' $CERTS_FOLDER/server.crt) + SERVER_KEY_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' $CERTS_FOLDER/server.key) + SERVER_PUB_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' $CERTS_FOLDER/server_pub.pem) + CA_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' $CERTS_FOLDER/ca.crt) + + # Store the server certificate, private key and CA certificate in Vault under secret/data/capif//nginx + VAULT_RESPONSE=$(curl -s -w "%{http_code}" -o /tmp/vault_resp.json \ + -X POST \ + -H "X-Vault-Token: $VAULT_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"data\": { + \"server_crt\": \"${SERVER_CRT_ESCAPED}\", + \"server_key\": \"${SERVER_KEY_ESCAPED}\", + \"server_pub\": \"${SERVER_PUB_ESCAPED}\", + \"ca\": \"${CA_ESCAPED}\" + } + }" \ + "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx") + + if [ "$VAULT_RESPONSE" != "200" ] && [ "$VAULT_RESPONSE" != "204" ]; then + echo "[ERROR] Failed to store certs in Vault" + cat /tmp/vault_resp.json + exit 1 fi -else - echo "[STEP 3] server.crt already exists – skipping certificate signing" -fi - - -############################################################### -# 4) Extract the public key from server.crt -############################################################### -openssl x509 -pubkey -noout -in server.crt > server_pub.pem - -############################################################### -# 5) CCF_ID RETRIEVAL (from helper, inside docker network) -############################################################### -HELPER_URL="http://helper:8080/helper/api/getCcfId" -ATTEMPT_CCFID=0 -CCF_ID="" -echo "[STEP] Fetching CCF_ID from Helper: $HELPER_URL" + echo "Certificates successfully stored in Vault namespace: secret/capif/$CCF_ID" +} -# Retry loop to get CCF_ID from Helper -while [ $ATTEMPT_CCFID -lt $MAX_RETRIES ]; do - ATTEMPT_CCFID=$((ATTEMPT_CCFID + 1)) - echo "[INFO] Attempt $ATTEMPT_CCFID/$MAX_RETRIES – GET $HELPER_URL" +check_value_and_store(){ + INPUT_VALUE=$1 + OUTPUT_FILE=$2 + if [ -n "$INPUT_VALUE" ] && [ "$INPUT_VALUE" != "null" ]; then + echo "$INPUT_VALUE" > $OUTPUT_FILE + echo "Value successfully saved to $OUTPUT_FILE." + else + echo "Invalid value for $OUTPUT_FILE ('null' or empty)." + exit 1 + fi +} - RESP=$(curl -s --connect-timeout 5 --max-time 10 "$HELPER_URL" || true) - CCF_ID=$(printf '%s' "$RESP" | jq -r '.ccf_id // empty' 2>/dev/null || true) +get_ccf_id_from_helper +echo "Retrieved CCF_ID from Helper: $CCF_ID" - if [ -n "$CCF_ID" ]; then - echo "[INFO] Got CCF_ID=$CCF_ID" - break - fi +# Make the request to Vault and store the response in a variable - echo "[WARN] Helper not ready or invalid response: $RESP" - echo "[WARN] Retrying in ${RETRY_DELAY}s..." - sleep $RETRY_DELAY -done +HTTP_STATUS=$(curl -s -k \ + --connect-timeout 5 \ + --max-time 10 \ + --header "X-Vault-Token: $VAULT_TOKEN" \ + --request GET "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx" \ + -o $CERTS_FOLDER/response.json \ + -w "%{http_code}") -if [ -z "$CCF_ID" ]; then - echo "[ERROR] Unable to retrieve CCF_ID from Helper after $MAX_RETRIES attempts" - exit 1 -fi +echo "HTTP STATUS: $HTTP_STATUS" +RESPONSE=$(cat $CERTS_FOLDER/response.json) +if [ -n "$RESPONSE" ] && [ "$RESPONSE" != "null" ] && [ "$HTTP_STATUS" -eq 200 ] ; then + echo "RESPONSE is valid, proceeding with certificate extraction and storage" + CA_CERT=$(jq -r '.data.data.ca' $CERTS_FOLDER/response.json) + SERVER_CRT=$(jq -r '.data.data.server_crt' $CERTS_FOLDER/response.json) + SERVER_KEY=$(jq -r '.data.data.server_key' $CERTS_FOLDER/response.json) + SERVER_PUB=$(jq -r '.data.data.server_pub' $CERTS_FOLDER/response.json) + check_value_and_store "$SERVER_CRT" "$CERTS_FOLDER/server.crt" + check_value_and_store "$SERVER_KEY" "$CERTS_FOLDER/server.key" + check_value_and_store "$SERVER_PUB" "$CERTS_FOLDER/server_pub.pem" + check_value_and_store "$CA_CERT" "$CERTS_FOLDER/ca.crt" -############################################################### -# 6) STORE CERTIFICATES IN VAULT UNDER capif/ -############################################################### -echo "Storing CAPIF certificates in Vault..." - -SERVER_CRT_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server.crt) -SERVER_KEY_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server.key) -SERVER_PUB_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' server_pub.pem) -CA_ESCAPED=$(sed ':a;N;$!ba;s/\n/\\n/g' ca.crt) - -# Store the server certificate, private key and CA certificate in Vault under secret/data/capif//nginx -VAULT_RESPONSE=$(curl -s -w "%{http_code}" -o /tmp/vault_resp.json \ - -X POST \ - -H "X-Vault-Token: $VAULT_TOKEN" \ - -H "Content-Type: application/json" \ - -d "{ - \"data\": { - \"server_crt\": \"${SERVER_CRT_ESCAPED}\", - \"server_key\": \"${SERVER_KEY_ESCAPED}\", - \"server_pub\": \"${SERVER_PUB_ESCAPED}\", - \"ca\": \"${CA_ESCAPED}\" - } - }" \ - "$VAULT_ADDR/v1/secret/data/capif/${CCF_ID}/nginx") - -if [ "$VAULT_RESPONSE" != "200" ] && [ "$VAULT_RESPONSE" != "204" ]; then - echo "[ERROR] Failed to store certs in Vault" - cat /tmp/vault_resp.json - exit 1 +else + echo "Data not previously stored at Vault. Initialize information" + fetch_ca_root_cert_from_vault + generate_server_key_if_missing + generate_server_key_and_sign + extract_public_key + store_certs_in_vault + echo "Certificate information successfully stored in Vault for CCF_ID=$CCF_ID" fi -echo "Certificates successfully stored in Vault namespace: secret/capif/$CCF_ID" - ############################################################### # 7) START NGINX -- GitLab