diff --git a/.gitignore b/.gitignore index c27c6be3e887423403f0be2a726fa4ef7edaa134..40d2726caa6c8b449d1c6de34025d9be0ac66f9a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,15 +19,15 @@ services/easy_rsa/certs/*EasyRSA* services/easy_rsa/certs/*.profile services/easy_rsa/certs/*.csr -monitoring/grafana/grafana_db/* -!monitoring/grafana/grafana_db/.keep -monitoring/prometheus/prometheus_db/* -!monitoring/prometheus/prometheus_db/.keep -monitoring/prometheus/alert.rules/* -!monitoring/prometheus/alert.rules/.keep -monitoring/tempo/tempo-data/* -!monitoring/tempo/tempo-data/.keep - +services/monitoring/grafana/grafana_db/* +!services/monitoring/grafana/grafana_db/.keep +services/monitoring/prometheus/prometheus_db/* +!services/monitoring/prometheus/prometheus_db/.keep +services/monitoring/prometheus/alert.rules/* +!services/monitoring/prometheus/alert.rules/.keep +services/monitoring/tempo/tempo-data/* +!services/monitoring/tempo/tempo-data/.keep +services/monitoring/grafana/grafana_db/* docs/testing_with_postman/*node_modules* docs/testing_with_postman/Responses diff --git a/README.md b/README.md index 358015bd2513a0447ed036ce9d59f1247457f5e3..74a32c286ad8d09fb78dc9b78aafa29c60fb826f 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ - [Common API Framework (CAPIF)](#common-api-framework-capif) - [CAPIF\_API\_Services](#capif_api_services) - [Documentation](#documentation) +- [Install and Run](#install-and-run) - [How to run CAPIF services in this Repository](#how-to-run-capif-services-in-this-repository) - [Run All CAPIF Services locally with Docker images](#run-all-capif-services-locally-with-docker-images) - [Run All CAPIF Services locally with Docker images and deploy monitoring stack](#run-all-capif-services-locally-with-docker-images-and-deploy-monitoring-stack) @@ -25,20 +26,6 @@ Please refer to [OCF Documentation] for more detailed information. # Install and Run -### (to be added in Getting Started section of Documentation) -``` -mkdir OpenCAPIF - -cd OpenCAPIF - -# The link must be changed when finally merged with the default branch and be permanent -wget https://labs.etsi.org/rep/ocf/capif/-/raw/OCF19-local-installation-of-capif-downloading-script/deploy.sh - -chmod +x deploy.sh - -# ./deploy.sh [branch to fetch] [true or false (default) to install monitoring stack or not] -./deploy.sh staging -``` ## How to run CAPIF services in this Repository Capif services are developed under /service/ folder. @@ -161,11 +148,11 @@ or http://:8083/ (if accessed from another host) ``` + # FAQ Documentation Frequently asked questions can be found here: [FAQ Directory] - [Open API Descriptions of 3GPP 5G APIs]: https://forge.3gpp.org/rep/all/5G_APIs "Open API Descriptions of 3GPP 5G APIs" [Test Plan Directory]: ./docs/test_plan/README.md "Test Plan Directory" [Testing Using Curl]: ./docs/testing_with_curl/README.md "Testing Using Curl" diff --git a/helm/DELETE.txt b/helm/DELETE.txt deleted file mode 100644 index 2d030d7bc1bbfbdee332aaf691447b30cdea375b..0000000000000000000000000000000000000000 --- a/helm/DELETE.txt +++ /dev/null @@ -1 +0,0 @@ -delete me diff --git a/helm/capif/README.md b/helm/capif/README.md index a78b060c3aff3b0fbc789d06e70b886c0f230208..04814b511f3ee76bf9bbef77652e270cf0cd2b6d 100644 --- a/helm/capif/README.md +++ b/helm/capif/README.md @@ -1,304 +1,52 @@ -# Helm of CAPIF +# capif -![Version: v1.0.0](https://img.shields.io/badge/Version-v1.0.0-informational?style=for-the-badge) -![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge) -![AppVersion: v1.0.0](https://img.shields.io/badge/AppVersion-v1.0.0-informational?style=for-the-badge) - -## Description +![Version: v3.1.6](https://img.shields.io/badge/Version-v3.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.1.6](https://img.shields.io/badge/AppVersion-v3.1.6-informational?style=flat-square) A Helm chart to CAPIF in Kubernetes -## Usage +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| | fluentbit | * | +| | grafana | * | +| | loki | * | +| | mock-server | * | +| | mongo | * | +| | mongo-express | * | +| | mongo-register | * | +| | mongo-register-express | * | +| | nginx | * | +| | ocf-access-control-policy | * | +| | ocf-api-invocation-logs | * | +| | ocf-api-invoker-management | * | +| | ocf-api-provider-management | * | +| | ocf-auditing-api-logs | * | +| | ocf-discover-service-api | * | +| | ocf-events | * | +| | ocf-helper | * | +| | ocf-publish-service-api | * | +| | ocf-register | * | +| | ocf-routing-info | * | +| | ocf-security | * | +| | otelcollector | * | +| | redis | * | +| | renderer | * | +| https://grafana.github.io/helm-charts | tempo | ^1.3.1 | ## Values | Key | Type | Default | Description | |-----|------|---------|-------------| -| CapifClient.enable | string | `"true"` | If enable capif client. | -| CapifClient.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| CapifClient.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/client"` | The docker image repository to use | -| CapifClient.image.tag | string | `""` | The docker image tag to use @default Chart version | -| CapifClient.ports[0].name | string | `"8080"` | | -| CapifClient.ports[0].port | int | `8080` | | -| CapifClient.ports[0].targetPort | int | `8080` | | -| CapifClient.replicas | int | `1` | | -| CapifClient.resources.limits.cpu | string | `"100m"` | | -| CapifClient.resources.limits.memory | string | `"128Mi"` | | -| CapifClient.resources.requests.cpu | string | `"100m"` | | -| CapifClient.resources.requests.memory | string | `"128Mi"` | | -| CapifClient.type | string | `"ClusterIP"` | | -| accessControlPolicy.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| accessControlPolicy.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| accessControlPolicy.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/access-control-policy"` | The docker image repository to use | -| accessControlPolicy.image.tag | string | `""` | The docker image tag to use @default Chart version | -| accessControlPolicy.ports[0].name | string | `"8080"` | | -| accessControlPolicy.ports[0].port | int | `8080` | | -| accessControlPolicy.ports[0].targetPort | int | `8080` | | -| accessControlPolicy.replicas | int | `1` | | -| accessControlPolicy.resources.limits.cpu | string | `"100m"` | | -| accessControlPolicy.resources.limits.memory | string | `"128Mi"` | | -| accessControlPolicy.resources.requests.cpu | string | `"100m"` | | -| accessControlPolicy.resources.requests.memory | string | `"128Mi"` | | -| accessControlPolicy.type | string | `"ClusterIP"` | | -| apiInvocationLogs.apiInvocationLogs.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| apiInvocationLogs.apiInvocationLogs.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| apiInvocationLogs.apiInvocationLogs.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/api-invocation-logs-api"` | The docker image repository to use | -| apiInvocationLogs.apiInvocationLogs.image.tag | string | `""` | The docker image tag to use @default Chart version | -| apiInvocationLogs.apiInvocationLogs.resources.limits.cpu | string | `"100m"` | | -| apiInvocationLogs.apiInvocationLogs.resources.limits.memory | string | `"128Mi"` | | -| apiInvocationLogs.apiInvocationLogs.resources.requests.cpu | string | `"100m"` | | -| apiInvocationLogs.apiInvocationLogs.resources.requests.memory | string | `"128Mi"` | | -| apiInvocationLogs.ports[0].name | string | `"8080"` | | -| apiInvocationLogs.ports[0].port | int | `8080` | | -| apiInvocationLogs.ports[0].targetPort | int | `8080` | | -| apiInvocationLogs.replicas | int | `1` | | -| apiInvocationLogs.type | string | `"ClusterIP"` | | -| apiInvokerManagement.apiInvokerManagement.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| apiInvokerManagement.apiInvokerManagement.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| apiInvokerManagement.apiInvokerManagement.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/api-invoker-management-api"` | The docker image repository to use | -| apiInvokerManagement.apiInvokerManagement.image.tag | string | `""` | The docker image tag to use @default Chart version | -| apiInvokerManagement.apiInvokerManagement.resources.limits.cpu | string | `"100m"` | | -| apiInvokerManagement.apiInvokerManagement.resources.limits.memory | string | `"128Mi"` | | -| apiInvokerManagement.apiInvokerManagement.resources.requests.cpu | string | `"100m"` | | -| apiInvokerManagement.apiInvokerManagement.resources.requests.memory | string | `"128Mi"` | | -| apiInvokerManagement.ports[0].name | string | `"8080"` | | -| apiInvokerManagement.ports[0].port | int | `8080` | | -| apiInvokerManagement.ports[0].targetPort | int | `8080` | | -| apiInvokerManagement.replicas | int | `1` | | -| apiInvokerManagement.type | string | `"ClusterIP"` | | -| apiProviderManagement.apiProviderManagement.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| apiProviderManagement.apiProviderManagement.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| apiProviderManagement.apiProviderManagement.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/api-provider-management-api"` | The docker image repository to use | -| apiProviderManagement.apiProviderManagement.image.tag | string | `""` | The docker image tag to use @default Chart version | -| apiProviderManagement.apiProviderManagement.resources.limits.cpu | string | `"100m"` | | -| apiProviderManagement.apiProviderManagement.resources.limits.memory | string | `"128Mi"` | | -| apiProviderManagement.apiProviderManagement.resources.requests.cpu | string | `"100m"` | | -| apiProviderManagement.apiProviderManagement.resources.requests.memory | string | `"128Mi"` | | -| apiProviderManagement.ports[0].name | string | `"8080"` | | -| apiProviderManagement.ports[0].port | int | `8080` | | -| apiProviderManagement.ports[0].targetPort | int | `8080` | | -| apiProviderManagement.replicas | int | `1` | | -| apiProviderManagement.type | string | `"ClusterIP"` | | -| capifEvents.capifEvents.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| capifEvents.capifEvents.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| capifEvents.capifEvents.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/events-api"` | The docker image repository to use | -| capifEvents.capifEvents.image.tag | string | `""` | The docker image tag to use @default Chart version | -| capifEvents.capifEvents.resources.limits.cpu | string | `"100m"` | | -| capifEvents.capifEvents.resources.limits.memory | string | `"128Mi"` | | -| capifEvents.capifEvents.resources.requests.cpu | string | `"100m"` | | -| capifEvents.capifEvents.resources.requests.memory | string | `"128Mi"` | | -| capifEvents.ports[0].name | string | `"8080"` | | -| capifEvents.ports[0].port | int | `8080` | | -| capifEvents.ports[0].targetPort | int | `8080` | | -| capifEvents.replicas | int | `1` | | -| capifEvents.type | string | `"ClusterIP"` | | -| capifRoutingInfo.capifRoutingInfo.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| capifRoutingInfo.capifRoutingInfo.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| capifRoutingInfo.capifRoutingInfo.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/routing-info-api"` | The docker image repository to use | -| capifRoutingInfo.capifRoutingInfo.image.tag | string | `""` | The docker image tag to use @default Chart version | -| capifRoutingInfo.capifRoutingInfo.resources.limits.cpu | string | `"100m"` | | -| capifRoutingInfo.capifRoutingInfo.resources.limits.memory | string | `"128Mi"` | | -| capifRoutingInfo.capifRoutingInfo.resources.requests.cpu | string | `"100m"` | | -| capifRoutingInfo.capifRoutingInfo.resources.requests.memory | string | `"128Mi"` | | -| capifRoutingInfo.ports[0].name | string | `"8080"` | | -| capifRoutingInfo.ports[0].port | int | `8080` | | -| capifRoutingInfo.ports[0].targetPort | int | `8080` | | -| capifRoutingInfo.replicas | int | `1` | | -| capifRoutingInfo.type | string | `"ClusterIP"` | | -| capifSecurity.capifSecurity.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| capifSecurity.capifSecurity.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| capifSecurity.capifSecurity.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/security-api"` | The docker image repository to use | -| capifSecurity.capifSecurity.image.tag | string | `""` | The docker image tag to use @default Chart version | -| capifSecurity.capifSecurity.resources.limits.cpu | string | `"100m"` | | -| capifSecurity.capifSecurity.resources.limits.memory | string | `"128Mi"` | | -| capifSecurity.capifSecurity.resources.requests.cpu | string | `"100m"` | | -| capifSecurity.capifSecurity.resources.requests.memory | string | `"128Mi"` | | -| capifSecurity.ports[0].name | string | `"8080"` | | -| capifSecurity.ports[0].port | int | `8080` | | -| capifSecurity.ports[0].targetPort | int | `8080` | | -| capifSecurity.replicas | int | `1` | | -| capifSecurity.type | string | `"ClusterIP"` | | -| env | string | `""` | The Environment variable. Use openshift if you are deploying in Openshift cluster. anotherwise use the field empty | -| ingress.ip | string | `"10.17.173.127"` | | -| kubernetesClusterDomain | string | `"cluster.local"` | | -| logs.enable | string | `"true"` | If register enabled. enable: true, enable: "" = not enabled | -| logs.logs.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| logs.logs.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| logs.logs.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/auditing-api"` | The docker image repository to use | -| logs.logs.image.tag | string | `""` | The docker image tag to use @default Chart version | -| logs.logs.resources.limits.cpu | string | `"100m"` | | -| logs.logs.resources.limits.memory | string | `"128Mi"` | | -| logs.logs.resources.requests.cpu | string | `"100m"` | | -| logs.logs.resources.requests.memory | string | `"128Mi"` | | -| logs.ports[0].name | string | `"8080"` | | -| logs.ports[0].port | int | `8080` | | -| logs.ports[0].targetPort | int | `8080` | | -| logs.replicas | int | `1` | | -| logs.type | string | `"ClusterIP"` | | -| mongo.mongo.env.mongoInitdbRootPassword | string | `"example"` | | -| mongo.mongo.env.mongoInitdbRootUsername | string | `"root"` | | -| mongo.mongo.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| mongo.mongo.image.repository | string | `"mongo"` | The docker image repository to use | -| mongo.mongo.image.tag | string | `"6.0.2"` | The docker image tag to use @default Chart version | -| mongo.mongo.resources | object | `{}` | | -| mongo.persistence | object | `{"enable":"true","storage":"8Gi"}` | If mongo.persistence enabled. enable: true, enable: "" = not enabled | -| mongo.ports[0].name | string | `"27017"` | | -| mongo.ports[0].port | int | `27017` | | -| mongo.ports[0].targetPort | int | `27017` | | -| mongo.replicas | int | `1` | | -| mongo.type | string | `"ClusterIP"` | | -| mongoExpress.mongoExpress.env.meConfigMongodbAdminpassword | string | `"example"` | | -| mongoExpress.mongoExpress.env.meConfigMongodbAdminusername | string | `"root"` | | -| mongoExpress.mongoExpress.env.meConfigMongodbUrl | string | `"mongodb://root:example@mongo:27017/"` | | -| mongoExpress.mongoExpress.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| mongoExpress.mongoExpress.image.repository | string | `"mongo-express"` | The docker image repository to use | -| mongoExpress.mongoExpress.image.tag | string | `"1.0.0-alpha.4"` | The docker image tag to use @default Chart version | -| mongoExpress.mongoExpress.resources.limits.cpu | string | `"100m"` | | -| mongoExpress.mongoExpress.resources.limits.memory | string | `"128Mi"` | | -| mongoExpress.mongoExpress.resources.requests.cpu | string | `"100m"` | | -| mongoExpress.mongoExpress.resources.requests.memory | string | `"128Mi"` | | -| mongoExpress.ports[0].name | string | `"8082"` | | -| mongoExpress.ports[0].port | int | `8082` | | -| mongoExpress.ports[0].targetPort | int | `8081` | | -| mongoExpress.replicas | int | `1` | | -| mongoExpress.type | string | `"ClusterIP"` | | -| mongoRegister.mongo.env.mongoInitdbRootPassword | string | `"example"` | | -| mongoRegister.mongo.env.mongoInitdbRootUsername | string | `"root"` | | -| mongoRegister.mongo.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| mongoRegister.mongo.image.repository | string | `"mongo"` | The docker image repository to use | -| mongoRegister.mongo.image.tag | string | `"6.0.2"` | The docker image tag to use @default Chart version | -| mongoRegister.mongo.resources | object | `{}` | | -| mongoRegister.ports[0].name | string | `"27017"` | | -| mongoRegister.ports[0].port | int | `27017` | | -| mongoRegister.ports[0].targetPort | int | `27017` | | -| mongoRegister.replicas | int | `1` | | -| mongoRegister.type | string | `"ClusterIP"` | | -| monitoring.enable | string | `"true"` | | -| monitoring.enable | string | `"true"` | If monitoring enabled. enable: true, enable: "" = not enabled | -| monitoring.fluentBit.env.lokiUrl | string | `"http://loki:3100/loki/api/v1/push"` | | -| monitoring.fluentBit.image.repository | string | `"grafana/fluent-bit-plugin-loki"` | The docker image repository to use | -| monitoring.fluentBit.image.tag | string | `"latest"` | The docker image tag to use @default Chart version | -| monitoring.fluentBit.resources | object | `{}` | | -| monitoring.grafana.env.gfAuthAnonymousEnable | bool | `true` | | -| monitoring.grafana.env.gfAuthAnonymousOrgRole | string | `"Admin"` | | -| monitoring.grafana.env.gfSecurityAdminPassword | string | `"secure_pass"` | | -| monitoring.grafana.env.gfSecurityAllowEmbedding | bool | `true` | | -| monitoring.grafana.env.lokiUrl | string | `"http://loki:3100"` | | -| monitoring.grafana.env.prometheusUrl | string | `"http://prometheus.mon.svc.cluster.local:9090"` | | -| monitoring.grafana.env.tempoUrl | string | `"http://monitoring-capif-tempo:3100"` | | -| monitoring.grafana.image.repository | string | `"grafana/grafana"` | The docker image repository to use | -| monitoring.grafana.image.tag | string | `"latest"` | The docker image tag to use @default Chart version | -| monitoring.grafana.ingress | object | `{"annotations":null,"enabled":true,"hosts":[{"host":"grafana.5gnacar.int","paths":[{"path":"/","pathType":"Prefix"}]}],"ingressClassName":"nginx","tls":[]}` | If ingress enabled=true, use monitoring.grafana.ingressRoute.enable="" | -| monitoring.grafana.ingressRoute | object | `{"enable":"","host":"grafana.5gnacar.int"}` | If ingressRoute enable=true, use monitoring.grafana.ingress.enabled="" | -| monitoring.grafana.persistence | object | `{"enable":"true","storage":"100Mi"}` | If grafana.persistence enabled. enable: true, enable: "" = not enabled | -| monitoring.grafana.resources | object | `{}` | | -| monitoring.grafana.service.port | int | `3000` | | -| monitoring.grafana.service.type | string | `"ClusterIP"` | | -| monitoring.loki.image.repository | string | `"grafana/loki"` | The docker image repository to use | -| monitoring.loki.image.tag | string | `"2.8.0"` | The docker image tag to use @default Chart version | -| monitoring.loki.persistence | object | `{"enable":"true","storage":"100Mi"}` | If grafana.persistence enabled. enable: true, enable: "" = not enabled | -| monitoring.loki.resources | object | `{}` | | -| monitoring.otel.configMap.tempoEndpoint | string | `"monitoring-capif-tempo:4317"` | | -| monitoring.otel.image.repository | string | `"otel/opentelemetry-collector"` | The docker image repository to use | -| monitoring.otel.image.tag | string | `"0.81.0"` | The docker image tag to use @default Chart version | -| monitoring.otel.resources | object | `{}` | | -| monitoring.prometheus.enable | string | `"true"` | It will deploy prometheus | -| monitoring.prometheus.image.repository | string | `"prom/prometheus"` | The docker image repository to use | -| monitoring.prometheus.image.tag | string | `"latest"` | The docker image tag to use @default Chart version | -| monitoring.prometheus.ingress.annotations | string | `nil` | | -| monitoring.prometheus.ingress.enabled | bool | `true` | | -| monitoring.prometheus.ingress.hosts[0].host | string | `"prometheus.5gnacar.int"` | | -| monitoring.prometheus.ingress.hosts[0].paths[0].path | string | `"/"` | | -| monitoring.prometheus.ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | -| monitoring.prometheus.ingress.ingressClassName | string | `"nginx"` | | -| monitoring.prometheus.ingress.tls | list | `[]` | | -| monitoring.prometheus.ingressRoute | object | `{"enable":"","host":"prometheus.5gnacar.int"}` | If ingressRoute enable=true, use monitoring.prometheus.ingress.enabled="" | -| monitoring.prometheus.persistence.enable | string | `"true"` | | -| monitoring.prometheus.persistence.storage | string | `"8Gi"` | | -| monitoring.prometheus.resources | object | `{}` | | -| monitoring.prometheus.service.port | int | `9090` | | -| monitoring.prometheus.service.type | string | `"ClusterIP"` | | -| monitoring.renderer.env.enableMetrics | string | `"true"` | | -| monitoring.renderer.image.repository | string | `"grafana/grafana-image-renderer"` | The docker image repository to use | -| monitoring.renderer.image.tag | string | `"latest"` | The docker image tag to use @default Chart version | -| monitoring.renderer.resources | object | `{}` | | -| nginx.annotations."nginx.ingress.kubernetes.io/backend-protocol" | string | `"HTTPS"` | | -| nginx.annotations."nginx.ingress.kubernetes.io/ssl-passthrough" | string | `"true"` | | -| nginx.annotations."nginx.ingress.kubernetes.io/ssl-redirect" | string | `"true"` | | -| nginx.ingressClassName | string | `"nginx"` | | -| nginx.ingressType | string | `"Ingress"` | if nginx.ingressType: "Ingress". set up monitoring.prometheus.ingress: true and monitoring.grafana.ingress: true Use IngressRoute if you want to use Gateway API. ex traefix | -| nginx.nginx.env.capifHostname | string | `"my-capif.apps.ocp-epg.hi.inet"` | Ingress's host to Capif | -| nginx.nginx.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| nginx.nginx.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/nginx"` | The docker image repository to use | -| nginx.nginx.image.tag | string | `""` | The docker image tag to use @default Chart version | -| nginx.nginx.resources.limits.cpu | string | `"100m"` | | -| nginx.nginx.resources.limits.memory | string | `"128Mi"` | | -| nginx.nginx.resources.requests.cpu | string | `"100m"` | | -| nginx.nginx.resources.requests.memory | string | `"128Mi"` | | -| nginx.ports[0].name | string | `"8080"` | | -| nginx.ports[0].port | int | `8080` | | -| nginx.ports[0].targetPort | int | `8080` | | -| nginx.ports[1].name | string | `"443"` | | -| nginx.ports[1].port | int | `443` | | -| nginx.ports[1].targetPort | int | `443` | | -| nginx.replicas | int | `1` | | -| nginx.type | string | `"ClusterIP"` | | -| parametersVault.env.vaultAccessToken | string | `"dev-only-token"` | | -| parametersVault.env.vaultHostname | string | `"vault-internal.mon.svc.cluster.local"` | | -| parametersVault.env.vaultPort | int | `8200` | | -| publishedApis.ports[0].name | string | `"8080"` | | -| publishedApis.ports[0].port | int | `8080` | | -| publishedApis.ports[0].targetPort | int | `8080` | | -| publishedApis.publishedApis.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| publishedApis.publishedApis.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| publishedApis.publishedApis.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/publish-service-api"` | The docker image repository to use | -| publishedApis.publishedApis.image.tag | string | `""` | The docker image tag to use @default Chart version | -| publishedApis.publishedApis.resources.limits.cpu | string | `"100m"` | | -| publishedApis.publishedApis.resources.limits.memory | string | `"128Mi"` | | -| publishedApis.publishedApis.resources.requests.cpu | string | `"100m"` | | -| publishedApis.publishedApis.resources.requests.memory | string | `"128Mi"` | | -| publishedApis.replicas | int | `1` | | -| publishedApis.type | string | `"ClusterIP"` | | -| redis.ports[0].name | string | `"6379"` | | -| redis.ports[0].port | int | `6379` | | -| redis.ports[0].targetPort | int | `6379` | | -| redis.redis.env.redisReplicationMode | string | `"master"` | | -| redis.redis.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| redis.redis.image.repository | string | `"redis"` | The docker image repository to use | -| redis.redis.image.tag | string | `"alpine"` | The docker image tag to use @default Chart version | -| redis.redis.resources.limits.cpu | string | `"100m"` | | -| redis.redis.resources.limits.memory | string | `"128Mi"` | | -| redis.redis.resources.requests.cpu | string | `"100m"` | | -| redis.redis.resources.requests.memory | string | `"128Mi"` | | -| redis.replicas | int | `1` | | -| redis.type | string | `"ClusterIP"` | | -| register.enable | string | `"true"` | If register enabled. enable: true, enable: "" = not enabled | -| register.ports[0].name | string | `"8080"` | | -| register.ports[0].port | int | `8084` | | -| register.ports[0].targetPort | int | `8080` | | -| register.register.env.mongoHost | string | `"mongo-register"` | | -| register.register.env.mongoPort | int | `27017` | | -| register.register.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| register.register.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/jwtauth"` | The docker image repository to use | -| register.register.image.tag | string | `""` | The docker image tag to use @default Chart version | -| register.register.resources.limits.cpu | string | `"100m"` | | -| register.register.resources.limits.memory | string | `"128Mi"` | | -| register.register.resources.requests.cpu | string | `"100m"` | | -| register.register.resources.requests.memory | string | `"128Mi"` | | -| register.replicas | int | `1` | | -| register.type | string | `"ClusterIP"` | | -| serviceApis.ports[0].name | string | `"8080"` | | -| serviceApis.ports[0].port | int | `8080` | | -| serviceApis.ports[0].targetPort | int | `8080` | | -| serviceApis.replicas | int | `1` | | -| serviceApis.serviceApis.env | object | `{"monitoring":"true"}` | If env.monitoring: true. Setup monitoring.enable: true | -| serviceApis.serviceApis.image.imagePullPolicy | string | `"Always"` | Image pull policy: Always, IfNotPresent | -| serviceApis.serviceApis.image.repository | string | `"public.ecr.aws/o2v4a8t6/opencapif/discover-service-api"` | The docker image repository to use | -| serviceApis.serviceApis.image.tag | string | `""` | The docker image tag to use @default Chart version | -| serviceApis.serviceApis.resources.limits.cpu | string | `"100m"` | | -| serviceApis.serviceApis.resources.limits.memory | string | `"128Mi"` | | -| serviceApis.serviceApis.resources.requests.cpu | string | `"100m"` | | -| serviceApis.serviceApis.resources.requests.memory | string | `"128Mi"` | | -| serviceApis.type | string | `"ClusterIP"` | | -| tempo | object | `{"enabled":true,"persistence":{"enabled":true,"size":"3Gi"},"tempo":{"metricsGenerator":{"enabled":true,"remoteWriteUrl":"http://prometheus.mon.svc.cluster.local:9090/api/v1/write"}}}` | If monitoring.enable: "true". Also enable tempo.enabled: true | +| fluentbit | object | `{"enabled":false}` | With fluentbit.enabled: false. It won't be deployed | +| grafana | object | `{"enabled":false}` | With grafana.enabled: false. It won't be deployed | +| loki | object | `{"enabled":false}` | With loki.enabled: false. It won't be deployed | +| mock-server | object | `{"enabled":false}` | With mock-server.enabled: false. It won't be deployed | +| mongo-express | object | `{"enabled":false}` | With mongo-express.enabled: false. It won't be deployed | +| mongo-register-express | object | `{"enabled":false}` | With mongo-register-express.enabled: false. It won't be deployed | +| otelcollector | object | `{"enabled":false}` | With otelcollector.enabled: false. It won't be deployed | +| renderer | object | `{"enabled":false}` | With renderer.enabled: false. It won't be deployed | +| tempo | object | `{"enabled":true,"persistence":{"enabled":true,"size":"3Gi"},"tempo":{"metricsGenerator":{"enabled":true,"remoteWriteUrl":"http://prometheus.mon.svc.cluster.local:9090/api/v1/write"}}}` | With tempo.enabled: false. It won't be deployed | +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/fluentbit/Chart.yaml b/helm/capif/charts/fluentbit/Chart.yaml index b10c00b6eb287628ab1f0da00b26a16c0aa5a6f6..d44fd6ce744abfa1c3916b4d3c1d88b05a104065 100644 --- a/helm/capif/charts/fluentbit/Chart.yaml +++ b/helm/capif/charts/fluentbit/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: fluentbit -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of fluentbit OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/fluentbit/README.md b/helm/capif/charts/fluentbit/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d60dec8bab2438c73ad516717c7169abb8d232db --- /dev/null +++ b/helm/capif/charts/fluentbit/README.md @@ -0,0 +1,60 @@ +# fluentbit + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of fluentbit OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| enabled | bool | `false` | | +| env.lokiUrl | string | `"http://loki:3100/loki/api/v1/push"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"grafana/fluent-bit-plugin-loki"` | | +| image.tag | string | `"latest"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe.initialDelaySeconds | int | `20` | | +| livenessProbe.periodSeconds | int | `5` | | +| livenessProbe.tcpSocket.port | int | `24224` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `20` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `24224` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `24224` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/fluent-bit/etc/fluent-bit.conf"` | | +| volumeMounts[0].name | string | `"fluent-bit-conf"` | | +| volumeMounts[0].subPath | string | `"fluent-bit.conf"` | | +| volumes[0].configMap.items[0].key | string | `"fluent-bit.conf"` | | +| volumes[0].configMap.items[0].path | string | `"fluent-bit.conf"` | | +| volumes[0].configMap.name | string | `"fluent-bit-configmap"` | | +| volumes[0].name | string | `"fluent-bit-conf"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/fluentbit/values.yaml b/helm/capif/charts/fluentbit/values.yaml index 49aa7e72bfcc9469d20697160fd2653421eae435..cd9ae42a094f39f4b2af4c7201256f472855480f 100644 --- a/helm/capif/charts/fluentbit/values.yaml +++ b/helm/capif/charts/fluentbit/values.yaml @@ -64,17 +64,17 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi livenessProbe: tcpSocket: diff --git a/helm/capif/charts/grafana/Chart.yaml b/helm/capif/charts/grafana/Chart.yaml index 2c7c54e5d4e37c3a84aea8825c5e447a5bc6a7d3..ec68776a592806b8cf054f6c23752288d58e9eeb 100644 --- a/helm/capif/charts/grafana/Chart.yaml +++ b/helm/capif/charts/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: grafana -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of grafana OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/grafana/README.md b/helm/capif/charts/grafana/README.md index 5325ad0dd72a30d59b8293e64d5a5f624857d0c9..e42edf1448764e7961f9f34a43539ecaf14edde5 100644 --- a/helm/capif/charts/grafana/README.md +++ b/helm/capif/charts/grafana/README.md @@ -2,7 +2,7 @@ ![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) -A Helm chart for Kubernetes +A Helm chart for Kubernetes of grafana OCF ## Values @@ -13,11 +13,14 @@ A Helm chart for Kubernetes | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| enabled | bool | `false` | | | env.gfAuthAnonymousEnable | bool | `true` | | | env.gfAuthAnonymousOrgRole | string | `"Admin"` | | | env.gfSecurityAdminPassword | string | `"secure_pass"` | | | env.gfSecurityAllowEmbedding | bool | `true` | | +| env.lokiUrl | string | `"http://loki:3100"` | | | env.prometheusUrl | string | `"http://prometheus.prometheus-system.svc.cluster.local:9090"` | | +| env.tempoUrl | string | `"http://tempo:3100"` | | | fullnameOverride | string | `""` | | | image.pullPolicy | string | `"Always"` | | | image.repository | string | `"grafana/grafana"` | | @@ -26,22 +29,22 @@ A Helm chart for Kubernetes | ingress.annotations | object | `{}` | | | ingress.className | string | `"nginx"` | | | ingress.enabled | bool | `true` | | -| ingress.environment | string | `"edge"` | | | ingress.hosts[0].host | string | `"grafana-dt.tactile5g.int"` | | | ingress.hosts[0].paths[0].path | string | `"/"` | | | ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | | ingress.tls | list | `[]` | | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | | -| persistence.enable | bool | `false` | | +| persistence.enable | bool | `true` | | | persistence.storage | string | `"10Gi"` | | +| persistence.storageClass | string | `"nfs-01"` | | | podAnnotations | object | `{}` | | | podSecurityContext | object | `{}` | | | replicaCount | int | `1` | | | resources | object | `{}` | | | securityContext | object | `{}` | | -| service.port | int | `80` | | -| service.type | string | `"NodePort"` | | +| service.port | int | `3000` | | +| service.type | string | `"ClusterIP"` | | | serviceAccount.annotations | object | `{}` | | | serviceAccount.create | bool | `true` | | | serviceAccount.name | string | `""` | | diff --git a/helm/capif/charts/grafana/templates/deployment.yaml b/helm/capif/charts/grafana/templates/deployment.yaml index d74241f8fd2bdfc89810f4a2f9e64ac7e3a4e636..c2e1a6e3066b253f669fe8257ab404d2d2d3a8a1 100644 --- a/helm/capif/charts/grafana/templates/deployment.yaml +++ b/helm/capif/charts/grafana/templates/deployment.yaml @@ -36,6 +36,8 @@ spec: value: {{ quote .Values.env.gfSecurityAllowEmbedding }} - name: GF_PATHS_PROVISIONING value: /etc/grafana/provisioning + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} name: {{ .Chart.Name }} diff --git a/helm/capif/charts/grafana/templates/pvc.yaml b/helm/capif/charts/grafana/templates/pvc.yaml index 7aa2b7225959833fd97079735a064a7deb022039..b6be2b4fda454a8b632e360ef1a4eff93ee1df4e 100644 --- a/helm/capif/charts/grafana/templates/pvc.yaml +++ b/helm/capif/charts/grafana/templates/pvc.yaml @@ -8,8 +8,7 @@ metadata: name: grafana-claim0 spec: storageClassName: {{ .Values.persistence.storageClass }} - accessModes: - - ReadWriteMany + accessModes: {{ .Values.persistence.accessModes }} resources: requests: storage: {{ .Values.persistence.storage }} diff --git a/helm/capif/charts/grafana/values.yaml b/helm/capif/charts/grafana/values.yaml index 8391800203a7f201b02594510981765701519502..5cae1de46db2f3cdb2b636f35c6549e995f79282 100644 --- a/helm/capif/charts/grafana/values.yaml +++ b/helm/capif/charts/grafana/values.yaml @@ -52,6 +52,8 @@ persistence: enable: true storage: 10Gi storageClass: nfs-01 + accessModes: + - ReadWriteMany service: type: ClusterIP @@ -73,17 +75,17 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi autoscaling: enabled: false diff --git a/helm/capif/charts/loki/Chart.yaml b/helm/capif/charts/loki/Chart.yaml index 1125160529fba8c6ba65a04d0f2677c77401079a..cfb4a8cf371947e9ba51326a0e1b9633295dbae2 100644 --- a/helm/capif/charts/loki/Chart.yaml +++ b/helm/capif/charts/loki/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: loki -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of loki OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/loki/README.md b/helm/capif/charts/loki/README.md new file mode 100644 index 0000000000000000000000000000000000000000..cba5de4a35562eb7e452356b2b744edd6bbc1e47 --- /dev/null +++ b/helm/capif/charts/loki/README.md @@ -0,0 +1,59 @@ +# loki + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of loki OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| enabled | bool | `false` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"grafana/loki"` | | +| image.tag | string | `"2.8.0"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe.initialDelaySeconds | int | `20` | | +| livenessProbe.periodSeconds | int | `5` | | +| livenessProbe.tcpSocket.port | int | `3100` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| persistence.enable | bool | `true` | | +| persistence.storage | string | `"100Mi"` | | +| persistence.storageClass | string | `"nfs-01"` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `20` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `3100` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext.runAsUser | int | `0` | | +| service.port | int | `3100` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/loki/wal"` | | +| volumeMounts[0].name | string | `"loki-claim0"` | | +| volumes[0].name | string | `"loki-claim0"` | | +| volumes[0].persistentVolumeClaim.claimName | string | `"loki-claim0"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/loki/templates/pvc.yaml b/helm/capif/charts/loki/templates/pvc.yaml index c6594b23557d2446b1a86928b18485a7ceba704f..028cbe6fe5e50c56ce1d5fb8e352703a5ea78e76 100644 --- a/helm/capif/charts/loki/templates/pvc.yaml +++ b/helm/capif/charts/loki/templates/pvc.yaml @@ -7,8 +7,7 @@ metadata: name: loki-claim0 spec: storageClassName: {{ .Values.persistence.storageClass }} - accessModes: - - ReadWriteMany + accessModes: {{ .Values.persistence.accessModes }} resources: requests: storage: {{ .Values.persistence.storage }} diff --git a/helm/capif/charts/loki/values.yaml b/helm/capif/charts/loki/values.yaml index 444311d2f1cb8c0de407ef19acb60b3ad2a86fa0..b7bbadc4f904a930cfbfa1aa651273a85022975c 100644 --- a/helm/capif/charts/loki/values.yaml +++ b/helm/capif/charts/loki/values.yaml @@ -45,6 +45,8 @@ persistence: enable: true storage: 100Mi storageClass: nfs-01 + accessModes: + - ReadWriteMany service: type: ClusterIP @@ -66,17 +68,17 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi livenessProbe: tcpSocket: diff --git a/helm/capif/charts/mock-server/Chart.yaml b/helm/capif/charts/mock-server/Chart.yaml index 9ca2cda3630662f9e05036d329d78d370c9113a9..9affda1d18474d1a337f89e1d58dbe92fc8ffd6a 100644 --- a/helm/capif/charts/mock-server/Chart.yaml +++ b/helm/capif/charts/mock-server/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: mock-server -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of mock-server OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/mock-server/README.md b/helm/capif/charts/mock-server/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d33a78a1b077381c3b7c4cc169e03917e02aac30 --- /dev/null +++ b/helm/capif/charts/mock-server/README.md @@ -0,0 +1,53 @@ +# mock-server + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of mock-server OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| enabled | bool | `false` | | +| env.logLevel | string | `"INFO"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"mock-server"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `"nginx"` | | +| ingress.enabled | bool | `true` | | +| ingress.hosts[0].host | string | `"mock-server.example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | +| ingress.tls | list | `[]` | | +| livenessProbe.initialDelaySeconds | int | `20` | | +| livenessProbe.periodSeconds | int | `5` | | +| livenessProbe.tcpSocket.port | int | `9100` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe | string | `nil` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `9100` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/mock-server/values.yaml b/helm/capif/charts/mock-server/values.yaml index a34433aa97c060faddc1e412f8d93c791b3bdf75..06de7306faf9f12d414d232909b550fbbc458d1a 100644 --- a/helm/capif/charts/mock-server/values.yaml +++ b/helm/capif/charts/mock-server/values.yaml @@ -46,7 +46,7 @@ securityContext: {} service: type: ClusterIP - port: 9090 + port: 9100 ingress: enabled: true @@ -64,21 +64,21 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi livenessProbe: tcpSocket: - port: 9090 + port: 9100 initialDelaySeconds: 20 periodSeconds: 5 readinessProbe: diff --git a/helm/capif/charts/mongo-express/Chart.yaml b/helm/capif/charts/mongo-express/Chart.yaml index 7150bbccdd23baed83ea708e050450f10b46e5ea..9962592258afaff1d7299c5c7ff90a694454d26d 100644 --- a/helm/capif/charts/mongo-express/Chart.yaml +++ b/helm/capif/charts/mongo-express/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: mongo-express -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes mongo-express OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/mongo-express/README.md b/helm/capif/charts/mongo-express/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6d5f120851dc8fcab46211ac3df04dc17003ba1f --- /dev/null +++ b/helm/capif/charts/mongo-express/README.md @@ -0,0 +1,58 @@ +# mongo-express + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes mongo-express OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| enabled | bool | `false` | | +| env.meConfigMongodbAdminpassword | string | `"example"` | | +| env.meConfigMongodbAdminusername | string | `"root"` | | +| env.meConfigMongodbUrl | string | `"mongodb://root:example@mongo:27017/"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"mongo-express"` | | +| image.tag | string | `"1.0.0-alpha.4"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `"nginx"` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `8081` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8082` | | +| service.targetPort | int | `8081` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/mongo-express/values.yaml b/helm/capif/charts/mongo-express/values.yaml index 36f3a8bdc3c1a4d6a8061b8d8f4fc150a34c2f73..76ce47e99026f1986269aa1cf02004770c015612 100644 --- a/helm/capif/charts/mongo-express/values.yaml +++ b/helm/capif/charts/mongo-express/values.yaml @@ -72,11 +72,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/mongo-register-express/Chart.yaml b/helm/capif/charts/mongo-register-express/Chart.yaml index b4e246c5371588b8649b2de23af3664ca6017f4b..36473fd2ece9ab61e60530949d49b9537157327a 100644 --- a/helm/capif/charts/mongo-register-express/Chart.yaml +++ b/helm/capif/charts/mongo-register-express/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: mongo-register-express -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of mongo-register-express OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/mongo-register-express/README.md b/helm/capif/charts/mongo-register-express/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c7ec4ff97806591481df7e230bfac3ce7b9e3ced --- /dev/null +++ b/helm/capif/charts/mongo-register-express/README.md @@ -0,0 +1,58 @@ +# mongo-register-express + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of mongo-register-express OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| enabled | bool | `false` | | +| env.meConfigMongodbAdminpassword | string | `"example"` | | +| env.meConfigMongodbAdminusername | string | `"root"` | | +| env.meConfigMongodbUrl | string | `"mongodb://root:example@mongo-register:27017/"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"mongo-express"` | | +| image.tag | string | `"1.0.0-alpha.4"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `"nginx"` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `8081` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8082` | | +| service.targetPort | int | `8081` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/mongo-register-express/values.yaml b/helm/capif/charts/mongo-register-express/values.yaml index dd225f5d39888dc1c3281da4584f9f211452a68b..f174fbd5bb1e0cfd16489b55375ea075116cc959 100644 --- a/helm/capif/charts/mongo-register-express/values.yaml +++ b/helm/capif/charts/mongo-register-express/values.yaml @@ -73,11 +73,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/mongo-register/Chart.yaml b/helm/capif/charts/mongo-register/Chart.yaml index 08a4264470125209be19d9403a59e9b96cabafd2..65a394ec98627fec17e837e3c23c3fdaa65a7a2b 100644 --- a/helm/capif/charts/mongo-register/Chart.yaml +++ b/helm/capif/charts/mongo-register/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: mongo-register -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of mongo-register OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/mongo-register/README.md b/helm/capif/charts/mongo-register/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a37f18df91859c713df1bf0317e8fe215c35daab --- /dev/null +++ b/helm/capif/charts/mongo-register/README.md @@ -0,0 +1,56 @@ +# mongo-register + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of mongo-register OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"mongo"` | | +| image.tag | string | `"6.0.2"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| persistence.storage | string | `"8Gi"` | | +| persistence.storageClass | string | `"nfs-01"` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `27017` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext.runAsUser | int | `999` | | +| service.port | int | `27017` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/data/db"` | | +| volumeMounts[0].name | string | `"mongo-register-pvc"` | | +| volumes[0].name | string | `"mongo-register-pvc"` | | +| volumes[0].persistentVolumeClaim.claimName | string | `"mongo-register-pvc"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/mongo-register/templates/pvc.yaml b/helm/capif/charts/mongo-register/templates/pvc.yaml index 13f17337ddd201d860557b3005ec7804cfbd3fdc..b3477fd3a044decf02b585f420d1cc77d23a8d94 100644 --- a/helm/capif/charts/mongo-register/templates/pvc.yaml +++ b/helm/capif/charts/mongo-register/templates/pvc.yaml @@ -6,8 +6,7 @@ metadata: name: mongo-register-pvc spec: storageClassName: {{ .Values.persistence.storageClass }} - accessModes: - - ReadWriteMany + accessModes: {{ .Values.persistence.accessModes }} resources: requests: storage: {{ .Values.persistence.storage }} \ No newline at end of file diff --git a/helm/capif/charts/mongo-register/values.yaml b/helm/capif/charts/mongo-register/values.yaml index dcb783f18c8e5a9a8659d98784528f7c15fd6043..d52301d421fa286f98a7265b1cfdb72defe4052f 100644 --- a/helm/capif/charts/mongo-register/values.yaml +++ b/helm/capif/charts/mongo-register/values.yaml @@ -63,17 +63,17 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: @@ -94,6 +94,8 @@ autoscaling: persistence: storage: 8Gi storageClass: nfs-01 + accessModes: + - ReadWriteMany # Additional volumes on the output Deployment definition. volumes: diff --git a/helm/capif/charts/mongo/Chart.yaml b/helm/capif/charts/mongo/Chart.yaml index 638bb4522a792c9c9d856c1fb3999b68c1da0edf..de7f0325034eb0044aef84207066f983c7bd7abf 100644 --- a/helm/capif/charts/mongo/Chart.yaml +++ b/helm/capif/charts/mongo/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: mongo -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of mongo OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/mongo/README.md b/helm/capif/charts/mongo/README.md new file mode 100644 index 0000000000000000000000000000000000000000..cf93547e786f3cfa54649d7649488a621489d739 --- /dev/null +++ b/helm/capif/charts/mongo/README.md @@ -0,0 +1,58 @@ +# mongo + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of mongo OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"mongo"` | | +| image.tag | string | `"6.0.2"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe.initialDelaySeconds | int | `20` | | +| livenessProbe.periodSeconds | int | `5` | | +| livenessProbe.tcpSocket.port | int | `27017` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| persistence.storage | string | `"8Gi"` | | +| persistence.storageClass | string | `"nfs-01"` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `27017` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext.runAsUser | int | `999` | | +| service.port | int | `27017` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/data/db"` | | +| volumeMounts[0].name | string | `"mongo-pvc"` | | +| volumes[0].name | string | `"mongo-pvc"` | | +| volumes[0].persistentVolumeClaim.claimName | string | `"mongo-pvc"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/mongo/templates/pvc.yaml b/helm/capif/charts/mongo/templates/pvc.yaml index c0ceafd7e06ed2ea6cdee2596923eebaa79bfdba..876d9e3b6e22f617a4fa69288816364a8ec8ae96 100644 --- a/helm/capif/charts/mongo/templates/pvc.yaml +++ b/helm/capif/charts/mongo/templates/pvc.yaml @@ -6,8 +6,7 @@ metadata: name: mongo-pvc spec: storageClassName: {{ .Values.persistence.storageClass }} - accessModes: - - ReadWriteMany + accessModes: {{ .Values.persistence.accessModes }} resources: requests: storage: {{ .Values.persistence.storage }} \ No newline at end of file diff --git a/helm/capif/charts/mongo/values.yaml b/helm/capif/charts/mongo/values.yaml index 38e4b9b9846ca5c27bb74899c3113a77a6b804dc..6e15c566a7b192b7aae0841b09aca850bef09027 100644 --- a/helm/capif/charts/mongo/values.yaml +++ b/helm/capif/charts/mongo/values.yaml @@ -63,17 +63,17 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi livenessProbe: tcpSocket: @@ -97,6 +97,8 @@ autoscaling: persistence: storage: 8Gi storageClass: nfs-01 + accessModes: + - ReadWriteMany # Additional volumes on the output Deployment definition. volumes: diff --git a/helm/capif/charts/nginx/Chart.yaml b/helm/capif/charts/nginx/Chart.yaml index 3464a394b4da5052006464f8fce5db8631012b09..d1e152ad21c9f0a604c1806101d331638146ad1d 100644 --- a/helm/capif/charts/nginx/Chart.yaml +++ b/helm/capif/charts/nginx/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nginx -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of nginx OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/nginx/README.md b/helm/capif/charts/nginx/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e1649cf014a9a934e9f606b1b62b17369e71ce76 --- /dev/null +++ b/helm/capif/charts/nginx/README.md @@ -0,0 +1,66 @@ +# nginx + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of nginx OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.capifHostname | string | `"my-capif.apps.ocp-epg.hi.inet"` | | +| env.logLevel | string | `"info"` | | +| env.vaultAccessToken | string | `"dev-only-token"` | | +| env.vaultHostname | string | `"vault-internal.mon.svc.cluster.local"` | | +| env.vaultPort | int | `8200` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"nginx"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations."nginx.ingress.kubernetes.io/backend-protocol" | string | `"HTTPS"` | | +| ingress.annotations."nginx.ingress.kubernetes.io/ssl-passthrough" | string | `"true"` | | +| ingress.annotations."nginx.ingress.kubernetes.io/ssl-redirect" | string | `"true"` | | +| ingress.className | string | `"nginx"` | | +| ingress.enabled | bool | `true` | | +| ingress.hosts[0].host | string | `"nginx-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | +| ingress.tls | list | `[]` | | +| livenessProbe.initialDelaySeconds | int | `20` | | +| livenessProbe.periodSeconds | int | `5` | | +| livenessProbe.tcpSocket.port | int | `8080` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe | string | `nil` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.ports[0].name | string | `"http"` | | +| service.ports[0].port | int | `8080` | | +| service.ports[0].targetPort | int | `8080` | | +| service.ports[1].name | string | `"https"` | | +| service.ports[1].port | int | `443` | | +| service.ports[1].targetPort | int | `443` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/nginx/values.yaml b/helm/capif/charts/nginx/values.yaml index db0541e9b82c3cf135ece746b3815f84cb6c9b25..43e1d05be3f87f6322acd1b1b7ceb88ff6b1e11a 100644 --- a/helm/capif/charts/nginx/values.yaml +++ b/helm/capif/charts/nginx/values.yaml @@ -80,11 +80,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: tcpSocket: diff --git a/helm/capif/charts/ocf-access-control-policy/Chart.yaml b/helm/capif/charts/ocf-access-control-policy/Chart.yaml index bed944736358047f394df7acd417a1f89e572932..21b47b00ef931461da2e3898b108c14241e1c9fd 100644 --- a/helm/capif/charts/ocf-access-control-policy/Chart.yaml +++ b/helm/capif/charts/ocf-access-control-policy/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-access-control-policy -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes ocf-access-control-policy # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-access-control-policy/README.md b/helm/capif/charts/ocf-access-control-policy/README.md new file mode 100644 index 0000000000000000000000000000000000000000..163beb4562963e5d8efa968a335b2f9a783aad03 --- /dev/null +++ b/helm/capif/charts/ocf-access-control-policy/README.md @@ -0,0 +1,57 @@ +# ocf-access-control-policy + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes ocf-access-control-policy + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.capifHostname | string | `"my-capif.apps.ocp-epg.hi.inet"` | | +| env.logLevel | string | `"INFO"` | | +| env.monitoring | string | `"true"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ocf-access-control-policy"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `10` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-access-control-policy/values.yaml b/helm/capif/charts/ocf-access-control-policy/values.yaml index 9184d264b10da5022f4ce435f902c50c64522e0c..1f2ce41ca3f577cdbc3e131574c0df670a501ed6 100644 --- a/helm/capif/charts/ocf-access-control-policy/values.yaml +++ b/helm/capif/charts/ocf-access-control-policy/values.yaml @@ -70,11 +70,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-api-invocation-logs/Chart.yaml b/helm/capif/charts/ocf-api-invocation-logs/Chart.yaml index d735b1627724a558c170dee1e339711e8f97a152..5057d4f04c8ac4586e5aa6e5db95f4423cb7fc4c 100644 --- a/helm/capif/charts/ocf-api-invocation-logs/Chart.yaml +++ b/helm/capif/charts/ocf-api-invocation-logs/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-api-invocation-logs -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-api-invocation-logs # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-api-invocation-logs/README.md b/helm/capif/charts/ocf-api-invocation-logs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8757334c7917951c9bb9b9165f6858b5c5823c9d --- /dev/null +++ b/helm/capif/charts/ocf-api-invocation-logs/README.md @@ -0,0 +1,67 @@ +# ocf-api-invocation-logs + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-api-invocation-logs + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.capifHostname | string | `"capif"` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| env.monitoring | string | `"true"` | | +| env.vaultAccessToken | string | `"dev-only-token"` | | +| env.vaultHostname | string | `"vault"` | | +| env.vaultPort | int | `8200` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ocf-api-invocation-logs-api"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `10` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"capif-invocation-config"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"capif-invocation-configmap"` | | +| volumes[0].name | string | `"capif-invocation-config"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-api-invocation-logs/values.yaml b/helm/capif/charts/ocf-api-invocation-logs/values.yaml index dc63d4b53ae11261428458a7926bf39fbf14815b..756ccbf82d76b4e755cc45ca7e9494eb380f7e8c 100644 --- a/helm/capif/charts/ocf-api-invocation-logs/values.yaml +++ b/helm/capif/charts/ocf-api-invocation-logs/values.yaml @@ -75,11 +75,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-api-invoker-management/Chart.yaml b/helm/capif/charts/ocf-api-invoker-management/Chart.yaml index 2a9ef72f16a224e3790cf85e51a7d19e5b25eccd..615fcb01fff740323d4bd16d3e870180d6c1a530 100644 --- a/helm/capif/charts/ocf-api-invoker-management/Chart.yaml +++ b/helm/capif/charts/ocf-api-invoker-management/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-api-invoker-management -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-api-invoker-management # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-api-invoker-management/README.md b/helm/capif/charts/ocf-api-invoker-management/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1e95f6d5a1744543b39f548adfcb695952295ca6 --- /dev/null +++ b/helm/capif/charts/ocf-api-invoker-management/README.md @@ -0,0 +1,66 @@ +# ocf-api-invoker-management + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-api-invoker-management + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| env.mongoRegister.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoRegister.mongoInitdbRootUsername | string | `"root"` | | +| env.monitoring | string | `"true"` | | +| env.vaultAccessToken | string | `"dev-only-token"` | | +| env.vaultHostname | string | `"vault"` | | +| env.vaultPort | int | `8200` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ocf-api-invoker-management-api"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"capif-invoker-config"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"capif-invoker-configmap"` | | +| volumes[0].name | string | `"capif-invoker-config"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-api-invoker-management/templates/deployment.yaml b/helm/capif/charts/ocf-api-invoker-management/templates/deployment.yaml index 5b210cb25b01f71318975a84bd89256b11183b44..70508d9f3fdb01c2521e2760920a520ebeebb525 100644 --- a/helm/capif/charts/ocf-api-invoker-management/templates/deployment.yaml +++ b/helm/capif/charts/ocf-api-invoker-management/templates/deployment.yaml @@ -42,6 +42,8 @@ spec: env: - name: MONITORING value: {{ quote .Values.env.monitoring }} + - name: CAPIF_HOSTNAME + value: {{ quote .Values.env.capifHostname }} - name: VAULT_HOSTNAME value: {{ quote .Values.env.vaultHostname }} - name: VAULT_PORT diff --git a/helm/capif/charts/ocf-api-invoker-management/values.yaml b/helm/capif/charts/ocf-api-invoker-management/values.yaml index e832c7d4ed28cd21113a6f367e2c9cbcfeb3af03..0fbda233bf45ad9626f951b90fc19bdc78c2190a 100644 --- a/helm/capif/charts/ocf-api-invoker-management/values.yaml +++ b/helm/capif/charts/ocf-api-invoker-management/values.yaml @@ -16,6 +16,7 @@ fullnameOverride: "" env: monitoring: "true" + capifHostname: capif vaultHostname: vault vaultPort: 8200 vaultAccessToken: dev-only-token @@ -77,11 +78,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-api-provider-management/Chart.yaml b/helm/capif/charts/ocf-api-provider-management/Chart.yaml index 773f014ce46e79ae2ddd0d0abe1255197b304f88..5db319a1b701cfbe6c96d7c284c6a07f68947cc6 100644 --- a/helm/capif/charts/ocf-api-provider-management/Chart.yaml +++ b/helm/capif/charts/ocf-api-provider-management/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-api-provider-management -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-api-provider-management # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-api-provider-management/README.md b/helm/capif/charts/ocf-api-provider-management/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e8d114bce034fca08fbe1edb48e053c0dcc4d828 --- /dev/null +++ b/helm/capif/charts/ocf-api-provider-management/README.md @@ -0,0 +1,66 @@ +# ocf-api-provider-management + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-api-provider-management + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| env.mongoRegister.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoRegister.mongoInitdbRootUsername | string | `"root"` | | +| env.monitoring | string | `"true"` | | +| env.vaultAccessToken | string | `"dev-only-token"` | | +| env.vaultHostname | string | `"vault"` | | +| env.vaultPort | int | `8200` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ocf-api-provider-management-api"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"capif-provider-config"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"capif-provider-configmap"` | | +| volumes[0].name | string | `"capif-provider-config"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-api-provider-management/templates/deployment.yaml b/helm/capif/charts/ocf-api-provider-management/templates/deployment.yaml index 7f95b9d602eb70ce4eeb5b34df18d506eef47d1b..b335dc75f4f201e91b8a807edd89e1433754b585 100644 --- a/helm/capif/charts/ocf-api-provider-management/templates/deployment.yaml +++ b/helm/capif/charts/ocf-api-provider-management/templates/deployment.yaml @@ -42,6 +42,8 @@ spec: env: - name: MONITORING value: {{ quote .Values.env.monitoring }} + - name: CAPIF_HOSTNAME + value: {{ quote .Values.env.capifHostname }} - name: VAULT_HOSTNAME value: {{ quote .Values.env.vaultHostname }} - name: VAULT_PORT diff --git a/helm/capif/charts/ocf-api-provider-management/values.yaml b/helm/capif/charts/ocf-api-provider-management/values.yaml index 547bb05431771b6e9a3668f7b133119781e8b4a7..b38cb0fd5c342833e5fee04aa61d2b24d16f5ca7 100644 --- a/helm/capif/charts/ocf-api-provider-management/values.yaml +++ b/helm/capif/charts/ocf-api-provider-management/values.yaml @@ -16,6 +16,7 @@ fullnameOverride: "" env: monitoring: "true" + capifHostname: capif vaultHostname: vault vaultPort: 8200 vaultAccessToken: dev-only-token @@ -77,11 +78,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-auditing-api-logs/Chart.yaml b/helm/capif/charts/ocf-auditing-api-logs/Chart.yaml index dd3585c35ca18a4c1229d0d4b05299cf97e990d7..397939516d97d0bce52782bbc3b9567ceedefb3f 100644 --- a/helm/capif/charts/ocf-auditing-api-logs/Chart.yaml +++ b/helm/capif/charts/ocf-auditing-api-logs/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-auditing-api-logs -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-auditing-api-logs # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-auditing-api-logs/README.md b/helm/capif/charts/ocf-auditing-api-logs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fdf834b3c3a90e6196eab06fbad5e903e4776aaa --- /dev/null +++ b/helm/capif/charts/ocf-auditing-api-logs/README.md @@ -0,0 +1,63 @@ +# ocf-auditing-api-logs + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-auditing-api-logs + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| env.monitoring | string | `"true"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"auditing-api"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `5` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"capif-logs-config"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"capif-logs-configmap"` | | +| volumes[0].name | string | `"capif-logs-config"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-auditing-api-logs/templates/deployment.yaml b/helm/capif/charts/ocf-auditing-api-logs/templates/deployment.yaml index 8248606b8385e819a3df8b58513685c2c5c004fd..32f3ac26fbfd88d1a4eb17eb7d808a4b686ea478 100644 --- a/helm/capif/charts/ocf-auditing-api-logs/templates/deployment.yaml +++ b/helm/capif/charts/ocf-auditing-api-logs/templates/deployment.yaml @@ -40,10 +40,10 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: MONITORING - value: {{ quote .Values.env.monitoring }} - - name: LOG_LEVEL - value: {{ quote .Values.env.logLevel }} + - name: MONITORING + value: {{ quote .Values.env.monitoring }} + - name: LOG_LEVEL + value: {{ quote .Values.env.logLevel }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-auditing-api-logs/values.yaml b/helm/capif/charts/ocf-auditing-api-logs/values.yaml index 859ba129d567caf4b1ca047d05e531a9bcddf3ea..2c0231e6e6f7518ee12f0051951a688fe01a2935 100644 --- a/helm/capif/charts/ocf-auditing-api-logs/values.yaml +++ b/helm/capif/charts/ocf-auditing-api-logs/values.yaml @@ -71,11 +71,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-discover-service-api/Chart.yaml b/helm/capif/charts/ocf-discover-service-api/Chart.yaml index 3bffbb8ac0f624fc2b1648fb7ad3aa9ce3098849..fd2dcf8381d04ed4f93610d6e227f3316b6083be 100644 --- a/helm/capif/charts/ocf-discover-service-api/Chart.yaml +++ b/helm/capif/charts/ocf-discover-service-api/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-discover-service-api -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-discover-service-api # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-discover-service-api/README.md b/helm/capif/charts/ocf-discover-service-api/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bc0aa2b9fcb0042cf280fe2914ccd0a427244525 --- /dev/null +++ b/helm/capif/charts/ocf-discover-service-api/README.md @@ -0,0 +1,63 @@ +# ocf-discover-service-api + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-discover-service-api + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| env.monitoring | string | `"true"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"discover-service-api"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `5` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"capif-service-config"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"capif-service-configmap"` | | +| volumes[0].name | string | `"capif-service-config"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-discover-service-api/values.yaml b/helm/capif/charts/ocf-discover-service-api/values.yaml index 6aa8e611bff38c395604f22d17b730663905b8a6..1d1c5d6e9d292121c3c352264da149eecde58f8a 100644 --- a/helm/capif/charts/ocf-discover-service-api/values.yaml +++ b/helm/capif/charts/ocf-discover-service-api/values.yaml @@ -71,11 +71,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-events/Chart.yaml b/helm/capif/charts/ocf-events/Chart.yaml index 9e9667fd23cdb8dcec69b3d70bef1368ed3ea137..8d267d2834bc89363dcaf1b30629ea078b0ec420 100644 --- a/helm/capif/charts/ocf-events/Chart.yaml +++ b/helm/capif/charts/ocf-events/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-events -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-events # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-events/README.md b/helm/capif/charts/ocf-events/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3e5f7caea53008532a49792db6c187aa1b456180 --- /dev/null +++ b/helm/capif/charts/ocf-events/README.md @@ -0,0 +1,63 @@ +# ocf-events + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-events + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| env.monitoring | string | `"true"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"events-api"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `5` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"capif-events-config"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"capif-events-configmap"` | | +| volumes[0].name | string | `"capif-events-config"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-events/templates/deployment.yaml b/helm/capif/charts/ocf-events/templates/deployment.yaml index 50b58cc909d0f3878268457fa6d6610066e0ceb9..90933d3bd8e9df788a83c8a296dc99cf7aff475a 100644 --- a/helm/capif/charts/ocf-events/templates/deployment.yaml +++ b/helm/capif/charts/ocf-events/templates/deployment.yaml @@ -40,10 +40,14 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: MONITORING - value: {{ quote .Values.env.monitoring }} - - name: LOG_LEVEL - value: {{ quote .Values.env.logLevel }} + - name: MONITORING + value: {{ quote .Values.env.monitoring }} + - name: CAPIF_HOSTNAME + value: {{ quote .Values.env.capifHostname }} + - name: LOG_LEVEL + value: {{ quote .Values.env.logLevel }} + - name: TIMEOUT + value: {{ quote .Values.env.timeout }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-events/values.yaml b/helm/capif/charts/ocf-events/values.yaml index b3ca6b0cdef9cf244e733e986365e0b7853b0334..56e03a9dedbc8b4c2f64b6669894f136f96e765d 100644 --- a/helm/capif/charts/ocf-events/values.yaml +++ b/helm/capif/charts/ocf-events/values.yaml @@ -16,9 +16,11 @@ fullnameOverride: "" env: monitoring: "true" + capifHostname: capif mongoInitdbRootUsername: root mongoInitdbRootPassword: example logLevel: "INFO" + timeout: "30" serviceAccount: # Specifies whether a service account should be created @@ -71,11 +73,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-helper/Chart.yaml b/helm/capif/charts/ocf-helper/Chart.yaml index ac740bc6db0d0d23687c74f95c6bc9e33772206b..a2294d53ab70d53fdaf27f2b3f9204ccd61c5962 100644 --- a/helm/capif/charts/ocf-helper/Chart.yaml +++ b/helm/capif/charts/ocf-helper/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-helper -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-helper # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-helper/README.md b/helm/capif/charts/ocf-helper/README.md new file mode 100644 index 0000000000000000000000000000000000000000..987a94d5895a35ed460c7e5165b339652a831b7b --- /dev/null +++ b/helm/capif/charts/ocf-helper/README.md @@ -0,0 +1,63 @@ +# ocf-helper + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-helper + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.capifHostname | string | `"capif"` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoHost | string | `"mongo"` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| env.mongoPort | int | `27017` | | +| env.vaultAccessToken | string | `"dev-only-token"` | | +| env.vaultHostname | string | `"vault-internal.mon.svc.cluster.local"` | | +| env.vaultPort | int | `8200` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ocf-helper"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe.tcpSocket.port | int | `8080` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations.app | string | `"ocf-ocf-helper"` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"ocf-helper-configmap"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"ocf-helper-configmap"` | | +| volumes[0].name | string | `"ocf-helper-configmap"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-helper/values.yaml b/helm/capif/charts/ocf-helper/values.yaml index f9e35bdb8134283ce065ef657e496f6d1c0336e2..8a30745c82ac8b1e9a5e74eeccf98acaca4d758d 100644 --- a/helm/capif/charts/ocf-helper/values.yaml +++ b/helm/capif/charts/ocf-helper/values.yaml @@ -72,17 +72,17 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi livenessProbe: tcpSocket: diff --git a/helm/capif/charts/ocf-publish-service-api/Chart.yaml b/helm/capif/charts/ocf-publish-service-api/Chart.yaml index 166d252382ca14ef29516690bcf32b1f09e46ca0..af825b5841a8498eb7134d8a5c9297cab1525c09 100644 --- a/helm/capif/charts/ocf-publish-service-api/Chart.yaml +++ b/helm/capif/charts/ocf-publish-service-api/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-publish-service-api -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-publish-service-api # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-publish-service-api/README.md b/helm/capif/charts/ocf-publish-service-api/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8562a8b8ce7955404b713fe580a5e6d44df066b5 --- /dev/null +++ b/helm/capif/charts/ocf-publish-service-api/README.md @@ -0,0 +1,63 @@ +# ocf-publish-service-api + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-publish-service-api + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| env.monitoring | string | `"true"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"publish-service-api"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `5` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"capif-published-config"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"capif-published-configmap"` | | +| volumes[0].name | string | `"capif-published-config"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-publish-service-api/templates/deployment.yaml b/helm/capif/charts/ocf-publish-service-api/templates/deployment.yaml index ceced651510218511744d9148811ee35f07fa01d..7df0807dc807d8600acfd7aed2169410e5e211a2 100644 --- a/helm/capif/charts/ocf-publish-service-api/templates/deployment.yaml +++ b/helm/capif/charts/ocf-publish-service-api/templates/deployment.yaml @@ -40,10 +40,12 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: MONITORING - value: {{ quote .Values.env.monitoring }} - - name: LOG_LEVEL - value: {{ quote .Values.env.logLevel }} + - name: MONITORING + value: {{ quote .Values.env.monitoring }} + - name: CAPIF_HOSTNAME + value: {{ quote .Values.env.capifHostname }} + - name: LOG_LEVEL + value: {{ quote .Values.env.logLevel }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-publish-service-api/values.yaml b/helm/capif/charts/ocf-publish-service-api/values.yaml index ac32a9800a93bbb7cbf2a2125cf2b6668608805d..f22c2b285e5f7a15c51d182d7aa78e75403017aa 100644 --- a/helm/capif/charts/ocf-publish-service-api/values.yaml +++ b/helm/capif/charts/ocf-publish-service-api/values.yaml @@ -16,6 +16,7 @@ fullnameOverride: "" env: monitoring: "true" + capifHostname: capif mongoInitdbRootUsername: root mongoInitdbRootPassword: example logLevel: "INFO" @@ -71,11 +72,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-register/Chart.yaml b/helm/capif/charts/ocf-register/Chart.yaml index 06dee8073879bd8dbd214be935e1101de7b70d2a..048a18c581a00a44b84283e3c407b36a125cddcb 100644 --- a/helm/capif/charts/ocf-register/Chart.yaml +++ b/helm/capif/charts/ocf-register/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-register -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-register # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-register/README.md b/helm/capif/charts/ocf-register/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7f379cb2c7b4531de628e7604ef2c995944026a2 --- /dev/null +++ b/helm/capif/charts/ocf-register/README.md @@ -0,0 +1,67 @@ +# ocf-register + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-register + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.capifHostname | string | `"capif-test.example.int"` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoHost | string | `"mongo-register"` | | +| env.mongoPort | int | `27017` | | +| env.vaultAccessToken | string | `"dev-only-token"` | | +| env.vaultHostname | string | `"vault"` | | +| env.vaultPort | int | `8200` | | +| extraConfigPod | object | `{}` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"register"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations."nginx.ingress.kubernetes.io/backend-protocol" | string | `"HTTPS"` | | +| ingress.annotations."nginx.ingress.kubernetes.io/ssl-passthrough" | string | `"true"` | | +| ingress.annotations."nginx.ingress.kubernetes.io/ssl-redirect" | string | `"true"` | | +| ingress.className | string | `"nginx"` | | +| ingress.enabled | bool | `true` | | +| ingress.hosts[0].host | string | `"register.app.ocp-epg.hi.inet"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8084` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"register-configmap"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"register-configmap"` | | +| volumes[0].name | string | `"register-configmap"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-register/templates/deployment.yaml b/helm/capif/charts/ocf-register/templates/deployment.yaml index 0009f19fd1e709ea12b9072ff0b7938c14f90692..23ef72cadd37d0b44c60c5b23627186683a74053 100644 --- a/helm/capif/charts/ocf-register/templates/deployment.yaml +++ b/helm/capif/charts/ocf-register/templates/deployment.yaml @@ -29,6 +29,9 @@ spec: serviceAccountName: {{ include "ocf-register.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- with .Values.extraConfigPod }} + {{- toYaml . | nindent 6 }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: @@ -40,14 +43,16 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: VAULT_HOSTNAME - value: {{ quote .Values.env.vaultHostname }} - - name: VAULT_PORT - value: {{ quote .Values.env.vaultPort }} - - name: VAULT_ACCESS_TOKEN - value: {{ quote .Values.env.vaultAccessToken }} - - name: LOG_LEVEL - value: {{ quote .Values.env.logLevel }} + - name: VAULT_HOSTNAME + value: {{ quote .Values.env.vaultHostname }} + - name: VAULT_PORT + value: {{ quote .Values.env.vaultPort }} + - name: VAULT_ACCESS_TOKEN + value: {{ quote .Values.env.vaultAccessToken }} + - name: LOG_LEVEL + value: {{ quote .Values.env.logLevel }} + - name: TIMEOUT + value: {{ quote .Values.env.timeout }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: @@ -73,4 +78,4 @@ spec: {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} \ No newline at end of file diff --git a/helm/capif/charts/ocf-register/values.yaml b/helm/capif/charts/ocf-register/values.yaml index ca8cfc3f43551526356ebf2250762c5f7c9c9d69..1773a6b875f55e783e1bba6520abccc5c52e72ad 100644 --- a/helm/capif/charts/ocf-register/values.yaml +++ b/helm/capif/charts/ocf-register/values.yaml @@ -22,6 +22,7 @@ env: vaultAccessToken: dev-only-token capifHostname: capif-test.example.int logLevel: "INFO" + timeout: "30" serviceAccount: # Specifies whether a service account should be created @@ -34,6 +35,12 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" +extraConfigPod: {} +# hostAliases: +# - hostnames: +# - "www.example.com" +# ip: "1.2.3.4" + podAnnotations: {} podLabels: {} @@ -76,11 +83,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-routing-info/Chart.yaml b/helm/capif/charts/ocf-routing-info/Chart.yaml index bf109e2ab9e69a5c54432fcc02c13c80535163ad..a04aac4290b19defbf67e3cf99029e6dd2f8b111 100644 --- a/helm/capif/charts/ocf-routing-info/Chart.yaml +++ b/helm/capif/charts/ocf-routing-info/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-routing-info -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-routing-info # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-routing-info/README.md b/helm/capif/charts/ocf-routing-info/README.md new file mode 100644 index 0000000000000000000000000000000000000000..561199c2f91f3f4bc69f6880435168a07fe199ac --- /dev/null +++ b/helm/capif/charts/ocf-routing-info/README.md @@ -0,0 +1,56 @@ +# ocf-routing-info + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-routing-info + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.logLevel | string | `"INFO"` | | +| env.monitoring | string | `"true"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"routing-info-api"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `5` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-routing-info/values.yaml b/helm/capif/charts/ocf-routing-info/values.yaml index d6c6a3d63c48e8d517347f2c1df70704b218ee56..b92b884fcb9f44736452dd3c5aceca4f14f2b7a3 100644 --- a/helm/capif/charts/ocf-routing-info/values.yaml +++ b/helm/capif/charts/ocf-routing-info/values.yaml @@ -69,11 +69,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/ocf-security/Chart.yaml b/helm/capif/charts/ocf-security/Chart.yaml index 93606cd6e5dc2315bea00f2a117feea2c3423df3..4c43d0d6840faff08514e1d3abe31b4ff5ea9833 100644 --- a/helm/capif/charts/ocf-security/Chart.yaml +++ b/helm/capif/charts/ocf-security/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ocf-security -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of ocf-security # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/ocf-security/README.md b/helm/capif/charts/ocf-security/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1cd3632275bec3aa78c397e2f45f40243552535e --- /dev/null +++ b/helm/capif/charts/ocf-security/README.md @@ -0,0 +1,65 @@ +# ocf-security + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of ocf-security + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.capifHostname | string | `"capif"` | | +| env.logLevel | string | `"INFO"` | | +| env.mongoInitdbRootPassword | string | `"example"` | | +| env.mongoInitdbRootUsername | string | `"root"` | | +| env.monitoring | string | `"true"` | | +| env.vaultAccessToken | string | `"dev-only-token"` | | +| env.vaultHostname | string | `"vault"` | | +| env.vaultPort | int | `8200` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"security-api"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.tcpSocket.port | int | `8080` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/usr/src/app/config.yaml"` | | +| volumeMounts[0].name | string | `"capif-security-config"` | | +| volumeMounts[0].subPath | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"config.yaml"` | | +| volumes[0].configMap.name | string | `"capif-security-configmap"` | | +| volumes[0].name | string | `"capif-security-config"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/ocf-security/templates/deployment.yaml b/helm/capif/charts/ocf-security/templates/deployment.yaml index 48ab76404d940062fcc5cfd0ba3f53224050535a..dd0805c6cf158679026ab9dcb8172615b4277016 100644 --- a/helm/capif/charts/ocf-security/templates/deployment.yaml +++ b/helm/capif/charts/ocf-security/templates/deployment.yaml @@ -52,6 +52,8 @@ spec: value: {{ quote .Values.env.vaultAccessToken }} - name: LOG_LEVEL value: {{ quote .Values.env.logLevel }} + - name: TIMEOUT + value: {{ quote .Values.env.timeout }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-security/values.yaml b/helm/capif/charts/ocf-security/values.yaml index 2be42885aacd8679b17ab198c6affe89c727f485..ab77f8128fa46ed51c94995f244d093f2bab34f4 100644 --- a/helm/capif/charts/ocf-security/values.yaml +++ b/helm/capif/charts/ocf-security/values.yaml @@ -23,6 +23,7 @@ env: mongoInitdbRootUsername: root mongoInitdbRootPassword: example logLevel: "INFO" + timeout: "30" serviceAccount: # Specifies whether a service account should be created @@ -75,11 +76,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/otelcollector/Chart.yaml b/helm/capif/charts/otelcollector/Chart.yaml index 77867b3cc10ba587d06cd2fb283329ec18dbda85..dc284ad609034706b05a2a33f1ab2eca3f14c43c 100644 --- a/helm/capif/charts/otelcollector/Chart.yaml +++ b/helm/capif/charts/otelcollector/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: otelcollector -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of otelcollector OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/otelcollector/README.md b/helm/capif/charts/otelcollector/README.md new file mode 100644 index 0000000000000000000000000000000000000000..33b37d9fd620f18faf4f0bccf22ee5e8fccbb276 --- /dev/null +++ b/helm/capif/charts/otelcollector/README.md @@ -0,0 +1,60 @@ +# otelcollector + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of otelcollector OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| configMap.tempoEndpoint | string | `"tempo:4317"` | | +| enabled | bool | `false` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"otel/opentelemetry-collector"` | | +| image.tag | string | `"0.81.0"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe | string | `nil` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe | string | `nil` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| service[0].name | string | `"otel-collector"` | | +| service[0].port | int | `55680` | | +| service[0].type | string | `"ClusterIP"` | | +| service[1].name | string | `"otel-tcp"` | | +| service[1].port | int | `4318` | | +| service[1].type | string | `"ClusterIP"` | | +| tolerations | list | `[]` | | +| volumeMounts[0].mountPath | string | `"/etc/otel-collector-config.yaml"` | | +| volumeMounts[0].name | string | `"op-telemetry"` | | +| volumeMounts[0].subPath | string | `"otel-collector-config.yaml"` | | +| volumes[0].configMap.items[0].key | string | `"otel-collector-config.yaml"` | | +| volumes[0].configMap.items[0].path | string | `"otel-collector-config.yaml"` | | +| volumes[0].configMap.name | string | `"open-telemetry-configmap"` | | +| volumes[0].name | string | `"op-telemetry"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/otelcollector/values.yaml b/helm/capif/charts/otelcollector/values.yaml index cd541af17d7143ab1c8fb43e64ad9706db2994b3..e7e0e5feb99fe5709d8f3323085afb1a78a92df0 100644 --- a/helm/capif/charts/otelcollector/values.yaml +++ b/helm/capif/charts/otelcollector/values.yaml @@ -69,17 +69,17 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi livenessProbe: # httpGet: diff --git a/helm/capif/charts/redis/Chart.yaml b/helm/capif/charts/redis/Chart.yaml index 165c19693100b7edaa044b2b32db184d179d588e..7c3dc8280313f09d9bf95f758c79cc987e4ef78f 100644 --- a/helm/capif/charts/redis/Chart.yaml +++ b/helm/capif/charts/redis/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: redis -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of redis OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/redis/README.md b/helm/capif/charts/redis/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4e777cc08bf87bea7ddeb477e50737fc24480106 --- /dev/null +++ b/helm/capif/charts/redis/README.md @@ -0,0 +1,56 @@ +# redis + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of redis OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.redisReplicationMode | string | `"master"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"redis"` | | +| image.tag | string | `"alpine"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe.initialDelaySeconds | int | `5` | | +| livenessProbe.periodSeconds | int | `5` | | +| livenessProbe.tcpSocket.port | int | `6379` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.periodSeconds | int | `5` | | +| readinessProbe.tcpSocket.port | int | `6379` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext | object | `{}` | | +| service.port | int | `6379` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/redis/values.yaml b/helm/capif/charts/redis/values.yaml index 4011e979c05c3f79c20173c51e527da53a69cb3f..ba9a6d29fb26796d98747a712d46edba1a09899e 100644 --- a/helm/capif/charts/redis/values.yaml +++ b/helm/capif/charts/redis/values.yaml @@ -68,11 +68,11 @@ resources: # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: - cpu: 100m - memory: 128Mi + cpu: 1m + memory: 1Mi livenessProbe: tcpSocket: diff --git a/helm/capif/charts/renderer/Chart.yaml b/helm/capif/charts/renderer/Chart.yaml index 49cab700e2147fc1a8ee02034758880b11cf2fea..a2289627393ad63e9c7c97c3f712baa2eb913e45 100644 --- a/helm/capif/charts/renderer/Chart.yaml +++ b/helm/capif/charts/renderer/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: renderer -description: A Helm chart for Kubernetes +description: A Helm chart for Kubernetes of renderer OCF # A chart can be either an 'application' or a 'library' chart. # diff --git a/helm/capif/charts/renderer/README.md b/helm/capif/charts/renderer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7a313fa43abd9bad3f3234b97c7f14100e9b9dcf --- /dev/null +++ b/helm/capif/charts/renderer/README.md @@ -0,0 +1,53 @@ +# renderer + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes of renderer OCF + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| enabled | bool | `false` | | +| env.enableMetrics | string | `"true"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"grafana/grafana-image-renderer"` | | +| image.tag | string | `"latest"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe.httpGet.path | string | `"/"` | | +| livenessProbe.httpGet.port | string | `"http"` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.httpGet.path | string | `"/"` | | +| readinessProbe.httpGet.port | string | `"http"` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `8081` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/capif/charts/renderer/values.yaml b/helm/capif/charts/renderer/values.yaml index 7696150a7fd3cfd46af58e6a1e19d13f32f14867..1270291d048d98eb093ead40313e0b096bc8bd4d 100644 --- a/helm/capif/charts/renderer/values.yaml +++ b/helm/capif/charts/renderer/values.yaml @@ -64,17 +64,17 @@ ingress: # hosts: # - chart-example.local -resources: {} +resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi livenessProbe: httpGet: diff --git a/helm/helmfile-capif.yaml b/helm/helmfile-capif.yaml deleted file mode 100644 index 610e64a4d19b92696fa23bc3ecf9dd698546a5b5..0000000000000000000000000000000000000000 --- a/helm/helmfile-capif.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# helm upgrade --install -n mon monitoring-capif capif/ --set nginx.nginx.env.capifHostname=mon-capif.monitoring.int \ -# --set ingress_ip.oneke="10.17.173.127" --set env=oneke --atomic -helmDefaults: - createNamespace: true - timeout: 600 -releases: - - name: monitoring-capif - chart: ./capif/ - namespace: monitoring -# atomic: true - wait: true - values: - - ./capif/values.yaml - - nginx: - nginx: - env: - capifHostname: monitoring-capif.monitoring.int - - ingress: - ip: "10.17.173.127" \ No newline at end of file diff --git a/helm/monitoring-stack/Chart.yaml b/helm/monitoring-stack/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fb7335de510097458839554f6a6bad2cbacca226 --- /dev/null +++ b/helm/monitoring-stack/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: Helm monitoring stack +description: A Helm chart for Kubernetes monitoring stack +type: application +version: 1.0.0 +appVersion: "1.0.0" + +dependencies: + - name: grafana + version: "*" + condition: grafana.enabled + - name: prometheus + version: "*" + condition: prometheus.enabled + - name: skooner + version: "*" + condition: skooner.enabled + - name: metrics-server + repository: 'https://charts.bitnami.com/bitnami' + version: 6.9.3 + condition: metrics-server.enabled \ No newline at end of file diff --git a/helm/monitoring-stack/README.md b/helm/monitoring-stack/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e2fee6931b1e7939fa9cbe65e3cbed2dcf22e10e --- /dev/null +++ b/helm/monitoring-stack/README.md @@ -0,0 +1,47 @@ +# Helm monitoring stack + +![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square) + +A Helm chart for Kubernetes monitoring stack + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| | grafana | * | +| | prometheus | * | +| | skooner | * | +| https://charts.bitnami.com/bitnami | metrics-server | 6.9.3 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| grafana.enabled | bool | `true` | | +| grafana.env.prometheusUrl | string | `"http://monitoring-prometheus.monitoring.svc.cluster.local:9090"` | | +| grafana.ingress.enable | bool | `true` | | +| grafana.ingress.hosts[0].host | string | `"grafana-dt.test.int"` | | +| grafana.ingress.hosts[0].paths[0].path | string | `"/"` | | +| grafana.ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | +| grafana.service.type | string | `"ClusterIP"` | | +| metrics-server.apiService.create | bool | `true` | | +| metrics-server.enabled | bool | `false` | | +| metrics-server.extraArgs[0] | string | `"--kubelet-insecure-tls=true"` | | +| metrics-server.extraArgs[1] | string | `"--kubelet-preferred-address-types=InternalIP"` | | +| prometheus.enabled | bool | `true` | | +| prometheus.ingress.enabled | bool | `true` | | +| prometheus.ingress.hosts[0].host | string | `"prometheus-dt.test.int"` | | +| prometheus.ingress.hosts[0].paths[0].path | string | `"/"` | | +| prometheus.ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | +| prometheus.service.type | string | `"ClusterIP"` | | +| prometheus.serviceAccount.create | bool | `false` | | +| skooner.enabled | bool | `true` | | +| skooner.ingress.className | string | `"nginx"` | | +| skooner.ingress.enabled | bool | `true` | | +| skooner.ingress.hosts[0].host | string | `"skooner-dt.test.int"` | | +| skooner.ingress.hosts[0].paths[0].path | string | `"/"` | | +| skooner.ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | +| skooner.service.type | string | `"ClusterIP"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/monitoring-stack/charts/grafana/.helmignore b/helm/monitoring-stack/charts/grafana/.helmignore new file mode 100644 index 0000000000000000000000000000000000000000..0e8a0eb36f4ca2c939201c0d54b5d82a1ea34778 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm/monitoring-stack/charts/grafana/Chart.yaml b/helm/monitoring-stack/charts/grafana/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2c7c54e5d4e37c3a84aea8825c5e447a5bc6a7d3 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: grafana +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/helm/monitoring-stack/charts/grafana/README.md b/helm/monitoring-stack/charts/grafana/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5325ad0dd72a30d59b8293e64d5a5f624857d0c9 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/README.md @@ -0,0 +1,51 @@ +# grafana + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.gfAuthAnonymousEnable | bool | `true` | | +| env.gfAuthAnonymousOrgRole | string | `"Admin"` | | +| env.gfSecurityAdminPassword | string | `"secure_pass"` | | +| env.gfSecurityAllowEmbedding | bool | `true` | | +| env.prometheusUrl | string | `"http://prometheus.prometheus-system.svc.cluster.local:9090"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"grafana/grafana"` | | +| image.tag | string | `"latest"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `"nginx"` | | +| ingress.enabled | bool | `true` | | +| ingress.environment | string | `"edge"` | | +| ingress.hosts[0].host | string | `"grafana-dt.tactile5g.int"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | +| ingress.tls | list | `[]` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| persistence.enable | bool | `false` | | +| persistence.storage | string | `"10Gi"` | | +| podAnnotations | object | `{}` | | +| podSecurityContext | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `80` | | +| service.type | string | `"NodePort"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/monitoring-stack/charts/grafana/kubernetes-dashboard.json b/helm/monitoring-stack/charts/grafana/kubernetes-dashboard.json new file mode 100644 index 0000000000000000000000000000000000000000..ac97f80ebd0139f383c3f82920b9b9aec7b8c1e9 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/kubernetes-dashboard.json @@ -0,0 +1,2629 @@ +{ + "annotations": { + "list": [ + { + "$$hashKey": "object:103", + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Monitors Kubernetes cluster using Prometheus. Shows overall cluster CPU / Memory / Filesystem usage as well as individual pod, containers, systemd services statistics. Uses cAdvisor metrics only.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 12740, + "graphTooltip": 0, + "id": 7, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 33, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Network I/O pressure", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 2, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 1 + }, + "height": "200px", + "hiddenSeries": false, + "id": 32, + "legend": { + "alignAsTable": false, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_network_receive_bytes_total{kubernetes_io_hostname=~\"^$Node$\"}[1m]))", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "Received", + "metric": "network", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "- sum (rate (container_network_transmit_bytes_total{kubernetes_io_hostname=~\"^$Node$\"}[1m]))", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "Sent", + "metric": "network", + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Network I/O pressure", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "show": true + }, + { + "format": "Bps", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 34, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Total usage", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 65 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 8 + }, + "id": 4, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) / sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"}) * 100", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "title": "Cluster memory usage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 65 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 8, + "x": 8, + "y": 8 + }, + "id": 6, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_cpu_usage_seconds_total{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) / sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"}) * 100", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "title": "Cluster CPU usage (1m avg)", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 65 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 8 + }, + "id": 7, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_fs_usage_bytes{device=~\"^/dev/[sv]d[a-z][1-9]$\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) / sum (container_fs_limit_bytes{device=~\"^/dev/[sv]d[a-z][1-9]$\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) * 100", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 10 + } + ], + "title": "Cluster filesystem usage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 13 + }, + "id": 9, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "title": "Used", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 13 + }, + "id": 10, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "title": "Total", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 13 + }, + "id": 11, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_cpu_usage_seconds_total{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m]))", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "title": "Used", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 13 + }, + "id": 12, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "title": "Total", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 13 + }, + "id": 13, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_fs_usage_bytes{device=~\"^/dev/[sv]d[a-z][1-9]$\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "title": "Used", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 13 + }, + "id": 14, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_fs_limit_bytes{device=~\"^/dev/[sv]d[a-z][1-9]$\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "title": "Total", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 16 + }, + "id": 35, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Pods CPU usage", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 3, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 17 + }, + "height": "", + "hiddenSeries": false, + "id": 17, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "editorMode": "code", + "expr": "sum (rate (container_cpu_usage_seconds_total{image!=\"\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (pod)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "{{ pod }}", + "metric": "container_cpu", + "range": true, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Pods CPU usage (1m avg)", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:112", + "format": "none", + "label": "cores", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:113", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 39, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Pods memory usage", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 2, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 25 + }, + "hiddenSeries": false, + "id": 25, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "editorMode": "code", + "expr": "sum (container_memory_working_set_bytes{image!=\"\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}) by (pod)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "{{ pod }}", + "metric": "container_memory_usage:sort_desc", + "range": true, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Pods memory usage", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:181", + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:182", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 43, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Pods network I/O", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 2, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 33 + }, + "hiddenSeries": false, + "id": 16, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "editorMode": "code", + "expr": "sum (rate (container_network_receive_bytes_total{image!=\"\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (pod)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "-> {{ pod }}", + "metric": "network", + "range": true, + "refId": "A", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "- sum (rate (container_network_transmit_bytes_total{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (pod)", + "hide": true, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "<- {{ pod }}", + "metric": "network", + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Pods network I/O (1m avg)", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": true, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 37, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 3, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 41 + }, + "height": "", + "hiddenSeries": false, + "id": 24, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_cpu_usage_seconds_total{image!=\"\",name=~\"^k8s_.*\",container!=\"POD\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (container, pod)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "pod: {{ pod }}| {{ container }}", + "metric": "container_cpu", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_cpu_usage_seconds_total{image!=\"\",name!~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (kubernetes_io_hostname, name, image)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "docker: {{ kubernetes_io_hostname }} | {{ image }} ({{ name }})", + "metric": "container_cpu", + "refId": "B", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_cpu_usage_seconds_total{rkt_container_name!=\"\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (kubernetes_io_hostname, rkt_container_name)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "rkt: {{ kubernetes_io_hostname }} | {{ rkt_container_name }}", + "metric": "container_cpu", + "refId": "C", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Containers CPU usage (1m avg)", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:337", + "format": "none", + "label": "cores", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:338", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Containers CPU usage", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 41, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 2, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 42 + }, + "hiddenSeries": false, + "id": 27, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_memory_working_set_bytes{image!=\"\",name=~\"^k8s_.*\",container!=\"POD\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}) by (container, pod)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "pod: {{ pod }} | {{ container }}", + "metric": "container_memory_usage:sort_desc", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_memory_working_set_bytes{image!=\"\",name!~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}) by (kubernetes_io_hostname, name, image)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "docker: {{ kubernetes_io_hostname }} | {{ image }} ({{ name }})", + "metric": "container_memory_usage:sort_desc", + "refId": "B", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_memory_working_set_bytes{rkt_container_name!=\"\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}) by (kubernetes_io_hostname, rkt_container_name)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "rkt: {{ kubernetes_io_hostname }} | {{ rkt_container_name }}", + "metric": "container_memory_usage:sort_desc", + "refId": "C", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Containers memory usage", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:406", + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:407", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Containers memory usage", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 42 + }, + "id": 44, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 2, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 43 + }, + "hiddenSeries": false, + "id": 30, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_network_receive_bytes_total{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (container, pod)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "-> pod: {{ pod }} | {{ container }}", + "metric": "network", + "refId": "B", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "- sum (rate (container_network_transmit_bytes_total{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (container, pod)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "<- pod: {{ pod }} | {{ container }}", + "metric": "network", + "refId": "D", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_network_receive_bytes_total{image!=\"\",name!~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (kubernetes_io_hostname, name, image)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "-> docker: {{ kubernetes_io_hostname }} | {{ image }} ({{ name }})", + "metric": "network", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "- sum (rate (container_network_transmit_bytes_total{image!=\"\",name!~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (kubernetes_io_hostname, name, image)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "<- docker: {{ kubernetes_io_hostname }} | {{ image }} ({{ name }})", + "metric": "network", + "refId": "C", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_network_transmit_bytes_total{rkt_container_name!=\"\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (kubernetes_io_hostname, rkt_container_name)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "-> rkt: {{ kubernetes_io_hostname }} | {{ rkt_container_name }}", + "metric": "network", + "refId": "E", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "- sum (rate (container_network_transmit_bytes_total{rkt_container_name!=\"\",kubernetes_io_hostname=~\"^$Node$\",namespace=~\"^$namespace$\"}[1m])) by (kubernetes_io_hostname, rkt_container_name)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "<- rkt: {{ kubernetes_io_hostname }} | {{ rkt_container_name }}", + "metric": "network", + "refId": "F", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Containers network I/O (1m avg)", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Containers network I/O", + "type": "row" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 36, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "System services CPU usage", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 3, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 44 + }, + "height": "", + "hiddenSeries": false, + "id": 23, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "editorMode": "code", + "expr": "sum (rate (container_cpu_usage_seconds_total{systemd_service_name!=\"\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (systemd_service_name)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "{{ systemd_service_name }}", + "metric": "container_cpu", + "range": true, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "System services CPU usage (1m avg)", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "label": "cores", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": true, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 51 + }, + "id": 40, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 2, + "editable": true, + "error": false, + "fill": 0, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 29 + }, + "hiddenSeries": false, + "id": 26, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_memory_working_set_bytes{systemd_service_name!=\"\",kubernetes_io_hostname=~\"^$Node$\"}) by (systemd_service_name)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "{{ systemd_service_name }}", + "metric": "container_memory_usage:sort_desc", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "System services memory usage", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "System services memory usage", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 52 + }, + "id": 38, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 3, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 46 + }, + "hiddenSeries": false, + "id": 20, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_cpu_usage_seconds_total{id!=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (id)", + "hide": false, + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "{{ id }}", + "metric": "container_cpu", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "All processes CPU usage (1m avg)", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:254", + "format": "none", + "label": "cores", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:255", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "All processes CPU usage", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 53 + }, + "id": 42, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 2, + "editable": true, + "error": false, + "fill": 0, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 47 + }, + "hiddenSeries": false, + "id": 28, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (container_memory_working_set_bytes{id!=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) by (id)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "{{ id }}", + "metric": "container_memory_usage:sort_desc", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "All processes memory usage", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "All processes memory usage", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 54 + }, + "id": 45, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "decimals": 2, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 48 + }, + "hiddenSeries": false, + "id": 29, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "sum (rate (container_network_receive_bytes_total{id!=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (id)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "-> {{ id }}", + "metric": "network", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "expr": "- sum (rate (container_network_transmit_bytes_total{id!=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (id)", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "<- {{ id }}", + "metric": "network", + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "All processes network I/O (1m avg)", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "All processes network I/O", + "type": "row" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "style": "dark", + "tags": [ + "kubernetes" + ], + "templating": { + "list": [ + { + "allValue": "", + "current": { + "selected": true, + "text": "monitoring", + "value": "monitoring" + }, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "definition": "label_values(namespace)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "namespace", + "options": [], + "query": "label_values(namespace)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "af6b44aa-0703-4979-825c-c1afba946534" + }, + "definition": "", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "Node", + "options": [], + "query": "label_values(kubernetes_io_hostname)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Kubernetes Monitoring Dashboard", + "uid": "msqzbWjWk", + "version": 2, + "weekStart": "" + } \ No newline at end of file diff --git a/helm/monitoring-stack/charts/grafana/templates/NOTES.txt b/helm/monitoring-stack/charts/grafana/templates/NOTES.txt new file mode 100644 index 0000000000000000000000000000000000000000..c7ac87e80664a0f6ec0466ce8fda3d4ef8c08758 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "grafana.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "grafana.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "grafana.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "grafana.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/helm/monitoring-stack/charts/grafana/templates/_helpers.tpl b/helm/monitoring-stack/charts/grafana/templates/_helpers.tpl new file mode 100644 index 0000000000000000000000000000000000000000..993f46bdd8df0131780dfe58e5019bdb8e29eb53 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "grafana.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "grafana.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "grafana.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "grafana.labels" -}} +helm.sh/chart: {{ include "grafana.chart" . }} +{{ include "grafana.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "grafana.selectorLabels" -}} +app.kubernetes.io/name: {{ include "grafana.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "grafana.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "grafana.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/helm/monitoring-stack/charts/grafana/templates/configmap.yaml b/helm/monitoring-stack/charts/grafana/templates/configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..91740d481e21233059799559d3b3cc46522abd62 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/configmap.yaml @@ -0,0 +1,53 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: datasources +data: + datasources.yaml: | + apiVersion: 1 + datasources: + - name: Prometheus + type: prometheus + typeName: Prometheus + typeLogoUrl: public/app/plugins/datasource/prometheus/img/prometheus_logo.svg + access: proxy + url: {{ .Values.env.prometheusUrl }} + uid: af6b44aa-0703-4979-825c-c1afba946534 + user: '' + database: '' + basicAuth: false + isDefault: false + jsonData: + httpMethod: POST + prometheusType: Prometheus + prometheusVersion: 2.40.1 + readOnly: false +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: default +data: + default.yaml: | + apiVersion: 1 + providers: + - name: Default # A uniquely identifiable name for the provider + orgId: 1 + folder: "" # The folder where to place the dashboards + folderUid: "" + type: file + disableDeletion: false + allowUiUpdates: true + options: + path: /var/lib/grafana/dashboards + +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: kubernetes-dashboard +data: + kubernetes-dashboard.json: | +{{ .Files.Get "kubernetes-dashboard.json" | indent 4 }} \ No newline at end of file diff --git a/helm/monitoring-stack/charts/grafana/templates/deployment.yaml b/helm/monitoring-stack/charts/grafana/templates/deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4f720c65243c4a2cc7e1c7cf642bbd62108cf032 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/deployment.yaml @@ -0,0 +1,102 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "grafana.fullname" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + strategy: + type: Recreate + {{- end }} + selector: + matchLabels: + {{- include "grafana.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + {{- include "grafana.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "grafana.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - env: + - name: GF_AUTH_ANONYMOUS_ENABLED + value: {{ quote .Values.env.gfAuthAnonymousEnable }} + - name: GF_SECURITY_ALLOW_EMBEDDING + value: {{ quote .Values.env.gfSecurityAllowEmbedding }} + - name: GF_PATHS_PROVISIONING + value: /etc/grafana/provisioning + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + name: {{ .Chart.Name }} + envFrom: + - secretRef: + name: grafana-secrets + ports: + - name: http + containerPort: 3000 + protocol: TCP +# livenessProbe: +# tcpSocket: +# port: {{ .Values.service.port }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - name: grafana-datasources + mountPath: /etc/grafana/provisioning/datasources/datasources.yaml + subPath: datasources.yaml + - name: grafana-default + mountPath: /etc/grafana/provisioning/dashboards/default.yaml + subPath: default.yaml + - name: kubernetes-dashboard + mountPath: /var/lib/grafana/dashboards/kubernetes-dashboard.json + subPath: kubernetes-dashboard.json + {{- if .Values.persistence.enable | default false }} + - name: grafana-claim0 + mountPath: /var/lib/grafana + {{- end }} + volumes: + - name: grafana-datasources + configMap: + name: datasources + items: + - key: "datasources.yaml" + path: "datasources.yaml" + - name: grafana-default + configMap: + name: default + items: + - key: "default.yaml" + path: "default.yaml" + - name: kubernetes-dashboard + configMap: + name: kubernetes-dashboard + items: + - key: "kubernetes-dashboard.json" + path: "kubernetes-dashboard.json" + {{- if .Values.persistence.enable | default false }} + - name: grafana-claim0 + persistentVolumeClaim: + claimName: grafana-claim0 + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/helm/monitoring-stack/charts/grafana/templates/hpa.yaml b/helm/monitoring-stack/charts/grafana/templates/hpa.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2384525742019bcbad67da4ad13393467e8bad50 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "grafana.fullname" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "grafana.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/helm/monitoring-stack/charts/grafana/templates/ingress.yaml b/helm/monitoring-stack/charts/grafana/templates/ingress.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fc17ff2f53dc3312d0c94e8302d9700a48e0f31e --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/ingress.yaml @@ -0,0 +1,99 @@ +{{- if .Values.ingress.enabled -}} +{{- if eq .Values.ingress.environment "edge" }} +{{- $fullName := include "grafana.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName | trunc 30 }} + labels: + {{- include "grafana.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} + +{{- if .Values.ingress.enabled }} +{{- if or (eq .Values.ingress.environment "region") (eq .Values.ingress.environment "wavelength") }} +{{- $fullName := include "grafana.fullname" . -}} +{{- $svcPort := .Values.service.port -}} + +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName | trunc 30 }} + namespace: {{ .Release.Namespace }} + annotations: + alb.ingress.kubernetes.io/load-balancer-name: {{ $fullName | trunc 30 }} + alb.ingress.kubernetes.io/target-type: instance + alb.ingress.kubernetes.io/scheme: internal + alb.ingress.kubernetes.io/tags: tactile5g/digital-twins={{ .Release.Namespace }} +spec: + ingressClassName: alb + defaultBackend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/helm/monitoring-stack/charts/grafana/templates/secrets.yaml b/helm/monitoring-stack/charts/grafana/templates/secrets.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7cc34fafa8c021b449500f071a3d6777ec2a7786 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/secrets.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: grafana-secrets +type: Opaque +data: + GF_AUTH_ANONYMOUS_ORG_ROLE: {{ .Values.env.gfAuthAnonymousOrgRole | b64enc | quote }} + GF_SECURITY_ADMIN_PASSWORD: {{ .Values.env.gfSecurityAdminPassword | b64enc | quote }} \ No newline at end of file diff --git a/helm/monitoring-stack/charts/grafana/templates/service.yaml b/helm/monitoring-stack/charts/grafana/templates/service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..98de07507a62ea7a39712a8118d0f8505cceced9 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "grafana.fullname" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "grafana.selectorLabels" . | nindent 4 }} diff --git a/helm/monitoring-stack/charts/grafana/templates/serviceaccount.yaml b/helm/monitoring-stack/charts/grafana/templates/serviceaccount.yaml new file mode 100644 index 0000000000000000000000000000000000000000..47782b5cd7ecf125c47c15031fc6b8ce309e1174 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "grafana.serviceAccountName" . }} + labels: + {{- include "grafana.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/monitoring-stack/charts/grafana/templates/tests/test-connection.yaml b/helm/monitoring-stack/charts/grafana/templates/tests/test-connection.yaml new file mode 100644 index 0000000000000000000000000000000000000000..805404c03297ca35941f4dbe5b3023381aa9de61 --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "grafana.fullname" . }}-test-connection" + labels: + {{- include "grafana.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "grafana.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/helm/monitoring-stack/charts/grafana/values.yaml b/helm/monitoring-stack/charts/grafana/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5c54eed483271a8c6e20d2d0c25ee7d98514ca2d --- /dev/null +++ b/helm/monitoring-stack/charts/grafana/values.yaml @@ -0,0 +1,96 @@ +# Default values for grafana. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: grafana/grafana + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "latest" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# PENDING: gfAuthAnonymousOrgRole and gfSecurityAdminPassword as aws external-secret +env: + gfAuthAnonymousEnable: true + gfSecurityAllowEmbedding: true + gfAuthAnonymousOrgRole: Admin + gfSecurityAdminPassword: secure_pass + prometheusUrl: http://prometheus.prometheus-system.svc.cluster.local:9090 + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +persistence: + enable: false + storage: 10Gi + +service: + type: NodePort + port: 80 + +ingress: + enabled: true + className: "nginx" + # edge, region, wavelength + environment: "edge" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: grafana-dt.tactile5g.int + paths: + - path: / + pathType: Prefix + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/helm/monitoring-stack/charts/prometheus/.helmignore b/helm/monitoring-stack/charts/prometheus/.helmignore new file mode 100644 index 0000000000000000000000000000000000000000..0e8a0eb36f4ca2c939201c0d54b5d82a1ea34778 --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm/monitoring-stack/charts/prometheus/Chart.yaml b/helm/monitoring-stack/charts/prometheus/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..29cd94126b2e91cfbb88923ad89df12a08fa4976 --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: prometheus +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/helm/monitoring-stack/charts/prometheus/README.md b/helm/monitoring-stack/charts/prometheus/README.md new file mode 100644 index 0000000000000000000000000000000000000000..238189ff5b1c39396b5c47c0d9ec871dafe164f3 --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/README.md @@ -0,0 +1,48 @@ +# prometheus + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"prom/prometheus"` | | +| image.tag | string | `"latest"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `"nginx"` | | +| ingress.enabled | bool | `false` | | +| ingress.environment | string | `"edge"` | | +| ingress.hosts[0].host | string | `"prometheus-dt.tactile5g.int"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | +| ingress.tls | list | `[]` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| persistence.enable | bool | `false` | | +| persistence.storage | string | `"10Gi"` | | +| podAnnotations | object | `{}` | | +| podSecurityContext | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `9090` | | +| service.type | string | `"NodePort"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `"prometheus"` | | +| tolerations | list | `[]` | | +| tsdb.path | string | `"/prometheus/"` | | +| tsdb.retentionTime | string | `"5d"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/monitoring-stack/charts/prometheus/templates/NOTES.txt b/helm/monitoring-stack/charts/prometheus/templates/NOTES.txt new file mode 100644 index 0000000000000000000000000000000000000000..67b2c0ec40898320933d3c1c0b71e026fabc991d --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "prometheus.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "prometheus.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "prometheus.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "prometheus.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/helm/monitoring-stack/charts/prometheus/templates/_helpers.tpl b/helm/monitoring-stack/charts/prometheus/templates/_helpers.tpl new file mode 100644 index 0000000000000000000000000000000000000000..42af2347d259affaf057e8ad836ff7bca686c703 --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "prometheus.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "prometheus.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "prometheus.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "prometheus.labels" -}} +helm.sh/chart: {{ include "prometheus.chart" . }} +{{ include "prometheus.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "prometheus.selectorLabels" -}} +app.kubernetes.io/name: {{ include "prometheus.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "prometheus.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "prometheus.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/helm/monitoring-stack/charts/prometheus/templates/cluster-role.yaml b/helm/monitoring-stack/charts/prometheus/templates/cluster-role.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ff7fe8f0f632807432dc1622fdc70774eefdd9e3 --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/cluster-role.yaml @@ -0,0 +1,45 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: prometheus + labels: + app: prometheus +rules: +- apiGroups: [""] + resources: + - nodes + - nodes/proxy + - services + - endpoints + - pods + verbs: ["get", "list", "watch"] +- apiGroups: + - extensions + resources: + - ingresses + verbs: ["get", "list", "watch"] +- nonResourceURLs: ["/metrics"] + verbs: ["get"] +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: prometheus + namespace: {{ .Release.Namespace }} + labels: + app: prometheus +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: prometheus + labels: + app: prometheus +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus +subjects: +- kind: ServiceAccount + name: prometheus + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/helm/monitoring-stack/charts/prometheus/templates/configmap.yaml b/helm/monitoring-stack/charts/prometheus/templates/configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e7b6796dd53c47f9f2b8ec8a19246a7e6c7d315 --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/configmap.yaml @@ -0,0 +1,137 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: prometheus + name: prometheus-config +data: + prometheus.rules: |- + groups: + - name: devopscube alert + rules: + - alert: High Pod Memory + expr: sum(container_memory_usage_bytes) > 1 + for: 1m + labels: + severity: slack + annotations: + summary: High Memory Usage + prometheus.yml: |- + global: + scrape_interval: 30s + scrape_timeout: 10s + scrape_configs: + #------------- configuration to collect pods metrics kubelet ------------------- + - job_name: 'kubernetes-cadvisor' + scheme: https + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + kubernetes_sd_configs: + - role: node + relabel_configs: + - action: labelmap + regex: __meta_kubernetes_node_label_(.+) + - target_label: __address__ + replacement: kubernetes.default.svc:443 + - source_labels: [__meta_kubernetes_node_name] + regex: (.+) + target_label: __metrics_path__ + replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor + #------------- configuration to collect pods metrics ------------------- + - job_name: 'kubernetes-pods' + honor_labels: true + kubernetes_sd_configs: + - role: pod + relabel_configs: + # select only those pods that has "prometheus.io/scrape: true" annotation + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] + action: keep + regex: true + # set metrics_path (default is /metrics) to the metrics path specified in "prometheus.io/path: " annotation. + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] + action: replace + target_label: __metrics_path__ + regex: (.+) + # set the scrapping port to the port specified in "prometheus.io/port: " annotation and set address accordingly. + - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] + action: replace + regex: ([^:]+)(?::\d+)?;(\d+) + replacement: $1:$2 + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_pod_label_(.+) + - source_labels: [__meta_kubernetes_namespace] + action: replace + target_label: kubernetes_namespace + - source_labels: [__meta_kubernetes_pod_name] + action: replace + target_label: kubernetes_pod_name + + #-------------- configuration to collect metrics from service endpoints ----------------------- + - job_name: 'kubernetes-service-endpoints' + honor_labels: true + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + # select only those endpoints whose service has "prometheus.io/scrape: true" annotation + - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] + action: keep + regex: true + # set the metrics_path to the path specified in "prometheus.io/path: " annotation. + - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] + action: replace + target_label: __metrics_path__ + regex: (.+) + # set the scrapping port to the port specified in "prometheus.io/port: " annotation and set address accordingly. + - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] + action: replace + target_label: __address__ + regex: ([^:]+)(?::\d+)?;(\d+) + replacement: $1:$2 + - action: labelmap + regex: __meta_kubernetes_service_label_(.+) + - source_labels: [__meta_kubernetes_namespace] + action: replace + target_label: kubernetes_namespace + - source_labels: [__meta_kubernetes_service_name] + action: replace + target_label: kubernetes_name + + #---------------- configuration to collect metrics from kubernetes apiserver ------------------------- + - job_name: 'kubernetes-apiservers' + honor_labels: true + kubernetes_sd_configs: + - role: endpoints + # kubernetes apiserver serve metrics on a TLS secure endpoints. so, we have to use "https" scheme + scheme: https + # we have to provide certificate to establish tls secure connection + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + # bearer_token_file is required for authorizating prometheus server to kubernetes apiserver + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + + relabel_configs: + - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] + action: keep + regex: default;kubernetes;https + + #--------------- configuration to collect metrics from nodes ----------------------- + - job_name: 'kubernetes-nodes' + honor_labels: true + scheme: https + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + + kubernetes_sd_configs: + - role: node + relabel_configs: + - action: labelmap + regex: __meta_kubernetes_node_label_(.+) + - target_label: __address__ + replacement: kubernetes.default.svc:443 + - source_labels: [__meta_kubernetes_node_name] + regex: (.+) + target_label: __metrics_path__ + replacement: /api/v1/nodes/${1}/proxy/metrics \ No newline at end of file diff --git a/helm/monitoring-stack/charts/prometheus/templates/deployment.yaml b/helm/monitoring-stack/charts/prometheus/templates/deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..31333a9c03efbe1cea43559191b0ee04c51e0cda --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/deployment.yaml @@ -0,0 +1,86 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "prometheus.fullname" . }} + labels: + {{- include "prometheus.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + strategy: + type: Recreate + {{- end }} + selector: + matchLabels: + {{- include "prometheus.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "prometheus.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "prometheus.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + args: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path={{.Values.tsdb.path }}" + - "--storage.tsdb.retention.time={{.Values.tsdb.retentionTime }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + livenessProbe: + tcpSocket: + port: {{ .Values.service.port }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - name: prometheus-config + mountPath: /etc/prometheus/ + {{- if .Values.persistence.enable | default false }} + - name: prometheus-storage-volume + mountPath: /prometheus/ + {{ else }} + - name: prometheus-storage + mountPath: /prometheus/ + {{- end }} + volumes: + - name: prometheus-config + configMap: + defaultMode: 420 + name: prometheus-config + {{- if .Values.persistence.enable | default false }} + - name: prometheus-storage-volume + persistentVolumeClaim: + claimName: prometheus-pvc + {{ else }} + - name: prometheus-storage + emptyDir: {} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/helm/monitoring-stack/charts/prometheus/templates/hpa.yaml b/helm/monitoring-stack/charts/prometheus/templates/hpa.yaml new file mode 100644 index 0000000000000000000000000000000000000000..26d07f4929f91aaf8f275e086cf929b1ee4df0e5 --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "prometheus.fullname" . }} + labels: + {{- include "prometheus.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "prometheus.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/helm/monitoring-stack/charts/prometheus/templates/ingress.yaml b/helm/monitoring-stack/charts/prometheus/templates/ingress.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1100cf9568aa3a58b6e3fe0aceb16b644264850a --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/ingress.yaml @@ -0,0 +1,99 @@ +{{- if .Values.ingress.enabled -}} +{{- if eq .Values.ingress.environment "edge" }} +{{- $fullName := include "prometheus.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "prometheus.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} + +{{- if .Values.ingress.enabled }} +{{- if or (eq .Values.ingress.environment "region") (eq .Values.ingress.environment "wavelength") }} +{{- $fullName := include "prometheus.fullname" . -}} +{{- $svcPort := .Values.service.port -}} + +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName | trunc 30 }} + namespace: {{ .Release.Namespace }} + annotations: + alb.ingress.kubernetes.io/load-balancer-name: {{ $fullName | trunc 30 }} + alb.ingress.kubernetes.io/target-type: instance + alb.ingress.kubernetes.io/scheme: internal + alb.ingress.kubernetes.io/tags: tactile5g/digital-twins={{ .Release.Namespace }} +spec: + ingressClassName: alb + defaultBackend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/helm/monitoring-stack/charts/prometheus/templates/pvc.yaml b/helm/monitoring-stack/charts/prometheus/templates/pvc.yaml new file mode 100644 index 0000000000000000000000000000000000000000..43ee6ec30f11f9877086781400c4111fe45e8c7a --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/pvc.yaml @@ -0,0 +1,13 @@ +{{- if .Values.persistence.enable | default false }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: prometheus-pvc + labels: + {{- include "prometheus.labels" . | nindent 4 }} +spec: + accessModes: {{ .Values.persistence.accessModes }} + resources: + requests: + storage: {{ .Values.persistence.storage }} +{{- end }} \ No newline at end of file diff --git a/helm/monitoring-stack/charts/prometheus/templates/service.yaml b/helm/monitoring-stack/charts/prometheus/templates/service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..eb05a25865c74149429790d0eae652d6f48e9ef4 --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "prometheus.fullname" . }} + labels: + {{- include "prometheus.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "prometheus.selectorLabels" . | nindent 4 }} \ No newline at end of file diff --git a/helm/monitoring-stack/charts/prometheus/templates/serviceaccount.yaml b/helm/monitoring-stack/charts/prometheus/templates/serviceaccount.yaml new file mode 100644 index 0000000000000000000000000000000000000000..06fb6f12777cad26277b3069572119d789b59380 --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "prometheus.serviceAccountName" . }} + labels: + {{- include "prometheus.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/monitoring-stack/charts/prometheus/templates/tests/test-connection.yaml b/helm/monitoring-stack/charts/prometheus/templates/tests/test-connection.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b534e11ac56bb8fc9efbbaf55e21a576dd23510e --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "prometheus.fullname" . }}-test-connection" + labels: + {{- include "prometheus.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['prometheus:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/helm/monitoring-stack/charts/prometheus/values.yaml b/helm/monitoring-stack/charts/prometheus/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9d35e8989851c41c5d94af9c1e94583853c06e7e --- /dev/null +++ b/helm/monitoring-stack/charts/prometheus/values.yaml @@ -0,0 +1,94 @@ +# Default values for prometheus. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: "prom/prometheus" + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "latest" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +tsdb: + path: /prometheus/ + retentionTime: 5d + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "prometheus" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +persistence: + enable: false + storage: 10Gi + accessModes: + - ReadWriteMany + +service: + type: NodePort + port: 9090 + +ingress: + enabled: false + className: "nginx" + # edge, region, wavelength + environment: "edge" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: prometheus-dt.tactile5g.int + paths: + - path: / + pathType: Prefix + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/helm/monitoring-stack/charts/skooner/.helmignore b/helm/monitoring-stack/charts/skooner/.helmignore new file mode 100644 index 0000000000000000000000000000000000000000..0e8a0eb36f4ca2c939201c0d54b5d82a1ea34778 --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm/monitoring-stack/charts/skooner/Chart.yaml b/helm/monitoring-stack/charts/skooner/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a50a83a44e39bce62c3dd66c5fc9921efba886bc --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: skooner +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/helm/monitoring-stack/charts/skooner/README.md b/helm/monitoring-stack/charts/skooner/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0c9205733aa5ac8f78840cf34cd304fe171797b6 --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/README.md @@ -0,0 +1,44 @@ +# skooner + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ghcr.io/skooner-k8s/skooner"` | | +| image.tag | string | `"stable"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `"nginx"` | | +| ingress.enabled | bool | `true` | | +| ingress.environment | string | `"edge"` | | +| ingress.hosts[0].host | string | `"skooner.tactile5g.com"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | +| ingress.tls | list | `[]` | | +| nameOverride | string | `""` | | +| nodeSelector."kubernetes.io/os" | string | `"linux"` | | +| podAnnotations | object | `{}` | | +| podSecurityContext | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `4654` | | +| service.type | string | `"NodePort"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `"skooner-sa"` | | +| tolerations | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/helm/monitoring-stack/charts/skooner/templates/NOTES.txt b/helm/monitoring-stack/charts/skooner/templates/NOTES.txt new file mode 100644 index 0000000000000000000000000000000000000000..038d8bc76021a8fc947959bbdb3a2c795985e192 --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "skooner.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "skooner.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "skooner.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "skooner.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/helm/monitoring-stack/charts/skooner/templates/_helpers.tpl b/helm/monitoring-stack/charts/skooner/templates/_helpers.tpl new file mode 100644 index 0000000000000000000000000000000000000000..06244a038ddda12004e9026a7c46ec318bcad37d --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "skooner.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "skooner.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "skooner.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "skooner.labels" -}} +helm.sh/chart: {{ include "skooner.chart" . }} +{{ include "skooner.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "skooner.selectorLabels" -}} +app.kubernetes.io/name: {{ include "skooner.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +k8s-app: skooner +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "skooner.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "skooner.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/helm/monitoring-stack/charts/skooner/templates/cluster-role.yaml b/helm/monitoring-stack/charts/skooner/templates/cluster-role.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f0ebfccd5baa83760ad93643efe9d403dd08417b --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/templates/cluster-role.yaml @@ -0,0 +1,15 @@ +{{- if .Values.serviceAccount.create }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "skooner.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: {{ include "skooner.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/helm/monitoring-stack/charts/skooner/templates/deployment.yaml b/helm/monitoring-stack/charts/skooner/templates/deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..91b119afce2ecf422f2f0bb190080205eb552fd9 --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/templates/deployment.yaml @@ -0,0 +1,63 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "skooner.fullname" . }} + labels: + {{- include "skooner.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "skooner.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "skooner.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "skooner.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 30 + timeoutSeconds: 30 + readinessProbe: + httpGet: + path: / + port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/helm/monitoring-stack/charts/skooner/templates/hpa.yaml b/helm/monitoring-stack/charts/skooner/templates/hpa.yaml new file mode 100644 index 0000000000000000000000000000000000000000..52320850503397fce35d68e40519c5e9e279ec45 --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "skooner.fullname" . }} + labels: + {{- include "skooner.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "skooner.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/helm/monitoring-stack/charts/skooner/templates/ingress.yaml b/helm/monitoring-stack/charts/skooner/templates/ingress.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5c8849cad06a547c96c99e7bd6f6a10fc6da935f --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/templates/ingress.yaml @@ -0,0 +1,99 @@ +{{- if .Values.ingress.enabled -}} +{{- if eq .Values.ingress.environment "edge" }} +{{- $fullName := include "skooner.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName | trunc 30 }} + labels: + {{- include "skooner.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} + +{{- if .Values.ingress.enabled }} +{{- if or (eq .Values.ingress.environment "region") (eq .Values.ingress.environment "wavelength") }} +{{- $fullName := include "skooner.fullname" . -}} +{{- $svcPort := .Values.service.port -}} + +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName | trunc 30 }} + namespace: {{ .Release.Namespace }} + annotations: + alb.ingress.kubernetes.io/load-balancer-name: {{ $fullName | trunc 30 }} + alb.ingress.kubernetes.io/target-type: instance + alb.ingress.kubernetes.io/scheme: internal + alb.ingress.kubernetes.io/tags: tactile5g/digital-twins={{ .Release.Namespace }} +spec: + ingressClassName: alb + defaultBackend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/helm/monitoring-stack/charts/skooner/templates/service.yaml b/helm/monitoring-stack/charts/skooner/templates/service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0d2e1e97d3d2ae340ee43fc36d1ad81eb08049e0 --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "skooner.fullname" . }} + labels: + {{- include "skooner.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "skooner.selectorLabels" . | nindent 4 }} diff --git a/helm/monitoring-stack/charts/skooner/templates/serviceaccount.yaml b/helm/monitoring-stack/charts/skooner/templates/serviceaccount.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee040fd662a68ba348e433d69486d5960dea3a7f --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "skooner.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "skooner.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/monitoring-stack/charts/skooner/templates/tests/test-connection.yaml b/helm/monitoring-stack/charts/skooner/templates/tests/test-connection.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dccfc6a38b215097665663572fbbdd9bccf12edc --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "skooner.fullname" . }}-test-connection" + labels: + {{- include "skooner.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['skooner:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/helm/monitoring-stack/charts/skooner/values.yaml b/helm/monitoring-stack/charts/skooner/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ea8b353f943c183ff2a87899097dc8d8146cd184 --- /dev/null +++ b/helm/monitoring-stack/charts/skooner/values.yaml @@ -0,0 +1,85 @@ +# Default values for skooner. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: ghcr.io/skooner-k8s/skooner + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "stable" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "skooner-sa" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: NodePort + port: 4654 + +ingress: + enabled: true + className: "nginx" + # edge, region, wavelength + environment: "edge" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: skooner.tactile5g.com + paths: + - path: / + pathType: Prefix + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 1m + memory: 1Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: + kubernetes.io/os: linux + +tolerations: [] + +affinity: {} diff --git a/helm/monitoring-stack/values.yaml b/helm/monitoring-stack/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..eac15c4e3e7088b066fdfc41f0561bb46c6cb173 --- /dev/null +++ b/helm/monitoring-stack/values.yaml @@ -0,0 +1,49 @@ + +grafana: + enabled: true + env: + prometheusUrl: http://monitoring-prometheus.monitoring.svc.cluster.local:9090 + ingress: + enable: true + hosts: + - host: grafana-dt.test.int + paths: + - path: / + pathType: Prefix + service: + type: ClusterIP + +prometheus: + enabled: true + ingress: + enabled: true + hosts: + - host: prometheus-dt.test.int + paths: + - path: / + pathType: Prefix + serviceAccount: + create: false + service: + type: ClusterIP + +skooner: + enabled: true + ingress: + enabled: true + className: nginx + hosts: + - host: skooner-dt.test.int + paths: + - path: / + pathType: Prefix + service: + type: ClusterIP + +metrics-server: + enabled: false + apiService: + create: true + extraArgs: + - --kubelet-insecure-tls=true + - --kubelet-preferred-address-types=InternalIP diff --git a/helm/scripts/create_remote_users.sh b/helm/scripts/create_remote_users.sh new file mode 100755 index 0000000000000000000000000000000000000000..a0209b31da4538e17dcb49b4c1343e903a029726 --- /dev/null +++ b/helm/scripts/create_remote_users.sh @@ -0,0 +1,145 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +# User to create +TOTAL_USERS=1 +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" + exit 1 +} + +# Read params +while getopts ":u:p:t:h" opt; do + case $opt in + u) + USERNAME_PREFIX="$OPTARG" + ;; + p) + USER_PASSWORD=$OPTARG + ;; + t) + TOTAL_USERS=$OPTARG + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [[ "$USERNAME_PREFIX" == "" ]] +then + echo "USERNAME_PREFIX must be set with option -u" + help + exit -1 +fi + +if [[ "$USER_PASSWORD" == "" ]] +then + echo "USER_PASSWORD must be set with option -p" + help + exit -1 +fi + +# Other Stuff +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 + +TEST_FOLDER=$CAPIF_BASE_DIR/tests +RESULT_FOLDER=$CAPIF_BASE_DIR/results +ROBOT_DOCKER_FILE_FOLDER=$CAPIF_BASE_DIR/tools/robot + +# nginx Hostname and http port (80 by default) to reach for tests +CAPIF_REGISTER=$REGISTER_HOSTNAME +CAPIF_REGISTER_PORT=443 +CAPIF_HTTPS_PORT=443 + +# VAULT access configuration +CAPIF_VAULT=$VAULT_HOSTNAME +CAPIF_VAULT_PORT=80 +CAPIF_VAULT_TOKEN=$VAULT_ACCESS_TOKEN + +# Mock Server +MOCK_SERVER_URL=http://mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN:80 +NOTIFICATION_DESTINATION_URL=http://mock-server.$CAPIF_NAMESPACE.svc.cluster.local:9100 + +PLATFORM=$(uname -m) +if [ "x86_64" == "$PLATFORM" ]; then + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-amd64 +else + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-arm64 +fi + +# Show variables +echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" +echo "CAPIF_REGISTER = $CAPIF_REGISTER" +echo "CAPIF_HTTP_PORT = $CAPIF_HTTP_PORT" +echo "CAPIF_HTTPS_PORT = $CAPIF_HTTPS_PORT" +echo "CAPIF_VAULT = $CAPIF_VAULT" +echo "CAPIF_VAULT_PORT = $CAPIF_VAULT_PORT" +echo "CAPIF_VAULT_TOKEN = $CAPIF_VAULT_TOKEN" +echo "TOTAL_USERS=$TOTAL_USERS" +echo "USERNAME_PREFIX=$USERNAME_PREFIX" +echo "USER_PASSWORD=$USER_PASSWORD" +echo "MOCK_SERVER_URL=$MOCK_SERVER_URL" +echo "NOTIFICATION_DESTINATION_URL=$NOTIFICATION_DESTINATION_URL" +echo "DOCKER_ROBOT_IMAGE = $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION" + +docker >/dev/null 2>/dev/null +if [[ $? -ne 0 ]] +then + echo "Docker maybe is not installed. Please check if docker CLI is present." + exit -1 +fi + +docker pull $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION || echo "Docker image ($DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION) not present on repository" +docker images|grep -Eq '^'$DOCKER_ROBOT_IMAGE'[ ]+[ ]'$DOCKER_ROBOT_IMAGE_VERSION'' +if [[ $? -ne 0 ]] +then + read -p "Robot image is not present. To continue, Do you want to build it? (y/n)" build_robot_image + if [[ $build_robot_image == "y" ]] + then + echo "Building Robot docker image." + cd $ROBOT_DOCKER_FILE_FOLDER + docker build --no-cache -t $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION . + cd $CAPIF_BASE_DIR + else + exit -2 + fi +fi + +cd $CAPIF_BASE_DIR + +mkdir -p $RESULT_FOLDER + +docker run -ti --rm --network="host" \ + -v $TEST_FOLDER:/opt/robot-tests/tests \ + -v $RESULT_FOLDER:/opt/robot-tests/results ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ + --variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \ + --variable CAPIF_HTTP_PORT:$CAPIF_HTTP_PORT \ + --variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \ + --variable CAPIF_REGISTER:$CAPIF_REGISTER \ + --variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \ + --variable CAPIF_VAULT:$CAPIF_VAULT \ + --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 \ + --variable TOTAL_USERS:$TOTAL_USERS \ + --variable USERNAME_PREFIX:$USERNAME_PREFIX \ + --variable USER_PASSWORD:$USER_PASSWORD \ + --include create-users diff --git a/helm/scripts/get_ingress.sh b/helm/scripts/get_ingress.sh new file mode 100755 index 0000000000000000000000000000000000000000..53b79c31c8e4de8db3c318809549330492d1b058 --- /dev/null +++ b/helm/scripts/get_ingress.sh @@ -0,0 +1,60 @@ +#!/bin/bash +IP="" +NAMESPACE="" +source $(dirname "$(readlink -f "$0")")/variables.sh + +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" + exit 1 +} +# Read params +while getopts ":i:n:k:h" opt; do + case $opt in + i) + IP="$OPTARG" + ;; + n) + NAMESPACE="$OPTARG" + ;; + k) + KUBECONFIG="$OPTARG" + if [ -z "$KUBECONFIG" ]; then + echo "The variable KUBECONFIG is empty. Using default k8s environment..." + else + KUBECONFIG="--kubeconfig $KUBECONFIG" + echo "The variable KUBECONFIG is not empty. Its value is: $KUBECONFIG" + fi + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [[ -n "$NAMESPACE" && -n "$IP" ]] +then + echo "IP: $IP and namespace: $NAMESPACE" +elif [[ -n "$NAMESPACE" ]]; then + if [[ -n "$K8S_IP" ]]; then + IP=$K8S_IP + echo "Using K8S_IP found. IP: $IP and namespace: $NAMESPACE" + fi +else + echo "IP ($IP) and NAMESPACE ($NAMESPACE) must be set" + exit -1 +fi + + +kubectl $KUBECONFIG -n $NAMESPACE get ing|grep -v NAME|awk "{print \"$IP \"\$3}" diff --git a/helm/scripts/install_capif.sh b/helm/scripts/install_capif.sh new file mode 100755 index 0000000000000000000000000000000000000000..74b1146a28ff321a0b7fb20ee6c4843a8b841e1c --- /dev/null +++ b/helm/scripts/install_capif.sh @@ -0,0 +1,148 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +helm repo add grafana https://grafana.github.io/helm-charts + +### download dependencies +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="DEBUG" \ +--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="DEBUG" \ +--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="DEBUG" \ +--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.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-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-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="DEBUG" \ +--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="DEBUG" \ +--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-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-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 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="debug" \ +--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 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="DEBUG" \ +--set mock-server.service.port=$MOCK_SERVER_PORT \ +--set mock-server.livenessProbe.tcpSocket.port=$MOCK_SERVER_PORT \ +--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-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" \ +--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 new file mode 100755 index 0000000000000000000000000000000000000000..9d6a00f370ad1fb9a02047365e2d45d221e68e92 --- /dev/null +++ b/helm/scripts/install_monitoring.sh @@ -0,0 +1,19 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +helm repo add bitnami https://charts.bitnami.com/bitnami +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.env.prometheusUrl=$PROMETHEUS_URL \ +--set prometheus.enabled=true \ +--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 \ +--wait --timeout=10m --create-namespace --atomic + diff --git a/helm/scripts/install_vault.sh b/helm/scripts/install_vault.sh new file mode 100755 index 0000000000000000000000000000000000000000..971d520044b8ace5428fa19172b0b3e865099959 --- /dev/null +++ b/helm/scripts/install_vault.sh @@ -0,0 +1,156 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +# Function to get the service status +get_service_status() { + kubectl $KUBECONFIG get pods -n "$VAULT_NAMESPACE" -l $LABEL_TO_CHECK="$VAULT_SERVICE_NAME" -o jsonpath='{.items[*].status.phase}' +} + +# Function to get the number of ready replicas +get_ready_replicas() { + kubectl $KUBECONFIG get pods -n "$VAULT_NAMESPACE" -l $LABEL_TO_CHECK="$VAULT_SERVICE_NAME" -o jsonpath='{.items[*].status.containerStatuses[0].ready}' +} + +# Function to get the number of ready replicas +get_started_replicas() { + kubectl $KUBECONFIG get pods -n "$VAULT_NAMESPACE" -l $LABEL_TO_CHECK="$VAULT_SERVICE_NAME" -o jsonpath='{.items[*].status.containerStatuses[0].started}' +} + +get_succeeded_job_status() { + kubectl $KUBECONFIG get jobs -n "$VAULT_NAMESPACE" -o jsonpath='{.items[*].status.succeeded}' +} + +get_failed_job_status() { + kubectl $KUBECONFIG get jobs -n "$VAULT_NAMESPACE" -o jsonpath='{.items[*].status.failed}' +} + +get_completion_job_status() { + kubectl $KUBECONFIG get jobs -n "$VAULT_NAMESPACE" -o jsonpath='{.items[*].status.conditions[0].status}' +} + +get_completed_type_job_status(){ + kubectl $KUBECONFIG get jobs -n "$VAULT_NAMESPACE" -o jsonpath='{.items[*].status.conditions[0].type}' +} + +helm $KUBECONFIG repo add hashicorp https://helm.releases.hashicorp.com + +helm $KUBECONFIG upgrade --install vault hashicorp/vault -n $VAULT_NAMESPACE --set server.ingress.enabled=true \ +--set server.ingress.hosts[0].host="$VAULT_HOSTNAME" \ +--set server.ingress.ingressClassName=nginx \ +--set server.dataStorage.storageClass=$VAULT_STORAGE_CLASS \ +--set server.dataStorage.size=$VAULT_STORAGE_SIZE \ +--set server.standalone.enabled=true --create-namespace + +# Loop to wait until the service is in "Running" state and has 0/1 ready replicas +while true; do + SERVICE_STATUS=$(get_service_status) + READY_REPLICAS=$(get_ready_replicas) + STARTED_REPLICAS=$(get_started_replicas) + + echo "Service status: $SERVICE_STATUS" + echo "Ready replicas: $READY_REPLICAS" + echo "Started Replicas: $STARTED_REPLICAS" + + if [ "$SERVICE_STATUS" == "Running" ] && [ "$READY_REPLICAS" == "false" ] && [ "$STARTED_REPLICAS" == "true" ]; then + echo "The service $VAULT_SERVICE_NAME is in RUNNING state and has 0/1 ready replicas." + break + else + echo "Waiting for the service $VAULT_SERVICE_NAME to be in RUNNING state and have 0/1 ready replicas..." + sleep 5 + fi +done + +echo "The service $VAULT_SERVICE_NAME is now in the desired state." + +# Init vault +echo "" +echo "Init vault" +kubectl $KUBECONFIG exec -ti vault-0 -n $VAULT_NAMESPACE -- vault operator init -key-shares=1 -key-threshold=1 > $VAULT_FILE + +# Remove control characters +cat $VAULT_FILE | ${SED_CMD} -r 's/\x1B\[[0-9;]*[JKmsu]//g' | ${SED_CMD} -e 's/[^[:print:]\t\n]//g' > $VAULT_FILE.tmp +mv $VAULT_FILE.tmp $VAULT_FILE + +# get UNSEAL Key and TOKEN +UNSEAL_KEY=$(awk '/Unseal Key 1/{ print $4 }' $VAULT_FILE) +VAULT_TOKEN=$(awk '/Initial Root Token/{ print $4 }' $VAULT_FILE) + +echo "UNSEAL KEY: $UNSEAL_KEY" +echo "VAULT TOKEN: $VAULT_TOKEN" + +kubectl $KUBECONFIG exec -ti vault-0 -n $VAULT_NAMESPACE -- vault operator unseal $UNSEAL_KEY + +# Loop to wait until the service is in "Running" state and has 1/1 ready replicas +while true; do + SERVICE_STATUS=$(get_service_status) + READY_REPLICAS=$(get_ready_replicas) + STARTED_REPLICAS=$(get_started_replicas) + + echo "Service status: $SERVICE_STATUS" + echo "Ready replicas: $READY_REPLICAS" + echo "Started Replicas: $STARTED_REPLICAS" + + if [ "$SERVICE_STATUS" == "Running" ] && [ "$READY_REPLICAS" == "true" ] && [ "$STARTED_REPLICAS" == "true" ]; then + echo "The service $VAULT_SERVICE_NAME is in RUNNING state and has 0/1 ready replicas." + break + else + echo "Waiting for the service $VAULT_SERVICE_NAME to be in RUNNING state and have 1/1 ready replicas..." + sleep 5 + fi +done + +${SED_CMD} -i "s/namespace:.*/namespace: $VAULT_NAMESPACE/g" $HELM_DIR/vault-job/vault-job.yaml +${SED_CMD} -i "s/VAULT_TOKEN=.*/VAULT_TOKEN=$VAULT_TOKEN/g" $HELM_DIR/vault-job/vault-job.yaml +${SED_CMD} -i "s/DOMAIN1=.*/DOMAIN1=$DOMAIN1/g" $HELM_DIR/vault-job/vault-job.yaml +${SED_CMD} -i "s/DOMAIN2=.*/DOMAIN2=$DOMAIN2/g" $HELM_DIR/vault-job/vault-job.yaml +${SED_CMD} -i "s/DOMAIN3=.*/DOMAIN3=$DOMAIN3/g" $HELM_DIR/vault-job/vault-job.yaml + +kubectl $KUBECONFIG delete job $VAULT_JOB_NAME -n $VAULT_NAMESPACE || echo "No vault job present" +kubectl $KUBECONFIG -n $VAULT_NAMESPACE apply -f $HELM_DIR/vault-job/ + +# Check job status +while true; do + SUCCEEDED_JOB_STATUS=$(get_succeeded_job_status) + FAILED_JOB_STATUS=$(get_failed_job_status) + COMPLETION_JOB_STATUS=$(get_completion_job_status) + COMPLETED_TYPE_JOB_STATUS=$(get_completed_type_job_status) + + echo "SUCCEEDED_JOB_STATUS: $SUCCEEDED_JOB_STATUS" + echo "FAILED_JOB_STATUS: $FAILED_JOB_STATUS" + echo "COMPLETION_JOB_STATUS: $COMPLETION_JOB_STATUS" + echo "COMPLETED_TYPE_JOB_STATUS: $COMPLETED_TYPE_JOB_STATUS" + + 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 + echo "The vault job succeeded." + break + else + echo "Waiting for the service $VAULT_SERVICE_NAME to be in RUNNING state and have 0/1 ready replicas..." + sleep 5 + fi +done + +echo "Job Success" +# Loop to wait until the service is in "Running" state and has 0/1 ready replicas + +while true; do + SERVICE_STATUS=$(get_service_status) + READY_REPLICAS=$(get_ready_replicas) + STARTED_REPLICAS=$(get_started_replicas) + + echo "Service status: $SERVICE_STATUS" + echo "Ready replicas: $READY_REPLICAS" + echo "Started Replicas: $STARTED_REPLICAS" + + if [ "$SERVICE_STATUS" == "Running" ] && [ "$READY_REPLICAS" == "true" ] && [ "$STARTED_REPLICAS" == "true" ]; then + echo "The service $VAULT_SERVICE_NAME is in RUNNING state and has 1/1 ready replicas." + break + else + echo "Waiting for the service $VAULT_SERVICE_NAME to be in RUNNING state and have 1/1 ready replicas..." + sleep 5 + fi +done + +echo "The service $VAULT_SERVICE_NAME is successfully deployed." diff --git a/helm/scripts/populate_create_remote_dummy_users.sh b/helm/scripts/populate_create_remote_dummy_users.sh new file mode 100755 index 0000000000000000000000000000000000000000..3243db82bb52d55c481ac9bc92389e67742d9937 --- /dev/null +++ b/helm/scripts/populate_create_remote_dummy_users.sh @@ -0,0 +1,125 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +# 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" + exit 1 +} + +# Read params +while getopts ":p:i:h" opt; do + case $opt in + p) + TOTAL_PROVIDERS=$OPTARG + ;; + i) + TOTAL_INVOKERS=$OPTARG + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +# Other Stuff +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 + +TEST_FOLDER=$CAPIF_BASE_DIR/tests +RESULT_FOLDER=$CAPIF_BASE_DIR/results +ROBOT_DOCKER_FILE_FOLDER=$CAPIF_BASE_DIR/tools/robot + +# nginx Hostname and http port (80 by default) to reach for tests +CAPIF_REGISTER=$REGISTER_HOSTNAME +CAPIF_REGISTER_PORT=443 +CAPIF_HTTPS_PORT=443 + +# VAULT access configuration +CAPIF_VAULT=$VAULT_HOSTNAME +CAPIF_VAULT_PORT=80 +CAPIF_VAULT_TOKEN=$VAULT_ACCESS_TOKEN + +# Mock Server +MOCK_SERVER_URL=http://mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN:80 +NOTIFICATION_DESTINATION_URL=http://mock-server.$CAPIF_NAMESPACE.svc.cluster.local:9100 + +PLATFORM=$(uname -m) +if [ "x86_64" == "$PLATFORM" ]; then + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-amd64 +else + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-arm64 +fi + +# Show variables +echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" +echo "CAPIF_REGISTER = $CAPIF_REGISTER" +echo "CAPIF_HTTP_PORT = $CAPIF_HTTP_PORT" +echo "CAPIF_HTTPS_PORT = $CAPIF_HTTPS_PORT" +echo "CAPIF_VAULT = $CAPIF_VAULT" +echo "CAPIF_VAULT_PORT = $CAPIF_VAULT_PORT" +echo "CAPIF_VAULT_TOKEN = $CAPIF_VAULT_TOKEN" +echo "TOTAL_USERS=$TOTAL_USERS" +echo "USERNAME_PREFIX=$USERNAME_PREFIX" +echo "USER_PASSWORD=$USER_PASSWORD" +echo "MOCK_SERVER_URL=$MOCK_SERVER_URL" +echo "NOTIFICATION_DESTINATION_URL=$NOTIFICATION_DESTINATION_URL" +echo "DOCKER_ROBOT_IMAGE = $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION" + +docker >/dev/null 2>/dev/null +if [[ $? -ne 0 ]] +then + echo "Docker maybe is not installed. Please check if docker CLI is present." + exit -1 +fi + +docker pull $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION || echo "Docker image ($DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION) not present on repository" +docker images|grep -Eq '^'$DOCKER_ROBOT_IMAGE'[ ]+[ ]'$DOCKER_ROBOT_IMAGE_VERSION'' +if [[ $? -ne 0 ]] +then + read -p "Robot image is not present. To continue, Do you want to build it? (y/n)" build_robot_image + if [[ $build_robot_image == "y" ]] + then + echo "Building Robot docker image." + cd $ROBOT_DOCKER_FILE_FOLDER + docker build --no-cache -t $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION . + cd $CAPIF_BASE_DIR + else + exit -2 + fi +fi + +cd $CAPIF_BASE_DIR + +mkdir -p $RESULT_FOLDER + +docker run -ti --rm --network="host" \ + -v $TEST_FOLDER:/opt/robot-tests/tests \ + -v $RESULT_FOLDER:/opt/robot-tests/results ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ + --variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \ + --variable CAPIF_HTTP_PORT:$CAPIF_HTTP_PORT \ + --variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \ + --variable CAPIF_REGISTER:$CAPIF_REGISTER \ + --variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \ + --variable CAPIF_VAULT:$CAPIF_VAULT \ + --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 \ + --variable TOTAL_PROVIDERS:$TOTAL_PROVIDERS \ + --variable TOTAL_INVOKERS:$TOTAL_INVOKERS \ + --include populate-create diff --git a/helm/scripts/populate_remove_remote_dummy_users.sh b/helm/scripts/populate_remove_remote_dummy_users.sh new file mode 100755 index 0000000000000000000000000000000000000000..7847525ef7004e37789866e30947f2f27358b2bf --- /dev/null +++ b/helm/scripts/populate_remove_remote_dummy_users.sh @@ -0,0 +1,112 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +help() { + echo "Usage: $1 " + echo "Removes all dummy users populated, stored on latest zip file on results" + echo " -h : show this help" + exit 1 +} + +# Read params +while getopts ":h" opt; do + case $opt in + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +# Other Stuff +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 + +TEST_FOLDER=$CAPIF_BASE_DIR/tests +RESULT_FOLDER=$CAPIF_BASE_DIR/results +ROBOT_DOCKER_FILE_FOLDER=$CAPIF_BASE_DIR/tools/robot + +# nginx Hostname and http port (80 by default) to reach for tests +CAPIF_REGISTER=$REGISTER_HOSTNAME +CAPIF_REGISTER_PORT=443 +CAPIF_HTTPS_PORT=443 + +# VAULT access configuration +CAPIF_VAULT=$VAULT_HOSTNAME +CAPIF_VAULT_PORT=80 +CAPIF_VAULT_TOKEN=$VAULT_ACCESS_TOKEN + +# Mock Server +MOCK_SERVER_URL=http://mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN:80 +NOTIFICATION_DESTINATION_URL=http://mock-server.$CAPIF_NAMESPACE.svc.cluster.local:9100 + +PLATFORM=$(uname -m) +if [ "x86_64" == "$PLATFORM" ]; then + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-amd64 +else + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-arm64 +fi + +# Show variables +echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" +echo "CAPIF_REGISTER = $CAPIF_REGISTER" +echo "CAPIF_HTTP_PORT = $CAPIF_HTTP_PORT" +echo "CAPIF_HTTPS_PORT = $CAPIF_HTTPS_PORT" +echo "CAPIF_VAULT = $CAPIF_VAULT" +echo "CAPIF_VAULT_PORT = $CAPIF_VAULT_PORT" +echo "CAPIF_VAULT_TOKEN = $CAPIF_VAULT_TOKEN" +echo "TOTAL_USERS=$TOTAL_USERS" +echo "USERNAME_PREFIX=$USERNAME_PREFIX" +echo "USER_PASSWORD=$USER_PASSWORD" +echo "MOCK_SERVER_URL=$MOCK_SERVER_URL" +echo "NOTIFICATION_DESTINATION_URL=$NOTIFICATION_DESTINATION_URL" +echo "DOCKER_ROBOT_IMAGE = $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION" + +docker >/dev/null 2>/dev/null +if [[ $? -ne 0 ]] +then + echo "Docker maybe is not installed. Please check if docker CLI is present." + exit -1 +fi + +docker pull $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION || echo "Docker image ($DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION) not present on repository" +docker images|grep -Eq '^'$DOCKER_ROBOT_IMAGE'[ ]+[ ]'$DOCKER_ROBOT_IMAGE_VERSION'' +if [[ $? -ne 0 ]] +then + read -p "Robot image is not present. To continue, Do you want to build it? (y/n)" build_robot_image + if [[ $build_robot_image == "y" ]] + then + echo "Building Robot docker image." + cd $ROBOT_DOCKER_FILE_FOLDER + docker build --no-cache -t $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION . + cd $CAPIF_BASE_DIR + else + exit -2 + fi +fi + +cd $CAPIF_BASE_DIR + +mkdir -p $RESULT_FOLDER + +docker run -ti --rm --network="host" \ + -v $TEST_FOLDER:/opt/robot-tests/tests \ + -v $RESULT_FOLDER:/opt/robot-tests/results ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ + --variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \ + --variable CAPIF_HTTP_PORT:$CAPIF_HTTP_PORT \ + --variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \ + --variable CAPIF_REGISTER:$CAPIF_REGISTER \ + --variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \ + --variable CAPIF_VAULT:$CAPIF_VAULT \ + --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 \ + --include populate-remove diff --git a/helm/scripts/remove_remote_users.sh b/helm/scripts/remove_remote_users.sh new file mode 100755 index 0000000000000000000000000000000000000000..dc6fa7620590aabca3fbeb11384a2f48d85735a7 --- /dev/null +++ b/helm/scripts/remove_remote_users.sh @@ -0,0 +1,126 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +# User to remove +USERNAME_PREFIX= + +help() { + echo "Usage: $1 " + echo " -u : User prefix to use" + echo " -h : show this help" + exit 1 +} + +# Read params +while getopts ":u:h" opt; do + case $opt in + u) + USERNAME_PREFIX="$OPTARG" + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [[ "$USERNAME_PREFIX" == "" ]] +then + echo "USERNAME_PREFIX must be set with option -u" + help + exit -1 +fi + +# Other Stuff +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 + +TEST_FOLDER=$CAPIF_BASE_DIR/tests +RESULT_FOLDER=$CAPIF_BASE_DIR/results +ROBOT_DOCKER_FILE_FOLDER=$CAPIF_BASE_DIR/tools/robot + +# nginx Hostname and http port (80 by default) to reach for tests +CAPIF_REGISTER=$REGISTER_HOSTNAME +CAPIF_REGISTER_PORT=443 +CAPIF_HTTPS_PORT=443 + +# VAULT access configuration +CAPIF_VAULT=$VAULT_HOSTNAME +CAPIF_VAULT_PORT=80 +CAPIF_VAULT_TOKEN=$VAULT_ACCESS_TOKEN + +# Mock Server +MOCK_SERVER_URL=http://mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN:80 +NOTIFICATION_DESTINATION_URL=http://mock-server.$CAPIF_NAMESPACE.svc.cluster.local:9100 + +PLATFORM=$(uname -m) +if [ "x86_64" == "$PLATFORM" ]; then + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-amd64 +else + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-arm64 +fi + +# Show variables +echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" +echo "CAPIF_REGISTER = $CAPIF_REGISTER" +echo "CAPIF_HTTP_PORT = $CAPIF_HTTP_PORT" +echo "CAPIF_HTTPS_PORT = $CAPIF_HTTPS_PORT" +echo "CAPIF_VAULT = $CAPIF_VAULT" +echo "CAPIF_VAULT_PORT = $CAPIF_VAULT_PORT" +echo "CAPIF_VAULT_TOKEN = $CAPIF_VAULT_TOKEN" +echo "TOTAL_USERS=$TOTAL_USERS" +echo "USERNAME_PREFIX=$USERNAME_PREFIX" +echo "USER_PASSWORD=$USER_PASSWORD" +echo "MOCK_SERVER_URL=$MOCK_SERVER_URL" +echo "NOTIFICATION_DESTINATION_URL=$NOTIFICATION_DESTINATION_URL" +echo "DOCKER_ROBOT_IMAGE = $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION" + +docker >/dev/null 2>/dev/null +if [[ $? -ne 0 ]] +then + echo "Docker maybe is not installed. Please check if docker CLI is present." + exit -1 +fi + +docker pull $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION || echo "Docker image ($DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION) not present on repository" +docker images|grep -Eq '^'$DOCKER_ROBOT_IMAGE'[ ]+[ ]'$DOCKER_ROBOT_IMAGE_VERSION'' +if [[ $? -ne 0 ]] +then + read -p "Robot image is not present. To continue, Do you want to build it? (y/n)" build_robot_image + if [[ $build_robot_image == "y" ]] + then + echo "Building Robot docker image." + cd $ROBOT_DOCKER_FILE_FOLDER + docker build --no-cache -t $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION . + cd $CAPIF_BASE_DIR + else + exit -2 + fi +fi + +cd $CAPIF_BASE_DIR + +mkdir -p $RESULT_FOLDER + +docker run -ti --rm --network="host" \ + -v $TEST_FOLDER:/opt/robot-tests/tests \ + -v $RESULT_FOLDER:/opt/robot-tests/results ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ + --variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \ + --variable CAPIF_HTTP_PORT:$CAPIF_HTTP_PORT \ + --variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \ + --variable CAPIF_REGISTER:$CAPIF_REGISTER \ + --variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \ + --variable CAPIF_VAULT:$CAPIF_VAULT \ + --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 \ + --variable USERNAME_PREFIX:$USERNAME_PREFIX \ + --include remove-users diff --git a/helm/scripts/remove_remote_users_by_prefix.sh b/helm/scripts/remove_remote_users_by_prefix.sh new file mode 100755 index 0000000000000000000000000000000000000000..003d694feec94cb1038ebdd5f3cd61370960a3d0 --- /dev/null +++ b/helm/scripts/remove_remote_users_by_prefix.sh @@ -0,0 +1,126 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +# User to remove +USERNAME_PREFIX= + +help() { + echo "Usage: $1 " + echo " -u : User prefix to use" + echo " -h : show this help" + exit 1 +} + +# Read params +while getopts ":u:h" opt; do + case $opt in + u) + USERNAME_PREFIX="$OPTARG" + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [[ "$USERNAME_PREFIX" == "" ]] +then + echo "USERNAME_PREFIX must be set with option -u" + help + exit -1 +fi + +# Other Stuff +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 + +TEST_FOLDER=$CAPIF_BASE_DIR/tests +RESULT_FOLDER=$CAPIF_BASE_DIR/results +ROBOT_DOCKER_FILE_FOLDER=$CAPIF_BASE_DIR/tools/robot + +# nginx Hostname and http port (80 by default) to reach for tests +CAPIF_REGISTER=$REGISTER_HOSTNAME +CAPIF_REGISTER_PORT=443 +CAPIF_HTTPS_PORT=443 + +# VAULT access configuration +CAPIF_VAULT=$VAULT_HOSTNAME +CAPIF_VAULT_PORT=80 +CAPIF_VAULT_TOKEN=$VAULT_ACCESS_TOKEN + +# Mock Server +MOCK_SERVER_URL=http://mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN:80 +NOTIFICATION_DESTINATION_URL=http://mock-server.$CAPIF_NAMESPACE.svc.cluster.local:9100 + +PLATFORM=$(uname -m) +if [ "x86_64" == "$PLATFORM" ]; then + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-amd64 +else + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-arm64 +fi + +# Show variables +echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" +echo "CAPIF_REGISTER = $CAPIF_REGISTER" +echo "CAPIF_HTTP_PORT = $CAPIF_HTTP_PORT" +echo "CAPIF_HTTPS_PORT = $CAPIF_HTTPS_PORT" +echo "CAPIF_VAULT = $CAPIF_VAULT" +echo "CAPIF_VAULT_PORT = $CAPIF_VAULT_PORT" +echo "CAPIF_VAULT_TOKEN = $CAPIF_VAULT_TOKEN" +echo "TOTAL_USERS=$TOTAL_USERS" +echo "USERNAME_PREFIX=$USERNAME_PREFIX" +echo "USER_PASSWORD=$USER_PASSWORD" +echo "MOCK_SERVER_URL=$MOCK_SERVER_URL" +echo "NOTIFICATION_DESTINATION_URL=$NOTIFICATION_DESTINATION_URL" +echo "DOCKER_ROBOT_IMAGE = $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION" + +docker >/dev/null 2>/dev/null +if [[ $? -ne 0 ]] +then + echo "Docker maybe is not installed. Please check if docker CLI is present." + exit -1 +fi + +docker pull $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION || echo "Docker image ($DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION) not present on repository" +docker images|grep -Eq '^'$DOCKER_ROBOT_IMAGE'[ ]+[ ]'$DOCKER_ROBOT_IMAGE_VERSION'' +if [[ $? -ne 0 ]] +then + read -p "Robot image is not present. To continue, Do you want to build it? (y/n)" build_robot_image + if [[ $build_robot_image == "y" ]] + then + echo "Building Robot docker image." + cd $ROBOT_DOCKER_FILE_FOLDER + docker build --no-cache -t $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION . + cd $CAPIF_BASE_DIR + else + exit -2 + fi +fi + +cd $CAPIF_BASE_DIR + +mkdir -p $RESULT_FOLDER + +docker run -ti --rm --network="host" \ + -v $TEST_FOLDER:/opt/robot-tests/tests \ + -v $RESULT_FOLDER:/opt/robot-tests/results ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ + --variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \ + --variable CAPIF_HTTP_PORT:$CAPIF_HTTP_PORT \ + --variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \ + --variable CAPIF_REGISTER:$CAPIF_REGISTER \ + --variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \ + --variable CAPIF_VAULT:$CAPIF_VAULT \ + --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 \ + --variable USERNAME_PREFIX:$USERNAME_PREFIX \ + --include remove-users-by-prefix diff --git a/helm/scripts/run_remote_capif_tests.sh b/helm/scripts/run_remote_capif_tests.sh new file mode 100755 index 0000000000000000000000000000000000000000..38b7e807399963c8bb2b5be342cee4c56c6d8693 --- /dev/null +++ b/helm/scripts/run_remote_capif_tests.sh @@ -0,0 +1,86 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 + +TEST_FOLDER=$CAPIF_BASE_DIR/tests +RESULT_FOLDER=$CAPIF_BASE_DIR/results +ROBOT_DOCKER_FILE_FOLDER=$CAPIF_BASE_DIR/tools/robot + +# nginx Hostname and http port (80 by default) to reach for tests +CAPIF_REGISTER=$REGISTER_HOSTNAME +CAPIF_REGISTER_PORT=443 +CAPIF_HTTPS_PORT=443 + +# VAULT access configuration +CAPIF_VAULT=$VAULT_HOSTNAME +CAPIF_VAULT_PORT=80 +CAPIF_VAULT_TOKEN=$VAULT_ACCESS_TOKEN + + +MOCK_SERVER_URL=http://mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN:80 +NOTIFICATION_DESTINATION_URL=http://mock-server.$CAPIF_NAMESPACE.svc.cluster.local:9100 + +PLATFORM=$(uname -m) +if [ "x86_64" == "$PLATFORM" ]; then + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-amd64 +else + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-arm64 +fi + +echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" +echo "CAPIF_REGISTER = $REGISTER_HOSTNAME" +echo "CAPIF_HTTPS_PORT = $CAPIF_HTTPS_PORT" +echo "CAPIF_VAULT = $VAULT_INTERNAL_HOSTNAME" +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" + +INPUT_OPTIONS=$@ +# Check if input is provided +if [ -z "$1" ]; then + # Set default value if no input is provided + INPUT_OPTIONS="--include all" +fi + +cd $CAPIF_BASE_DIR + +docker >/dev/null 2>/dev/null +if [[ $? -ne 0 ]] +then + echo "Docker maybe is not installed. Please check if docker CLI is present." + exit -1 +fi + +docker pull $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION || echo "Docker image ($DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION) not present on repository" +docker images|grep -Eq '^'$DOCKER_ROBOT_IMAGE'[ ]+[ ]'$DOCKER_ROBOT_IMAGE_VERSION'' +if [[ $? -ne 0 ]] +then + read -p "Robot image is not present. To continue, Do you want to build it? (y/n)" build_robot_image + if [[ $build_robot_image == "y" ]] + then + echo "Building Robot docker image." + cd $ROBOT_DOCKER_FILE_FOLDER + docker build --no-cache -t $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION . + cd $CAPIF_BASE_DIR + else + exit -2 + fi +fi + +mkdir -p $RESULT_FOLDER + +docker run -ti --rm --network="host" \ + -v $TEST_FOLDER:/opt/robot-tests/tests \ + -v $RESULT_FOLDER:/opt/robot-tests/results ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ + --variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \ + --variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \ + --variable CAPIF_REGISTER:$CAPIF_REGISTER \ + --variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \ + --variable CAPIF_VAULT:$CAPIF_VAULT \ + --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 diff --git a/helm/scripts/set_ingress.sh b/helm/scripts/set_ingress.sh new file mode 100755 index 0000000000000000000000000000000000000000..7f4034776503a82d3fd883ebb073f024831aa22e --- /dev/null +++ b/helm/scripts/set_ingress.sh @@ -0,0 +1,60 @@ +#!/bin/bash +IP="" +NAMESPACE="" +source $(dirname "$(readlink -f "$0")")/variables.sh + +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" + exit 1 +} +# Read params +while getopts ":i:n:k:h" opt; do + case $opt in + i) + IP="$OPTARG" + ;; + n) + NAMESPACE="$OPTARG" + ;; + k) + KUBECONFIG="$OPTARG" + if [ -z "$KUBECONFIG" ]; then + echo "The variable KUBECONFIG is empty. Using default k8s environment..." + else + KUBECONFIG="--kubeconfig $KUBECONFIG" + echo "The variable KUBECONFIG is not empty. Its value is: $KUBECONFIG" + fi + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [[ -n "$NAMESPACE" && -n "$IP" ]] +then + echo "IP: $IP and namespace: $NAMESPACE" +elif [[ -n "$NAMESPACE" ]]; then + if [[ -n "$K8S_IP" ]]; then + IP=$K8S_IP + echo "Using K8S_IP found. IP: $IP and namespace: $NAMESPACE" + fi +else + echo "IP ($IP) and NAMESPACE ($NAMESPACE) must be set" + exit -1 +fi + + +kubectl $KUBECONFIG -n $NAMESPACE get ing|grep -v NAME|awk "{print \"$IP \"\$3}" >> /etc/hosts diff --git a/helm/scripts/uninstall_capif.sh b/helm/scripts/uninstall_capif.sh new file mode 100755 index 0000000000000000000000000000000000000000..bacd0e0f2a1a6c31b978c6d17847221e069125c3 --- /dev/null +++ b/helm/scripts/uninstall_capif.sh @@ -0,0 +1,60 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +help() { + echo "Usage: $1 " + echo " -y : Force uninstall component" + echo " -h : show this help" + exit 1 +} + +export FORCE=0 +# Read params +while getopts ":yh" opt; do + case $opt in + y) + FORCE=1 + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [ "$FORCE" == "0" ]; then + # Function to display a warning message + warning_message() { + echo "WARNING: This uninstallation process is irreversible." + echo "All data associated with CAPIF service will be permanently lost." + echo "Are you sure you want to continue? (yes/no)" + } + + # Display the warning message + warning_message + + # Read the user input + read -r USER_INPUT + + # Check if the user confirmed the uninstallation + if [ "$USER_INPUT" != "yes" ]; then + echo "Uninstallation aborted by the user." + exit 1 + fi +else + echo "Forced uninstall" +fi +# Proceed with the uninstallation process +echo "Proceeding with uninstallation..." + +helm $KUBECONFIG uninstall $CAPIF_NAME_VERSION_CHART -n $CAPIF_NAMESPACE || echo "$CAPIF_NAME_VERSION_CHART is not present" +kubectl $KUBECONFIG delete namespace $CAPIF_NAMESPACE || echo "$CAPIF_NAMESPACE is not present" + +echo "Uninstallation complete. The CAPIF service and all associated data have been removed." \ No newline at end of file diff --git a/helm/scripts/uninstall_monitoring.sh b/helm/scripts/uninstall_monitoring.sh new file mode 100755 index 0000000000000000000000000000000000000000..aff1706b20e584e11ae4b29f4c2c9e8ad6fc2280 --- /dev/null +++ b/helm/scripts/uninstall_monitoring.sh @@ -0,0 +1,60 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +help() { + echo "Usage: $1 " + echo " -y : Force uninstall component" + echo " -h : show this help" + exit 1 +} + +export FORCE=0 +# Read params +while getopts ":yh" opt; do + case $opt in + y) + FORCE=1 + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [ "$FORCE" == "0" ]; then + # Function to display a warning message + warning_message() { + echo "WARNING: This uninstallation process is irreversible." + echo "All data associated with CAPIF service will be permanently lost." + echo "Are you sure you want to continue? (yes/no)" + } + + # Display the warning message + warning_message + + # Read the user input + read -r USER_INPUT + + # Check if the user confirmed the uninstallation + if [ "$USER_INPUT" != "yes" ]; then + echo "Uninstallation aborted by the user." + exit 1 + fi +else + echo "Forced uninstall" +fi +# Proceed with the uninstallation process +echo "Proceeding with uninstallation..." + +helm $KUBECONFIG uninstall $MONITORING_SERVICE_NAME -n $MONITORING_NAMESPACE || echo "$MONITORING_SERVICE_NAME is not present" +kubectl $KUBECONFIG delete namespace $MONITORING_NAMESPACE || echo "$MONITORING_NAMESPACE is not present" + +echo "Uninstallation complete. The Monitoring service and all associated data have been removed." \ No newline at end of file diff --git a/helm/scripts/uninstall_vault.sh b/helm/scripts/uninstall_vault.sh new file mode 100755 index 0000000000000000000000000000000000000000..cb9535f67569aedb36052cbef522fb8232268ede --- /dev/null +++ b/helm/scripts/uninstall_vault.sh @@ -0,0 +1,62 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/variables.sh + +help() { + echo "Usage: $1 " + echo " -y : Force uninstall component" + echo " -h : show this help" + exit 1 +} + +export FORCE=0 +# Read params +while getopts ":yh" opt; do + case $opt in + y) + FORCE=1 + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [ "$FORCE" == "0" ]; then + # Function to display a warning message + warning_message() { + echo "WARNING: This uninstallation process is irreversible." + echo "All data associated with Vault service will be permanently lost." + echo "Are you sure you want to continue? (yes/no)" + } + + # Display the warning message + warning_message + + # Read the user input + read -r USER_INPUT + + # Check if the user confirmed the uninstallation + if [ "$USER_INPUT" != "yes" ]; then + echo "Uninstallation aborted by the user." + exit 1 + fi +else + echo "Forced uninstall" +fi + +# Proceed with the uninstallation process +echo "Proceeding with uninstallation..." + +helm $KUBECONFIG uninstall $VAULT_SERVICE_NAME -n $VAULT_NAMESPACE +kubectl $KUBECONFIG delete job $VAULT_JOB_NAME -n $VAULT_NAMESPACE || echo "No vault $VAULT_JOB_NAME job present" +kubectl $KUBECONFIG delete namespace $VAULT_NAMESPACE + +echo "Uninstallation complete. The Vault service and all associated data have been removed." \ No newline at end of file diff --git a/helm/scripts/variables.sh b/helm/scripts/variables.sh new file mode 100755 index 0000000000000000000000000000000000000000..2abf7de3400a54b52719fe3c144d006eddbef0fd --- /dev/null +++ b/helm/scripts/variables.sh @@ -0,0 +1,189 @@ +#!/bin/bash + +# Use custom kubeconfig. If you set here the path to a kubeconfig file it will be used in installation/uninstallation scripts +export CUSTOM_KUBECONFIG="" +if [ -z "$CUSTOM_KUBECONFIG" ]; then + echo "The variable CUSTOM_KUBECONFIG is empty. Using default k8s environment..." + if [ -n "$KUBECONFIG" ]; then + CUSTOM_KUBECONFIG="--kubeconfig $KUBECONFIG" + echo "Using DEFAULT_KUBECONFIG $CUSTOM_KUBECONFIG" + fi +else + CUSTOM_KUBECONFIG="--kubeconfig $CUSTOM_KUBECONFIG" + echo "The variable CUSTOM_KUBECONFIG is not empty. Its value is: $CUSTOM_KUBECONFIG" +fi + +# timestap to use along scripts +export timestamp=$(date +"%Y%m%d_%H%M%S") + +# k8s public ip. NONE will indicate no local register service DNS resolution to reach CCF, empty value will try to get ip of ingress-nginx-controller NodePort +# and any other vaule will set resolution to K8S_IP set for CAPIF_HOSTNAME. +export K8S_IP="" + +# Directories variables setup (no modification needed) +export SCRIPTS_DIR=$(dirname "$(readlink -f "$0")") +export HELM_DIR=$(dirname "$SCRIPTS_DIR") +export CAPIF_BASE_DIR=$(dirname "$HELM_DIR") + +# Print scripts directory +echo "The /helm/scripts directory is: $SCRIPTS_DIR" +echo "The /helm directory is: $HELM_DIR" +echo "The base directory is: $CAPIF_BASE_DIR" + +# Configuration needed before use installation/uninstallation scripts + +# Vault installation variables +## Vault configuration +export VAULT_HOSTNAME=vault.testbed.develop +export VAULT_NAMESPACE=ocf-vault +export VAULT_SERVICE_NAME='vault' +export LABEL_TO_CHECK="app.kubernetes.io/name" +## File to store key and token +export VAULT_FILE="$HELM_DIR/vault_keys.txt" +## Vault domains to be included +export DOMAIN1=*.testbed.pre-production +export DOMAIN2=*.testbed.validation +export DOMAIN3=*.testbed.develop +## Vault Storage Configuration +export VAULT_STORAGE_CLASS=nfs-01 +export VAULT_STORAGE_SIZE=10Gi +## Vault configuration job +VAULT_JOB_NAME=vault-pki + +# Monitoring installation variables +## Prometheus Hostname to be used at ingress configuration +export PROMETHEUS_HOSTNAME=prometheus.testbed.develop +export MONITORING_NAMESPACE=monitoring +export MONITORING_SERVICE_NAME=monitoring +export MONITORING_SNOOKER_ENABLED=false + +# OpenCAPIF deployment variables +export CAPIF_RESOURCES_RESERVE="YES" +export CAPIF_RESOURCES_LIMITS_CPU=200m +export CAPIF_RESOURCES_LIMITS_MEMORY=256Mi +export CAPIF_RESOURCES_REQUESTS_CPU=1m +export CAPIF_RESOURCES_REQUESTS_MEMORY=1Mi +## Storage Class +export CAPIF_STORAGE_CLASS=nfs-01 +export CAPIF_STORAGE_ACCESS_MODE="ReadWriteMany" +export CAPIF_GRAFANA_STORAGE_SIZE=10Gi +export CAPIF_LOKI_STORAGE_SIZE=100Mi +export CAPIF_MONGO_STORAGE_SIZE=8Gi +export CAPIF_MONGO_REGISTER_STORAGE_SIZE=8Gi +export CAPIF_TEMPO_STORAGE_SIZE=3Gi +## Register and Capif hostname to be deployed +export CAPIF_HOSTNAME="capif.testbed.develop" +export REGISTER_HOSTNAME="register.testbed.develop" +## namespace to use +export CAPIF_NAMESPACE=ocf-capif +## version to be used on deployment +export CAPIF_NAME_VERSION_CHART=ocf-release1 +## Configuration of endpoints in ingress for grafana, mock-server and both mongo express instances. +### this configuration is used to add this script to ocf-mon-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN mock-server-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN mongo-express-register-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN mongo-express-$CAPIF_CI_ENV_ENDPOINT.$CAPIF_DOMAIN +export CAPIF_CI_ENV_ENDPOINT=capif +### Domain to ve used in grafana, mock-server and both mongo express instances. +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" +### 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 +export PROMETHEUS_URL="http://$MONITORING_SERVICE_NAME-prometheus.$MONITORING_NAMESPACE.svc.cluster.local:9090" +## vault capif configuration +export VAULT_INTERNAL_HOSTNAME="$VAULT_SERVICE_NAME.$VAULT_NAMESPACE.svc.cluster.local" +export VAULT_PORT="8200" +export VAULT_ACCESS_TOKEN="dev-only-token" +## Only for testing purpouses, configuration of mock-server port +export MOCK_SERVER_PORT="9100" + +######### 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 + VAULT_ACCESS_TOKEN=$(awk '/Initial Root Token/{ print $4 }' $VAULT_FILE) + echo "$VAULT_FILE exists and has content." +else + echo "$VAULT_FILE not exists or content is empty." +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 + echo "K8S_IP value is NONE. Register service will not have local DNS resolution" +elif [ -z "$K8S_IP" ]; then + K8S_IP=$(kubectl $KUBECONFIG get svc -A | grep ingress-nginx-controller | awk '/NodePort/{ print $4 }') + echo "K8S_IP value will be $K8S_IP" +fi + +capif_services=("fluentbit" +"grafana" +"loki" +"mock-server" +"mongo" +"mongo-express" +"mongo-register" +"mongo-register-express" +"nginx" +"ocf-access-control-policy" +"ocf-api-invocation-logs" +"ocf-api-invoker-management" +"ocf-api-provider-management" +"ocf-auditing-api-logs" +"ocf-discover-service-api" +"ocf-events" +"ocf-helper" +"ocf-publish-service-api" +"ocf-register" +"ocf-routing-info" +"ocf-security" +"otelcollector" +"redis" +"renderer") + +if [ -n "$CAPIF_STORAGE_ACCESS_MODE" ]; then + CAPIF_STORAGE_ACCESS_MODE="--set mongo.persistence.accessModes[0]=$CAPIF_STORAGE_ACCESS_MODE + --set mongo-register.persistence.accessModes[0]=$CAPIF_STORAGE_ACCESS_MODE + --set loki.persistence.accessModes[0]=$CAPIF_STORAGE_ACCESS_MODE + --set grafana.persistence.accessModes[0]=$CAPIF_STORAGE_ACCESS_MODE + " +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 + --set mongo-register.securityContext.runAsUser=0 + --set grafana.securityContext.runAsUser=0" +fi + +export SED_CMD=sed +if [[ "$OSTYPE" == "darwin"* ]]; then + # Require gnu-sed. + if ! [ -x "$(command -v gsed)" ]; then + echo "Error: 'gsed' is not istalled." >&2 + echo "If you are using Homebrew, install with 'brew install gnu-sed'." >&2 + exit 1 + fi + SED_CMD=gsed +fi + +if [ "$CAPIF_RESOURCES_RESERVE" == "NO" ]; then + echo "No Limits will be requested on deployment" + CAPIF_RESOURCES_RESERVE="" + ${SED_CMD} -i "s/^resources:.*/resources: {}/g" $HELM_DIR/**/**/**/values.yaml + ${SED_CMD} -i "s/^ limits:/# limits:/g" $HELM_DIR/**/**/**/values.yaml + ${SED_CMD} -i "s/^ cpu:/# cpu:/g" $HELM_DIR/**/**/**/values.yaml + ${SED_CMD} -i "s/^ memory:/# memory:/g" $HELM_DIR/**/**/**/values.yaml + ${SED_CMD} -i "s/^ requests:/# requests:/g" $HELM_DIR/**/**/**/values.yaml +else + CAPIF_RESOURCES_RESERVE="" + for service in "${capif_services[@]}"; do + CAPIF_RESOURCES_RESERVE="$CAPIF_RESOURCES_RESERVE --set $service.resources.limits.cpu=$CAPIF_RESOURCES_LIMITS_CPU + --set $service.resources.limits.memory=$CAPIF_RESOURCES_LIMITS_MEMORY + --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 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 e0046a76daea25433263092830c0b5e9395780c8..dd0e2a9e7892c7379f62964a2f181f7327bd1220 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/FILES @@ -1,45 +1,71 @@ .dockerignore .gitignore +.openapi-generator-ignore .travis.yml Dockerfile README.md +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/security_controller_.py +api_invoker_management/controllers/individual_api_invoker_enrolment_details_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_invoker_enrolment_details.py -api_invoker_management/models/base_model_.py +api_invoker_management/models/api_invoker_enrolment_details_patch.py +api_invoker_management/models/api_list.py +api_invoker_management/models/api_status.py +api_invoker_management/models/base_model.py +api_invoker_management/models/civic_address.py api_invoker_management/models/communication_type.py -api_invoker_management/models/communication_type_any_of.py api_invoker_management/models/custom_operation.py api_invoker_management/models/data_format.py -api_invoker_management/models/data_format_any_of.py +api_invoker_management/models/ellipsoid_arc.py +api_invoker_management/models/gad_shape.py +api_invoker_management/models/geographic_area.py +api_invoker_management/models/geographical_coordinates.py api_invoker_management/models/interface_description.py api_invoker_management/models/invalid_param.py +api_invoker_management/models/ip_addr_range.py +api_invoker_management/models/ipv4_address_range.py +api_invoker_management/models/ipv6_addr1.py +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/onboarding_information.py api_invoker_management/models/onboarding_notification.py api_invoker_management/models/operation.py -api_invoker_management/models/operation_any_of.py +api_invoker_management/models/point.py +api_invoker_management/models/point_altitude.py +api_invoker_management/models/point_altitude_uncertainty.py +api_invoker_management/models/point_uncertainty_circle.py +api_invoker_management/models/point_uncertainty_ellipse.py +api_invoker_management/models/polygon.py api_invoker_management/models/problem_details.py api_invoker_management/models/protocol.py -api_invoker_management/models/protocol_any_of.py api_invoker_management/models/published_api_path.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/security_method_any_of.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/supported_gad_shapes.py +api_invoker_management/models/uncertainty_ellipse.py +api_invoker_management/models/uncertainty_ellipsoid.py 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/typing_utils.py api_invoker_management/util.py -git_push.sh requirements.txt setup.py test-requirements.txt diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/VERSION index 4b448de535c7dd619da0df6d8221995dbd5d118a..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/Dockerfile b/services/TS29222_CAPIF_API_Invoker_Management_API/Dockerfile index ac8732bcd88a9d3d26a6a0d7aacb78fdfaa749e2..2d8bbe74dae1305697234308fd67e65f05f82920 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/Dockerfile +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/Dockerfile @@ -1,15 +1,21 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/requirements.txt -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir -r requirements.txt -RUN apk add redis -RUN apk add jq -RUN apk add curl +RUN apt-get update && apt-get install -y --no-install-recommends jq curl redis COPY . /usr/src/app 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 9d55bc5adba29d09c93b1e1909bb79bea88aaaff..e44c08e4776684adbfc29617e7cb261c7a2434fb 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 @@ -1,24 +1,27 @@ #!/usr/bin/env python3 -import connexion import logging -import encoder -from flask_jwt_extended import JWTManager, jwt_required, create_access_token -from config import Config -from core.consumer_messager import Subscriber -from logging.handlers import RotatingFileHandler import os -from fluent import sender +from datetime import datetime +from logging.handlers import RotatingFileHandler + +import connexion +from flask_apscheduler import APScheduler from flask_executor import Executor -from opentelemetry.instrumentation.flask import FlaskInstrumentor +from flask_jwt_extended import JWTManager +from fluent import sender from opentelemetry import trace -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator 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.instrumentation.redis import RedisInstrumentor +from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +import encoder +from config import Config +from core.consumer_messager import Subscriber NAME = "Invoker-Service" @@ -116,8 +119,8 @@ def verbose_formatter(): with open("/usr/src/app/api_invoker_management/pubkey.pem", "rb") as pub_file: pub_data = pub_file.read() -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = encoder.CustomJSONEncoder app.add_api('openapi.yaml', arguments={'title': 'CAPIF_API_Invoker_Management_API'}, pythonic_params=True) @@ -137,7 +140,11 @@ if monitoring_value == "true": executor = Executor(app.app) subscriber = Subscriber() - -@app.app.before_first_request -def create_listener_message(): - executor.submit(subscriber.listen) \ No newline at end of file +scheduler = APScheduler() +scheduler.init_app(app.app) +scheduler.start() + +@scheduler.task('date', id='listener', next_run_time=datetime.now()) +def up_listener(): + with scheduler.app.app_context(): + executor.submit(subscriber.listen()) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/config.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/config.py index 01f9914cc141eb3c49fd73506e9b1c5470edd781..abfa40820dc99bf2c64c7bf0a31994eedc414e03 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/config.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): 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/default_controller.py index f2b0df69780e4ebde99f3df1a43fb34bca9805b9..c080cd19675cf0f0ee67e7bbdeec4ca7c57d8a70 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/default_controller.py @@ -1,14 +1,13 @@ -import connexion - -from ..models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 -from ..core.apiinvokerenrolmentdetails import InvokerManagementOperations -from ..core.validate_user import ControlAccess +from functools import wraps -from flask import Response, request, current_app -from flask_jwt_extended import jwt_required, get_jwt_identity from cryptography import x509 from cryptography.hazmat.backends import default_backend -from functools import wraps +from flask import request, current_app +from flask_jwt_extended import jwt_required, get_jwt_identity + +from ..core.apiinvokerenrolmentdetails import InvokerManagementOperations +from ..core.validate_user import ControlAccess +from ..models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 invoker_operations = InvokerManagementOperations() valid_user = ControlAccess() @@ -70,8 +69,9 @@ def onboarded_invokers_onboarding_id_put(onboarding_id, body): # noqa: E501 :rtype: APIInvokerEnrolmentDetails """ current_app.logger.info("Updating invoker") - if connexion.request.is_json: - body = APIInvokerEnrolmentDetails.from_dict(connexion.request.get_json()) # noqa: E501 + if request.is_json: + body = APIInvokerEnrolmentDetails.from_dict(request.get_json()) # noqa: E501 + res = invoker_operations.update_apiinvokerenrolmentdetail(onboarding_id,body) return res @@ -92,10 +92,10 @@ def onboarded_invokers_post(body): # noqa: E501 identity = get_jwt_identity() username, uuid = identity.split() - if connexion.request.is_json: - body = APIInvokerEnrolmentDetails.from_dict(connexion.request.get_json()) # noqa: E501 - 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/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 new file mode 100644 index 0000000000000000000000000000000000000000..9cce3a04fe77786a839cab01f8389533d38c37e8 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/individual_api_invoker_enrolment_details_controller.py @@ -0,0 +1,18 @@ +from api_invoker_management.models.api_invoker_enrolment_details_patch import APIInvokerEnrolmentDetailsPatch # noqa: E501 + + +def modify_ind_api_invoke_enrolment(onboarding_id, api_invoker_enrolment_details_patch): # 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]] + """ + if request.is_json: + api_invoker_enrolment_details_patch = APIInvokerEnrolmentDetailsPatch.from_dict(request.get_json()) # noqa: E501 + return 'do some magic!' 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 new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller.py @@ -0,0 +1,2 @@ + + 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 bcf1905da8b4f3a5901a833fad70112740877c8b..fcc1a1883a7ea843d2a85166a900724a9b6c6310 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 @@ -1,32 +1,38 @@ -import rfc3987 -from pymongo import ReturnDocument -import secrets -import requests -from .responses import bad_request_error, not_found_error, forbidden_error, internal_server_error, make_response -from flask import current_app, Flask, Response import json +import os +import secrets from datetime import datetime -from ..util import dict_to_camel_case, clean_empty, serialize_clean_camel_case + +import requests +import rfc3987 +from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails +from flask import current_app, Response +from pymongo import ReturnDocument + 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, not_found_error, forbidden_error, internal_server_error, make_response from ..config import Config -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails -from .redis_event import RedisEvent -from .publisher import Publisher +from ..util import dict_to_camel_case, serialize_clean_camel_case publisher_ops = Publisher() + + class InvokerManagementOperations(Resource): def __check_api_invoker_id(self, api_invoker_id): current_app.logger.debug("Cheking api invoker id") mycol = self.db.get_col_by_name(self.db.invoker_enrolment_details) - my_query = {'api_invoker_id':api_invoker_id} + my_query = {'api_invoker_id': api_invoker_id} old_values = mycol.find_one(my_query) if old_values is None: current_app.logger.error("Not found api invoker id") - return not_found_error(detail="Please provide an existing Network App ID", cause= "Not exist Network App ID" ) + return not_found_error(detail="Please provide an existing Network App ID", cause="Not exist Network App ID") return old_values @@ -35,13 +41,14 @@ class InvokerManagementOperations(Resource): url = f"http://{self.config['ca_factory']['url']}:{self.config['ca_factory']['port']}/v1/pki_int/sign/my-ca" headers = {'X-Vault-Token': self.config['ca_factory']['token']} data = { - 'format':'pem_bundle', + 'format': 'pem_bundle', 'ttl': '43000h', 'csr': publick_key, 'common_name': invoker_id } - response = requests.request("POST", url, headers=headers, data=data, verify = self.config["ca_factory"].get("verify", False)) + response = requests.request("POST", url, headers=headers, data=data, + verify=self.config["ca_factory"].get("verify", False)) print(response) response_payload = json.loads(response.text) @@ -52,51 +59,57 @@ class InvokerManagementOperations(Resource): self.auth_manager = AuthManager() self.config = Config().get_config() - def add_apiinvokerenrolmentdetail(self, apiinvokerenrolmentdetail, username, uuid): mycol = self.db.get_col_by_name(self.db.invoker_enrolment_details) - #try: + # try: current_app.logger.debug("Creating invoker resource") - res = mycol.find_one({'onboarding_information.api_invoker_public_key': apiinvokerenrolmentdetail.onboarding_information.api_invoker_public_key}) + res = mycol.find_one({'onboarding_information.api_invoker_public_key': + apiinvokerenrolmentdetail.onboarding_information.api_invoker_public_key}) if res is not None: - current_app.logger.error("Generating forbbiden error, invoker registered") - return forbidden_error(detail= "Invoker already registered", cause = "Identical invoker public key") + current_app.logger.error( + "Generating forbbiden error, invoker registered") + return forbidden_error(detail="Invoker already registered", cause="Identical invoker public key") if rfc3987.match(apiinvokerenrolmentdetail.notification_destination, rule="URI") is None: 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"}]) + return bad_request_error(detail="Bad Param", cause="Detected Bad formar of param", invalid_params=[{"param": "notificationDestination", "reason": "Not valid URL format"}]) current_app.logger.debug("Signing Certificate") api_invoker_id = 'INV'+str(secrets.token_hex(15)) - cert = self.__sign_cert(apiinvokerenrolmentdetail.onboarding_information.api_invoker_public_key, api_invoker_id) + cert = self.__sign_cert( + apiinvokerenrolmentdetail.onboarding_information.api_invoker_public_key, api_invoker_id) apiinvokerenrolmentdetail.api_invoker_id = api_invoker_id current_app.logger.debug(cert) - apiinvokerenrolmentdetail.onboarding_information.api_invoker_certificate = cert['data']['certificate'] + apiinvokerenrolmentdetail.onboarding_information.api_invoker_certificate = cert[ + 'data']['certificate'] # Onboarding Date Record invoker_dict = apiinvokerenrolmentdetail.to_dict() invoker_dict["onboarding_date"] = datetime.now() - invoker_dict["username"]=username - invoker_dict["uuid"]=uuid + invoker_dict["username"] = username + invoker_dict["uuid"] = uuid mycol.insert_one(invoker_dict) current_app.logger.debug("Invoker inserted in database") current_app.logger.debug("Netapp onboarded sucessfuly") - self.auth_manager.add_auth_invoker(cert['data']['certificate'], api_invoker_id) + self.auth_manager.add_auth_invoker( + cert['data']['certificate'], api_invoker_id) - res = make_response(object=serialize_clean_camel_case(apiinvokerenrolmentdetail), status=201) - res.headers['Location'] = "/api-invoker-management/v1/onboardedInvokers/" + str(api_invoker_id) + res = make_response(object=serialize_clean_camel_case( + apiinvokerenrolmentdetail), status=201) + res.headers['Location'] = f"https://{os.getenv("CAPIF_HOSTNAME")}/api-invoker-management/v1/onboardedInvokers/{str(api_invoker_id)}" if res.status_code == 201: current_app.logger.info("Invoker Created") - RedisEvent("API_INVOKER_ONBOARDED", "apiInvokerIds", [str(api_invoker_id)]).send_event() + RedisEvent("API_INVOKER_ONBOARDED", + api_invoker_ids=[str(api_invoker_id)]).send_event() return res def update_apiinvokerenrolmentdetail(self, onboard_id, apiinvokerenrolmentdetail): @@ -111,16 +124,23 @@ class InvokerManagementOperations(Resource): return result 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"]) - apiinvokerenrolmentdetail.onboarding_information.api_invoker_certificate = cert['data']['certificate'] - self.auth_manager.update_auth_invoker(cert['data']["certificate"], onboard_id) + cert = self.__sign_cert( + apiinvokerenrolmentdetail.onboarding_information.api_invoker_public_key, result["api_invoker_id"]) + apiinvokerenrolmentdetail.onboarding_information.api_invoker_certificate = cert[ + 'data']['certificate'] + self.auth_manager.update_auth_invoker( + cert['data']["certificate"], onboard_id) apiinvokerenrolmentdetail_update = apiinvokerenrolmentdetail.to_dict() apiinvokerenrolmentdetail_update = { key: value for key, value in apiinvokerenrolmentdetail_update.items() if value is not None } - result = mycol.find_one_and_update(result, {"$set":apiinvokerenrolmentdetail_update}, projection={'_id': 0},return_document=ReturnDocument.AFTER ,upsert=False) + result = mycol.find_one_and_update(result, + {"$set": apiinvokerenrolmentdetail_update}, + projection={'_id': 0}, + return_document=ReturnDocument.AFTER, + upsert=False) result = { key: value for key, value in result.items() if value is not None @@ -130,10 +150,12 @@ class InvokerManagementOperations(Resource): invoker_updated = APIInvokerEnrolmentDetails().from_dict(dict_to_camel_case(result)) - res = make_response(object=serialize_clean_camel_case(invoker_updated), status=200) + res = make_response(object=serialize_clean_camel_case( + invoker_updated), status=200) if res.status_code == 200: current_app.logger.info("Invoker Updated") - RedisEvent("API_INVOKER_UPDATED", "apiInvokerIds", [onboard_id]).send_event() + RedisEvent("API_INVOKER_UPDATED", + api_invoker_ids=[onboard_id]).send_event() return res except Exception as e: @@ -151,22 +173,25 @@ class InvokerManagementOperations(Resource): if isinstance(result, Response): return result - mycol.delete_one({'api_invoker_id':onboard_id}) + mycol.delete_one({'api_invoker_id': onboard_id}) self.auth_manager.remove_auth_invoker(onboard_id) current_app.logger.debug("Invoker resource removed from database") current_app.logger.debug("Netapp offboarded sucessfuly") - out = "The Network App matching onboardingId " + onboard_id + " was offboarded." + out = "The Network App matching onboardingId " + onboard_id + " was offboarded." res = make_response(out, status=204) if res.status_code == 204: current_app.logger.info("Invoker Removed") - RedisEvent("API_INVOKER_OFFBOARDED", "apiInvokerIds", [onboard_id]).send_event() - publisher_ops.publish_message("internal-messages", f"invoker-removed:{onboard_id}") + RedisEvent("API_INVOKER_OFFBOARDED", + api_invoker_ids=[onboard_id]).send_event() + RedisInternalEvent("INVOKER-REMOVED", + "invokerId", + { + "api_invoker_id": onboard_id + }).send_event() return res except Exception as e: exception = "An exception occurred in remove invoker" current_app.logger.error(exception + "::" + str(e)) return internal_server_error(detail=exception, cause=str(e)) - - diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/auth_manager.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/auth_manager.py index c3736a6d4e2e95d58ab6a96c1e62fe42404538f1..4614d64febc873684f9326b77b3a71307d23c9e8 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/auth_manager.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/auth_manager.py @@ -1,5 +1,6 @@ from cryptography import x509 from cryptography.hazmat.backends import default_backend + from .resources import Resource diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/consumer_messager.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/consumer_messager.py index 26f8d6b025229c757bd7e909699c337d02a4a53d..f6243656cc59f0269d8ab042a12cc1fec0df0f35 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/consumer_messager.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/consumer_messager.py @@ -1,8 +1,12 @@ # subscriber.py +import json + import redis -from .invoker_internal_ops import InvokerInternalOperations from flask import current_app +from .invoker_internal_ops import InvokerInternalOperations + + class Subscriber(): def __init__(self): @@ -14,13 +18,38 @@ class Subscriber(): def listen(self): for raw_message in self.p.listen(): if raw_message["type"] == "message" and raw_message["channel"].decode('utf-8') == "internal-messages": - message, invoker_id, api_id = raw_message["data"].decode('utf-8').split(":") - if message == "security-context-created": - current_app.logger.debug("Internal message received, updating Api list on invoker") - self.invoker_ops.update_services_list(invoker_id, api_id) - if message == "security-context-removed": - current_app.logger.debug("Internal message received, removing service in Api list of invoker") - self.invoker_ops.remove_services_list(invoker_id, api_id) - - - + current_app.logger.info("New internal event received") + internal_redis_event = json.loads( + raw_message["data"].decode('utf-8')) + if internal_redis_event.get('event') == "SECURITY-CONTEXT-CREATED": + current_app.logger.debug( + "Internal message received, updating Api list on invoker") + security_context_information = internal_redis_event.get( + 'information', None) + if security_context_information is not None: + api_invoker_id = security_context_information.get( + 'api_invoker_id') + api_id = security_context_information.get('api_id') + self.invoker_ops.update_services_list( + api_invoker_id, api_id) + elif internal_redis_event.get('event') == "SECURITY-CONTEXT-REMOVED": + current_app.logger.debug( + "Internal message received, removing service in Api list of invoker") + security_context_information = internal_redis_event.get( + 'information', None) + if security_context_information is not None: + api_invoker_id = security_context_information.get( + 'api_invoker_id') + api_id = security_context_information.get('api_id') + self.invoker_ops.remove_services_list( + api_invoker_id, api_id) + # elif internal_redis_event.get('event') == "INVOKER-REMOVED": + # api_invoker_id = internal_redis_event.get( + # 'information', {"api_invoker_id": None}).get('api_invoker_id') + # if api_invoker_id is not None: + # self.acls_ops.remove_invoker_acl(api_invoker_id) + # elif internal_redis_event.get('event') == "PROVIDER-REMOVED": + # aef_ids = internal_redis_event.get( + # 'information', {"aef_ids": []}).get('aef_ids') + # if len(aef_ids) > 0: + # self.acls_ops.remove_provider_acls(aef_ids[0]) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/redis_event.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/redis_event.py index aadbdbb6b3116cf288648de41effdb12b9ca9143..f80e6b2e666574188740a99a0da0837ea899e01d 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/redis_event.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/redis_event.py @@ -1,12 +1,20 @@ -from ..encoder import JSONEncoder -from .publisher import Publisher import json +from .publisher import Publisher +from ..encoder import JSONEncoder + publisher_ops = Publisher() class RedisEvent(): - def __init__(self, event, event_detail_key=None, information=None) -> None: + def __init__(self, + event, + service_api_descriptions=None, + api_ids=None, + api_invoker_ids=None, + acc_ctrl_pol_list=None, + invocation_logs=None, + api_topo_hide=None) -> None: self.EVENTS_ENUM = [ 'SERVICE_API_AVAILABLE', 'SERVICE_API_UNAVAILABLE', @@ -27,9 +35,23 @@ class RedisEvent(): self.redis_event = { "event": event } - if event_detail_key != None and information != None: - self.redis_event['key'] = event_detail_key - self.redis_event['information'] = information + # Add event filter keys to an auxiliary object + event_detail = { + "serviceAPIDescriptions": service_api_descriptions, + "apiIds": api_ids, + "apiInvokerIds": api_invoker_ids, + "accCtrlPolList": acc_ctrl_pol_list, + "invocationLogs": invocation_logs, + "apiTopoHide": api_topo_hide + } + + # Filter keys with not None values + filtered_event_detail = {k: v for k, + v in event_detail.items() if v is not None} + + # If there are valid values then add to redis event. + if filtered_event_detail: + self.redis_event["event_detail"] = filtered_event_detail def to_string(self): return json.dumps(self.redis_event, cls=JSONEncoder) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/redis_internal_event.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/redis_internal_event.py new file mode 100644 index 0000000000000000000000000000000000000000..50e343424b8498d32078648978c719c923304353 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/redis_internal_event.py @@ -0,0 +1,36 @@ +import json + +from .publisher import Publisher +from ..encoder import JSONEncoder + +publisher_ops = Publisher() + + +class RedisInternalEvent(): + def __init__(self, event, event_detail_key=None, information=None) -> None: + self.INTERNAL_MESSAGES = [ + 'INVOKER-REMOVED', + 'PROVIDER-REMOVED', + 'SECURITY-CONTEXT-CREATED', + 'SECURITY-CONTEXT-REMOVED', + 'create-acl', + 'remove-acl', + ] + if event not in self.INTERNAL_MESSAGES: + raise Exception( + "Internal Message (" + event + ") is not on INTERNAL_MESSAGES enum (" + ','.join(self.INTERNAL_MESSAGES) + ")") + self.redis_event = { + "event": event + } + if event_detail_key is not None and information is not None: + self.redis_event['key'] = event_detail_key + self.redis_event['information'] = information + + def to_string(self): + return json.dumps(self.redis_event, cls=JSONEncoder) + + def send_event(self): + publisher_ops.publish_message("internal-messages", self.to_string()) + + def __call__(self): + return self.redis_event diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/resources.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/resources.py index efbe3c2d4cf28cec298ef17b394011dcd6aa66cb..7ef0e6f20356e7712fced07b4c763bdea082d90d 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/resources.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/resources.py @@ -1,5 +1,7 @@ -from abc import ABC, abstractmethod -from db.db import MongoDatabse +from abc import ABC + +from api_invoker_management.db.db import MongoDatabse + class Resource(ABC): 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 f647dbf7b3f5ca6fa7bd36367f863ba21e99f8f4..8f975cbf426c304c4ae0681f65af67fcad9abca5 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 @@ -1,14 +1,16 @@ -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder -from flask import Response import json + +from flask import Response + +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case mimetype = "application/json" def make_response(object, status): - res = Response(json.dumps(object, cls=JSONEncoder), status=status, mimetype=mimetype) + res = Response(json.dumps(object, cls=CustomJSONEncoder), status=status, mimetype=mimetype) return res @@ -17,25 +19,25 @@ def internal_server_error(detail, cause): prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=500, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=500, mimetype=mimetype) def forbidden_error(detail, cause): prob = ProblemDetails(title="Forbidden", status=403, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=403, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=403, mimetype=mimetype) 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=JSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) 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=JSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/validate_user.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/validate_user.py index b1e7a9bf9c0bfd032b37e08ca47c2669c6999d09..1b25fd6a4cd6f01a50401fcd62dd42965631d267 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/validate_user.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/core/validate_user.py @@ -1,9 +1,11 @@ -from flask import current_app, Response import json -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder + +from flask import current_app, Response + from .resources import Resource from .responses import internal_server_error +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case @@ -21,7 +23,7 @@ class ControlAccess(Resource): if cert_entry["cert_signature"] != cert_signature: prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype="application/json") except Exception as e: exception = "An exception occurred in validate invoker" diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/db/db.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/db/db.py index 1ef0262504047495eba1c6f05d4d2e3de8d5391d..92bf7d6d2fb4728a53ff6d6e799c20797cb6ac04 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/db/db.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/db/db.py @@ -1,10 +1,11 @@ +import os import time -from pymongo import MongoClient -from pymongo.errors import AutoReconnect -from config import Config + +from api_invoker_management.config import Config from bson.codec_options import CodecOptions -import os from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from pymongo import MongoClient +from pymongo.errors import AutoReconnect monitoring_value = os.environ.get("MONITORING", "").lower() if monitoring_value == "true": 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 80bad8fa9220ab873e044b7adc0a849746088ad5..9c06b11ba88238ed068af23376ddf006758a87b5 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,20 +1,18 @@ -from connexion.apps.flask_app import FlaskJSONEncoder -import six +from api_invoker_management.models.base_model import Model +from connexion.jsonifier import JSONEncoder -from models.base_model_ import Model - -class JSONEncoder(FlaskJSONEncoder): +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + return JSONEncoder.default(self, o) 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 1aa7151920f7bb18378ee65b526ed45649060d14..d036df693ea41dfaa3debffffad0462c1fcd8e4a 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,29 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # import models into model package -from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails -from api_invoker_management.models.aef_profile import AefProfile -from api_invoker_management.models.communication_type import CommunicationType -from api_invoker_management.models.communication_type_any_of import CommunicationTypeAnyOf -from api_invoker_management.models.custom_operation import CustomOperation -from api_invoker_management.models.data_format import DataFormat -from api_invoker_management.models.data_format_any_of import DataFormatAnyOf -from api_invoker_management.models.interface_description import InterfaceDescription -from api_invoker_management.models.invalid_param import InvalidParam -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.operation_any_of import OperationAnyOf -from api_invoker_management.models.problem_details import ProblemDetails -from api_invoker_management.models.protocol import Protocol -from api_invoker_management.models.protocol_any_of import ProtocolAnyOf -from api_invoker_management.models.published_api_path import PublishedApiPath -from api_invoker_management.models.resource import Resource -from api_invoker_management.models.security_method import SecurityMethod -from api_invoker_management.models.security_method_any_of import SecurityMethodAnyOf -from api_invoker_management.models.service_api_description import ServiceAPIDescription -from api_invoker_management.models.shareable_information import ShareableInformation -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 new file mode 100644 index 0000000000000000000000000000000000000000..c5b5a7d07ea7e2ef876d97837749a627c29d2890 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/aef_location.py @@ -0,0 +1,116 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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_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 23a84c93cb8a37b17d92d6899d8f5d6a538ce1ee..2556c6ecfde9e6f6f5e45790967acc3541a2abc7 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,31 +1,25 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.data_format import DataFormat -from api_invoker_management.models.interface_description import InterfaceDescription -from api_invoker_management.models.protocol import Protocol -from api_invoker_management.models.security_method import SecurityMethod -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 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.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): # noqa: E501 + 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, 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 @@ -42,6 +36,12 @@ class AefProfile(Model): :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, @@ -50,7 +50,10 @@ class AefProfile(Model): 'data_format': DataFormat, 'security_methods': List[SecurityMethod], 'domain_name': str, - 'interface_descriptions': List[InterfaceDescription] + 'interface_descriptions': List[InterfaceDescription], + 'aef_location': AefLocation, + 'service_kpis': ServiceKpis, + 'ue_ip_range': IpAddrRange } self.attribute_map = { @@ -60,7 +63,10 @@ class AefProfile(Model): 'data_format': 'dataFormat', 'security_methods': 'securityMethods', 'domain_name': 'domainName', - 'interface_descriptions': 'interfaceDescriptions' + 'interface_descriptions': 'interfaceDescriptions', + 'aef_location': 'aefLocation', + 'service_kpis': 'serviceKpis', + 'ue_ip_range': 'ueIpRange' } self._aef_id = aef_id @@ -70,6 +76,9 @@ class AefProfile(Model): self._security_methods = security_methods 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': @@ -83,7 +92,7 @@ class AefProfile(Model): return util.deserialize_model(dikt, cls) @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -94,7 +103,7 @@ class AefProfile(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -108,7 +117,7 @@ class AefProfile(Model): self._aef_id = aef_id @property - def versions(self): + def versions(self) -> List[Version]: """Gets the versions of this AefProfile. API version # noqa: E501 @@ -119,7 +128,7 @@ class AefProfile(Model): return self._versions @versions.setter - def versions(self, versions): + def versions(self, versions: List[Version]): """Sets the versions of this AefProfile. API version # noqa: E501 @@ -135,7 +144,7 @@ class AefProfile(Model): self._versions = versions @property - def protocol(self): + def protocol(self) -> Protocol: """Gets the protocol of this AefProfile. @@ -145,7 +154,7 @@ class AefProfile(Model): return self._protocol @protocol.setter - def protocol(self, protocol): + def protocol(self, protocol: Protocol): """Sets the protocol of this AefProfile. @@ -156,7 +165,7 @@ class AefProfile(Model): self._protocol = protocol @property - def data_format(self): + def data_format(self) -> DataFormat: """Gets the data_format of this AefProfile. @@ -166,7 +175,7 @@ class AefProfile(Model): return self._data_format @data_format.setter - def data_format(self, data_format): + def data_format(self, data_format: DataFormat): """Sets the data_format of this AefProfile. @@ -177,7 +186,7 @@ class AefProfile(Model): self._data_format = data_format @property - def security_methods(self): + def security_methods(self) -> List[SecurityMethod]: """Gets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -188,7 +197,7 @@ class AefProfile(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + def security_methods(self, security_methods: List[SecurityMethod]): """Sets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -202,7 +211,7 @@ class AefProfile(Model): self._security_methods = security_methods @property - def domain_name(self): + def domain_name(self) -> str: """Gets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -213,7 +222,7 @@ class AefProfile(Model): return self._domain_name @domain_name.setter - def domain_name(self, domain_name): + def domain_name(self, domain_name: str): """Sets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -225,7 +234,7 @@ class AefProfile(Model): self._domain_name = domain_name @property - def interface_descriptions(self): + def interface_descriptions(self) -> List[InterfaceDescription]: """Gets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -236,7 +245,7 @@ class AefProfile(Model): return self._interface_descriptions @interface_descriptions.setter - def interface_descriptions(self, interface_descriptions): + def interface_descriptions(self, interface_descriptions: List[InterfaceDescription]): """Sets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -248,3 +257,66 @@ class AefProfile(Model): 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 + + @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/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 b7667b5305f7992a9497fdb2f43ee54fa020391d..c29d55155cb3360795ac59ca0328b52736856503 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,17 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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 - +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 -from api_invoker_management.models.service_api_description import ServiceAPIDescription # noqa: E501 from api_invoker_management.models.websock_notif_config import WebsockNotifConfig # noqa: E501 -import re # noqa: E501 class APIInvokerEnrolmentDetails(Model): @@ -20,7 +15,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, 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): # noqa: E501 """APIInvokerEnrolmentDetails - a model defined in OpenAPI :param api_invoker_id: The api_invoker_id of this APIInvokerEnrolmentDetails. # noqa: E501 @@ -34,9 +29,11 @@ class APIInvokerEnrolmentDetails(Model): :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: List[ServiceAPIDescription] + :type api_list: APIList :param api_invoker_information: The api_invoker_information of this APIInvokerEnrolmentDetails. # noqa: E501 :type api_invoker_information: str + :param exp_time: The exp_time of this APIInvokerEnrolmentDetails. # noqa: E501 + :type exp_time: datetime :param supported_features: The supported_features of this APIInvokerEnrolmentDetails. # noqa: E501 :type supported_features: str """ @@ -46,8 +43,9 @@ class APIInvokerEnrolmentDetails(Model): 'notification_destination': str, 'request_test_notification': bool, 'websock_notif_config': WebsockNotifConfig, - 'api_list': List[ServiceAPIDescription], + 'api_list': APIList, 'api_invoker_information': str, + 'exp_time': datetime, 'supported_features': str } @@ -59,6 +57,7 @@ class APIInvokerEnrolmentDetails(Model): 'websock_notif_config': 'websockNotifConfig', 'api_list': 'apiList', 'api_invoker_information': 'apiInvokerInformation', + 'exp_time': 'expTime', 'supported_features': 'supportedFeatures' } @@ -69,6 +68,7 @@ class APIInvokerEnrolmentDetails(Model): self._websock_notif_config = websock_notif_config self._api_list = api_list self._api_invoker_information = api_invoker_information + self._exp_time = exp_time self._supported_features = supported_features @classmethod @@ -83,10 +83,10 @@ class APIInvokerEnrolmentDetails(Model): return util.deserialize_model(dikt, cls) @property - def api_invoker_id(self): + 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 + 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 @@ -94,10 +94,10 @@ class APIInvokerEnrolmentDetails(Model): return self._api_invoker_id @api_invoker_id.setter - def api_invoker_id(self, api_invoker_id): + 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 + 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 @@ -106,7 +106,7 @@ class APIInvokerEnrolmentDetails(Model): self._api_invoker_id = api_invoker_id @property - def onboarding_information(self): + def onboarding_information(self) -> OnboardingInformation: """Gets the onboarding_information of this APIInvokerEnrolmentDetails. @@ -116,7 +116,7 @@ class APIInvokerEnrolmentDetails(Model): return self._onboarding_information @onboarding_information.setter - def onboarding_information(self, onboarding_information): + def onboarding_information(self, onboarding_information: OnboardingInformation): """Sets the onboarding_information of this APIInvokerEnrolmentDetails. @@ -129,7 +129,7 @@ class APIInvokerEnrolmentDetails(Model): self._onboarding_information = onboarding_information @property - def notification_destination(self): + def notification_destination(self) -> str: """Gets the notification_destination of this APIInvokerEnrolmentDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -140,7 +140,7 @@ class APIInvokerEnrolmentDetails(Model): return self._notification_destination @notification_destination.setter - def notification_destination(self, notification_destination): + 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 @@ -154,10 +154,10 @@ class APIInvokerEnrolmentDetails(Model): self._notification_destination = notification_destination @property - def request_test_notification(self): + 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 subclause 7.6. Set to false or omitted otherwise. # noqa: E501 + 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 @@ -165,10 +165,10 @@ class APIInvokerEnrolmentDetails(Model): return self._request_test_notification @request_test_notification.setter - def request_test_notification(self, request_test_notification): + 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 subclause 7.6. Set to false or omitted otherwise. # noqa: E501 + 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 @@ -177,7 +177,7 @@ class APIInvokerEnrolmentDetails(Model): self._request_test_notification = request_test_notification @property - def websock_notif_config(self): + def websock_notif_config(self) -> WebsockNotifConfig: """Gets the websock_notif_config of this APIInvokerEnrolmentDetails. @@ -187,7 +187,7 @@ class APIInvokerEnrolmentDetails(Model): return self._websock_notif_config @websock_notif_config.setter - def websock_notif_config(self, websock_notif_config): + def websock_notif_config(self, websock_notif_config: WebsockNotifConfig): """Sets the websock_notif_config of this APIInvokerEnrolmentDetails. @@ -198,35 +198,31 @@ class APIInvokerEnrolmentDetails(Model): self._websock_notif_config = websock_notif_config @property - def api_list(self): + def api_list(self) -> APIList: """Gets the api_list of this APIInvokerEnrolmentDetails. - The list of service APIs that the API Invoker is allowed to invoke # noqa: E501 :return: The api_list of this APIInvokerEnrolmentDetails. - :rtype: List[ServiceAPIDescription] + :rtype: APIList """ return self._api_list @api_list.setter - def api_list(self, api_list): + def api_list(self, api_list: APIList): """Sets the api_list of this APIInvokerEnrolmentDetails. - The list of service APIs that the API Invoker is allowed to invoke # noqa: E501 :param api_list: The api_list of this APIInvokerEnrolmentDetails. - :type api_list: List[ServiceAPIDescription] + :type api_list: APIList """ - if api_list is not None and len(api_list) < 1: - raise ValueError("Invalid value for `api_list`, number of items must be greater than or equal to `1`") # noqa: E501 self._api_list = api_list @property - def api_invoker_information(self): + 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 + 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 @@ -234,10 +230,10 @@ class APIInvokerEnrolmentDetails(Model): return self._api_invoker_information @api_invoker_information.setter - def api_invoker_information(self, api_invoker_information): + 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 + 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 @@ -246,10 +242,33 @@ class APIInvokerEnrolmentDetails(Model): self._api_invoker_information = api_invoker_information @property - def supported_features(self): + def exp_time(self) -> datetime: + """Gets the exp_time of this APIInvokerEnrolmentDetails. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :return: The exp_time of this APIInvokerEnrolmentDetails. + :rtype: datetime + """ + return self._exp_time + + @exp_time.setter + def exp_time(self, exp_time: datetime): + """Sets the exp_time of this APIInvokerEnrolmentDetails. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :param exp_time: The exp_time of this APIInvokerEnrolmentDetails. + :type exp_time: datetime + """ + + self._exp_time = exp_time + + @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 + 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 @@ -257,10 +276,10 @@ class APIInvokerEnrolmentDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..55e0255e489a7abe38c0392741b756539bff2a22 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_invoker_enrolment_details_patch.py @@ -0,0 +1,172 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + Do not edit the class manually. + """ + + def __init__(self, onboarding_information=None, notification_destination=None, api_list=None, api_invoker_information=None, exp_time=None): # noqa: E501 + """APIInvokerEnrolmentDetailsPatch - a model defined in OpenAPI + + :param onboarding_information: The onboarding_information of this APIInvokerEnrolmentDetailsPatch. # noqa: E501 + :type onboarding_information: OnboardingInformation + :param notification_destination: The notification_destination of this APIInvokerEnrolmentDetailsPatch. # noqa: E501 + :type notification_destination: str + :param api_list: The api_list of this APIInvokerEnrolmentDetailsPatch. # noqa: E501 + :type api_list: APIList + :param api_invoker_information: The api_invoker_information of this APIInvokerEnrolmentDetailsPatch. # noqa: E501 + :type api_invoker_information: str + :param exp_time: The exp_time of this APIInvokerEnrolmentDetailsPatch. # noqa: E501 + :type exp_time: datetime + """ + self.openapi_types = { + 'onboarding_information': OnboardingInformation, + 'notification_destination': str, + 'api_list': APIList, + 'api_invoker_information': str, + 'exp_time': datetime + } + + self.attribute_map = { + 'onboarding_information': 'onboardingInformation', + 'notification_destination': 'notificationDestination', + 'api_list': 'apiList', + 'api_invoker_information': 'apiInvokerInformation', + 'exp_time': 'expTime' + } + + self._onboarding_information = onboarding_information + self._notification_destination = notification_destination + self._api_list = api_list + self._api_invoker_information = api_invoker_information + self._exp_time = exp_time + + @classmethod + def from_dict(cls, dikt) -> 'APIInvokerEnrolmentDetailsPatch': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The APIInvokerEnrolmentDetailsPatch of this APIInvokerEnrolmentDetailsPatch. # noqa: E501 + :rtype: APIInvokerEnrolmentDetailsPatch + """ + return util.deserialize_model(dikt, cls) + + @property + def onboarding_information(self) -> OnboardingInformation: + """Gets the onboarding_information of this APIInvokerEnrolmentDetailsPatch. + + + :return: The onboarding_information of this APIInvokerEnrolmentDetailsPatch. + :rtype: OnboardingInformation + """ + return self._onboarding_information + + @onboarding_information.setter + def onboarding_information(self, onboarding_information: OnboardingInformation): + """Sets the onboarding_information of this APIInvokerEnrolmentDetailsPatch. + + + :param onboarding_information: The onboarding_information of this APIInvokerEnrolmentDetailsPatch. + :type onboarding_information: OnboardingInformation + """ + + self._onboarding_information = onboarding_information + + @property + def notification_destination(self) -> str: + """Gets the notification_destination of this APIInvokerEnrolmentDetailsPatch. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The notification_destination of this APIInvokerEnrolmentDetailsPatch. + :rtype: str + """ + return self._notification_destination + + @notification_destination.setter + def notification_destination(self, notification_destination: str): + """Sets the notification_destination of this APIInvokerEnrolmentDetailsPatch. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param notification_destination: The notification_destination of this APIInvokerEnrolmentDetailsPatch. + :type notification_destination: str + """ + + self._notification_destination = notification_destination + + @property + def api_list(self) -> APIList: + """Gets the api_list of this APIInvokerEnrolmentDetailsPatch. + + + :return: The api_list of this APIInvokerEnrolmentDetailsPatch. + :rtype: APIList + """ + return self._api_list + + @api_list.setter + def api_list(self, api_list: APIList): + """Sets the api_list of this APIInvokerEnrolmentDetailsPatch. + + + :param api_list: The api_list of this APIInvokerEnrolmentDetailsPatch. + :type api_list: APIList + """ + + self._api_list = api_list + + @property + def api_invoker_information(self) -> str: + """Gets the api_invoker_information of this APIInvokerEnrolmentDetailsPatch. + + 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 APIInvokerEnrolmentDetailsPatch. + :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 APIInvokerEnrolmentDetailsPatch. + + 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 APIInvokerEnrolmentDetailsPatch. + :type api_invoker_information: str + """ + + self._api_invoker_information = api_invoker_information + + @property + def exp_time(self) -> datetime: + """Gets the exp_time of this APIInvokerEnrolmentDetailsPatch. + + string with format \"date-time\" as defined in OpenAPI with \"nullable=true\" property. # noqa: E501 + + :return: The exp_time of this APIInvokerEnrolmentDetailsPatch. + :rtype: datetime + """ + return self._exp_time + + @exp_time.setter + def exp_time(self, exp_time: datetime): + """Sets the exp_time of this APIInvokerEnrolmentDetailsPatch. + + string with format \"date-time\" as defined in OpenAPI with \"nullable=true\" property. # noqa: E501 + + :param exp_time: The exp_time of this APIInvokerEnrolmentDetailsPatch. + :type exp_time: datetime + """ + + self._exp_time = exp_time 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 new file mode 100644 index 0000000000000000000000000000000000000000..43fccbbe4abaf6c3b009c8fe7e77210cc2311728 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_list.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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. + + 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] + """ + 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. + + 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] + """ + 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/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 new file mode 100644 index 0000000000000000000000000000000000000000..6d199deae834f32dfd79f3c2d583e4c5bef2894f --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/api_status.py @@ -0,0 +1,64 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model + + +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 this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # 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 this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # 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_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 similarity index 92% rename from services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model_.py rename to services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/base_model.py index 5b0ea2f02325d69c4c325b915147e0bacd818dc8..19dfa2aff5b72bcd232c95f926eaf6a357e8e2b0 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,6 +1,4 @@ import pprint - -import six import typing from api_invoker_management import util @@ -8,14 +6,14 @@ from api_invoker_management import util T = typing.TypeVar('T') -class Model(object): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. - openapi_types = {} + openapi_types: typing.Dict[str, type] = {} # attributeMap: The key is attribute name and the # value is json key in definition. - attribute_map = {} + attribute_map: typing.Dict[str, str] = {} @classmethod def from_dict(cls: typing.Type[T], dikt) -> T: @@ -29,7 +27,7 @@ class Model(object): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 new file mode 100644 index 0000000000000000000000000000000000000000..5c09caf97608cb4883172629219f13b733ddeab4 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/civic_address.py @@ -0,0 +1,918 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model + + +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_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 48e559c2cf651aa97b44ec8fef76623a20c41705..84d3489a5d98d34496e85ceab5cf74a60171d9df 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type_any_of import CommunicationTypeAnyOf from api_invoker_management import util +from api_invoker_management.models.base_model import Model -from api_invoker_management.models.communication_type_any_of import CommunicationTypeAnyOf # noqa: E501 class CommunicationType(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/communication_type_any_of.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type_any_of.py deleted file mode 100644 index 461a002acf4838d1a1f4b68c772cb0efd63c6e8a..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/communication_type_any_of.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 CommunicationTypeAnyOf(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 - """CommunicationTypeAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'CommunicationTypeAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The CommunicationType_anyOf of this CommunicationTypeAnyOf. # noqa: E501 - :rtype: CommunicationTypeAnyOf - """ - return util.deserialize_model(dikt, cls) 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 5663c98c162751b3a9cf4f5bd8e91a783ed24bda..f9e7771f93c563889462c31fc20a6bb4f504c8e0 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type import CommunicationType -from api_invoker_management.models.operation import Operation from api_invoker_management import util - +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). @@ -62,7 +56,7 @@ class CustomOperation(Model): return util.deserialize_model(dikt, cls) @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this CustomOperation. @@ -72,7 +66,7 @@ class CustomOperation(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this CustomOperation. @@ -85,10 +79,10 @@ class CustomOperation(Model): self._comm_type = comm_type @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -96,10 +90,10 @@ class CustomOperation(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -110,10 +104,10 @@ class CustomOperation(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -121,10 +115,10 @@ class CustomOperation(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -135,7 +129,7 @@ class CustomOperation(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this CustomOperation. Text description of the custom operation # noqa: E501 @@ -146,7 +140,7 @@ class CustomOperation(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this CustomOperation. Text description of the custom operation # noqa: E501 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 c8ed3beefabcdb8b4193971d961d5053d37a49ba..ecd02ac5a2ad3dc2fe15cc2059a1c81c22096341 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.data_format_any_of import DataFormatAnyOf from api_invoker_management import util +from api_invoker_management.models.base_model import Model -from api_invoker_management.models.data_format_any_of import DataFormatAnyOf # noqa: E501 class DataFormat(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/ellipsoid_arc.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py new file mode 100644 index 0000000000000000000000000000000000000000..7be7c612bec90fae64c9a6a97246c9ce193a8d1c --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ellipsoid_arc.py @@ -0,0 +1,260 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..74c27870f702fb1a0e51b2a9b3d0fe3655d22268 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/gad_shape.py @@ -0,0 +1,63 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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_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 new file mode 100644 index 0000000000000000000000000000000000000000..02477e5db52c7a12d1c13d9701935a091b498028 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographic_area.py @@ -0,0 +1,453 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..c10a7c6441b338ceabb4e7bbae541a38bf4fd587 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/geographical_coordinates.py @@ -0,0 +1,98 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model + + +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_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 1e0050bf2319d28e41d59cbbd8774d40e1068576..1c4e7192e23728ce86aef94b5fbfcf89c88505e6 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,51 +1,57 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.security_method import SecurityMethod from api_invoker_management import util - +from api_invoker_management.models.base_model import Model from api_invoker_management.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 + def __init__(self, ipv4_addr=None, ipv6_addr=None, fqdn=None, port=None, api_prefix=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 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] """ self.openapi_types = { 'ipv4_addr': str, 'ipv6_addr': str, + 'fqdn': str, 'port': int, + 'api_prefix': str, 'security_methods': List[SecurityMethod] } self.attribute_map = { 'ipv4_addr': 'ipv4Addr', 'ipv6_addr': 'ipv6Addr', + 'fqdn': 'fqdn', 'port': 'port', + 'api_prefix': 'apiPrefix', 'security_methods': 'securityMethods' } 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 @classmethod @@ -60,10 +66,10 @@ class InterfaceDescription(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr(self): + 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 + 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 @@ -71,10 +77,10 @@ class InterfaceDescription(Model): return self._ipv4_addr @ipv4_addr.setter - def ipv4_addr(self, ipv4_addr): + 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 + 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 @@ -83,10 +89,10 @@ class InterfaceDescription(Model): self._ipv4_addr = ipv4_addr @property - def ipv6_addr(self): + 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 + 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 @@ -94,10 +100,10 @@ class InterfaceDescription(Model): return self._ipv6_addr @ipv6_addr.setter - def ipv6_addr(self, ipv6_addr): + 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 + 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 @@ -106,7 +112,36 @@ class InterfaceDescription(Model): self._ipv6_addr = ipv6_addr @property - def port(self): + def fqdn(self) -> str: + """Gets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :return: The fqdn of this InterfaceDescription. + :rtype: str + """ + return self._fqdn + + @fqdn.setter + def fqdn(self, fqdn: str): + """Sets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :param fqdn: The fqdn of this InterfaceDescription. + :type fqdn: str + """ + if fqdn is not None and len(fqdn) > 253: + raise ValueError("Invalid value for `fqdn`, length must be less than or equal to `253`") # noqa: E501 + if fqdn is not None and len(fqdn) < 4: + raise ValueError("Invalid value for `fqdn`, length must be greater than or equal to `4`") # noqa: E501 + if fqdn is not None and not re.search(r'^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$', fqdn): # noqa: E501 + raise ValueError("Invalid value for `fqdn`, must be a follow pattern or equal to `/^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$/`") # noqa: E501 + + self._fqdn = fqdn + + @property + def port(self) -> int: """Gets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -117,7 +152,7 @@ class InterfaceDescription(Model): return self._port @port.setter - def port(self, port): + def port(self, port: int): """Sets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -133,10 +168,33 @@ class InterfaceDescription(Model): self._port = port @property - def security_methods(self): + def api_prefix(self) -> str: + """Gets the api_prefix of this InterfaceDescription. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. - Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + 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] @@ -144,10 +202,10 @@ class InterfaceDescription(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + 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 + 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] 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 1fa0f4c341232cf077cb42cd89748bd83ea856e7..60f94e86af1594b63381e3205a1b8623dc449b85 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from api_invoker_management.models.base_model import Model class InvalidParam(Model): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 new file mode 100644 index 0000000000000000000000000000000000000000..7a8a4bf50b91905f24e04aad2b8d46fa50ce269d --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ip_addr_range.py @@ -0,0 +1,96 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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, ue_ipv6_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[Ipv4AddressRange] + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. # noqa: E501 + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange] + """ + self.openapi_types = { + 'ue_ipv4_addr_ranges': List[Ipv4AddressRange], + 'ue_ipv6_addr_ranges': List[Ipv6AddressRange] + } + + self.attribute_map = { + 'ue_ipv4_addr_ranges': 'ueIpv4AddrRanges', + 'ue_ipv6_addr_ranges': 'ueIpv6AddrRanges' + } + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + self._ue_ipv6_addr_ranges = ue_ipv6_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[Ipv4AddressRange]: + """Gets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv4_addr_ranges of this IpAddrRange. + :rtype: List[Ipv4AddressRange] + """ + return self._ue_ipv4_addr_ranges + + @ue_ipv4_addr_ranges.setter + def ue_ipv4_addr_ranges(self, ue_ipv4_addr_ranges: List[Ipv4AddressRange]): + """Sets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv4_addr_ranges: The ue_ipv4_addr_ranges of this IpAddrRange. + :type ue_ipv4_addr_ranges: List[Ipv4AddressRange] + """ + if ue_ipv4_addr_ranges is not None and len(ue_ipv4_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv4_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + + @property + def ue_ipv6_addr_ranges(self) -> List[Ipv6AddressRange]: + """Gets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv6_addr_ranges of this IpAddrRange. + :rtype: List[Ipv6AddressRange] + """ + return self._ue_ipv6_addr_ranges + + @ue_ipv6_addr_ranges.setter + def ue_ipv6_addr_ranges(self, ue_ipv6_addr_ranges: List[Ipv6AddressRange]): + """Sets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange] + """ + if ue_ipv6_addr_ranges is not None and len(ue_ipv6_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv6_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv6_addr_ranges = ue_ipv6_addr_ranges 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 new file mode 100644 index 0000000000000000000000000000000000000000..eb6090840f480f531cb97542dad92fcca15f3488 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv4_address_range.py @@ -0,0 +1,99 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model + + +class Ipv4AddressRange(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 + """Ipv4AddressRange - a model defined in OpenAPI + + :param start: The start of this Ipv4AddressRange. # noqa: E501 + :type start: str + :param end: The end of this Ipv4AddressRange. # 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) -> 'Ipv4AddressRange': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv4AddressRange of this Ipv4AddressRange. # noqa: E501 + :rtype: Ipv4AddressRange + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> str: + """Gets the start of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The start of this Ipv4AddressRange. + :rtype: str + """ + return self._start + + @start.setter + def start(self, start: str): + """Sets the start of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param start: The start of this Ipv4AddressRange. + :type start: str + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + if start is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', start): # noqa: E501 + raise ValueError("Invalid value for `start`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._start = start + + @property + def end(self) -> str: + """Gets the end of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The end of this Ipv4AddressRange. + :rtype: str + """ + return self._end + + @end.setter + def end(self, end: str): + """Sets the end of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param end: The end of this Ipv4AddressRange. + :type end: str + """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 + if end is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', end): # noqa: E501 + raise ValueError("Invalid value for `end`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._end = end diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format_any_of.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py similarity index 58% rename from services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format_any_of.py rename to services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py index a022aab149daaa87ac8d4bf442629f4464ed38c2..d12cb20c0c5844fd54b9f0e1df3fd51c57ec149f 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/data_format_any_of.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_addr1.py @@ -1,26 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from api_invoker_management.models.base_model import Model -class DataFormatAnyOf(Model): +class Ipv6Addr1(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" def __init__(self): # noqa: E501 - """DataFormatAnyOf - a model defined in OpenAPI + """Ipv6Addr1 - a model defined in OpenAPI """ self.openapi_types = { @@ -30,12 +22,12 @@ class DataFormatAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'DataFormatAnyOf': + def from_dict(cls, dikt) -> 'Ipv6Addr1': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The DataFormat_anyOf of this DataFormatAnyOf. # noqa: E501 - :rtype: DataFormatAnyOf + :return: The Ipv6Addr_1 of this Ipv6Addr1. # noqa: E501 + :rtype: Ipv6Addr1 """ return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..46203297e05f67419e259db76f29019c780fbe04 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/ipv6_address_range.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + Do not edit the class manually. + """ + + def __init__(self, start=None, end=None): # noqa: E501 + """Ipv6AddressRange - a model defined in OpenAPI + + :param start: The start of this Ipv6AddressRange. # noqa: E501 + :type start: Ipv6Addr1 + :param end: The end of this Ipv6AddressRange. # noqa: E501 + :type end: Ipv6Addr1 + """ + self.openapi_types = { + 'start': Ipv6Addr1, + 'end': Ipv6Addr1 + } + + self.attribute_map = { + 'start': 'start', + 'end': 'end' + } + + self._start = start + self._end = end + + @classmethod + def from_dict(cls, dikt) -> 'Ipv6AddressRange': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv6AddressRange of this Ipv6AddressRange. # noqa: E501 + :rtype: Ipv6AddressRange + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> Ipv6Addr1: + """Gets the start of this Ipv6AddressRange. + + + :return: The start of this Ipv6AddressRange. + :rtype: Ipv6Addr1 + """ + return self._start + + @start.setter + def start(self, start: Ipv6Addr1): + """Sets the start of this Ipv6AddressRange. + + + :param start: The start of this Ipv6AddressRange. + :type start: Ipv6Addr1 + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + + self._start = start + + @property + def end(self) -> Ipv6Addr1: + """Gets the end of this Ipv6AddressRange. + + + :return: The end of this Ipv6AddressRange. + :rtype: Ipv6Addr1 + """ + return self._end + + @end.setter + def end(self, end: Ipv6Addr1): + """Sets the end of this Ipv6AddressRange. + + + :param end: The end of this Ipv6AddressRange. + :type end: Ipv6Addr1 + """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 + + self._end = end 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 new file mode 100644 index 0000000000000000000000000000000000000000..50a6d460c250ad266981299f5cbccff14319f8ba --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local2d_point_uncertainty_ellipse.py @@ -0,0 +1,184 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..7c8633fc79e91caa77d5a221362461c6e9ad8b5a --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local3d_point_uncertainty_ellipsoid.py @@ -0,0 +1,184 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, local_origin=None, point=None, uncertainty_ellipsoid=None, 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 + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'local_origin': LocalOrigin, + 'point': RelativeCartesianLocation, + 'uncertainty_ellipsoid': UncertaintyEllipsoid, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'local_origin': 'localOrigin', + 'point': 'point', + 'uncertainty_ellipsoid': 'uncertaintyEllipsoid', + 'confidence': 'confidence' + } + + self._shape = shape + self._local_origin = local_origin + self._point = point + self._uncertainty_ellipsoid = uncertainty_ellipsoid + self._confidence = 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..1313b6837d54bed61f5bc9f81d45277c514b1ad8 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/local_origin.py @@ -0,0 +1,87 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + Do not edit the class manually. + """ + + def __init__(self, coordinate_id=None, point=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 + """ + self.openapi_types = { + 'coordinate_id': str, + 'point': GeographicalCoordinates + } + + self.attribute_map = { + 'coordinate_id': 'coordinateId', + 'point': 'point' + } + + self._coordinate_id = coordinate_id + self._point = point + + @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 + """ + + 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 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 17b8de0cc5cea56ab477174c067d79960f1d5e1f..b4a93bb7028e29bb66594925316ae1418f67d4c0 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,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from api_invoker_management.models.base_model import Model class OnboardingInformation(Model): @@ -53,10 +49,10 @@ class OnboardingInformation(Model): return util.deserialize_model(dikt, cls) @property - def api_invoker_public_key(self): + def api_invoker_public_key(self) -> str: """Gets the api_invoker_public_key of this OnboardingInformation. - The API Invoker’s public key # noqa: E501 + The API Invoker's public key # noqa: E501 :return: The api_invoker_public_key of this OnboardingInformation. :rtype: str @@ -64,10 +60,10 @@ class OnboardingInformation(Model): return self._api_invoker_public_key @api_invoker_public_key.setter - def api_invoker_public_key(self, api_invoker_public_key): + 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 + 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 @@ -78,10 +74,10 @@ class OnboardingInformation(Model): self._api_invoker_public_key = api_invoker_public_key @property - def api_invoker_certificate(self): + 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 + 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 @@ -89,10 +85,10 @@ class OnboardingInformation(Model): return self._api_invoker_certificate @api_invoker_certificate.setter - def api_invoker_certificate(self, api_invoker_certificate): + 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 + 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 @@ -101,10 +97,10 @@ class OnboardingInformation(Model): self._api_invoker_certificate = api_invoker_certificate @property - def onboarding_secret(self): + 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 + The API Invoker's onboarding secret, provided by the CAPIF core function. # noqa: E501 :return: The onboarding_secret of this OnboardingInformation. :rtype: str @@ -112,10 +108,10 @@ class OnboardingInformation(Model): return self._onboarding_secret @onboarding_secret.setter - def onboarding_secret(self, onboarding_secret): + 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 + 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 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 09a99cf6876b23c6dcb89062d68e461bd377deb1..d7ec7e249a53432034ec4f59ec35cafd40087179 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import 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_invoker_enrolment_details import APIInvokerEnrolmentDetails -from api_invoker_management.models.service_api_description import ServiceAPIDescription from api_invoker_management import util - from api_invoker_management.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 -from api_invoker_management.models.service_api_description import ServiceAPIDescription # 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). @@ -29,13 +23,13 @@ class OnboardingNotification(Model): :param api_invoker_enrolment_details: The api_invoker_enrolment_details of this OnboardingNotification. # noqa: E501 :type api_invoker_enrolment_details: APIInvokerEnrolmentDetails :param api_list: The api_list of this OnboardingNotification. # noqa: E501 - :type api_list: List[ServiceAPIDescription] + :type api_list: APIList """ self.openapi_types = { 'result': bool, 'resource_location': str, 'api_invoker_enrolment_details': APIInvokerEnrolmentDetails, - 'api_list': List[ServiceAPIDescription] + 'api_list': APIList } self.attribute_map = { @@ -62,7 +56,7 @@ class OnboardingNotification(Model): return util.deserialize_model(dikt, cls) @property - def result(self): + def result(self) -> bool: """Gets the result of this OnboardingNotification. Set to \"true\" indicate successful on-boarding. Otherwise set to \"false\" # noqa: E501 @@ -73,7 +67,7 @@ class OnboardingNotification(Model): return self._result @result.setter - def result(self, result): + def result(self, result: bool): """Sets the result of this OnboardingNotification. Set to \"true\" indicate successful on-boarding. Otherwise set to \"false\" # noqa: E501 @@ -87,7 +81,7 @@ class OnboardingNotification(Model): self._result = result @property - def resource_location(self): + def resource_location(self) -> str: """Gets the resource_location of this OnboardingNotification. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -98,7 +92,7 @@ class OnboardingNotification(Model): return self._resource_location @resource_location.setter - def resource_location(self, resource_location): + def resource_location(self, resource_location: str): """Sets the resource_location of this OnboardingNotification. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -110,7 +104,7 @@ class OnboardingNotification(Model): self._resource_location = resource_location @property - def api_invoker_enrolment_details(self): + def api_invoker_enrolment_details(self) -> APIInvokerEnrolmentDetails: """Gets the api_invoker_enrolment_details of this OnboardingNotification. @@ -120,7 +114,7 @@ class OnboardingNotification(Model): return self._api_invoker_enrolment_details @api_invoker_enrolment_details.setter - def api_invoker_enrolment_details(self, api_invoker_enrolment_details): + def api_invoker_enrolment_details(self, api_invoker_enrolment_details: APIInvokerEnrolmentDetails): """Sets the api_invoker_enrolment_details of this OnboardingNotification. @@ -131,26 +125,22 @@ class OnboardingNotification(Model): self._api_invoker_enrolment_details = api_invoker_enrolment_details @property - def api_list(self): + def api_list(self) -> APIList: """Gets the api_list of this OnboardingNotification. - The list of service APIs that the API Invoker is allowed to invoke # noqa: E501 :return: The api_list of this OnboardingNotification. - :rtype: List[ServiceAPIDescription] + :rtype: APIList """ return self._api_list @api_list.setter - def api_list(self, api_list): + def api_list(self, api_list: APIList): """Sets the api_list of this OnboardingNotification. - The list of service APIs that the API Invoker is allowed to invoke # noqa: E501 :param api_list: The api_list of this OnboardingNotification. - :type api_list: List[ServiceAPIDescription] + :type api_list: APIList """ - if api_list is not None and len(api_list) < 1: - raise ValueError("Invalid value for `api_list`, number of items must be greater than or equal to `1`") # noqa: E501 self._api_list = api_list 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 620d6a8c5bc4330af08abb3d8c2ffe19876c0359..8ebd5c61f54d93fa13688eb5aa2c4d4f5410495b 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.operation_any_of import OperationAnyOf from api_invoker_management import util +from api_invoker_management.models.base_model import Model -from api_invoker_management.models.operation_any_of import OperationAnyOf # noqa: E501 class Operation(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_any_of.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation_any_of.py deleted file mode 100644 index f3fff37e480d4ec18323aeb476126c27ea8956ad..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/operation_any_of.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 OperationAnyOf(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 - """OperationAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'OperationAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Operation_anyOf of this OperationAnyOf. # noqa: E501 - :rtype: OperationAnyOf - """ - return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..95ce36c24705d0f956290227e95082da28627c63 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point.py @@ -0,0 +1,92 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..4533b0cc7ad9d90f7d184f68017ad50f87064449 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude.py @@ -0,0 +1,126 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..4708b9b0e5dbed7f2245cdb14f8c970a698e6c31 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_altitude_uncertainty.py @@ -0,0 +1,253 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..89dd1c6808325060442d7c4bc8d8fa386f86e646 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_circle.py @@ -0,0 +1,124 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..252f7be1d76468c57169bedcd823d96c1d450e98 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/point_uncertainty_ellipse.py @@ -0,0 +1,155 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + 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_API_Invoker_Management_API/api_invoker_management/models/polygon.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py new file mode 100644 index 0000000000000000000000000000000000000000..9b1ea42a2389495bfd5ba441604f4d80fda77626 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/polygon.py @@ -0,0 +1,98 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model +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). + + 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_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 c28a360726c8d1d8e95150683e71e258aeddf38e..bf1b667727aaf047c00eecea1e76cdb5f1c5bbe5 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.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 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,10 +239,10 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 + 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 @@ -256,10 +250,10 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 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 f68a15d847177cf1194f6cc877111b85324032e2..8322eb2c2cfdaa5149fe4119d3b021ea955585a5 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.protocol_any_of import ProtocolAnyOf from api_invoker_management import util +from api_invoker_management.models.base_model import Model -from api_invoker_management.models.protocol_any_of import ProtocolAnyOf # noqa: E501 class Protocol(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/published_api_path.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/published_api_path.py index 01b94e667f4db5639022fd337c236cd2ed63a2bf..76b6b93fdff8a9a5f079d864eb83baa4fc8b5eda 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from api_invoker_management.models.base_model import Model class PublishedApiPath(Model): @@ -43,7 +39,7 @@ class PublishedApiPath(Model): return util.deserialize_model(dikt, cls) @property - def ccf_ids(self): + 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 @@ -54,7 +50,7 @@ class PublishedApiPath(Model): return self._ccf_ids @ccf_ids.setter - def ccf_ids(self, ccf_ids): + 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..e5092005c9e00a51a4e25baf2b3339209213bd5a --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/relative_cartesian_location.py @@ -0,0 +1,122 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model + + +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_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 e2cea42e3cb8af3beb0770028804f81b35b8d421..1fd97b395a38214ce47893267c9d95f7d63a2b85 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,25 +1,20 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type import CommunicationType -from api_invoker_management.models.operation import Operation from api_invoker_management import util - +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). 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 + 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 @@ -30,6 +25,8 @@ class Resource(Model): :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 @@ -40,6 +37,7 @@ class Resource(Model): 'comm_type': CommunicationType, 'uri': str, 'cust_op_name': str, + 'cust_operations': List[CustomOperation], 'operations': List[Operation], 'description': str } @@ -49,6 +47,7 @@ class Resource(Model): 'comm_type': 'commType', 'uri': 'uri', 'cust_op_name': 'custOpName', + 'cust_operations': 'custOperations', 'operations': 'operations', 'description': 'description' } @@ -57,6 +56,7 @@ class Resource(Model): 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 @@ -72,7 +72,7 @@ class Resource(Model): return util.deserialize_model(dikt, cls) @property - def resource_name(self): + def resource_name(self) -> str: """Gets the resource_name of this Resource. Resource name # noqa: E501 @@ -83,7 +83,7 @@ class Resource(Model): return self._resource_name @resource_name.setter - def resource_name(self, resource_name): + def resource_name(self, resource_name: str): """Sets the resource_name of this Resource. Resource name # noqa: E501 @@ -97,7 +97,7 @@ class Resource(Model): self._resource_name = resource_name @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this Resource. @@ -107,7 +107,7 @@ class Resource(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this Resource. @@ -120,10 +120,10 @@ class Resource(Model): self._comm_type = comm_type @property - def uri(self): + def uri(self) -> str: """Gets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -131,10 +131,10 @@ class Resource(Model): return self._uri @uri.setter - def uri(self, uri): + def uri(self, uri: str): """Sets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -145,10 +145,10 @@ class Resource(Model): self._uri = uri @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -156,10 +156,10 @@ class Resource(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -168,10 +168,35 @@ class Resource(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -179,10 +204,10 @@ class Resource(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -193,7 +218,7 @@ class Resource(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this Resource. Text description of the API resource # noqa: E501 @@ -204,7 +229,7 @@ class Resource(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this Resource. Text description of the API resource # noqa: E501 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 e66fa6543f0aae1fd4d7c1139980d4366f746b41..99a51a851b3c81c6878255555884d5558c10ae83 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.security_method_any_of import SecurityMethodAnyOf from api_invoker_management import util +from api_invoker_management.models.base_model import Model -from api_invoker_management.models.security_method_any_of import SecurityMethodAnyOf # noqa: E501 class SecurityMethod(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_any_of.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method_any_of.py deleted file mode 100644 index e446cf32eef91e444c63b27e7c8d080d9f8bd951..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/security_method_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 SecurityMethodAnyOf(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 - """SecurityMethodAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'SecurityMethodAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The SecurityMethod_anyOf of this SecurityMethodAnyOf. # noqa: E501 - :rtype: SecurityMethodAnyOf - """ - return util.deserialize_model(dikt, cls) 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 e194fdb10782d7cc7f07f34aa2415578f5829861..29659b82fd7295af4d10907eb815ab4e8756ff01 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,21 +1,14 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.aef_profile import AefProfile -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.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). @@ -23,13 +16,15 @@ class ServiceAPIDescription(Model): 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 + 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 @@ -46,10 +41,13 @@ class ServiceAPIDescription(Model): :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, @@ -57,12 +55,14 @@ class ServiceAPIDescription(Model): 'service_api_category': str, 'api_supp_feats': str, 'pub_api_path': PublishedApiPath, - 'ccf_id': str + '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', @@ -70,11 +70,13 @@ class ServiceAPIDescription(Model): 'service_api_category': 'serviceAPICategory', 'api_supp_feats': 'apiSuppFeats', 'pub_api_path': 'pubApiPath', - 'ccf_id': 'ccfId' + '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 @@ -83,6 +85,7 @@ class ServiceAPIDescription(Model): 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': @@ -96,10 +99,10 @@ class ServiceAPIDescription(Model): return util.deserialize_model(dikt, cls) @property - def api_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -107,10 +110,10 @@ class ServiceAPIDescription(Model): return self._api_name @api_name.setter - def api_name(self, api_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -121,10 +124,10 @@ class ServiceAPIDescription(Model): self._api_name = api_name @property - def api_id(self): + 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 + 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 @@ -132,10 +135,10 @@ class ServiceAPIDescription(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + 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 + 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 @@ -144,10 +147,31 @@ class ServiceAPIDescription(Model): self._api_id = api_id @property - def aef_profiles(self): + 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. - AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 + AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 :return: The aef_profiles of this ServiceAPIDescription. :rtype: List[AefProfile] @@ -155,10 +179,10 @@ class ServiceAPIDescription(Model): return self._aef_profiles @aef_profiles.setter - def aef_profiles(self, aef_profiles): + 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 + 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] @@ -169,7 +193,7 @@ class ServiceAPIDescription(Model): self._aef_profiles = aef_profiles @property - def description(self): + def description(self) -> str: """Gets the description of this ServiceAPIDescription. Text description of the API # noqa: E501 @@ -180,7 +204,7 @@ class ServiceAPIDescription(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this ServiceAPIDescription. Text description of the API # noqa: E501 @@ -192,10 +216,10 @@ class ServiceAPIDescription(Model): self._description = description @property - def supported_features(self): + 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 + 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 @@ -203,10 +227,10 @@ class ServiceAPIDescription(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 @@ -217,7 +241,7 @@ class ServiceAPIDescription(Model): self._supported_features = supported_features @property - def shareable_info(self): + def shareable_info(self) -> ShareableInformation: """Gets the shareable_info of this ServiceAPIDescription. @@ -227,7 +251,7 @@ class ServiceAPIDescription(Model): return self._shareable_info @shareable_info.setter - def shareable_info(self, shareable_info): + def shareable_info(self, shareable_info: ShareableInformation): """Sets the shareable_info of this ServiceAPIDescription. @@ -238,9 +262,10 @@ class ServiceAPIDescription(Model): self._shareable_info = shareable_info @property - def service_api_category(self): + def service_api_category(self) -> str: """Gets the service_api_category of this ServiceAPIDescription. + The service API category to which the service API belongs to. # noqa: E501 :return: The service_api_category of this ServiceAPIDescription. :rtype: str @@ -248,9 +273,10 @@ class ServiceAPIDescription(Model): return self._service_api_category @service_api_category.setter - def service_api_category(self, service_api_category): + def service_api_category(self, service_api_category: str): """Sets the service_api_category of this ServiceAPIDescription. + The service API category to which the service API belongs to. # noqa: E501 :param service_api_category: The service_api_category of this ServiceAPIDescription. :type service_api_category: str @@ -259,10 +285,10 @@ class ServiceAPIDescription(Model): self._service_api_category = service_api_category @property - def api_supp_feats(self): + 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 + 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 @@ -270,10 +296,10 @@ class ServiceAPIDescription(Model): return self._api_supp_feats @api_supp_feats.setter - def api_supp_feats(self, api_supp_feats): + 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 + 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 @@ -284,7 +310,7 @@ class ServiceAPIDescription(Model): self._api_supp_feats = api_supp_feats @property - def pub_api_path(self): + def pub_api_path(self) -> PublishedApiPath: """Gets the pub_api_path of this ServiceAPIDescription. @@ -294,7 +320,7 @@ class ServiceAPIDescription(Model): return self._pub_api_path @pub_api_path.setter - def pub_api_path(self, pub_api_path): + def pub_api_path(self, pub_api_path: PublishedApiPath): """Sets the pub_api_path of this ServiceAPIDescription. @@ -305,7 +331,7 @@ class ServiceAPIDescription(Model): self._pub_api_path = pub_api_path @property - def ccf_id(self): + def ccf_id(self) -> str: """Gets the ccf_id of this ServiceAPIDescription. CAPIF core function identifier. # noqa: E501 @@ -316,7 +342,7 @@ class ServiceAPIDescription(Model): return self._ccf_id @ccf_id.setter - def ccf_id(self, ccf_id): + def ccf_id(self, ccf_id: str): """Sets the ccf_id of this ServiceAPIDescription. CAPIF core function identifier. # noqa: E501 @@ -326,3 +352,26 @@ class ServiceAPIDescription(Model): """ self._ccf_id = ccf_id + + @property + def api_prov_name(self) -> str: + """Gets the api_prov_name of this ServiceAPIDescription. + + Represents the API provider name. # noqa: E501 + + :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. + + Represents the API provider name. # noqa: E501 + + :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/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 new file mode 100644 index 0000000000000000000000000000000000000000..9131233e2cbf9f32555cae6181c89b296c930648 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/service_kpis.py @@ -0,0 +1,275 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model + + +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("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("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("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("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_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 4a369d9bdca15de00797e0cb095963f19d1ba0db..a6f198078eae31233b76dd7483be5d02c5ed1eb3 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from api_invoker_management.models.base_model import Model class ShareableInformation(Model): @@ -48,10 +44,10 @@ class ShareableInformation(Model): return util.deserialize_model(dikt, cls) @property - def is_shareable(self): + 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 + 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 @@ -59,10 +55,10 @@ class ShareableInformation(Model): return self._is_shareable @is_shareable.setter - def is_shareable(self, is_shareable): + 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 + 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 @@ -73,10 +69,10 @@ class ShareableInformation(Model): self._is_shareable = is_shareable @property - def capif_prov_doms(self): + 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 + 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] @@ -84,10 +80,10 @@ class ShareableInformation(Model): return self._capif_prov_doms @capif_prov_doms.setter - def capif_prov_doms(self, capif_prov_doms): + 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 + 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] diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol_any_of.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py similarity index 57% rename from services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol_any_of.py rename to services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py index eafceb4d5ed7312cdc1d3a9b0c380de804a0f4f9..4d459b98a55d4ba6e8c44bc5488d5b4fb10caa10 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/protocol_any_of.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/supported_gad_shapes.py @@ -1,27 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from api_invoker_management.models.base_model import Model -class ProtocolAnyOf(Model): +class SupportedGADShapes(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - """ - allowed enum values - """ - _1_1 = "HTTP_1_1" - _2 = "HTTP_2" def __init__(self): # noqa: E501 - """ProtocolAnyOf - a model defined in OpenAPI + """SupportedGADShapes - a model defined in OpenAPI """ self.openapi_types = { @@ -31,12 +22,12 @@ class ProtocolAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'ProtocolAnyOf': + def from_dict(cls, dikt) -> 'SupportedGADShapes': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The Protocol_anyOf of this ProtocolAnyOf. # noqa: E501 - :rtype: ProtocolAnyOf + :return: The SupportedGADShapes of this SupportedGADShapes. # noqa: E501 + :rtype: SupportedGADShapes """ return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..b7e749492efb22ad5bfa7adb5b2ac8a6abf8274e --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipse.py @@ -0,0 +1,132 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model + + +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_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 new file mode 100644 index 0000000000000000000000000000000000000000..5d41877bf77a33bf223e5f4fdc62f86df2ae1162 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/models/uncertainty_ellipsoid.py @@ -0,0 +1,164 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from api_invoker_management import util +from api_invoker_management.models.base_model import Model + + +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_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 6f0521ba1067133e584e2865bba945679fd47785..dfdc783c1a3c166608ae7d9c897ab5f7241fbed7 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.custom_operation import CustomOperation -from api_invoker_management.models.resource import Resource from api_invoker_management import util - +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). @@ -62,7 +56,7 @@ class Version(Model): return util.deserialize_model(dikt, cls) @property - def api_version(self): + def api_version(self) -> str: """Gets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -73,7 +67,7 @@ class Version(Model): return self._api_version @api_version.setter - def api_version(self, api_version): + def api_version(self, api_version: str): """Sets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -87,7 +81,7 @@ class Version(Model): self._api_version = api_version @property - def expiry(self): + def expiry(self) -> datetime: """Gets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -98,7 +92,7 @@ class Version(Model): return self._expiry @expiry.setter - def expiry(self, expiry): + def expiry(self, expiry: datetime): """Sets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -110,7 +104,7 @@ class Version(Model): self._expiry = expiry @property - def resources(self): + def resources(self) -> List[Resource]: """Gets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -121,7 +115,7 @@ class Version(Model): return self._resources @resources.setter - def resources(self, resources): + def resources(self, resources: List[Resource]): """Sets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -135,7 +129,7 @@ class Version(Model): self._resources = resources @property - def cust_operations(self): + def cust_operations(self) -> List[CustomOperation]: """Gets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 @@ -146,7 +140,7 @@ class Version(Model): return self._cust_operations @cust_operations.setter - def cust_operations(self, cust_operations): + def cust_operations(self, cust_operations: List[CustomOperation]): """Sets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 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 4bf3f9217a9670b20ad71b891e4c5e4e72ec020f..2c38535d62622fc1444efbe602c7b97be0264f73 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from api_invoker_management.models.base_model import Model class WebsockNotifConfig(Model): @@ -48,7 +44,7 @@ class WebsockNotifConfig(Model): return util.deserialize_model(dikt, cls) @property - def websocket_uri(self): + 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 @@ -59,7 +55,7 @@ class WebsockNotifConfig(Model): return self._websocket_uri @websocket_uri.setter - def websocket_uri(self, websocket_uri): + 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 @@ -71,7 +67,7 @@ class WebsockNotifConfig(Model): self._websocket_uri = websocket_uri @property - def request_websocket_uri(self): + 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 @@ -82,7 +78,7 @@ class WebsockNotifConfig(Model): return self._request_websocket_uri @request_websocket_uri.setter - def request_websocket_uri(self, request_websocket_uri): + 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 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 d574fb198f0177162587e43738559ffe9c8b8965..12715c6e2c68e290d5182c0d8a2e3123ef40013c 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,20 +1,18 @@ openapi: 3.0.0 info: - description: | - API for API invoker management. - © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). - All rights reserved. + description: "API for API invoker management. \n© 2024, 3GPP Organizational Partners\ + \ (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_API_Invoker_Management_API - version: 1.2.0-alpha.2 + version: 1.3.0-alpha.2 externalDocs: - description: 3GPP TS 29.222 V17.2.0 Common API Framework for 3GPP Northbound APIs - url: http://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ + description: 3GPP TS 29.222 V18.5.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' +- url: "{apiRoot}/api-invoker-management/v1" variables: apiRoot: default: https://example.com - description: apiRoot as defined in subclause 7.5 of 3GPP TS 29.222 + description: apiRoot as defined in clause 7.5 of 3GPP TS 29.222 paths: /onboardedInvokers: post: @@ -84,7 +82,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -129,8 +127,8 @@ paths: description: API invoker on-boarded successfully. headers: Location: - description: 'Contains the URI of the newly created resource, according - to the structure: {apiRoot}/api-invoker-management/v1/onboardedInvokers/{onboardingId}' + description: | + Contains the URI of the newly created resource, according to the structure {apiRoot}/api-invoker-management/v1/onboardedInvokers/{onboardingId} explode: false required: true schema: @@ -174,7 +172,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -279,6 +277,116 @@ paths: default: description: Generic Error x-openapi-router-controller: api_invoker_management.controllers.default_controller + patch: + description: Modify an individual API invoker details. + operationId: modify_ind_api_invoke_enrolment + parameters: + - explode: false + in: path + name: onboardingId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/APIInvokerEnrolmentDetailsPatch' + required: true + responses: + "200": + content: + application/json: + 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. + "202": + description: The request is accepted and under processing. + "204": + description: No Content. The definition of the service API is modified successfully. + "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 + tags: + - Individual API Invoker enrolment details + x-openapi-router-controller: api_invoker_management.controllers.individual_api_invoker_enrolment_details_controller put: callbacks: notificationDestination: @@ -346,7 +454,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -401,11 +509,11 @@ paths: $ref: '#/components/schemas/APIInvokerEnrolmentDetails' description: API invoker details updated successfully. "202": - description: The CAPIF core has accepted the API invoker update details - request and is processing it. + description: | + The CAPIF core has accepted the API invoker update details request and is processing it. "204": - description: API invoker’s information updated successfully, with no content - to be sent in the response body. + description: | + API invoker's information updated successfully, with no content to be sent in the response body. "307": description: Temporary Redirect headers: @@ -457,7 +565,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -486,6 +594,85 @@ paths: description: Generic Error x-openapi-router-controller: api_invoker_management.controllers.default_controller components: + responses: + "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 + "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 schemas: OnboardingInformation: description: Represents on-boarding information of the API invoker. @@ -495,17 +682,17 @@ components: apiInvokerCertificate: apiInvokerCertificate properties: apiInvokerPublicKey: - description: The API Invoker’s public key + 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. + 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. + description: | + The API Invoker's onboarding secret, provided by the CAPIF core function. title: onboardingSecret type: string required: @@ -513,28 +700,9 @@ components: title: OnboardingInformation type: object APIList: - description: The list of service APIs that the API Invoker is allowed to invoke - items: - $ref: '#/components/schemas/ServiceAPIDescription' - minItems: 1 - title: apiList - type: array - APIInvokerEnrolmentDetails: - description: Information about the API Invoker that requested to onboard + description: Represents a list of APIs. example: - notificationDestination: notificationDestination - supportedFeatures: supportedFeatures - apiInvokerId: apiInvokerId - apiInvokerInformation: apiInvokerInformation - websockNotifConfig: - requestWebsocketUri: true - websocketUri: websocketUri - onboardingInformation: - apiInvokerPublicKey: apiInvokerPublicKey - onboardingSecret: onboardingSecret - apiInvokerCertificate: apiInvokerCertificate - requestTestNotification: true - apiList: + serviceAPIDescriptions: - serviceAPICategory: serviceAPICategory ccfId: ccfId apiName: apiName @@ -543,20 +711,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -564,19 +763,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -585,6 +800,20 @@ components: - 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 @@ -592,46 +821,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -639,19 +966,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -660,6 +1003,20 @@ components: - 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 @@ -667,37 +1024,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 @@ -710,20 +1139,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -731,19 +1191,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -752,6 +1228,20 @@ components: - 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 @@ -759,46 +1249,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -806,19 +1394,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -827,123 +1431,164 @@ components: - operations: - null - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri + 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 properties: - 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: notificationDestination - type: string - requestTestNotification: - description: Set to true by Subscriber to request the CAPIF core function - to send a test notification as defined in in subclause 7.6. Set to false - or omitted otherwise. - title: requestTestNotification - type: boolean - websockNotifConfig: - $ref: '#/components/schemas/WebsockNotifConfig' - apiList: - description: The list of service APIs that the API Invoker is allowed to - invoke + serviceAPIDescriptions: + description: Represents the list of service APIs that the API Invoker is + allowed to invoke. items: $ref: '#/components/schemas/ServiceAPIDescription' minItems: 1 - title: apiList + title: serviceAPIDescriptions type: array - 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 + title: APIList type: object - OnboardingNotification: - description: Represents a notification of on-boarding or update result. + APIInvokerEnrolmentDetails: + description: Represents information about the API Invoker that requested to + onboard. example: - result: true - apiInvokerEnrolmentDetails: - notificationDestination: notificationDestination - supportedFeatures: supportedFeatures - apiInvokerId: apiInvokerId - apiInvokerInformation: apiInvokerInformation - websockNotifConfig: - requestWebsocketUri: true - websocketUri: websocketUri - onboardingInformation: - apiInvokerPublicKey: apiInvokerPublicKey - onboardingSecret: onboardingSecret - apiInvokerCertificate: apiInvokerCertificate - requestTestNotification: true - apiList: + 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 @@ -952,20 +1597,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -973,19 +1649,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -994,6 +1686,20 @@ components: - 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 @@ -1001,46 +1707,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -1048,19 +1852,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1069,6 +1889,20 @@ components: - 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 @@ -1076,37 +1910,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 @@ -1119,20 +2025,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -1140,19 +2077,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1161,6 +2114,20 @@ components: - 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 @@ -1168,46 +2135,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -1215,19 +2280,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1236,6 +2317,20 @@ components: - 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 @@ -1243,381 +2338,1896 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 - resourceLocation: resourceLocation + properties: + 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: notificationDestination + 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: - - serviceAPICategory: serviceAPICategory - ccfId: ccfId - apiName: apiName - shareableInfo: - capifProvDoms: - - capifProvDoms - - capifProvDoms - isShareable: true + $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 + expTime: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime + 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 + OnboardingNotification: + description: Represents a notification of on-boarding or update result. + example: + result: true + apiInvokerEnrolmentDetails: + notificationDestination: notificationDestination supportedFeatures: supportedFeatures - description: description - apiSuppFeats: apiSuppFeats - apiId: apiId - aefProfiles: - - securityMethods: - - null - - null - versions: - - apiVersion: apiVersion - resources: - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - custOperations: - - operations: - - null - - null - description: description - custOpName: custOpName - - operations: - - null - - null - description: description - custOpName: custOpName - expiry: 2000-01-23T04:56:07.000+00:00 - - apiVersion: apiVersion - resources: - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - custOperations: - - operations: - - null - - null - description: description - custOpName: custOpName - - operations: - - null - - null - description: description - custOpName: custOpName - expiry: 2000-01-23T04:56:07.000+00:00 - domainName: domainName - aefId: aefId - interfaceDescriptions: - - ipv6Addr: ipv6Addr - securityMethods: - - null - - null - port: 5248 - ipv4Addr: ipv4Addr - - ipv6Addr: ipv6Addr - securityMethods: - - null - - null - port: 5248 - ipv4Addr: ipv4Addr - - securityMethods: - - null - - null - versions: - - apiVersion: apiVersion - resources: - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - custOperations: - - operations: - - null - - null - description: description - custOpName: custOpName - - operations: - - null - - null - description: description - custOpName: custOpName - expiry: 2000-01-23T04:56:07.000+00:00 - - apiVersion: apiVersion - resources: - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - custOperations: - - operations: - - null - - null - description: description - custOpName: custOpName - - operations: - - null - - null - description: description - custOpName: custOpName - expiry: 2000-01-23T04:56:07.000+00:00 - domainName: domainName - aefId: aefId - interfaceDescriptions: - - ipv6Addr: ipv6Addr - securityMethods: - - null - - null - port: 5248 - ipv4Addr: ipv4Addr - - ipv6Addr: ipv6Addr + 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 + 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 + 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 + 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 + fqdn: fqdn + port: 5248 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + 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 + 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 + 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 + 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 + fqdn: fqdn + port: 5248 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + 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 + 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 + 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 + 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 + fqdn: fqdn + port: 5248 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + 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 + 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 + 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 + 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 + fqdn: fqdn + port: 5248 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + 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 + resourceLocation: resourceLocation + 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 + 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 - 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: - - securityMethods: - - null - - null - versions: - - apiVersion: apiVersion - resources: - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - custOperations: - - operations: + - PSK + - PSK + 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 + 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 - description: description - custOpName: custOpName - - operations: + fqdn: fqdn + port: 5248 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: - null - null - description: description - custOpName: custOpName - expiry: 2000-01-23T04:56:07.000+00:00 - - apiVersion: apiVersion - resources: - - operations: + 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 + 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 + 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 + 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 - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - - operations: + fqdn: fqdn + port: 5248 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: - null - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - custOperations: - - operations: + 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 + 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 + 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 + 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 - description: description - custOpName: custOpName - - operations: + fqdn: fqdn + port: 5248 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: - null - null - description: description - custOpName: custOpName - expiry: 2000-01-23T04:56:07.000+00:00 - domainName: domainName - aefId: aefId - interfaceDescriptions: - - ipv6Addr: ipv6Addr - securityMethods: - - null - - null - port: 5248 - ipv4Addr: ipv4Addr - - ipv6Addr: ipv6Addr + 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 + 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 - port: 5248 - ipv4Addr: ipv4Addr - - securityMethods: - - null - - null - versions: - - apiVersion: apiVersion - resources: - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - custOperations: - - operations: - - null - - null - description: description - custOpName: custOpName - - operations: - - null - - null - description: description - custOpName: custOpName - expiry: 2000-01-23T04:56:07.000+00:00 - - apiVersion: apiVersion - resources: - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - - operations: - - null - - null - description: description - resourceName: resourceName - custOpName: custOpName - uri: uri - custOperations: - - operations: + - PSK + - PSK + 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 + 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 - description: description - custOpName: custOpName - - operations: + fqdn: fqdn + port: 5248 + apiPrefix: apiPrefix + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: - null - null - description: description - custOpName: custOpName - expiry: 2000-01-23T04:56:07.000+00:00 - domainName: domainName - 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 + 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 properties: result: description: Set to "true" indicate successful on-boarding. Otherwise set to "false" + title: result type: boolean resourceLocation: description: string providing an URI formatted according to IETF RFC 3986. @@ -1626,15 +4236,35 @@ components: apiInvokerEnrolmentDetails: $ref: '#/components/schemas/APIInvokerEnrolmentDetails' apiList: - description: The list of service APIs that the API Invoker is allowed to - invoke - items: - $ref: '#/components/schemas/ServiceAPIDescription' - minItems: 1 - title: apiList - type: array + $ref: '#/components/schemas/APIList' required: - result + title: OnboardingNotification + type: object + APIInvokerEnrolmentDetailsPatch: + description: Represents an API Invoker's enrolment details to be updated. + properties: + onboardingInformation: + $ref: '#/components/schemas/OnboardingInformation' + notificationDestination: + description: string providing an URI formatted according to IETF RFC 3986. + title: notificationDestination + type: string + 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 + expTime: + description: | + string with format "date-time" as defined in OpenAPI with "nullable=true" property. + format: date-time + nullable: true + title: expTime + type: string + title: APIInvokerEnrolmentDetailsPatch type: object ProblemDetails: description: Represents additional information and details on an error response. @@ -1644,8 +4274,8 @@ components: title: notificationDestination type: string title: - description: A short, human-readable summary of the problem type. It should - not change from occurrence to occurrence of the problem. + 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: @@ -1662,33 +4292,22 @@ components: title: notificationDestination 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. + 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. + 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]*$ + 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 @@ -1698,15 +4317,16 @@ components: title: notificationDestination type: string InvalidParam: - description: Represents the description of invalid parameters, for a request - rejected due to invalid parameters. + 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. + 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". + description: "A human-readable reason, e.g. \"must be a positive integer\"\ + ." title: reason type: string required: @@ -1725,20 +4345,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -1746,19 +4397,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1767,6 +4434,20 @@ components: - 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 @@ -1774,46 +4455,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -1821,19 +4600,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1842,6 +4637,20 @@ components: - 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 @@ -1849,59 +4658,129 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 properties: apiName: - description: API name, it is set as {apiName} part of the URI structure - as defined in subclause 4.4 of 3GPP TS 29.501. + 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). + 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 + apiStatus: + $ref: '#/components/schemas/ApiStatus' aefProfiles: - description: AEF profile information, which includes the exposed API details - (e.g. protocol). + description: | + AEF profile information, which includes the exposed API details (e.g. protocol). items: $ref: '#/components/schemas/AefProfile' minItems: 1 @@ -1912,40 +4791,21 @@ components: 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]*$ + 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: + description: The service API category to which the service API belongs to. 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]*$ + 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: @@ -1954,22 +4814,71 @@ components: description: CAPIF core function identifier. title: ccfId type: string + apiProvName: + description: Represents the API provider name. + title: apiProvName + type: string required: - apiName title: ServiceAPIDescription 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 this attribute is omitted, the API is inactive at all AEF(s) defined in the "aefProfiles" attribute within the ServiceAPIDescription data structure. + items: + type: string + title: aefIds + type: array + required: + - aefIds + title: ApiStatus + type: object AefProfile: description: Represents the AEF profile data. example: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -1977,19 +4886,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1998,6 +4923,20 @@ components: - 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 @@ -2005,42 +4944,111 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - oneOf: - - required: - - domainName - - required: - - interfaceDescriptions + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + nullable: true + oneOf: [] properties: aefId: description: Identifier of the API exposing function @@ -2075,6 +5083,12 @@ components: minItems: 1 title: interfaceDescriptions type: array + aefLocation: + $ref: '#/components/schemas/AefLocation' + serviceKpis: + $ref: '#/components/schemas/ServiceKpis' + ueIpRange: + $ref: '#/components/schemas/IpAddrRange' required: - aefId - versions @@ -2088,6 +5102,20 @@ components: - 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 @@ -2095,19 +5123,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -2145,6 +5189,20 @@ components: 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 @@ -2157,19 +5215,26 @@ components: commType: $ref: '#/components/schemas/CommunicationType' uri: - description: Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} - part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. + 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 subclause 4.4 of 3GPP - TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -2187,42 +5252,38 @@ components: type: object CommunicationType: anyOf: - - $ref: '#/components/schemas/CommunicationType_anyOf' - - 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. + - enum: + - REQUEST_RESPONSE + - SUBSCRIBE_NOTIFY 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: - - $ref: '#/components/schemas/Operation_anyOf' - 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 + 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 CustomOperation: description: Represents the description of a custom operation. example: operations: - - null - - null + - 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 subclause 4.4 of - 3GPP TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -2237,32 +5298,68 @@ components: - 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 Protocol: anyOf: - - $ref: '#/components/schemas/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: | - Possible values are - HTTP_1_1: HTTP version 1.1 - HTTP_2: HTTP version 2 + 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: - - $ref: '#/components/schemas/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: | - Possible values are - JSON: JavaScript Object Notation + 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 SecurityMethod: anyOf: - - $ref: '#/components/schemas/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 + description: "Indicates the security method. \nPossible values are:\n- PSK:\ + \ Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122.\n- PKI:\ + \ 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 InterfaceDescription: description: Represents the description of an API's interface. @@ -2271,34 +5368,45 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - oneOf: - - required: - - ipv4Addr - - required: - - ipv6Addr + nullable: true + oneOf: [] properties: ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted - decimal" notation as defined in IETF RFC 1166. + 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. + 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 + fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer + apiPrefix: + description: | + A string representing a sequence of path segments that starts with the slash character. + title: apiPrefix + type: string securityMethods: - description: Security methods supported by the interface, it take precedence - over the security methods provided in AefProfile, for this specific interface. + 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 @@ -2306,9 +5414,160 @@ components: type: array title: InterfaceDescription type: object + 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: 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 + 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 + IpAddrRange: + anyOf: [] + description: Represents the list of public IP ranges + example: + 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 + nullable: true + properties: + ueIpv4AddrRanges: + description: Represents the IPv4 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv4AddressRange' + minItems: 1 + title: ueIpv4AddrRanges + type: array + ueIpv6AddrRanges: + description: Represents the Ipv6 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv6AddressRange' + minItems: 1 + title: ueIpv6AddrRanges + type: array + title: IpAddrRange + 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. + 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 @@ -2316,14 +5575,13 @@ components: 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". + 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. + description: | + List of CAPIF provider domains to which the service API information to be shared. items: type: string minItems: 1 @@ -2352,8 +5610,8 @@ components: title: PublishedApiPath type: object WebsockNotifConfig: - description: Represents the configuration information for the delivery of notifications - over Websockets. + description: | + Represents the configuration information for the delivery of notifications over Websockets. example: requestWebsocketUri: true websocketUri: websocketUri @@ -2375,74 +5633,628 @@ components: 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 DateTime: description: string with format "date-time" as defined in OpenAPI. format: date-time title: DateTime 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 + DateTimeRm: + description: | + string with format "date-time" as defined in OpenAPI with "nullable=true" property. + format: date-time + nullable: true + title: expTime + type: string Ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted decimal" - notation as defined in IETF RFC 1166. + 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. + 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 + Fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string Port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer - CommunicationType_anyOf: - enum: - - REQUEST_RESPONSE - - SUBSCRIBE_NOTIFY - title: CommunicationType_anyOf - type: string - Operation_anyOf: - enum: - - GET - - POST - - PUT - - PATCH - - DELETE - title: Operation_anyOf - type: string - Protocol_anyOf: - enum: - - HTTP_1_1 - - HTTP_2 - title: Protocol_anyOf - type: string - DataFormat_anyOf: - enum: - - JSON - title: DataFormat_anyOf + 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 + 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: 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 + 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' + title: LocalOrigin + type: object + 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' + 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 + Ipv4AddressRange: + description: Range of IPv4 addresses + example: + start: 198.51.100.1 + end: 198.51.100.1 + properties: + start: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 + type: string + end: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 + type: string + required: + - end + - start + title: Ipv4AddressRange + type: object + Ipv4Addr_1: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 type: string - SecurityMethod_anyOf: - enum: - - PSK - - PKI - - OAUTH - title: SecurityMethod_anyOf + Ipv6AddressRange: + description: Range of IPv6 addresses + example: + start: 2001:db8:85a3::8a2e:370:7334 + end: 2001:db8:85a3::8a2e:370:7334 + properties: + start: + $ref: '#/components/schemas/Ipv6Addr_1' + end: + $ref: '#/components/schemas/Ipv6Addr_1' + required: + - end + - start + title: Ipv6AddressRange + type: object + Ipv6Addr_1: + allOf: + - pattern: "^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})):){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))$" + - pattern: "^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))$" + description: | + String identifying an IPv6 address formatted according to clause 4 of RFC5952. The mixed IPv4 IPv6 notation according to clause 5 of RFC5952 shall not be used. + example: 2001:db8:85a3::8a2e:370:7334 + title: Ipv6Addr_1 type: string + Float: + description: string with format 'float' as defined in OpenAPI. + format: float + title: Float + type: number 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 new file mode 100644 index 0000000000000000000000000000000000000000..df1dcccbf43abd45b7233223166fc234acc85166 --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/__init__.py @@ -0,0 +1,15 @@ +import logging + +import connexion +from api_invoker_management.encoder import JSONEncoder +from flask_testing import TestCase + + +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_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 new file mode 100644 index 0000000000000000000000000000000000000000..5724e7dfa47e2fc97c2652b8851236fe0293f5be --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_default_controller.py @@ -0,0 +1,65 @@ +import unittest + +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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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 new file mode 100644 index 0000000000000000000000000000000000000000..d0cece92aa3fc6093c66dcfe0cceb498beb8fb0b --- /dev/null +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/test/test_individual_api_invoker_enrolment_details_controller.py @@ -0,0 +1,31 @@ +import unittest + +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/typing_utils.py b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..d21c4f633653a0eae75d04b2f6eff684ff9d200d 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/typing_utils.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/typing_utils.py @@ -1,9 +1,6 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): - import typing def is_generic(klass): """ Determine whether klass is a generic class """ 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 31af7ab10eab38338398dd85eadcfa42e500519d..cf911e58787fb3529bcfb427cbea50d5f4a5e1fb 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,7 +1,6 @@ import datetime -import six -import typing_utils +from api_invoker_management import typing_utils def serialize_clean_camel_case(obj): @@ -17,10 +16,10 @@ def clean_empty(d): return { k: v for k, v in ((k, clean_empty(v)) for k, v in d.items()) - if v + if v is not None or (isinstance(v, list) and len(v) == 0) } if isinstance(d, list): - return [v for v in map(clean_empty, d) if v] + return [v for v in map(clean_empty, d) if v is not None] return d @@ -63,7 +62,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -92,7 +91,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -157,7 +156,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -192,4 +191,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/git_push.sh b/services/TS29222_CAPIF_API_Invoker_Management_API/git_push.sh index 9405f72e950cdb8ca24c3cf4d15cee7eac62fde7..f53a75d4fabe760cce49eddfd62fcc702938ea90 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/git_push.sh +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi 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 df73fa6481be279fa52e2d825b529024f1f36bff..971ce33796ff7b7ab830118c4e4534a436119a5a 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/prepare_invoker.sh @@ -14,5 +14,5 @@ curl -vv -k -retry 30 \ --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" 2>/dev/null | jq -r '.data.data.pub_key' -j > /usr/src/app/api_invoker_management/pubkey.pem -gunicorn --bind 0.0.0.0:8080 \ - --chdir /usr/src/app/api_invoker_management wsgi:app \ No newline at end of file +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ + --chdir /usr/src/app/api_invoker_management wsgi:app diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt index dbf0f198c54c3dea4807fe473ffcde6d560a528c..c28e5fb691113e5d9910216f9dd62b0aae387314 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/requirements.txt @@ -1,24 +1,25 @@ -connexion[swagger-ui] == 2.14.2; python_version>="3.6" +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 +setuptools == 74.0.0 +Flask == 3.0.3 pymongo == 4.7.3 -flask_jwt_extended == 4.4.4 -cryptography == 42.0.8 -rfc3987 == 1.3.8 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.17.0 +flask_jwt_extended == 4.6.0 +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.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 == 2.2.3 +Flask-APScheduler == 1.13.1 +werkzeug == 3.0.6 gunicorn == 22.0.0 -packaging == 24.0 +packaging == 24.0 \ No newline at end of file diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py b/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py index 8bd54a4473b3b6f1d29aca7e7bf80ada78ed124f..7187d5c15404799138cf880113816241f65be434 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/setup.py @@ -1,6 +1,3 @@ -# coding: utf-8 - -import sys from setuptools import setup, find_packages NAME = "api_invoker_management" @@ -33,7 +30,7 @@ setup( entry_points={ 'console_scripts': ['api_invoker_management=api_invoker_management.__main__:main']}, long_description="""\ - API for API invoker management. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for API invoker management. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/test-requirements.txt b/services/TS29222_CAPIF_API_Invoker_Management_API/test-requirements.txt index 202a684feef71ff540d6aa528d348febf0b37d1e..58f51d6a00272d7515a20e3618f345b73c68afa0 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/test-requirements.txt +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/test-requirements.txt @@ -1,4 +1,4 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 +pytest~=7.1.0 pytest-cov>=2.8.1 -pytest-randomly == 1.2.3 # needed for python 2.7+3.4 -Flask-Testing == 0.8.0 +pytest-randomly>=1.2.3 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/tox.ini b/services/TS29222_CAPIF_API_Invoker_Management_API/tox.ini index 80a64e2ad2a49bb6891bd06f0f2e74031b41c342..ec13971b7ab8b5ecfe45cff1192932b2826e8eb3 100644 --- a/services/TS29222_CAPIF_API_Invoker_Management_API/tox.ini +++ b/services/TS29222_CAPIF_API_Invoker_Management_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= pytest --cov=api_invoker_management diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/.openapi-generator/FILES b/services/TS29222_CAPIF_API_Provider_Management_API/.openapi-generator/FILES index 4baa18d102547e4af62eb3fcf54176b0ad20ad2e..3ffb37ba66517527d2b3be7f3de29fa88f4300df 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_API_Provider_Management_API/.openapi-generator/FILES @@ -1,28 +1,32 @@ .dockerignore .gitignore +.openapi-generator-ignore .travis.yml Dockerfile README.md +git_push.sh api_provider_management/__init__.py api_provider_management/__main__.py api_provider_management/controllers/__init__.py api_provider_management/controllers/default_controller.py -api_provider_management/controllers/security_controller_.py +api_provider_management/controllers/individual_api_provider_enrolment_details_controller.py +api_provider_management/controllers/security_controller.py api_provider_management/encoder.py api_provider_management/models/__init__.py api_provider_management/models/api_provider_enrolment_details.py +api_provider_management/models/api_provider_enrolment_details_patch.py api_provider_management/models/api_provider_func_role.py -api_provider_management/models/api_provider_func_role_any_of.py api_provider_management/models/api_provider_function_details.py -api_provider_management/models/base_model_.py +api_provider_management/models/base_model.py api_provider_management/models/invalid_param.py api_provider_management/models/problem_details.py api_provider_management/models/registration_information.py api_provider_management/openapi/openapi.yaml api_provider_management/test/__init__.py +api_provider_management/test/test_default_controller.py +api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py api_provider_management/typing_utils.py api_provider_management/util.py -git_push.sh requirements.txt setup.py test-requirements.txt diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_API_Provider_Management_API/.openapi-generator/VERSION index 4b448de535c7dd619da0df6d8221995dbd5d118a..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_API_Provider_Management_API/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/Dockerfile b/services/TS29222_CAPIF_API_Provider_Management_API/Dockerfile index 5f2713c9eaf2187221eddce8996768dd5a684490..a6ee27499f6c07ccfa46f443bfa9c9c3dddcc666 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/Dockerfile +++ b/services/TS29222_CAPIF_API_Provider_Management_API/Dockerfile @@ -1,15 +1,21 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/ -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir -r requirements.txt -RUN apk add redis -RUN apk add jq -RUN apk add curl +RUN apt-get update && apt-get install -y --no-install-recommends jq curl redis COPY . /usr/src/app diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/README.md b/services/TS29222_CAPIF_API_Provider_Management_API/README.md index c9acf914cff1769f2c2527ba1c6398f97c607d1c..3aa91ec68ea850ad7ece64da4412eb0da0423592 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/README.md +++ b/services/TS29222_CAPIF_API_Provider_Management_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 api_provider_management +python3 -m openapi_server ``` and open your browser to here: 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 2896830ca9ff062875fd666db2bc654a9c8bc0d2..0838c6b75281847b0f735c3b40af2928ba19ccd2 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 @@ -1,25 +1,23 @@ #!/usr/bin/env python3 -import connexion import logging +import os +from logging.handlers import RotatingFileHandler -import encoder +import api_provider_management.encoder +import connexion from flask_jwt_extended import JWTManager -from logging.handlers import RotatingFileHandler -from config import Config -import os -import sys from fluent import sender -from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry import trace -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator 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.instrumentation.redis import RedisInstrumentor - +from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +from .config import Config NAME = "Provider-Service" @@ -113,8 +111,8 @@ def verbose_formatter(): with open("/usr/src/app/api_provider_management/pubkey.pem", "rb") as pub_file: pub_data = pub_file.read() -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = api_provider_management.encoder.CustomJSONEncoder app.add_api('openapi.yaml', arguments={'title': 'CAPIF_API_Provider_Management_API'}, pythonic_params=True) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/config.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/config.py index bed212ac136607ee7459f333b0f50bf7f3481b6b..404434feca0f72cd914c4cbdb94a3fa589bc94b0 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/config.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): 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 d9a190cd5cd48ceca8fcb7c8ecea79bc5c173b29..6232ea297304762760f2a8b01ed66ab6272b8bcb 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,21 +1,13 @@ -import connexion -from flask import Response, request, current_app - -from ..core.provider_enrolment_details_api import ProviderManagementOperations -from ..models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 -from ..models.problem_details import ProblemDetails # noqa: E501 -from .. import util -from ..core.validate_user import ControlAccess +from functools import wraps +from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend +from flask import request, current_app from flask_jwt_extended import jwt_required, get_jwt_identity -from cryptography import x509 -from functools import wraps - - -import sys +from ..core.provider_enrolment_details_api import ProviderManagementOperations +from ..core.validate_user import ControlAccess provider_management_ops = ProviderManagementOperations() valid_user = ControlAccess() @@ -54,17 +46,15 @@ def registrations_post(body): # noqa: E501 :param api_provider_enrolment_details: :type api_provider_enrolment_details: dict | bytes - :rtype: APIProviderEnrolmentDetails + :rtype: Union[APIProviderEnrolmentDetails, Tuple[APIProviderEnrolmentDetails, int], Tuple[APIProviderEnrolmentDetails, int, Dict[str, str]] """ - identity = get_jwt_identity() username, uuid = identity.split() current_app.logger.info("Registering Provider Domain") - if connexion.request.is_json: - body = APIProviderEnrolmentDetails.from_dict(connexion.request.get_json()) # noqa: E501 - + if request.is_json: + body = APIProviderEnrolmentDetails.from_dict(request.get_json()) # noqa: E501 res = provider_management_ops.register_api_provider_enrolment_details(body, username, uuid) @@ -79,7 +69,7 @@ def registrations_registration_id_delete(registration_id): # noqa: E501 :param registration_id: String identifying an registered API provider domain resource. :type registration_id: str - :rtype: None + :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] """ current_app.logger.info("Removing Provider Domain") res = provider_management_ops.delete_api_provider_enrolment_details(registration_id) @@ -95,14 +85,15 @@ def registrations_registration_id_put(registration_id, body): # noqa: E501 :param registration_id: String identifying an registered API provider domain resource. :type registration_id: str - :param api_provider_enrolment_details: Representation of the API provider domain registration details to be updated in CAPIF core function. + :param api_provider_enrolment_details: Representation of the API provider domain registration details to be updated in CAPIF core function. :type api_provider_enrolment_details: dict | bytes - :rtype: APIProviderEnrolmentDetails + :rtype: Union[APIProviderEnrolmentDetails, Tuple[APIProviderEnrolmentDetails, int], Tuple[APIProviderEnrolmentDetails, int, Dict[str, str]] """ current_app.logger.info("Updating Provider Domain") - if connexion.request.is_json: - body = APIProviderEnrolmentDetails.from_dict(connexion.request.get_json()) # noqa: E501 + + if request.is_json: + body = APIProviderEnrolmentDetails.from_dict(request.get_json()) # noqa: E501 res = provider_management_ops.update_api_provider_enrolment_details(registration_id,body) 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 dee8d1539b8945e2ff049a9ad8afb5dc4a0c34c9..abc759378121d282e40d5bb0bfe2523be5e673e4 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,18 +1,10 @@ -import connexion -from flask import Response, request, current_app +from flask import request, current_app + from ..core.provider_enrolment_details_api import ProviderManagementOperations -from ..encoder import JSONEncoder -from ..models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 from ..models.api_provider_enrolment_details_patch import APIProviderEnrolmentDetailsPatch # noqa: E501 -from ..models.problem_details import ProblemDetails # noqa: E501 -from .. import util - -from cryptography.hazmat.backends import default_backend -from cryptography import x509 provider_management_ops = ProviderManagementOperations() - def modify_ind_api_provider_enrolment(registration_id, body): # noqa: E501 """modify_ind_api_provider_enrolment @@ -23,12 +15,11 @@ def modify_ind_api_provider_enrolment(registration_id, body): # noqa: E501 :param api_provider_enrolment_details_patch: :type api_provider_enrolment_details_patch: dict | bytes - :rtype: APIProviderEnrolmentDetails + :rtype: Union[APIProviderEnrolmentDetails, Tuple[APIProviderEnrolmentDetails, int], Tuple[APIProviderEnrolmentDetails, int, Dict[str, str]] """ - current_app.logger.info("Patch Provider Domain") - if connexion.request.is_json: - body = APIProviderEnrolmentDetailsPatch.from_dict(connexion.request.get_json()) # 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) 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 new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller.py @@ -0,0 +1,2 @@ + + 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 deleted file mode 100644 index 6d294ffd6df1a26a469dbb4e72533b01503468dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/controllers/security_controller_.py +++ /dev/null @@ -1,2 +0,0 @@ -from typing import List - diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/auth_manager.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/auth_manager.py index cfa302ada519fbe9116b2bc33cae39ddeb009f87..4e5a6f10e34032c75f3452bf6ca687ef5d5e00d8 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/auth_manager.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/auth_manager.py @@ -1,6 +1,7 @@ from cryptography import x509 from cryptography.hazmat.backends import default_backend + from .resources import Resource 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 30760b996db7ae7fbbc5fcd212bfaf979dc8a7f2..9c96434553e438f1ad04f9044421913d3b5c3c7a 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 @@ -1,15 +1,18 @@ -from pymongo import ReturnDocument +import os import secrets -from flask import current_app, Flask, Response -from ..core.sign_certificate import sign_certificate -from .responses import internal_server_error, not_found_error, forbidden_error, make_response, bad_request_error from datetime import datetime -from ..util import dict_to_camel_case, clean_empty, serialize_clean_camel_case -from .resources import Resource -from .auth_manager import AuthManager from api_provider_management.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 +from flask import current_app, Response +from pymongo import ReturnDocument + +from .auth_manager import AuthManager +from .redis_internal_event import RedisInternalEvent +from .resources import Resource +from .responses import internal_server_error, not_found_error, forbidden_error, make_response, bad_request_error +from ..core.sign_certificate import sign_certificate +from ..util import dict_to_camel_case, clean_empty, serialize_clean_camel_case class ProviderManagementOperations(Resource): @@ -40,19 +43,24 @@ class ProviderManagementOperations(Resource): my_provider_enrolment_details = mycol.find_one(search_filter) if my_provider_enrolment_details is not None: - current_app.logger.error("Found provider registered with same id") + current_app.logger.error( + "Found provider registered with same id") return forbidden_error(detail="Provider already registered", cause="Identical provider reg sec") - api_provider_enrolment_details.api_prov_dom_id = secrets.token_hex(15) + api_provider_enrolment_details.api_prov_dom_id = secrets.token_hex( + 15) current_app.logger.debug("Generating certs to api prov funcs") for api_provider_func in api_provider_enrolment_details.api_prov_funcs: - api_provider_func.api_prov_func_id = api_provider_func.api_prov_func_role + str(secrets.token_hex(15)) - certificate = sign_certificate(api_provider_func.reg_info.api_prov_pub_key, api_provider_func.api_prov_func_id) + api_provider_func.api_prov_func_id = api_provider_func.api_prov_func_role + \ + str(secrets.token_hex(15)) + certificate = sign_certificate( + api_provider_func.reg_info.api_prov_pub_key, api_provider_func.api_prov_func_id) api_provider_func.reg_info.api_prov_cert = certificate - self.auth_manager.add_auth_provider(certificate, api_provider_func.api_prov_func_id, api_provider_func.api_prov_func_role, api_provider_enrolment_details.api_prov_dom_id) + self.auth_manager.add_auth_provider(certificate, api_provider_func.api_prov_func_id, + api_provider_func.api_prov_func_role, api_provider_enrolment_details.api_prov_dom_id) # Onboarding Date Record provider_dict = api_provider_enrolment_details.to_dict() @@ -61,12 +69,13 @@ class ProviderManagementOperations(Resource): provider_dict["uuid"] = uuid mycol.insert_one(provider_dict) - + current_app.logger.debug("Provider inserted in database") - res = make_response(object=serialize_clean_camel_case(api_provider_enrolment_details), status=201) + res = make_response(object=serialize_clean_camel_case( + api_provider_enrolment_details), status=201) - res.headers['Location'] = "/api-provider-management/v1/registrations/" + str(api_provider_enrolment_details.api_prov_dom_id) + res.headers['Location'] = f"https://{os.getenv("CAPIF_HOSTNAME")}/api-provider-management/v1/registrations/{str(api_provider_enrolment_details.api_prov_dom_id)}" return res except Exception as e: @@ -84,17 +93,32 @@ class ProviderManagementOperations(Resource): if isinstance(result, Response): return result - apf_id = [ provider_func['api_prov_func_id'] for provider_func in result["api_prov_funcs"] if provider_func['api_prov_func_role'] == 'APF' ] - aef_id = [ provider_func['api_prov_func_id'] for provider_func in result["api_prov_funcs"] if provider_func['api_prov_func_role'] == 'AEF' ] - amf_id = [ provider_func['api_prov_func_id'] for provider_func in result["api_prov_funcs"] if provider_func['api_prov_func_role'] == 'AMF' ] + func_ids = list() + for provider_func in result["api_prov_funcs"]: + func_ids.append(provider_func['api_prov_func_id']) + apf_ids = [provider_func['api_prov_func_id'] + for provider_func in result["api_prov_funcs"] if provider_func['api_prov_func_role'] == 'APF'] + aef_ids = [provider_func['api_prov_func_id'] + for provider_func in result["api_prov_funcs"] if provider_func['api_prov_func_role'] == 'AEF'] + amf_ids = [provider_func['api_prov_func_id'] + for provider_func in result["api_prov_funcs"] if provider_func['api_prov_func_role'] == 'AMF'] mycol.delete_one({'api_prov_dom_id': api_prov_dom_id}) - out = "The provider matching apiProvDomainId " + api_prov_dom_id + " was offboarded." + out = "The provider matching apiProvDomainId " + \ + api_prov_dom_id + " was offboarded." current_app.logger.debug("Removed provider domain from database") - self.auth_manager.remove_auth_provider([apf_id[0], aef_id[0], amf_id[0]]) + self.auth_manager.remove_auth_provider(func_ids) + + RedisInternalEvent("PROVIDER-REMOVED", + "providerIds", + { + "apf_ids": apf_ids, + "aef_ids": aef_ids, + "amf_ids": amf_ids, + "all_ids": apf_ids + aef_ids + amf_ids + }).send_event() - self.publish_ops.publish_message("internal-messages", f"provider-removed:{aef_id[0]}:{apf_id[0]}:{amf_id[0]}") return make_response(object=out, status=204) except Exception as e: @@ -114,26 +138,33 @@ class ProviderManagementOperations(Resource): for func in api_provider_enrolment_details.api_prov_funcs: if func.api_prov_func_id is None: - func.api_prov_func_id = func.api_prov_func_role + str(secrets.token_hex(15)) - certificate = sign_certificate(func.reg_info.api_prov_pub_key, func.api_prov_func_id) + func.api_prov_func_id = func.api_prov_func_role + \ + str(secrets.token_hex(15)) + certificate = sign_certificate( + func.reg_info.api_prov_pub_key, func.api_prov_func_id) func.reg_info.api_prov_cert = certificate - self.auth_manager.update_auth_provider(certificate, func.api_prov_func_id, api_prov_dom_id, func.api_prov_func_role) + self.auth_manager.update_auth_provider( + certificate, func.api_prov_func_id, api_prov_dom_id, func.api_prov_func_role) else: api_prov_funcs = result["api_prov_funcs"] for api_func in api_prov_funcs: if func.api_prov_func_id == api_func["api_prov_func_id"]: if func.api_prov_func_role != api_func["api_prov_func_role"]: - return bad_request_error(detail="Bad Role in provider", cause="Different role in update reqeuest", invalid_params=[{"param":"api_prov_func_role","reason":"different role with same id"}]) + return bad_request_error(detail="Bad Role in provider", cause="Different role in update reqeuest", invalid_params=[{"param": "api_prov_func_role", "reason": "different role with same id"}]) if func.reg_info.api_prov_pub_key != api_func["reg_info"]["api_prov_pub_key"]: - certificate = sign_certificate(func.reg_info.api_prov_pub_key, api_func["api_prov_func_id"]) + certificate = sign_certificate( + func.reg_info.api_prov_pub_key, api_func["api_prov_func_id"]) func.reg_info.api_prov_cert = certificate - self.auth_manager.update_auth_provider(certificate, func.api_prov_func_id, api_prov_dom_id, func.api_prov_func_role) + self.auth_manager.update_auth_provider( + certificate, func.api_prov_func_id, api_prov_dom_id, func.api_prov_func_role) api_provider_enrolment_details = api_provider_enrolment_details.to_dict() - api_provider_enrolment_details = clean_empty(api_provider_enrolment_details) + api_provider_enrolment_details = clean_empty( + api_provider_enrolment_details) - result = mycol.find_one_and_update(result, {"$set":api_provider_enrolment_details}, projection={'_id': 0},return_document=ReturnDocument.AFTER ,upsert=False) + result = mycol.find_one_and_update(result, {"$set": api_provider_enrolment_details}, projection={ + '_id': 0}, return_document=ReturnDocument.AFTER, upsert=False) result = clean_empty(result) current_app.logger.debug("Provider domain updated in database") @@ -157,9 +188,11 @@ class ProviderManagementOperations(Resource): return result api_provider_enrolment_details_patch = api_provider_enrolment_details_patch.to_dict() - api_provider_enrolment_details_patch = clean_empty(api_provider_enrolment_details_patch) + api_provider_enrolment_details_patch = clean_empty( + api_provider_enrolment_details_patch) - result = mycol.find_one_and_update(result, {"$set":api_provider_enrolment_details_patch}, projection={'_id': 0},return_document=ReturnDocument.AFTER ,upsert=False) + result = mycol.find_one_and_update(result, {"$set": api_provider_enrolment_details_patch}, projection={ + '_id': 0}, return_document=ReturnDocument.AFTER, upsert=False) result = clean_empty(result) @@ -171,4 +204,4 @@ class ProviderManagementOperations(Resource): except Exception as e: exception = "An exception occurred in patch provider" current_app.logger.error(exception + "::" + str(e)) - return internal_server_error(detail=exception, cause=str(e)) \ No newline at end of file + return internal_server_error(detail=exception, cause=str(e)) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/redis_internal_event.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/redis_internal_event.py new file mode 100644 index 0000000000000000000000000000000000000000..50e343424b8498d32078648978c719c923304353 --- /dev/null +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/redis_internal_event.py @@ -0,0 +1,36 @@ +import json + +from .publisher import Publisher +from ..encoder import JSONEncoder + +publisher_ops = Publisher() + + +class RedisInternalEvent(): + def __init__(self, event, event_detail_key=None, information=None) -> None: + self.INTERNAL_MESSAGES = [ + 'INVOKER-REMOVED', + 'PROVIDER-REMOVED', + 'SECURITY-CONTEXT-CREATED', + 'SECURITY-CONTEXT-REMOVED', + 'create-acl', + 'remove-acl', + ] + if event not in self.INTERNAL_MESSAGES: + raise Exception( + "Internal Message (" + event + ") is not on INTERNAL_MESSAGES enum (" + ','.join(self.INTERNAL_MESSAGES) + ")") + self.redis_event = { + "event": event + } + if event_detail_key is not None and information is not None: + self.redis_event['key'] = event_detail_key + self.redis_event['information'] = information + + def to_string(self): + return json.dumps(self.redis_event, cls=JSONEncoder) + + def send_event(self): + publisher_ops.publish_message("internal-messages", self.to_string()) + + def __call__(self): + return self.redis_event diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/resources.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/resources.py index 7b8092ab35ed7214a6eddfdad30577747e3a673a..d2b8da87604f82b5016ee091e388d3e90681fba7 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/resources.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/resources.py @@ -1,6 +1,8 @@ from abc import ABC -from db.db import MongoDatabse + from core.publisher import Publisher +from db.db import MongoDatabse + class Resource(ABC): 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 98eca0c9453aa3eaf676c209e9f2708b2b2d44e2..8f975cbf426c304c4ae0681f65af67fcad9abca5 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 @@ -1,14 +1,16 @@ +import json + +from flask import Response + +from ..encoder import CustomJSONEncoder from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder from ..util import serialize_clean_camel_case -from flask import Response, current_app -import json mimetype = "application/json" def make_response(object, status): - res = Response(json.dumps(object, cls=JSONEncoder), status=status, mimetype=mimetype) + res = Response(json.dumps(object, cls=CustomJSONEncoder), status=status, mimetype=mimetype) return res @@ -17,25 +19,25 @@ def internal_server_error(detail, cause): prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=500, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=500, mimetype=mimetype) def forbidden_error(detail, cause): prob = ProblemDetails(title="Forbidden", status=403, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=403, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=403, mimetype=mimetype) 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=JSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) 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=JSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/sign_certificate.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/sign_certificate.py index 1e23a8104ede297eaa13a2c870c7df5635ad412c..f535a6c8d57fd234228f28a118ab9e87487c6cf5 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/sign_certificate.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/sign_certificate.py @@ -1,7 +1,10 @@ -import requests import json + +import requests + from ..config import Config + def sign_certificate(publick_key, provider_id): config = Config().get_config() diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/validate_user.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/validate_user.py index 29043d520f6bfab2f3be3b0b63479440a4ba8aad..153a90c7128e642b02fdf3ea43c568d59821ce1c 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/validate_user.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/validate_user.py @@ -1,9 +1,11 @@ -from flask import current_app, Response import json -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder + +from flask import current_app, Response + from .resources import Resource from .responses import internal_server_error +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case @@ -21,7 +23,7 @@ class ControlAccess(Resource): if cert_entry["cert_signature"] != cert_signature: prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype="application/json") except Exception as e: exception = "An exception occurred in validate amf" diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/db/db.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/db/db.py index 024529c6927f900e815804567bf3dd283c3d2a57..e4957614a0bb472dbb6073e1e1edd1b39572ac2b 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/db/db.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/db/db.py @@ -1,10 +1,11 @@ +import os import time -from pymongo import MongoClient -from pymongo.errors import AutoReconnect -from config import Config + from bson.codec_options import CodecOptions -import os +from config import Config from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from pymongo import MongoClient +from pymongo.errors import AutoReconnect monitoring_value = os.environ.get("MONITORING", "").lower() if monitoring_value == "true": 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 3f1c01ce6812b1ff12e0d1d284bc433e951e1ea6..51082b2736f57daecc081762914b0d7223f19e2b 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,19 +1,19 @@ -from connexion.apps.flask_app import FlaskJSONEncoder -import six +from connexion.jsonifier import JSONEncoder -from models.base_model_ import Model +from .models.base_model import Model -class JSONEncoder(FlaskJSONEncoder): + +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + return JSONEncoder.default(self, o) 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 785be4594c57a40d7cdc175382399c56cdfd471c..d036df693ea41dfaa3debffffad0462c1fcd8e4a 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,13 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # 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.api_provider_func_role_any_of import ApiProviderFuncRoleAnyOf -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 b4d4f38ccbf4d55583af86cdf700339164da3668..92a631209a444fdd1ea091f061f14574732719a2 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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 -import re # noqa: E501 +from api_provider_management.models.base_model import Model + class APIProviderEnrolmentDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -19,7 +13,7 @@ class APIProviderEnrolmentDetails(Model): Do not edit the class manually. """ - def __init__(self, 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 + def __init__(self, api_prov_dom_id=None, reg_sec=None, api_prov_funcs=None, api_prov_dom_info=None, supp_feat=None, fail_reason=None, api_prov_name=None): # noqa: E501 """APIProviderEnrolmentDetails - a model defined in OpenAPI :param api_prov_dom_id: The api_prov_dom_id of this APIProviderEnrolmentDetails. # noqa: E501 @@ -34,6 +28,8 @@ class APIProviderEnrolmentDetails(Model): :type supp_feat: str :param fail_reason: The fail_reason of this APIProviderEnrolmentDetails. # noqa: E501 :type fail_reason: str + :param api_prov_name: The api_prov_name of this APIProviderEnrolmentDetails. # noqa: E501 + :type api_prov_name: str """ self.openapi_types = { 'api_prov_dom_id': str, @@ -41,7 +37,8 @@ class APIProviderEnrolmentDetails(Model): 'api_prov_funcs': List[APIProviderFunctionDetails], 'api_prov_dom_info': str, 'supp_feat': str, - 'fail_reason': str + 'fail_reason': str, + 'api_prov_name': str } self.attribute_map = { @@ -50,7 +47,8 @@ class APIProviderEnrolmentDetails(Model): 'api_prov_funcs': 'apiProvFuncs', 'api_prov_dom_info': 'apiProvDomInfo', 'supp_feat': 'suppFeat', - 'fail_reason': 'failReason' + 'fail_reason': 'failReason', + 'api_prov_name': 'apiProvName' } self._api_prov_dom_id = api_prov_dom_id @@ -59,6 +57,7 @@ class APIProviderEnrolmentDetails(Model): self._api_prov_dom_info = api_prov_dom_info self._supp_feat = supp_feat self._fail_reason = fail_reason + self._api_prov_name = api_prov_name @classmethod def from_dict(cls, dikt) -> 'APIProviderEnrolmentDetails': @@ -72,7 +71,7 @@ class APIProviderEnrolmentDetails(Model): return util.deserialize_model(dikt, cls) @property - def api_prov_dom_id(self): + 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 @@ -83,7 +82,7 @@ class APIProviderEnrolmentDetails(Model): return self._api_prov_dom_id @api_prov_dom_id.setter - def api_prov_dom_id(self, api_prov_dom_id): + 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 @@ -95,7 +94,7 @@ class APIProviderEnrolmentDetails(Model): self._api_prov_dom_id = api_prov_dom_id @property - def reg_sec(self): + 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 @@ -106,7 +105,7 @@ class APIProviderEnrolmentDetails(Model): return self._reg_sec @reg_sec.setter - def reg_sec(self, reg_sec): + 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 @@ -120,7 +119,7 @@ class APIProviderEnrolmentDetails(Model): self._reg_sec = reg_sec @property - def api_prov_funcs(self): + 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 @@ -131,7 +130,7 @@ class APIProviderEnrolmentDetails(Model): return self._api_prov_funcs @api_prov_funcs.setter - def api_prov_funcs(self, api_prov_funcs): + 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 @@ -145,7 +144,7 @@ class APIProviderEnrolmentDetails(Model): self._api_prov_funcs = api_prov_funcs @property - def api_prov_dom_info(self): + 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 @@ -156,7 +155,7 @@ class APIProviderEnrolmentDetails(Model): return self._api_prov_dom_info @api_prov_dom_info.setter - def api_prov_dom_info(self, api_prov_dom_info): + 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 @@ -168,7 +167,7 @@ class APIProviderEnrolmentDetails(Model): self._api_prov_dom_info = api_prov_dom_info @property - def supp_feat(self): + 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 @@ -179,7 +178,7 @@ class APIProviderEnrolmentDetails(Model): return self._supp_feat @supp_feat.setter - def supp_feat(self, supp_feat): + 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 @@ -193,7 +192,7 @@ class APIProviderEnrolmentDetails(Model): self._supp_feat = supp_feat @property - def fail_reason(self): + 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 @@ -204,7 +203,7 @@ class APIProviderEnrolmentDetails(Model): return self._fail_reason @fail_reason.setter - def fail_reason(self, fail_reason): + 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 @@ -214,3 +213,26 @@ class APIProviderEnrolmentDetails(Model): """ self._fail_reason = fail_reason + + @property + def api_prov_name(self) -> str: + """Gets the api_prov_name of this APIProviderEnrolmentDetails. + + Represents the API provider name. # noqa: E501 + + :return: The api_prov_name of this APIProviderEnrolmentDetails. + :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 APIProviderEnrolmentDetails. + + Represents the API provider name. # noqa: E501 + + :param api_prov_name: The api_prov_name of this APIProviderEnrolmentDetails. + :type api_prov_name: str + """ + + self._api_prov_name = api_prov_name 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 acd27280a669540b1aa61a46bb8769b2303dfa3e..a9eeeceb6706559457d964725cec2042e32eb3c8 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,15 +1,10 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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 + class APIProviderEnrolmentDetailsPatch(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +45,7 @@ class APIProviderEnrolmentDetailsPatch(Model): return util.deserialize_model(dikt, cls) @property - def api_prov_funcs(self): + def api_prov_funcs(self) -> List[APIProviderFunctionDetails]: """Gets the api_prov_funcs of this APIProviderEnrolmentDetailsPatch. 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. # noqa: E501 @@ -61,7 +56,7 @@ class APIProviderEnrolmentDetailsPatch(Model): return self._api_prov_funcs @api_prov_funcs.setter - def api_prov_funcs(self, api_prov_funcs): + def api_prov_funcs(self, api_prov_funcs: List[APIProviderFunctionDetails]): """Sets the api_prov_funcs of this APIProviderEnrolmentDetailsPatch. 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. # noqa: E501 @@ -75,7 +70,7 @@ class APIProviderEnrolmentDetailsPatch(Model): self._api_prov_funcs = api_prov_funcs @property - def api_prov_dom_info(self): + def api_prov_dom_info(self) -> str: """Gets the api_prov_dom_info of this APIProviderEnrolmentDetailsPatch. Generic information related to the API provider domain such as details of the API provider applications. # noqa: E501 @@ -86,7 +81,7 @@ class APIProviderEnrolmentDetailsPatch(Model): return self._api_prov_dom_info @api_prov_dom_info.setter - def api_prov_dom_info(self, api_prov_dom_info): + def api_prov_dom_info(self, api_prov_dom_info: str): """Sets the api_prov_dom_info of this APIProviderEnrolmentDetailsPatch. Generic information related to the API provider domain such as details of the API provider applications. # noqa: E501 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 9c2b1da61c34951fd9d5c9441e6e5ee580a993b4..20cc6f7ef2fa0f0731d909c3fdc43124cf40892e 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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_any_of import ApiProviderFuncRoleAnyOf from api_provider_management import util +from api_provider_management.models.base_model import Model -from api_provider_management.models.api_provider_func_role_any_of import ApiProviderFuncRoleAnyOf # noqa: E501 class ApiProviderFuncRole(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_any_of.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role_any_of.py deleted file mode 100644 index 8d4b9b03cd933dd40e4d5efabb7781863e05b54e..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/api_provider_func_role_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from api_provider_management.models.base_model_ import Model -from api_provider_management import util - - -class ApiProviderFuncRoleAnyOf(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - AEF = "AEF" - APF = "APF" - AMF = "AMF" - def __init__(self): # noqa: E501 - """ApiProviderFuncRoleAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'ApiProviderFuncRoleAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The ApiProviderFuncRole_anyOf of this ApiProviderFuncRoleAnyOf. # noqa: E501 - :rtype: ApiProviderFuncRoleAnyOf - """ - return util.deserialize_model(dikt, cls) 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 eb21ba7e963f7062c81e444efd1a4ee9ab1d4f00..2646b41854e1b1b47300bf11e1400edf12f22934 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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). @@ -62,7 +56,7 @@ class APIProviderFunctionDetails(Model): return util.deserialize_model(dikt, cls) @property - def api_prov_func_id(self): + 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 @@ -73,7 +67,7 @@ class APIProviderFunctionDetails(Model): return self._api_prov_func_id @api_prov_func_id.setter - def api_prov_func_id(self, api_prov_func_id): + 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 @@ -85,7 +79,7 @@ class APIProviderFunctionDetails(Model): self._api_prov_func_id = api_prov_func_id @property - def reg_info(self): + def reg_info(self) -> RegistrationInformation: """Gets the reg_info of this APIProviderFunctionDetails. @@ -95,7 +89,7 @@ class APIProviderFunctionDetails(Model): return self._reg_info @reg_info.setter - def reg_info(self, reg_info): + def reg_info(self, reg_info: RegistrationInformation): """Sets the reg_info of this APIProviderFunctionDetails. @@ -108,7 +102,7 @@ class APIProviderFunctionDetails(Model): self._reg_info = reg_info @property - def api_prov_func_role(self): + def api_prov_func_role(self) -> ApiProviderFuncRole: """Gets the api_prov_func_role of this APIProviderFunctionDetails. @@ -118,7 +112,7 @@ class APIProviderFunctionDetails(Model): return self._api_prov_func_role @api_prov_func_role.setter - def api_prov_func_role(self, api_prov_func_role): + def api_prov_func_role(self, api_prov_func_role: ApiProviderFuncRole): """Sets the api_prov_func_role of this APIProviderFunctionDetails. @@ -131,7 +125,7 @@ class APIProviderFunctionDetails(Model): self._api_prov_func_role = api_prov_func_role @property - def api_prov_func_info(self): + 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 @@ -142,7 +136,7 @@ class APIProviderFunctionDetails(Model): return self._api_prov_func_info @api_prov_func_info.setter - def api_prov_func_info(self, api_prov_func_info): + 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 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 similarity index 92% rename from services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model_.py rename to services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/models/base_model.py index bd3a034f6d93e20fafba7a238d4c89172ab4a603..621b8c7d108e389ec2467de39e26e0ff2a6683a5 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,6 +1,4 @@ import pprint - -import six import typing from api_provider_management import util @@ -8,14 +6,14 @@ from api_provider_management import util T = typing.TypeVar('T') -class Model(object): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. - openapi_types = {} + openapi_types: typing.Dict[str, type] = {} # attributeMap: The key is attribute name and the # value is json key in definition. - attribute_map = {} + attribute_map: typing.Dict[str, str] = {} @classmethod def from_dict(cls: typing.Type[T], dikt) -> T: @@ -29,7 +27,7 @@ class Model(object): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 58aae71fa366b79b77982308d29a36a37de0738c..6d1bfc1552b2e79905697a70bc0d2cb4da885cc0 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 44fe3443f43e2b09ef86fec1c55921eaa422bc51..89e0807ffc704af18bef569df3585aa7fc21e36a 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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 -import re # noqa: E501 + class ProblemDetails(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,7 +239,7 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 @@ -256,7 +250,7 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 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 7e1b08a5a690d25adfca1a4ad65b9d0a4ce5c642..5255ef8ca3e8a88be1d60af0b8b3fa4c1fb06e1b 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -48,7 +44,7 @@ class RegistrationInformation(Model): return util.deserialize_model(dikt, cls) @property - def api_prov_pub_key(self): + 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 @@ -59,7 +55,7 @@ class RegistrationInformation(Model): return self._api_prov_pub_key @api_prov_pub_key.setter - def api_prov_pub_key(self, api_prov_pub_key): + 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 @@ -73,7 +69,7 @@ class RegistrationInformation(Model): self._api_prov_pub_key = api_prov_pub_key @property - def api_prov_cert(self): + def api_prov_cert(self) -> str: """Gets the api_prov_cert of this RegistrationInformation. API provider domain function's client certificate # noqa: E501 @@ -84,7 +80,7 @@ class RegistrationInformation(Model): return self._api_prov_cert @api_prov_cert.setter - def api_prov_cert(self, api_prov_cert): + 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 diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/openapi/openapi.yaml b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/openapi/openapi.yaml index 59ea36c94dd56e2d674f07c5c18368fd133e54c8..60fd3db1a7bedc3d233410272113cd3e81095ef3 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/openapi/openapi.yaml @@ -1,15 +1,15 @@ openapi: 3.0.0 info: - description: "API for API provider domain functions management. \n© 2022, 3GPP\ + description: "API for API provider domain functions management. \n© 2024, 3GPP\ \ Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights\ \ reserved.\n" title: CAPIF_API_Provider_Management_API - version: 1.1.0 + version: 1.2.0-alpha.3 externalDocs: - description: 3GPP TS 29.222 V17.5.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V18.5.0 Common API Framework for 3GPP Northbound APIs url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: -- url: '{apiRoot}/api-provider-management/v1' +- url: "{apiRoot}/api-provider-management/v1" variables: apiRoot: default: https://example.com @@ -77,7 +77,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -261,7 +261,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -371,7 +371,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -400,10 +400,90 @@ paths: description: Generic Error x-openapi-router-controller: api_provider_management.controllers.default_controller components: + responses: + "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 + "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 schemas: APIProviderEnrolmentDetails: description: Represents an API provider domain's enrolment details. example: + apiProvName: apiProvName regSec: regSec apiProvFuncs: - apiProvFuncId: apiProvFuncId @@ -411,11 +491,13 @@ components: regInfo: apiProvCert: apiProvCert apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF - apiProvFuncId: apiProvFuncId apiProvFuncInfo: apiProvFuncInfo regInfo: apiProvCert: apiProvCert apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF failReason: failReason apiProvDomId: apiProvDomId apiProvDomInfo: apiProvDomInfo @@ -448,7 +530,7 @@ components: 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]*$ + pattern: "^[A-Fa-f0-9]*$" title: suppFeat type: string failReason: @@ -456,18 +538,23 @@ components: 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 + apiProvName: + description: Represents the API provider name. + title: apiProvName + type: string required: - regSec title: APIProviderEnrolmentDetails type: object APIProviderFunctionDetails: - description: Represents API provider domain function's details. + description: Represents an API provider domain function's details. example: apiProvFuncId: apiProvFuncId apiProvFuncInfo: apiProvFuncInfo regInfo: apiProvCert: apiProvCert apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF properties: apiProvFuncId: description: | @@ -507,20 +594,9 @@ components: - apiProvPubKey title: RegistrationInformation type: object - ApiProviderFuncRole: - anyOf: - - $ref: '#/components/schemas/ApiProviderFuncRole_anyOf' - - 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 APIProviderEnrolmentDetailsPatch: - description: Represents an API provider domain's enrolment details. + description: | + Represents a list of modifications for the API provider domain's enrolment details. properties: apiProvFuncs: description: "A list of individual API provider domain functions details.\ @@ -531,12 +607,30 @@ components: 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 + title: APIProviderEnrolmentDetailsPatch 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: "Indicates the role (e.g. AEF, APF, etc.) of an API provider domain\ + \ function. \nPossible values are:\n- AEF: API provider function is API Exposing\ + \ Function.\n- APF: API provider function is API Publishing Function.\n- AMF:\ + \ API Provider function is API Management Function.\n" + title: ApiProviderFuncRole ProblemDetails: description: Represents additional information and details on an error response. properties: @@ -545,8 +639,8 @@ components: 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. + 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: @@ -563,14 +657,13 @@ components: 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. + 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. + description: | + Description of invalid parameters, for a request rejected due to invalid parameters. items: $ref: '#/components/schemas/InvalidParam' minItems: 1 @@ -579,7 +672,7 @@ components: 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]*$ + pattern: "^[A-Fa-f0-9]*$" title: suppFeat type: string title: ProblemDetails @@ -589,15 +682,16 @@ components: title: type type: string InvalidParam: - description: Represents the description of invalid parameters, for a request - rejected due to invalid parameters. + 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. + 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". + description: "A human-readable reason, e.g. \"must be a positive integer\"\ + ." title: reason type: string required: @@ -607,13 +701,6 @@ components: 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]*$ + pattern: "^[A-Fa-f0-9]*$" title: suppFeat type: string - ApiProviderFuncRole_anyOf: - enum: - - AEF - - APF - - AMF - title: ApiProviderFuncRole_anyOf - type: string 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 new file mode 100644 index 0000000000000000000000000000000000000000..7be5050e36aed914ad5992b3087322dc02cfb0ec --- /dev/null +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/__init__.py @@ -0,0 +1,15 @@ +import logging + +import connexion +from api_provider_management.encoder import JSONEncoder +from flask_testing import TestCase + + +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_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 new file mode 100644 index 0000000000000000000000000000000000000000..87052d9518b34b8ef3fd5a947244085382c5c396 --- /dev/null +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_default_controller.py @@ -0,0 +1,65 @@ +import unittest + +from api_provider_management.test import BaseTestCase +from flask import json + + +class TestDefaultController(BaseTestCase): + """DefaultController integration test stubs""" + + def test_registrations_post(self): + """Test case for registrations_post + + + """ + api_provider_enrolment_details = {"apiProvName":"apiProvName","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","apiProvDomId":"apiProvDomId","apiProvDomInfo":"apiProvDomInfo","suppFeat":"suppFeat"} + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + response = self.client.open( + '/api-provider-management/v1/registrations', + method='POST', + headers=headers, + data=json.dumps(api_provider_enrolment_details), + content_type='application/json') + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_registrations_registration_id_delete(self): + """Test case for registrations_registration_id_delete + + + """ + headers = { + 'Accept': 'application/problem+json', + } + response = self.client.open( + '/api-provider-management/v1/registrations/{registration_id}'.format(registration_id='registration_id_example'), + method='DELETE', + headers=headers) + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_registrations_registration_id_put(self): + """Test case for registrations_registration_id_put + + + """ + api_provider_enrolment_details = {"apiProvName":"apiProvName","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","apiProvDomId":"apiProvDomId","apiProvDomInfo":"apiProvDomInfo","suppFeat":"suppFeat"} + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + response = self.client.open( + '/api-provider-management/v1/registrations/{registration_id}'.format(registration_id='registration_id_example'), + method='PUT', + headers=headers, + data=json.dumps(api_provider_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_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 new file mode 100644 index 0000000000000000000000000000000000000000..6d8533afd9dca27b58ee3aeea4b1d21cf2febd71 --- /dev/null +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/test/test_individual_api_provider_enrolment_details_controller.py @@ -0,0 +1,31 @@ +import unittest + +from api_provider_management.test import BaseTestCase +from flask import json + + +class TestIndividualAPIProviderEnrolmentDetailsController(BaseTestCase): + """IndividualAPIProviderEnrolmentDetailsController integration test stubs""" + + def test_modify_ind_api_provider_enrolment(self): + """Test case for modify_ind_api_provider_enrolment + + + """ + api_provider_enrolment_details_patch = openapi_server.APIProviderEnrolmentDetailsPatch() + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/merge-patch+json', + } + response = self.client.open( + '/api-provider-management/v1/registrations/{registration_id}'.format(registration_id='registration_id_example'), + method='PATCH', + headers=headers, + data=json.dumps(api_provider_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_Provider_Management_API/api_provider_management/typing_utils.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..d21c4f633653a0eae75d04b2f6eff684ff9d200d 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/typing_utils.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/typing_utils.py @@ -1,9 +1,6 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): - import typing def is_generic(klass): """ Determine whether klass is a generic class """ 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 431a28c6f522dec54599eb6e30ac9f9e4a040d49..f4f15bc5f02e1dbdc1fb7091417a2faf6935e372 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,6 @@ import datetime -import six -import typing_utils + +from api_provider_management import typing_utils def serialize_clean_camel_case(obj): @@ -16,10 +16,10 @@ def clean_empty(d): return { k: v for k, v in ((k, clean_empty(v)) for k, v in d.items()) - if v + if v is not None or (isinstance(v, list) and len(v) == 0) } if isinstance(d, list): - return [v for v in map(clean_empty, d) if v] + return [v for v in map(clean_empty, d) if v is not None] return d @@ -51,7 +51,6 @@ def dict_to_camel_case(my_dict): return result - def _deserialize(data, klass): """Deserializes dict, list, str into an object. @@ -63,7 +62,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -92,7 +91,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -157,7 +156,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -192,4 +191,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/wsgi copy.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/wsgi copy.py new file mode 100644 index 0000000000000000000000000000000000000000..6026b0fa96078634d3455ab93d71dcdc78774276 --- /dev/null +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/wsgi copy.py @@ -0,0 +1,4 @@ +from app import app + +if __name__ == "__main__": + app.run() diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/wsgi.py b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/wsgi.py index 6026b0fa96078634d3455ab93d71dcdc78774276..92585dc226d1ee5af883f2ddf10fd2b210717ad8 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/wsgi.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/wsgi.py @@ -1,4 +1,4 @@ -from app import app +from api_provider_management.app import app if __name__ == "__main__": app.run() diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/git_push.sh b/services/TS29222_CAPIF_API_Provider_Management_API/git_push.sh index 9405f72e950cdb8ca24c3cf4d15cee7eac62fde7..f53a75d4fabe760cce49eddfd62fcc702938ea90 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/git_push.sh +++ b/services/TS29222_CAPIF_API_Provider_Management_API/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi 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 5ec3096850c15a6a5ec6f9ad7173e61a122baf97..27cd6183ab9b3cc7c28f67350c0662a8586971b9 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh +++ b/services/TS29222_CAPIF_API_Provider_Management_API/prepare_provider.sh @@ -12,8 +12,6 @@ curl -vv -k -retry 30 \ --header "X-Vault-Token: $VAULT_TOKEN" \ --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" 2>/dev/null | jq -r '.data.data.pub_key' -j > /usr/src/app/api_provider_management/pubkey.pem - -gunicorn --bind 0.0.0.0:8080 \ +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/api_provider_management wsgi:app - diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt b/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt index a5c9ccef16b0c711e5d502db5efc6f574eb97476..0b5ec10e2e2b3f5deb197743248e0fbd8d8bd042 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt +++ b/services/TS29222_CAPIF_API_Provider_Management_API/requirements.txt @@ -1,23 +1,23 @@ -connexion[swagger-ui] == 2.14.2; python_version>="3.6" +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 +setuptools == 74.0.0 +Flask == 3.0.3 pymongo == 4.7.3 redis == 4.5.4 -flask_jwt_extended == 4.4.4 +flask_jwt_extended == 4.6.0 cryptography == 42.0.8 rfc3987 == 1.3.8 -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-instrumentation == 0.40b0 +opentelemetry-instrumentation-flask == 0.40b0 +opentelemetry-instrumentation-redis == 0.40b0 +opentelemetry-instrumentation-pymongo == 0.40b0 +opentelemetry-exporter-otlp == 1.19.0 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.17.0 -opentelemetry-sdk == 1.17.0 +opentelemetry-api == 1.19.0 +opentelemetry-sdk == 1.19.0 flask_executor == 1.0.0 -Werkzeug == 2.2.3 +werkzeug == 3.0.4 gunicorn == 22.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/setup.py b/services/TS29222_CAPIF_API_Provider_Management_API/setup.py index ac408ac3938277e2847fe0056dcde52dd04290ef..0f5d4a6207ca5caac051c10b37e4276ac23c1256 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/setup.py +++ b/services/TS29222_CAPIF_API_Provider_Management_API/setup.py @@ -1,6 +1,3 @@ -# coding: utf-8 - -import sys from setuptools import setup, find_packages NAME = "api_provider_management" @@ -33,7 +30,7 @@ setup( entry_points={ 'console_scripts': ['api_provider_management=api_provider_management.__main__:main']}, long_description="""\ - API for API provider domain functions management. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for API provider domain functions management. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/test-requirements.txt b/services/TS29222_CAPIF_API_Provider_Management_API/test-requirements.txt index 202a684feef71ff540d6aa528d348febf0b37d1e..58f51d6a00272d7515a20e3618f345b73c68afa0 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/test-requirements.txt +++ b/services/TS29222_CAPIF_API_Provider_Management_API/test-requirements.txt @@ -1,4 +1,4 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 +pytest~=7.1.0 pytest-cov>=2.8.1 -pytest-randomly == 1.2.3 # needed for python 2.7+3.4 -Flask-Testing == 0.8.0 +pytest-randomly>=1.2.3 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_API_Provider_Management_API/tox.ini b/services/TS29222_CAPIF_API_Provider_Management_API/tox.ini index 5dbd9624ce969db078cb84dbd4a749a54258deba..371a15e8d747f18c6f0b33d5a0adadfa05c296d0 100644 --- a/services/TS29222_CAPIF_API_Provider_Management_API/tox.ini +++ b/services/TS29222_CAPIF_API_Provider_Management_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= pytest --cov=api_provider_management 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 9024036c49dbed352a31b1de587254487b3cf568..eeda92fd5bcfe53d25713964b3ddc9a8a64b43b3 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/FILES @@ -1,27 +1,28 @@ .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/access_control_policy_list.py -openapi_server/models/api_invoker_policy.py -openapi_server/models/base_model_.py -openapi_server/models/invalid_param.py -openapi_server/models/problem_details.py -openapi_server/models/time_range_list.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 +capif_acl/__init__.py +capif_acl/__main__.py +capif_acl/controllers/__init__.py +capif_acl/controllers/default_controller.py +capif_acl/controllers/security_controller.py +capif_acl/encoder.py +capif_acl/models/__init__.py +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/problem_details.py +capif_acl/models/time_range_list.py +capif_acl/openapi/openapi.yaml +capif_acl/test/__init__.py +capif_acl/test/test_default_controller.py +capif_acl/typing_utils.py +capif_acl/util.py requirements.txt setup.py test-requirements.txt diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/VERSION index 4be2c727ad97a7352120a34d6bd4afa3f77e2ff2..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/Dockerfile b/services/TS29222_CAPIF_Access_Control_Policy_API/Dockerfile index 9c1382590feac6390a85c9ac48dc55b64b805496..b10cb585a4ba305ee3ecf4eee64194f49d4f4a25 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/Dockerfile +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/README.md b/services/TS29222_CAPIF_Access_Control_Policy_API/README.md index 40feae4be1daaa8b8b1987f5fb318f79e56391b4..1222b0aaa2f6cd49ca656fe3a9c8ba7505ee9ccc 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/README.md +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/README.md @@ -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 openapi_server . +docker build -t capif_acl . # starting up a container -docker run -p 8080:8080 openapi_server +docker run -p 8080:8080 capif_acl ``` \ No newline at end of file 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 59a0f90b9976dfd4ee1cecb0173ec6b03cf4cd8f..0b39d964d744e37f7813f293083ed7a5013f136b 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 @@ -1,28 +1,27 @@ #!/usr/bin/env python3 -import connexion - -import encoder - import logging - -from flask_jwt_extended import JWTManager, jwt_required, create_access_token -from logging.handlers import RotatingFileHandler -from config import Config -from datetime import datetime import os -from fluent import sender -from core.consumer_messager import Subscriber -from flask_executor import Executor +from datetime import datetime +from logging.handlers import RotatingFileHandler + +import connexion from flask_apscheduler import APScheduler -from opentelemetry.instrumentation.flask import FlaskInstrumentor +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.trace.propagation.tracecontext import TraceContextTextMapPropagator +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.instrumentation.redis import RedisInstrumentor +from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator + +import encoder +from config import Config +from core.consumer_messager import Subscriber NAME = "Acl-Service" @@ -113,8 +112,8 @@ def verbose_formatter(): datefmt='%d/%m/%Y %H:%M:%S' ) -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = encoder.CustomJSONEncoder app.add_api('openapi.yaml', arguments={'title': 'CAPIF_Access_Control_policy_API'}, pythonic_params=True) diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/config.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/config.py index 01f9914cc141eb3c49fd73506e9b1c5470edd781..abfa40820dc99bf2c64c7bf0a31994eedc414e03 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/config.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): 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 52174b1eee09160d184a65d3d412954f187240db..bf9857c670738671f33772d16a47a1a3e26152d7 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,8 +1,8 @@ - from functools import wraps -from flask import request, current_app + from cryptography import x509 from cryptography.hazmat.backends import default_backend +from flask import request, current_app from ..core.accesscontrolpolicyapi import accessControlPolicyApi @@ -24,7 +24,6 @@ def cert_validation(): return __cert_validation return _cert_validation - @cert_validation() def access_control_policy_list_service_api_id_get(service_api_id, aef_id, api_invoker_id=None, supported_features=None): # noqa: E501 """access_control_policy_list_service_api_id_get 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 new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller.py @@ -0,0 +1,2 @@ + + 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 deleted file mode 100644 index 6d294ffd6df1a26a469dbb4e72533b01503468dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/controllers/security_controller_.py +++ /dev/null @@ -1,2 +0,0 @@ -from typing import List - diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/accesscontrolpolicyapi.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/accesscontrolpolicyapi.py index 48bf04e69b04e537e5c3de4f957a87fabe8125c8..27e7f248c2c19747c049625de6cd202a2e31da4b 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/accesscontrolpolicyapi.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/accesscontrolpolicyapi.py @@ -1,8 +1,9 @@ -from ..core.resources import Resource from flask import current_app + from .responses import make_response, not_found_error, internal_server_error +from ..core.resources import Resource from ..models.access_control_policy_list import AccessControlPolicyList -from ..util import dict_to_camel_case, clean_empty, serialize_clean_camel_case +from ..util import serialize_clean_camel_case class accessControlPolicyApi(Resource): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/consumer_messager.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/consumer_messager.py index 0da24408e801f22693e0412636df090680c1424c..141b1604a92f08c4b80042aee16602daf5d428f4 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/consumer_messager.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/consumer_messager.py @@ -1,15 +1,20 @@ # subscriber.py +import json + import redis from config import Config -from .internal_service_ops import InternalServiceOps from flask import current_app +from .internal_service_ops import InternalServiceOps + + class Subscriber(): def __init__(self): self.config = Config().get_config() - #set this params using config params - self.r = redis.Redis(host=self.config["redis"]["host"], port=self.config["redis"]["port"], db=self.config["redis"]["db"]) + # set this params using config params + self.r = redis.Redis( + host=self.config["redis"]["host"], port=self.config["redis"]["port"], db=self.config["redis"]["db"]) self.acls_ops = InternalServiceOps() self.p = self.r.pubsub() self.p.subscribe("acls-messages", "internal-messages") @@ -19,19 +24,25 @@ class Subscriber(): if raw_message["type"] == "message" and raw_message["channel"].decode('utf-8') == "acls-messages": current_app.logger.info("acls-messages recived") message, *ids = raw_message["data"].decode('utf-8').split(":") - if message == "create-acl" and len(ids)==3: + if message == "create-acl" and len(ids) == 3: self.acls_ops.create_acl(ids[0], ids[1], ids[2]) - if message == "remove-acl" and len(ids)==3: + if message == "remove-acl" and len(ids) == 3: self.acls_ops.remove_acl(ids[0], ids[1], ids[2]) - if message == "remove-acl" and len(ids)==1: + if message == "remove-acl" and len(ids) == 1: self.acls_ops.remove_invoker_acl(ids[0]) - if raw_message["type"] == "message" and raw_message["channel"].decode('utf-8') == "internal-messages": - message, *ids = raw_message["data"].decode('utf-8').split(":") - if message == "invoker-removed" and len(ids)>0: - self.acls_ops.remove_invoker_acl(ids[0]) - if message == "provider-removed" or message == "service-removed" and len(ids) > 0: - self.acls_ops.remove_provider_acls(ids[0]) - - - + if raw_message["type"] == "message" and raw_message["channel"].decode('utf-8') == "internal-messages": + current_app.logger.info("New internal event received") + internal_redis_event = json.loads( + raw_message["data"].decode('utf-8')) + if internal_redis_event.get('event') == "INVOKER-REMOVED": + api_invoker_id = internal_redis_event.get( + 'information', {"api_invoker_id": None}).get('api_invoker_id') + if api_invoker_id is not None: + self.acls_ops.remove_invoker_acl(api_invoker_id) + elif internal_redis_event.get('event') == "PROVIDER-REMOVED": + aef_ids = internal_redis_event.get( + 'information', {"aef_ids": []}).get('aef_ids') + if len(aef_ids) > 0: + for aef_id in aef_ids: + self.acls_ops.remove_provider_acls(aef_id) diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/internal_service_ops.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/internal_service_ops.py index 1e5aa20c0d708dee31e51b2586e0295ba3ea629a..520f35c1b51515d076805f69ff04be934e7ebb87 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/internal_service_ops.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/internal_service_ops.py @@ -1,12 +1,13 @@ +from datetime import datetime, timedelta + from flask import current_app -from .resources import Resource from models.api_invoker_policy import ApiInvokerPolicy from models.time_range_list import TimeRangeList -from datetime import datetime, timedelta +from util import dict_to_camel_case from .redis_event import RedisEvent -from util import dict_to_camel_case, clean_empty +from .resources import Resource class InternalServiceOps(Resource): @@ -59,7 +60,7 @@ class InternalServiceOps(Resource): "apiInvokerPolicies": inserted_service_acls_camel['apiInvokerPolicies'] } RedisEvent("ACCESS_CONTROL_POLICY_UPDATE", - "accCtrlPolList", accCtrlPolListExt).send_event() + acc_ctrl_pol_list=accCtrlPolListExt).send_event() current_app.logger.info( f"Invoker ACL added for invoker: {invoker_id} for service: {service_id}") diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/redis_event.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/redis_event.py index 40e3e406830e58a72359e4283d8ff6e0d66bb893..77526edbb3d7f0d9506eea879469871e83f2ee93 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/redis_event.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/redis_event.py @@ -1,12 +1,21 @@ -from encoder import JSONEncoder -from .publisher import Publisher import json +from encoder import CustomJSONEncoder + +from .publisher import Publisher + publisher_ops = Publisher() class RedisEvent(): - def __init__(self, event, event_detail_key=None, information=None) -> None: + def __init__(self, + event, + service_api_descriptions=None, + api_ids=None, + api_invoker_ids=None, + acc_ctrl_pol_list=None, + invocation_logs=None, + api_topo_hide=None) -> None: self.EVENTS_ENUM = [ 'SERVICE_API_AVAILABLE', 'SERVICE_API_UNAVAILABLE', @@ -27,12 +36,26 @@ class RedisEvent(): self.redis_event = { "event": event } - if event_detail_key != None and information != None: - self.redis_event['key'] = event_detail_key - self.redis_event['information'] = information + # Add event filter keys to an auxiliary object + event_detail = { + "serviceAPIDescriptions": service_api_descriptions, + "apiIds": api_ids, + "apiInvokerIds": api_invoker_ids, + "accCtrlPolList": acc_ctrl_pol_list, + "invocationLogs": invocation_logs, + "apiTopoHide": api_topo_hide + } + + # Filter keys with not None values + filtered_event_detail = {k: v for k, + v in event_detail.items() if v is not None} + + # If there are valid values then add to redis event. + if filtered_event_detail: + self.redis_event["event_detail"] = filtered_event_detail def to_string(self): - return json.dumps(self.redis_event, cls=JSONEncoder) + return json.dumps(self.redis_event, cls=CustomJSONEncoder) def send_event(self): publisher_ops.publish_message("events", self.to_string()) diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/resources.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/resources.py index d5a3552d6b3459a77d30df65d0bbda4a86c7fa61..053c10786ef6135e5fa994c2d825c36419c95112 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/resources.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/resources.py @@ -1,4 +1,5 @@ from abc import ABC + from db.db import MongoDatabse 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 9f8c3e665d94e8d98044638870dcc65a9dab1a91..8f975cbf426c304c4ae0681f65af67fcad9abca5 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 @@ -1,14 +1,16 @@ -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder -from flask import Response -from ..util import dict_to_camel_case, clean_empty, serialize_clean_camel_case import json +from flask import Response + +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails +from ..util import serialize_clean_camel_case + mimetype = "application/json" def make_response(object, status): - res = Response(json.dumps(object, cls=JSONEncoder), status=status, mimetype=mimetype) + res = Response(json.dumps(object, cls=CustomJSONEncoder), status=status, mimetype=mimetype) return res @@ -17,25 +19,25 @@ def internal_server_error(detail, cause): prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=500, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=500, mimetype=mimetype) def forbidden_error(detail, cause): prob = ProblemDetails(title="Forbidden", status=403, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=403, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=403, mimetype=mimetype) 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=JSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) 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=JSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/db/db.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/db/db.py index e485c8923ea861c669454a68eb99716f86406023..66a4060978ba6a2e8c4c7ccf9303e7fc03707c21 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/db/db.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/db/db.py @@ -1,11 +1,12 @@ +import os import time -from pymongo import MongoClient -from pymongo.errors import AutoReconnect -from config import Config + from bson.codec_options import CodecOptions -import os +from config import Config from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from pymongo import MongoClient +from pymongo.errors import AutoReconnect monitoring_value = os.environ.get("MONITORING", "").lower() if monitoring_value == "true": 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 80bad8fa9220ab873e044b7adc0a849746088ad5..9afbbe1de7d3bb358283f2bed1f0ab090aff349b 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,20 +1,18 @@ -from connexion.apps.flask_app import FlaskJSONEncoder -import six +from capif_acl.models.base_model import Model +from connexion.jsonifier import JSONEncoder -from models.base_model_ import Model - -class JSONEncoder(FlaskJSONEncoder): +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + 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 4c4e60f91034863564e2c69f9c75a1d883d6990d..d036df693ea41dfaa3debffffad0462c1fcd8e4a 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,10 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # 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.problem_details import ProblemDetails -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 b3cacd4164aab94158436597b462dc967f91a2f7..03850940694ffde9a838d5fda1750ea61fb0cc1f 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,15 +1,10 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.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). @@ -45,7 +40,7 @@ class AccessControlPolicyList(Model): return util.deserialize_model(dikt, cls) @property - def api_invoker_policies(self): + def api_invoker_policies(self) -> List[ApiInvokerPolicy]: """Gets the api_invoker_policies of this AccessControlPolicyList. Policy of each API invoker. # noqa: E501 @@ -56,7 +51,7 @@ class AccessControlPolicyList(Model): return self._api_invoker_policies @api_invoker_policies.setter - def api_invoker_policies(self, api_invoker_policies): + def api_invoker_policies(self, api_invoker_policies: List[ApiInvokerPolicy]): """Sets the api_invoker_policies of this AccessControlPolicyList. Policy of each API invoker. # noqa: E501 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 86ffec0cf84c8c867ebbd8db1594eb2746140591..1798a003e165a12a7413a4168f12248dcad006c6 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,16 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.time_range_list import TimeRangeList from capif_acl import util - +from capif_acl.models.base_model import Model 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). @@ -60,7 +55,7 @@ class ApiInvokerPolicy(Model): return util.deserialize_model(dikt, cls) @property - def api_invoker_id(self): + def api_invoker_id(self) -> str: """Gets the api_invoker_id of this ApiInvokerPolicy. API invoker ID assigned by the CAPIF core function # noqa: E501 @@ -71,7 +66,7 @@ class ApiInvokerPolicy(Model): return self._api_invoker_id @api_invoker_id.setter - def api_invoker_id(self, api_invoker_id): + def api_invoker_id(self, api_invoker_id: str): """Sets the api_invoker_id of this ApiInvokerPolicy. API invoker ID assigned by the CAPIF core function # noqa: E501 @@ -85,7 +80,7 @@ class ApiInvokerPolicy(Model): self._api_invoker_id = api_invoker_id @property - def allowed_total_invocations(self): + def allowed_total_invocations(self) -> int: """Gets the allowed_total_invocations of this ApiInvokerPolicy. Total number of invocations allowed on the service API by the API invoker. # noqa: E501 @@ -96,7 +91,7 @@ class ApiInvokerPolicy(Model): return self._allowed_total_invocations @allowed_total_invocations.setter - def allowed_total_invocations(self, allowed_total_invocations): + def allowed_total_invocations(self, allowed_total_invocations: int): """Sets the allowed_total_invocations of this ApiInvokerPolicy. Total number of invocations allowed on the service API by the API invoker. # noqa: E501 @@ -108,7 +103,7 @@ class ApiInvokerPolicy(Model): self._allowed_total_invocations = allowed_total_invocations @property - def allowed_invocations_per_second(self): + def allowed_invocations_per_second(self) -> int: """Gets the allowed_invocations_per_second of this ApiInvokerPolicy. Invocations per second allowed on the service API by the API invoker. # noqa: E501 @@ -119,7 +114,7 @@ class ApiInvokerPolicy(Model): return self._allowed_invocations_per_second @allowed_invocations_per_second.setter - def allowed_invocations_per_second(self, allowed_invocations_per_second): + def allowed_invocations_per_second(self, allowed_invocations_per_second: int): """Sets the allowed_invocations_per_second of this ApiInvokerPolicy. Invocations per second allowed on the service API by the API invoker. # noqa: E501 @@ -131,7 +126,7 @@ class ApiInvokerPolicy(Model): self._allowed_invocations_per_second = allowed_invocations_per_second @property - def allowed_invocation_time_range_list(self): + def allowed_invocation_time_range_list(self) -> List[TimeRangeList]: """Gets the allowed_invocation_time_range_list of this ApiInvokerPolicy. The time ranges during which the invocations are allowed on the service API by the API invoker. # noqa: E501 @@ -142,7 +137,7 @@ class ApiInvokerPolicy(Model): return self._allowed_invocation_time_range_list @allowed_invocation_time_range_list.setter - def allowed_invocation_time_range_list(self, allowed_invocation_time_range_list): + def allowed_invocation_time_range_list(self, allowed_invocation_time_range_list: List[TimeRangeList]): """Sets the allowed_invocation_time_range_list of this ApiInvokerPolicy. The time ranges during which the invocations are allowed on the service API by the API invoker. # noqa: E501 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 similarity index 95% rename from services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model_.py rename to services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/models/base_model.py index cce5379c767ede112d5fdcdcffa34403bddb2884..2e2e14aa18aa54a98887ef28db4f26653eb25704 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,6 +1,4 @@ import pprint - -import six import typing from capif_acl import util @@ -8,7 +6,7 @@ from capif_acl import util T = typing.TypeVar('T') -class Model(object): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. openapi_types: typing.Dict[str, type] = {} @@ -29,7 +27,7 @@ class Model(object): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 88606c4107c7ac4b408a0548af2feb398233b555..cd2c0864d02a070050a6dfce39aaa4ed5a01b9ed 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from capif_acl.models.base_model import Model class InvalidParam(Model): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 25caab4e29a65d9df08d966a551618c69a2ffa45..99610c5a6d01f3dbd4b293f77af99531daf57ff9 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.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). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,7 +239,7 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 @@ -256,7 +250,7 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 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 eaacad60592ff7acf1a9c2b7b71c21dfb6fd5083..5585278a806491f8bb017f1b8f5619face836d58 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from capif_acl.models.base_model import Model class TimeRangeList(Model): @@ -48,7 +44,7 @@ class TimeRangeList(Model): return util.deserialize_model(dikt, cls) @property - def start_time(self): + def start_time(self) -> datetime: """Gets the start_time of this TimeRangeList. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -59,7 +55,7 @@ class TimeRangeList(Model): return self._start_time @start_time.setter - def start_time(self, start_time): + def start_time(self, start_time: datetime): """Sets the start_time of this TimeRangeList. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -71,7 +67,7 @@ class TimeRangeList(Model): self._start_time = start_time @property - def stop_time(self): + def stop_time(self) -> datetime: """Gets the stop_time of this TimeRangeList. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -82,7 +78,7 @@ class TimeRangeList(Model): return self._stop_time @stop_time.setter - def stop_time(self, stop_time): + def stop_time(self, stop_time: datetime): """Sets the stop_time of this TimeRangeList. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 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 1621baa9a449be7d8bb2377e7b2b6fd590cbec5d..164693101b1be8d3fdaab38d81075cea20decf7c 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 @@ -309,7 +309,7 @@ components: type: string title: description: "A short, human-readable summary of the problem type. It should\ - \ not change from occurrence to occurrence of the problem." + \ not change from occurrence to occurrence of the problem. \n" title: title type: string status: @@ -326,14 +326,13 @@ components: 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." + 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." + description: | + Description of invalid parameters, for a request rejected due to invalid parameters. items: $ref: '#/components/schemas/InvalidParam' minItems: 1 @@ -352,8 +351,8 @@ components: title: type type: string InvalidParam: - description: "Represents the description of invalid parameters, for a request\ - \ rejected due to invalid parameters." + 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." 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 5d664f823dc74e062cbb804324de82bf7d239643..f70a615ed2840293ed3d9cccd4c7ff514b4676ab 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 44ed0bee14671018ffb842dfe7e98edf26875ec2..f7ba5ceeee3f78f43743e3d8aef094d009850ae6 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,9 +1,6 @@ -# coding: utf-8 - -from __future__ import absolute_import import unittest -from test import BaseTestCase +from capif_acl.test import BaseTestCase class TestDefaultController(BaseTestCase): diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/typing_utils.py b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..74e3c913a7db6246bc765f147ca872996112c6bb 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/typing_utils.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/typing_utils.py @@ -1,5 +1,3 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): 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 72d18d9b7df0bfd24490b24c4b9d9bcd683ad9ef..599f221af0ad9351a0f94ef2d20e9dc16aa43a99 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,7 +1,6 @@ import datetime -import six -import typing_utils +from capif_acl import typing_utils def serialize_clean_camel_case(obj): @@ -17,10 +16,10 @@ def clean_empty(d): return { k: v for k, v in ((k, clean_empty(v)) for k, v in d.items()) - if v + if v is not None or (isinstance(v, list) and len(v) == 0) } if isinstance(d, list): - return [v for v in map(clean_empty, d) if v] + return [v for v in map(clean_empty, d) if v is not None] return d @@ -53,6 +52,7 @@ def dict_to_camel_case(my_dict): return result + def _deserialize(data, klass): """Deserializes dict, list, str into an object. @@ -64,7 +64,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -93,7 +93,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -158,7 +158,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -193,4 +193,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/prepare_capif_acl.sh b/services/TS29222_CAPIF_Access_Control_Policy_API/prepare_capif_acl.sh index fd0077ff49fd19e6e396a8253c2b63ce93e0c7c9..42f12afe4ac1e7bf0389e43aa7181f7670b03ed6 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/prepare_capif_acl.sh +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/prepare_capif_acl.sh @@ -1,4 +1,4 @@ #!/bin/bash -gunicorn --bind 0.0.0.0:8080 \ +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/capif_acl wsgi:app \ No newline at end of file diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt b/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt index 2e82931ce42ddc44d6ae7c6e86961fcbe4751d7a..e38f272cebb4b75f3862a7b01ee49d2f3cc3be76 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/requirements.txt @@ -1,26 +1,24 @@ -connexion[swagger-ui] == 2.14.2; python_version>="3.6" -Werkzeug == 2.2.3 +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 +setuptools == 74.0.0 +Flask == 3.0.3 pymongo == 4.7.3 -flask_jwt_extended == 4.4.4 -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.17.0 +redis == 4.5.4 +flask_jwt_extended == 4.6.0 +cryptography == 42.0.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 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.17.0 -opentelemetry-sdk == 1.17.0 -flask_executor == 1.0.0 -cryptography == 42.0.8 -redis == 4.5.4 +opentelemetry-api == 1.19.0 +opentelemetry-sdk == 1.19.0 flask_executor == 1.0.0 -Flask-APScheduler == 1.12.4 +Flask-APScheduler == 1.13.1 Flask-Script == 2.0.6 gunicorn == 22.0.0 packaging == 24.0 \ No newline at end of file diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py b/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py index 275b7b6b91de3bcb6cb8228baf5ab704cee59c7e..d4234b02c1d5a817c691413564f16afebaac9a7a 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/setup.py @@ -1,9 +1,6 @@ -# coding: utf-8 - -import sys from setuptools import setup, find_packages -NAME = "openapi_server" +NAME = "capif_acl" VERSION = "1.0.0" # To install the library, run the following @@ -31,7 +28,7 @@ setup( package_data={'': ['openapi/openapi.yaml']}, include_package_data=True, entry_points={ - 'console_scripts': ['openapi_server=openapi_server.__main__:main']}, + 'console_scripts': ['capif_acl=capif_acl.__main__:main']}, long_description="""\ API for access control policy. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/test-requirements.txt b/services/TS29222_CAPIF_Access_Control_Policy_API/test-requirements.txt index 422ece88482f451c08b57e0109939c09bead2c20..58f51d6a00272d7515a20e3618f345b73c68afa0 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/test-requirements.txt +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/test-requirements.txt @@ -1,4 +1,4 @@ pytest~=7.1.0 pytest-cov>=2.8.1 pytest-randomly>=1.2.3 -Flask-Testing == 0.8.1 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_Access_Control_Policy_API/tox.ini b/services/TS29222_CAPIF_Access_Control_Policy_API/tox.ini index f66b2d84cdaa91cec100c23e86388924a071a451..539b51bc024421711c1835fc20106a0e5a8963db 100644 --- a/services/TS29222_CAPIF_Access_Control_Policy_API/tox.ini +++ b/services/TS29222_CAPIF_Access_Control_Policy_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= - pytest --cov=openapi_server + pytest --cov=capif_acl diff --git a/services/TS29222_CAPIF_Auditing_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Auditing_API/.openapi-generator/FILES index f5bc02fc12670684750f50376d9d5d04a59ff38c..684a73b60645ff821764ab71687ecab433146cbe 100644 --- a/services/TS29222_CAPIF_Auditing_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Auditing_API/.openapi-generator/FILES @@ -1,5 +1,6 @@ .dockerignore .gitignore +.openapi-generator-ignore .travis.yml Dockerfile README.md @@ -8,23 +9,23 @@ logs/__init__.py logs/__main__.py logs/controllers/__init__.py logs/controllers/default_controller.py -logs/controllers/security_controller_.py +logs/controllers/security_controller.py logs/encoder.py logs/models/__init__.py -logs/models/base_model_.py +logs/models/base_model.py logs/models/interface_description.py logs/models/invalid_param.py logs/models/invocation_log.py +logs/models/invocation_logs.py +logs/models/invocation_logs_retrieve_res.py logs/models/log.py logs/models/operation.py -logs/models/operation_any_of.py logs/models/problem_details.py logs/models/protocol.py -logs/models/protocol_any_of.py logs/models/security_method.py -logs/models/security_method_any_of.py logs/openapi/openapi.yaml logs/test/__init__.py +logs/test/test_default_controller.py logs/typing_utils.py logs/util.py requirements.txt diff --git a/services/TS29222_CAPIF_Auditing_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_Auditing_API/.openapi-generator/VERSION index 4b448de535c7dd619da0df6d8221995dbd5d118a..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_Auditing_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_Auditing_API/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_Auditing_API/Dockerfile b/services/TS29222_CAPIF_Auditing_API/Dockerfile index 1d1de3244165065973eec8ff86e502001b178373..909445e22087b5f3cb04c9c08405a8eea5b59d32 100644 --- a/services/TS29222_CAPIF_Auditing_API/Dockerfile +++ b/services/TS29222_CAPIF_Auditing_API/Dockerfile @@ -1,11 +1,19 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/requirements.txt -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir -r requirements.txt COPY . /usr/src/app diff --git a/services/TS29222_CAPIF_Auditing_API/README.md b/services/TS29222_CAPIF_Auditing_API/README.md index 17eb857e7f965899d1e251d68f3bf66c55d18bcd..7f120ad3805905f9098f0244cde751badfa9be84 100644 --- a/services/TS29222_CAPIF_Auditing_API/README.md +++ b/services/TS29222_CAPIF_Auditing_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 logs +python3 -m openapi_server ``` and open your browser to here: diff --git a/services/TS29222_CAPIF_Auditing_API/git_push.sh b/services/TS29222_CAPIF_Auditing_API/git_push.sh index 9405f72e950cdb8ca24c3cf4d15cee7eac62fde7..f53a75d4fabe760cce49eddfd62fcc702938ea90 100644 --- a/services/TS29222_CAPIF_Auditing_API/git_push.sh +++ b/services/TS29222_CAPIF_Auditing_API/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/services/TS29222_CAPIF_Auditing_API/logs/app.py b/services/TS29222_CAPIF_Auditing_API/logs/app.py index f68880cee26c27d442c50b2ec0b68ad07a825169..4e8068e73885ded3f8eacd3d3707791c8c3b9c97 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/app.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/app.py @@ -1,20 +1,21 @@ #!/usr/bin/env python3 -import connexion import logging -from logging.handlers import RotatingFileHandler -import encoder -from config import Config import os +from logging.handlers import RotatingFileHandler + +import connexion from fluent import sender -from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry import trace from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +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 +import encoder +from config import Config NAME = "Logs-Service" @@ -104,8 +105,8 @@ def verbose_formatter(): ) -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = encoder.CustomJSONEncoder app.add_api('openapi.yaml', arguments={'title': 'CAPIF_Auditing_API'}, pythonic_params=True) diff --git a/services/TS29222_CAPIF_Auditing_API/logs/config.py b/services/TS29222_CAPIF_Auditing_API/logs/config.py index 97ab831fc7a69163163f7182f1f8c61bd9e3ffc4..2ac31772c592bd967935a873ae08d3ba2c0791fc 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/config.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): 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 ead9ec5341d13bf3150ad460f174c3c91e714f3c..87ecabbfc4c4d7d8b20f23d21ce425a0de053849 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/controllers/default_controller.py @@ -1,8 +1,10 @@ +from flask import request, current_app +from logs import util +from logs.models.interface_description import InterfaceDescription # noqa: E501 +from logs.models.operation import Operation # noqa: E501 +from logs.models.protocol import Protocol # noqa: E501 -from ..util import deserialize_datetime from ..core.auditoperations import AuditOperations -from flask import Response, request, current_app - from ..core.responses import bad_request_error audit_operations = AuditOperations() @@ -23,7 +25,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 subclause 4.4 of 3GPP TS 29.501. + :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. :type api_name: str :param api_version: Version of the API which was invoked. :type api_version: str @@ -36,13 +38,13 @@ def api_invocation_logs_get(aef_id=None, api_invoker_id=None, time_range_start=N :param resource_name: Name of the specific resource invoked. :type resource_name: str :param src_interface: Interface description of the API invoker. - :type src_interface: str + :type src_interface: dict | bytes :param dest_interface: Interface description of the API invoked. - :type dest_interface: str + :type dest_interface: dict | bytes :param supported_features: To filter irrelevant responses related to unsupported features :type supported_features: str - :rtype: InvocationLog + :rtype: Union[InvocationLogsRetrieveRes, Tuple[InvocationLogsRetrieveRes, int], Tuple[InvocationLogsRetrieveRes, int, Dict[str, str]] """ current_app.logger.info("Audit logs") @@ -52,8 +54,17 @@ def api_invocation_logs_get(aef_id=None, api_invoker_id=None, time_range_start=N cause="Mandatory parameters missing", invalid_params=[ {"param": "aef_id or api_invoker_id", "reason": "missing"}]) - time_range_start = deserialize_datetime(time_range_start) - time_range_end = deserialize_datetime(time_range_end) + + time_range_start = util.deserialize_datetime(time_range_start) + time_range_end = util.deserialize_datetime(time_range_end) + if request.is_json: + protocol = Protocol.from_dict(request.get_json()) # noqa: E501 + if request.is_json: + operation = Operation.from_dict(request.get_json()) # noqa: E501 + if request.is_json: + src_interface = InterfaceDescription.from_dict(request.get_json()) # noqa: E501 + if request.is_json: + dest_interface = InterfaceDescription.from_dict(request.get_json()) # noqa: E501 query_params = {"aef_id": aef_id, "api_invoker_id": api_invoker_id, diff --git a/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py b/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller.py @@ -0,0 +1,2 @@ + + diff --git a/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller_.py b/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller_.py deleted file mode 100644 index 6d294ffd6df1a26a469dbb4e72533b01503468dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Auditing_API/logs/controllers/security_controller_.py +++ /dev/null @@ -1,2 +0,0 @@ -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 f74ec112e2aa73c682463ca6d0502e0ae503e1c3..86586ed2c16698bde72d647d0d174663e15b079d 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/core/auditoperations.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/core/auditoperations.py @@ -1,12 +1,12 @@ -from flask import current_app, Flask, Response import json -from .resources import Resource +from flask import current_app -from ..util import serialize_clean_camel_case -from .responses import bad_request_error, not_found_error, forbidden_error, internal_server_error, make_response +from .resources import Resource +from .responses import bad_request_error, not_found_error, internal_server_error, make_response from ..models.invocation_log import InvocationLog +from ..util import serialize_clean_camel_case class AuditOperations (Resource): diff --git a/services/TS29222_CAPIF_Auditing_API/logs/core/resources.py b/services/TS29222_CAPIF_Auditing_API/logs/core/resources.py index d5a3552d6b3459a77d30df65d0bbda4a86c7fa61..053c10786ef6135e5fa994c2d825c36419c95112 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/core/resources.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/core/resources.py @@ -1,4 +1,5 @@ from abc import ABC + from db.db import MongoDatabse diff --git a/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py b/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py index 89689a9e7b3a936e3ea953ed621853ce164d2d70..8f975cbf426c304c4ae0681f65af67fcad9abca5 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/core/responses.py @@ -1,14 +1,16 @@ -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder +import json + from flask import Response + +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case -import json mimetype = "application/json" def make_response(object, status): - res = Response(json.dumps(object, cls=JSONEncoder), status=status, mimetype=mimetype) + res = Response(json.dumps(object, cls=CustomJSONEncoder), status=status, mimetype=mimetype) return res @@ -17,25 +19,25 @@ def internal_server_error(detail, cause): prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=500, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=500, mimetype=mimetype) def forbidden_error(detail, cause): prob = ProblemDetails(title="Forbidden", status=403, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=403, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=403, mimetype=mimetype) 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=JSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) 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=JSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_Auditing_API/logs/db/db.py b/services/TS29222_CAPIF_Auditing_API/logs/db/db.py index cf7c0d2ca60425a2e5a842aad94d97c095a47761..4520c84691184c8ab699bce82cfc967abb02b948 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/db/db.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/db/db.py @@ -1,10 +1,11 @@ +import os import time -from pymongo import MongoClient -from pymongo.errors import AutoReconnect + from config import Config -import os from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from pymongo import MongoClient +from pymongo.errors import AutoReconnect monitoring_value = os.environ.get("MONITORING", "").lower() if monitoring_value == "true": diff --git a/services/TS29222_CAPIF_Auditing_API/logs/encoder.py b/services/TS29222_CAPIF_Auditing_API/logs/encoder.py index 80bad8fa9220ab873e044b7adc0a849746088ad5..a6803052e0c0ff15c8bb0ef2e96c97f27d7ca830 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/encoder.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/encoder.py @@ -1,20 +1,19 @@ -from connexion.apps.flask_app import FlaskJSONEncoder -import six +from connexion.jsonifier import JSONEncoder -from models.base_model_ import Model +from logs.models.base_model import Model -class JSONEncoder(FlaskJSONEncoder): +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + 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 d8b2550fa7ec4c195af937a7e39decc6fbacec60..d036df693ea41dfaa3debffffad0462c1fcd8e4a 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/__init__.py @@ -1,16 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # 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.log import Log -from logs.models.operation import Operation -from logs.models.operation_any_of import OperationAnyOf -from logs.models.problem_details import ProblemDetails -from logs.models.protocol import Protocol -from logs.models.protocol_any_of import ProtocolAnyOf -from logs.models.security_method import SecurityMethod -from logs.models.security_method_any_of import SecurityMethodAnyOf diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/base_model_.py b/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py similarity index 92% rename from services/TS29222_CAPIF_Auditing_API/logs/models/base_model_.py rename to services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py index 160eaa04eab544df66e788339368d145184d8fdc..16381a1db9d87b449e01620b4c7f37a939179ed8 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/base_model_.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/base_model.py @@ -1,6 +1,4 @@ import pprint - -import six import typing from logs import util @@ -8,14 +6,14 @@ from logs import util T = typing.TypeVar('T') -class Model(object): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. - openapi_types = {} + openapi_types: typing.Dict[str, type] = {} # attributeMap: The key is attribute name and the # value is json key in definition. - attribute_map = {} + attribute_map: typing.Dict[str, str] = {} @classmethod def from_dict(cls: typing.Type[T], dikt) -> T: @@ -29,7 +27,7 @@ class Model(object): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 7a8878e663fd02989c50e2aa4e485daaa4bec01e..f470096294458c04b0e448c35d3ba9c313ce41da 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/interface_description.py @@ -1,51 +1,57 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from logs.models.base_model_ import Model -from logs.models.security_method import SecurityMethod from logs import util - +from logs.models.base_model import Model from logs.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 + def __init__(self, ipv4_addr=None, ipv6_addr=None, fqdn=None, port=None, api_prefix=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 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] """ self.openapi_types = { 'ipv4_addr': str, 'ipv6_addr': str, + 'fqdn': str, 'port': int, + 'api_prefix': str, 'security_methods': List[SecurityMethod] } self.attribute_map = { 'ipv4_addr': 'ipv4Addr', 'ipv6_addr': 'ipv6Addr', + 'fqdn': 'fqdn', 'port': 'port', + 'api_prefix': 'apiPrefix', 'security_methods': 'securityMethods' } 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 @classmethod @@ -60,10 +66,10 @@ class InterfaceDescription(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr(self): + 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 + 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 @@ -71,10 +77,10 @@ class InterfaceDescription(Model): return self._ipv4_addr @ipv4_addr.setter - def ipv4_addr(self, ipv4_addr): + 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 + 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 @@ -83,10 +89,10 @@ class InterfaceDescription(Model): self._ipv4_addr = ipv4_addr @property - def ipv6_addr(self): + 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 + 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 @@ -94,10 +100,10 @@ class InterfaceDescription(Model): return self._ipv6_addr @ipv6_addr.setter - def ipv6_addr(self, ipv6_addr): + 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 + 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 @@ -106,7 +112,36 @@ class InterfaceDescription(Model): self._ipv6_addr = ipv6_addr @property - def port(self): + def fqdn(self) -> str: + """Gets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :return: The fqdn of this InterfaceDescription. + :rtype: str + """ + return self._fqdn + + @fqdn.setter + def fqdn(self, fqdn: str): + """Sets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :param fqdn: The fqdn of this InterfaceDescription. + :type fqdn: str + """ + if fqdn is not None and len(fqdn) > 253: + raise ValueError("Invalid value for `fqdn`, length must be less than or equal to `253`") # noqa: E501 + if fqdn is not None and len(fqdn) < 4: + raise ValueError("Invalid value for `fqdn`, length must be greater than or equal to `4`") # noqa: E501 + if fqdn is not None and not re.search(r'^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$', fqdn): # noqa: E501 + raise ValueError("Invalid value for `fqdn`, must be a follow pattern or equal to `/^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$/`") # noqa: E501 + + self._fqdn = fqdn + + @property + def port(self) -> int: """Gets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -117,7 +152,7 @@ class InterfaceDescription(Model): return self._port @port.setter - def port(self, port): + def port(self, port: int): """Sets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -133,10 +168,33 @@ class InterfaceDescription(Model): self._port = port @property - def security_methods(self): + def api_prefix(self) -> str: + """Gets the api_prefix of this InterfaceDescription. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. - Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + 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] @@ -144,10 +202,10 @@ class InterfaceDescription(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + 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 + 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] 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 17b30eb1400949497e5252839e7f64f71036499a..a7c83e71d656489bea9120c06c796f10bccaf7df 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invalid_param.py @@ -1,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 4a0bc019d981720b6ea74ae97a2c8e92cfa67b8c..f5d5e0ecd4acb9f7380c2a57c58a8124e06afa91 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_log.py @@ -1,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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). @@ -62,10 +56,10 @@ class InvocationLog(Model): return util.deserialize_model(dikt, cls) @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this InvocationLog. - Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 + Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 :return: The aef_id of this InvocationLog. :rtype: str @@ -73,10 +67,10 @@ class InvocationLog(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this InvocationLog. - Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 + Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 :param aef_id: The aef_id of this InvocationLog. :type aef_id: str @@ -87,7 +81,7 @@ class InvocationLog(Model): self._aef_id = aef_id @property - def api_invoker_id(self): + def api_invoker_id(self) -> str: """Gets the api_invoker_id of this InvocationLog. Identity of the API invoker which invoked the service API # noqa: E501 @@ -98,7 +92,7 @@ class InvocationLog(Model): return self._api_invoker_id @api_invoker_id.setter - def api_invoker_id(self, api_invoker_id): + def api_invoker_id(self, api_invoker_id: str): """Sets the api_invoker_id of this InvocationLog. Identity of the API invoker which invoked the service API # noqa: E501 @@ -112,7 +106,7 @@ class InvocationLog(Model): self._api_invoker_id = api_invoker_id @property - def logs(self): + def logs(self) -> List[Log]: """Gets the logs of this InvocationLog. Service API invocation log # noqa: E501 @@ -123,7 +117,7 @@ class InvocationLog(Model): return self._logs @logs.setter - def logs(self, logs): + def logs(self, logs: List[Log]): """Sets the logs of this InvocationLog. Service API invocation log # noqa: E501 @@ -139,10 +133,10 @@ class InvocationLog(Model): self._logs = logs @property - def supported_features(self): + def supported_features(self) -> str: """Gets the supported_features of this InvocationLog. - 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 + 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 InvocationLog. :rtype: str @@ -150,10 +144,10 @@ class InvocationLog(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + def supported_features(self, supported_features: str): """Sets the supported_features of this InvocationLog. - 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 + 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 InvocationLog. :type supported_features: str diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py new file mode 100644 index 0000000000000000000000000000000000000000..a4fe7ca4eab585e8fb3fdd59bf1afc65e782308d --- /dev/null +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs.py @@ -0,0 +1,96 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from logs import util +from logs.models.base_model import Model +from logs.models.invocation_log import InvocationLog # noqa: E501 + + +class InvocationLogs(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, multiple_invocation_logs=None, supported_features=None): # noqa: E501 + """InvocationLogs - a model defined in OpenAPI + + :param multiple_invocation_logs: The multiple_invocation_logs of this InvocationLogs. # noqa: E501 + :type multiple_invocation_logs: List[InvocationLog] + :param supported_features: The supported_features of this InvocationLogs. # noqa: E501 + :type supported_features: str + """ + self.openapi_types = { + 'multiple_invocation_logs': List[InvocationLog], + 'supported_features': str + } + + self.attribute_map = { + 'multiple_invocation_logs': 'multipleInvocationLogs', + 'supported_features': 'supportedFeatures' + } + + self._multiple_invocation_logs = multiple_invocation_logs + self._supported_features = supported_features + + @classmethod + def from_dict(cls, dikt) -> 'InvocationLogs': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The InvocationLogs of this InvocationLogs. # noqa: E501 + :rtype: InvocationLogs + """ + return util.deserialize_model(dikt, cls) + + @property + def multiple_invocation_logs(self) -> List[InvocationLog]: + """Gets the multiple_invocation_logs of this InvocationLogs. + + + :return: The multiple_invocation_logs of this InvocationLogs. + :rtype: List[InvocationLog] + """ + return self._multiple_invocation_logs + + @multiple_invocation_logs.setter + def multiple_invocation_logs(self, multiple_invocation_logs: List[InvocationLog]): + """Sets the multiple_invocation_logs of this InvocationLogs. + + + :param multiple_invocation_logs: The multiple_invocation_logs of this InvocationLogs. + :type multiple_invocation_logs: List[InvocationLog] + """ + if multiple_invocation_logs is None: + raise ValueError("Invalid value for `multiple_invocation_logs`, must not be `None`") # noqa: E501 + if multiple_invocation_logs is not None and len(multiple_invocation_logs) < 1: + raise ValueError("Invalid value for `multiple_invocation_logs`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._multiple_invocation_logs = multiple_invocation_logs + + @property + def supported_features(self) -> str: + """Gets the supported_features of this InvocationLogs. + + 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 InvocationLogs. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this InvocationLogs. + + 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 InvocationLogs. + :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("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_Auditing_API/logs/models/invocation_logs_retrieve_res.py b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py new file mode 100644 index 0000000000000000000000000000000000000000..b26a62f2bb044e9c0aa62ffa909c5e3e57d29f2f --- /dev/null +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/invocation_logs_retrieve_res.py @@ -0,0 +1,189 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from logs import util +from logs.models.base_model import Model +from logs.models.invocation_log import InvocationLog # noqa: E501 +from logs.models.log import Log # noqa: E501 + + +class InvocationLogsRetrieveRes(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, api_invoker_id=None, logs=None, supported_features=None, multiple_invocation_logs=None): # noqa: E501 + """InvocationLogsRetrieveRes - a model defined in OpenAPI + + :param aef_id: The aef_id of this InvocationLogsRetrieveRes. # noqa: E501 + :type aef_id: str + :param api_invoker_id: The api_invoker_id of this InvocationLogsRetrieveRes. # noqa: E501 + :type api_invoker_id: str + :param logs: The logs of this InvocationLogsRetrieveRes. # noqa: E501 + :type logs: List[Log] + :param supported_features: The supported_features of this InvocationLogsRetrieveRes. # noqa: E501 + :type supported_features: str + :param multiple_invocation_logs: The multiple_invocation_logs of this InvocationLogsRetrieveRes. # noqa: E501 + :type multiple_invocation_logs: List[InvocationLog] + """ + self.openapi_types = { + 'aef_id': str, + 'api_invoker_id': str, + 'logs': List[Log], + 'supported_features': str, + 'multiple_invocation_logs': List[InvocationLog] + } + + self.attribute_map = { + 'aef_id': 'aefId', + 'api_invoker_id': 'apiInvokerId', + 'logs': 'logs', + 'supported_features': 'supportedFeatures', + 'multiple_invocation_logs': 'multipleInvocationLogs' + } + + self._aef_id = aef_id + self._api_invoker_id = api_invoker_id + self._logs = logs + self._supported_features = supported_features + self._multiple_invocation_logs = multiple_invocation_logs + + @classmethod + def from_dict(cls, dikt) -> 'InvocationLogsRetrieveRes': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The InvocationLogsRetrieveRes of this InvocationLogsRetrieveRes. # noqa: E501 + :rtype: InvocationLogsRetrieveRes + """ + return util.deserialize_model(dikt, cls) + + @property + def aef_id(self) -> str: + """Gets the aef_id of this InvocationLogsRetrieveRes. + + Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 + + :return: The aef_id of this InvocationLogsRetrieveRes. + :rtype: str + """ + return self._aef_id + + @aef_id.setter + def aef_id(self, aef_id: str): + """Sets the aef_id of this InvocationLogsRetrieveRes. + + Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 + + :param aef_id: The aef_id of this InvocationLogsRetrieveRes. + :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 api_invoker_id(self) -> str: + """Gets the api_invoker_id of this InvocationLogsRetrieveRes. + + Identity of the API invoker which invoked the service API # noqa: E501 + + :return: The api_invoker_id of this InvocationLogsRetrieveRes. + :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 InvocationLogsRetrieveRes. + + Identity of the API invoker which invoked the service API # noqa: E501 + + :param api_invoker_id: The api_invoker_id of this InvocationLogsRetrieveRes. + :type api_invoker_id: str + """ + if api_invoker_id is None: + raise ValueError("Invalid value for `api_invoker_id`, must not be `None`") # noqa: E501 + + self._api_invoker_id = api_invoker_id + + @property + def logs(self) -> List[Log]: + """Gets the logs of this InvocationLogsRetrieveRes. + + Service API invocation log # noqa: E501 + + :return: The logs of this InvocationLogsRetrieveRes. + :rtype: List[Log] + """ + return self._logs + + @logs.setter + def logs(self, logs: List[Log]): + """Sets the logs of this InvocationLogsRetrieveRes. + + Service API invocation log # noqa: E501 + + :param logs: The logs of this InvocationLogsRetrieveRes. + :type logs: List[Log] + """ + if logs is None: + raise ValueError("Invalid value for `logs`, must not be `None`") # noqa: E501 + if logs is not None and len(logs) < 1: + raise ValueError("Invalid value for `logs`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._logs = logs + + @property + def supported_features(self) -> str: + """Gets the supported_features of this InvocationLogsRetrieveRes. + + 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 InvocationLogsRetrieveRes. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this InvocationLogsRetrieveRes. + + 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 InvocationLogsRetrieveRes. + :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("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 multiple_invocation_logs(self) -> List[InvocationLog]: + """Gets the multiple_invocation_logs of this InvocationLogsRetrieveRes. + + + :return: The multiple_invocation_logs of this InvocationLogsRetrieveRes. + :rtype: List[InvocationLog] + """ + return self._multiple_invocation_logs + + @multiple_invocation_logs.setter + def multiple_invocation_logs(self, multiple_invocation_logs: List[InvocationLog]): + """Sets the multiple_invocation_logs of this InvocationLogsRetrieveRes. + + + :param multiple_invocation_logs: The multiple_invocation_logs of this InvocationLogsRetrieveRes. + :type multiple_invocation_logs: List[InvocationLog] + """ + if multiple_invocation_logs is None: + raise ValueError("Invalid value for `multiple_invocation_logs`, must not be `None`") # noqa: E501 + if multiple_invocation_logs is not None and len(multiple_invocation_logs) < 1: + raise ValueError("Invalid value for `multiple_invocation_logs`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._multiple_invocation_logs = multiple_invocation_logs diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/log.py b/services/TS29222_CAPIF_Auditing_API/logs/models/log.py index 44c50ef1c67f97c4c4f7d65d046da5c11701fc0a..2fb185c6d2241187865dca49d3019552a3c34b86 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/log.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/log.py @@ -1,20 +1,13 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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.operation import Operation -from logs.models.protocol import Protocol from logs import util - +from logs.models.base_model import Model from logs.models.interface_description import InterfaceDescription # 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). @@ -119,7 +112,7 @@ class Log(Model): return util.deserialize_model(dikt, cls) @property - def api_id(self): + def api_id(self) -> str: """Gets the api_id of this Log. String identifying the API invoked. # noqa: E501 @@ -130,7 +123,7 @@ class Log(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + def api_id(self, api_id: str): """Sets the api_id of this Log. String identifying the API invoked. # noqa: E501 @@ -144,10 +137,10 @@ class Log(Model): self._api_id = api_id @property - def api_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 :return: The api_name of this Log. :rtype: str @@ -155,10 +148,10 @@ class Log(Model): return self._api_name @api_name.setter - def api_name(self, api_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 :param api_name: The api_name of this Log. :type api_name: str @@ -169,7 +162,7 @@ class Log(Model): self._api_name = api_name @property - def api_version(self): + def api_version(self) -> str: """Gets the api_version of this Log. Version of the API which was invoked # noqa: E501 @@ -180,7 +173,7 @@ class Log(Model): return self._api_version @api_version.setter - def api_version(self, api_version): + def api_version(self, api_version: str): """Sets the api_version of this Log. Version of the API which was invoked # noqa: E501 @@ -194,7 +187,7 @@ class Log(Model): self._api_version = api_version @property - def resource_name(self): + def resource_name(self) -> str: """Gets the resource_name of this Log. Name of the specific resource invoked # noqa: E501 @@ -205,7 +198,7 @@ class Log(Model): return self._resource_name @resource_name.setter - def resource_name(self, resource_name): + def resource_name(self, resource_name: str): """Sets the resource_name of this Log. Name of the specific resource invoked # noqa: E501 @@ -219,7 +212,7 @@ class Log(Model): self._resource_name = resource_name @property - def uri(self): + def uri(self) -> str: """Gets the uri of this Log. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -230,7 +223,7 @@ class Log(Model): return self._uri @uri.setter - def uri(self, uri): + def uri(self, uri: str): """Sets the uri of this Log. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -242,7 +235,7 @@ class Log(Model): self._uri = uri @property - def protocol(self): + def protocol(self) -> Protocol: """Gets the protocol of this Log. @@ -252,7 +245,7 @@ class Log(Model): return self._protocol @protocol.setter - def protocol(self, protocol): + def protocol(self, protocol: Protocol): """Sets the protocol of this Log. @@ -265,7 +258,7 @@ class Log(Model): self._protocol = protocol @property - def operation(self): + def operation(self) -> Operation: """Gets the operation of this Log. @@ -275,7 +268,7 @@ class Log(Model): return self._operation @operation.setter - def operation(self, operation): + def operation(self, operation: Operation): """Sets the operation of this Log. @@ -286,7 +279,7 @@ class Log(Model): self._operation = operation @property - def result(self): + def result(self) -> str: """Gets the result of this Log. For HTTP protocol, it contains HTTP status code of the invocation # noqa: E501 @@ -297,7 +290,7 @@ class Log(Model): return self._result @result.setter - def result(self, result): + def result(self, result: str): """Sets the result of this Log. For HTTP protocol, it contains HTTP status code of the invocation # noqa: E501 @@ -311,7 +304,7 @@ class Log(Model): self._result = result @property - def invocation_time(self): + def invocation_time(self) -> datetime: """Gets the invocation_time of this Log. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -322,7 +315,7 @@ class Log(Model): return self._invocation_time @invocation_time.setter - def invocation_time(self, invocation_time): + def invocation_time(self, invocation_time: datetime): """Sets the invocation_time of this Log. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -334,10 +327,10 @@ class Log(Model): self._invocation_time = invocation_time @property - def invocation_latency(self): + def invocation_latency(self) -> int: """Gets the invocation_latency of this Log. - Unsigned integer identifying a period of time in units of milliseconds. # noqa: E501 + Represents a period of time in units of milliseconds. # noqa: E501 :return: The invocation_latency of this Log. :rtype: int @@ -345,10 +338,10 @@ class Log(Model): return self._invocation_latency @invocation_latency.setter - def invocation_latency(self, invocation_latency): + def invocation_latency(self, invocation_latency: int): """Sets the invocation_latency of this Log. - Unsigned integer identifying a period of time in units of milliseconds. # noqa: E501 + Represents a period of time in units of milliseconds. # noqa: E501 :param invocation_latency: The invocation_latency of this Log. :type invocation_latency: int @@ -359,10 +352,10 @@ class Log(Model): self._invocation_latency = invocation_latency @property - def input_parameters(self): + def input_parameters(self) -> object: """Gets the input_parameters of this Log. - List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :return: The input_parameters of this Log. :rtype: object @@ -370,10 +363,10 @@ class Log(Model): return self._input_parameters @input_parameters.setter - def input_parameters(self, input_parameters): + def input_parameters(self, input_parameters: object): """Sets the input_parameters of this Log. - List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :param input_parameters: The input_parameters of this Log. :type input_parameters: object @@ -382,10 +375,10 @@ class Log(Model): self._input_parameters = input_parameters @property - def output_parameters(self): + def output_parameters(self) -> object: """Gets the output_parameters of this Log. - List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :return: The output_parameters of this Log. :rtype: object @@ -393,10 +386,10 @@ class Log(Model): return self._output_parameters @output_parameters.setter - def output_parameters(self, output_parameters): + def output_parameters(self, output_parameters: object): """Sets the output_parameters of this Log. - List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :param output_parameters: The output_parameters of this Log. :type output_parameters: object @@ -405,7 +398,7 @@ class Log(Model): self._output_parameters = output_parameters @property - def src_interface(self): + def src_interface(self) -> InterfaceDescription: """Gets the src_interface of this Log. @@ -415,7 +408,7 @@ class Log(Model): return self._src_interface @src_interface.setter - def src_interface(self, src_interface): + def src_interface(self, src_interface: InterfaceDescription): """Sets the src_interface of this Log. @@ -426,7 +419,7 @@ class Log(Model): self._src_interface = src_interface @property - def dest_interface(self): + def dest_interface(self) -> InterfaceDescription: """Gets the dest_interface of this Log. @@ -436,7 +429,7 @@ class Log(Model): return self._dest_interface @dest_interface.setter - def dest_interface(self, dest_interface): + def dest_interface(self, dest_interface: InterfaceDescription): """Sets the dest_interface of this Log. @@ -447,10 +440,10 @@ class Log(Model): self._dest_interface = dest_interface @property - def fwd_interface(self): + def fwd_interface(self) -> str: """Gets the fwd_interface of this Log. - 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 # noqa: E501 + 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 # noqa: E501 :return: The fwd_interface of this Log. :rtype: str @@ -458,10 +451,10 @@ class Log(Model): return self._fwd_interface @fwd_interface.setter - def fwd_interface(self, fwd_interface): + def fwd_interface(self, fwd_interface: str): """Sets the fwd_interface of this Log. - 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 # noqa: E501 + 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 # noqa: E501 :param fwd_interface: The fwd_interface of this Log. :type fwd_interface: str diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py b/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py index 6e9c9395bf61f32a0b1a23e2d32fc3cc61b8bc7a..d36a4e88a17c250bc2221f724e225be6ede33053 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/operation.py @@ -1,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -15,14 +11,6 @@ class Operation(Model): 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 diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/operation_any_of.py b/services/TS29222_CAPIF_Auditing_API/logs/models/operation_any_of.py deleted file mode 100644 index 7d6eb401341f7a586f10cceecee1442eed136d07..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/operation_any_of.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from logs.models.base_model_ import Model -from logs import util - - -class OperationAnyOf(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 - """OperationAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'OperationAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Operation_anyOf of this OperationAnyOf. # noqa: E501 - :rtype: OperationAnyOf - """ - return util.deserialize_model(dikt, cls) 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 28d45102e5cb5244a4062cf8199e0f8ae172a309..beca8ffd297744c5f663e7c1df6e2047142f5148 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/problem_details.py @@ -1,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,10 +239,10 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 + 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 @@ -256,10 +250,10 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py b/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py index 8016cba0c427be10fbbdd3c5e239abdeb94a0960..db5cdc90d6a0c59d66764f5350228abaa7a9cafa 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/protocol.py @@ -1,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -15,11 +11,6 @@ class Protocol(Model): Do not edit the class manually. """ - """ - allowed enum values - """ - _1_1 = "HTTP_1_1" - _2 = "HTTP_2" def __init__(self): # noqa: E501 """Protocol - a model defined in OpenAPI 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 ef1ce82fe6fb49d9a82f87e2a95699fe3d2b8931..db5311a176764c80fa793689d6db8576f6c4f3c0 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/models/security_method.py @@ -1,12 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,12 +11,6 @@ class SecurityMethod(Model): 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 diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/security_method_any_of.py b/services/TS29222_CAPIF_Auditing_API/logs/models/security_method_any_of.py deleted file mode 100644 index cebc8770598e55b7b637025798e3ed0e3a722fb2..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/security_method_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from logs.models.base_model_ import Model -from logs import util - - -class SecurityMethodAnyOf(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 - """SecurityMethodAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'SecurityMethodAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The SecurityMethod_anyOf of this SecurityMethodAnyOf. # noqa: E501 - :rtype: SecurityMethodAnyOf - """ - return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_Auditing_API/logs/openapi/openapi.yaml b/services/TS29222_CAPIF_Auditing_API/logs/openapi/openapi.yaml index e619908ddac184867500ad9d38bccd2041fdf018..7a2cfcd004c5974c420a600f8427b48468a436c8 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© 2022, 3GPP Organizational Partners (ARIB, ATIS,\ + description: "API for auditing. \n© 2023, 3GPP Organizational Partners (ARIB, ATIS,\ \ CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Auditing_API - version: 1.2.1 + version: 1.3.0-alpha.2 externalDocs: - description: 3GPP TS 29.222 V17.6.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V18.1.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" @@ -110,26 +110,22 @@ paths: schema: type: string style: form - - description: Interface description of the API invoker. - example: "{\"ipv4Addr\": \"192.168.1.7\",\"port\": 8888,\"securityMethods\"\ - : [\"OAuth\"]}" - explode: true + - content: + application/json: + schema: + $ref: '#/components/schemas/InterfaceDescription' + description: Interface description of the API invoker. in: query name: src-interface required: false - schema: - type: string - style: form - - description: Interface description of the API invoked. - example: "{\"ipv4Addr\": \"192.168.1.7\",\"port\": 8888,\"securityMethods\"\ - : [\"OAuth\"]}" - explode: true + - content: + application/json: + schema: + $ref: '#/components/schemas/InterfaceDescription' + description: Interface description of the API invoked. in: query name: dest-interface required: false - schema: - type: string - style: form - description: To filter irrelevant responses related to unsupported features explode: true in: query @@ -143,7 +139,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InvocationLog' + $ref: '#/components/schemas/InvocationLogsRetrieveRes' description: | Result of the query operation along with fetched service API invocation log data. "307": @@ -294,69 +290,114 @@ components: default: description: Generic Error schemas: + InvocationLogs: + description: | + Represents several (more than one) invocation logs. + properties: + multipleInvocationLogs: + items: + $ref: '#/components/schemas/InvocationLog' + minItems: 1 + title: multipleInvocationLogs + 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 + required: + - multipleInvocationLogs + title: InvocationLogs + type: object + InvocationLogsRetrieveRes: + description: | + Represents the result of an invocation logs retrieval request. + oneOf: + - $ref: '#/components/schemas/InvocationLog' + - $ref: '#/components/schemas/InvocationLogs' + title: InvocationLogsRetrieveRes DateTime: description: string with format "date-time" as defined in OpenAPI. format: date-time title: DateTime type: string Protocol: - description: | - Possible values are: - - HTTP_1_1: HTTP version 1.1 - - HTTP_2: HTTP version 2 - enum: - - HTTP_1_1 - - HTTP_2 + 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 - type: string 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 - enum: - - GET - - POST - - PUT - - PATCH - - DELETE + 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 - type: string InterfaceDescription: description: Represents the description of an API's interface. example: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - oneOf: - - required: - - ipv4Addr - - required: - - ipv6Addr + 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 + 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 + 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 + fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn type: string port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 - title: port + title: Port type: integer + apiPrefix: + description: | + A string representing a sequence of path segments that starts with the slash character. + title: apiPrefix + type: string securityMethods: description: | Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. @@ -368,23 +409,93 @@ components: title: InterfaceDescription type: object 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 - enum: - - PSK - - PKI - - OAUTH + 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: "Indicates the security method. \nPossible values are:\n- PSK:\ + \ Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122.\n- PKI:\ + \ 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 - 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 + title: SupportedFeatures type: string + 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: Uri + 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: Uri + 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: Uri + 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 InvocationLog: description: | Represents a set of Service API invocation logs to be stored in a CAPIF core function. @@ -398,9 +509,11 @@ components: srcInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -408,16 +521,18 @@ components: inputParameters: "" invocationLatency: 0 result: result - protocol: null + protocol: HTTP_1_1 apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - operation: null + operation: GET apiId: apiId outputParameters: "" - apiName: apiName @@ -425,9 +540,11 @@ components: srcInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -435,16 +552,18 @@ components: inputParameters: "" invocationLatency: 0 result: result - protocol: null + protocol: HTTP_1_1 apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - operation: null + operation: GET apiId: apiId outputParameters: "" properties: @@ -468,7 +587,7 @@ components: 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 + title: SupportedFeatures type: string required: - aefId @@ -484,9 +603,11 @@ components: srcInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -494,16 +615,18 @@ components: inputParameters: "" invocationLatency: 0 result: result - protocol: null + protocol: HTTP_1_1 apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - operation: null + operation: GET apiId: apiId outputParameters: "" properties: @@ -542,7 +665,7 @@ components: title: DateTime type: string invocationLatency: - description: Unsigned integer identifying a period of time in units of milliseconds. + description: Represents a period of time in units of milliseconds. minimum: 0 title: DurationMs type: integer @@ -573,92 +696,31 @@ components: title: Log type: object DurationMs: - description: Unsigned integer identifying a period of time in units of milliseconds. + description: Represents a period of time in units of milliseconds. minimum: 0 title: DurationMs type: integer - 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: Uri - type: string - title: - description: "A short, human-readable summary of the problem type. It should\ - \ not change from occurrence to occurrence of the problem." - 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: Uri - 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: Uri - 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 Ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted decimal" - notation as defined in IETF RFC 1166. - title: 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 + 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 + Fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn type: string Port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 - title: port + title: Port type: integer diff --git a/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py b/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9209767da292497b8cd9b8faa70e93cb711aba29 --- /dev/null +++ b/services/TS29222_CAPIF_Auditing_API/logs/test/__init__.py @@ -0,0 +1,15 @@ +import logging + +import connexion +from flask_testing import TestCase +from logs.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_Auditing_API/logs/test/test_default_controller.py b/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..3223c999100c4c4bb5f0afb1aa8a3f5c1201e7d3 --- /dev/null +++ b/services/TS29222_CAPIF_Auditing_API/logs/test/test_default_controller.py @@ -0,0 +1,41 @@ +import unittest + +from logs.test import BaseTestCase + + +class TestDefaultController(BaseTestCase): + """DefaultController integration test stubs""" + + def test_api_invocation_logs_get(self): + """Test case for api_invocation_logs_get + + + """ + query_string = [('aef-id', 'aef_id_example'), + ('api-invoker-id', 'api_invoker_id_example'), + ('time-range-start', '2013-10-20T19:20:30+01:00'), + ('time-range-end', '2013-10-20T19:20:30+01:00'), + ('api-id', 'api_id_example'), + ('api-name', 'api_name_example'), + ('api-version', 'api_version_example'), + ('protocol', openapi_server.Protocol()), + ('operation', openapi_server.Operation()), + ('result', 'result_example'), + ('resource-name', 'resource_name_example'), + ('src-interface', openapi_server.InterfaceDescription()), + ('dest-interface', openapi_server.InterfaceDescription()), + ('supported-features', 'supported_features_example')] + headers = { + 'Accept': 'application/json', + } + response = self.client.open( + '/logs/v1/apiInvocationLogs', + 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_Auditing_API/logs/typing_utils.py b/services/TS29222_CAPIF_Auditing_API/logs/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..d21c4f633653a0eae75d04b2f6eff684ff9d200d 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/typing_utils.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/typing_utils.py @@ -1,9 +1,6 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): - import typing def is_generic(klass): """ Determine whether klass is a generic class """ diff --git a/services/TS29222_CAPIF_Auditing_API/logs/util.py b/services/TS29222_CAPIF_Auditing_API/logs/util.py index d5deea1b7202ee5b603d373471d763f5953e6f2e..47a58118b121e52881a7795286b96659f4392ce7 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/util.py +++ b/services/TS29222_CAPIF_Auditing_API/logs/util.py @@ -1,7 +1,6 @@ import datetime -import six -import typing_utils +from logs import typing_utils def serialize_clean_camel_case(obj): @@ -17,10 +16,10 @@ def clean_empty(d): return { k: v for k, v in ((k, clean_empty(v)) for k, v in d.items()) - if v + if v is not None or (isinstance(v, list) and len(v) == 0) } if isinstance(d, list): - return [v for v in map(clean_empty, d) if v] + return [v for v in map(clean_empty, d) if v is not None] return d @@ -54,7 +53,6 @@ def dict_to_camel_case(my_dict): return result - def _deserialize(data, klass): """Deserializes dict, list, str into an object. @@ -66,7 +64,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -95,7 +93,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -160,7 +158,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -195,4 +193,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_Auditing_API/prepare_audit.sh b/services/TS29222_CAPIF_Auditing_API/prepare_audit.sh index e47912ba6dd4a46eccfdd31e89107c76a838e82b..6049f2e972087e168236f5a3cc4c5883559f5395 100644 --- a/services/TS29222_CAPIF_Auditing_API/prepare_audit.sh +++ b/services/TS29222_CAPIF_Auditing_API/prepare_audit.sh @@ -1,6 +1,6 @@ #!/bin/bash -gunicorn --bind 0.0.0.0:8080 \ +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/logs wsgi:app diff --git a/services/TS29222_CAPIF_Auditing_API/requirements.txt b/services/TS29222_CAPIF_Auditing_API/requirements.txt index c2ef0b45391bea561624453a9049889ab0dd1567..da3a4c516c3d71cc4160bc0170a572a7818ef814 100644 --- a/services/TS29222_CAPIF_Auditing_API/requirements.txt +++ b/services/TS29222_CAPIF_Auditing_API/requirements.txt @@ -1,24 +1,24 @@ -connexion[swagger-ui] == 2.14.2; python_version>="3.6" +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 +setuptools == 74.0.0 +Flask == 3.0.3 pymongo == 4.7.3 elasticsearch == 8.4.3 -flask_jwt_extended == 4.4.4 -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.17.0 +flask_jwt_extended == 4.6.0 +cryptography == 42.0.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 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.17.0 -opentelemetry-sdk == 1.17.0 +opentelemetry-api == 1.19.0 +opentelemetry-sdk == 1.19.0 flask_executor == 1.0.0 -cryptography == 42.0.8 -Werkzeug == 2.2.3 +werkzeug == 3.0.4 pyopenssl == 24.1.0 gunicorn == 22.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Auditing_API/setup.py b/services/TS29222_CAPIF_Auditing_API/setup.py index 65778780707cbf453302647c2c222081f01ab422..c593a4122eaa6a814731cb88a1c09e001e2c802b 100644 --- a/services/TS29222_CAPIF_Auditing_API/setup.py +++ b/services/TS29222_CAPIF_Auditing_API/setup.py @@ -1,6 +1,3 @@ -# coding: utf-8 - -import sys from setuptools import setup, find_packages NAME = "logs" @@ -33,7 +30,7 @@ setup( entry_points={ 'console_scripts': ['logs=logs.__main__:main']}, long_description="""\ - API for auditing. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for auditing. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) diff --git a/services/TS29222_CAPIF_Auditing_API/test-requirements.txt b/services/TS29222_CAPIF_Auditing_API/test-requirements.txt index 202a684feef71ff540d6aa528d348febf0b37d1e..58f51d6a00272d7515a20e3618f345b73c68afa0 100644 --- a/services/TS29222_CAPIF_Auditing_API/test-requirements.txt +++ b/services/TS29222_CAPIF_Auditing_API/test-requirements.txt @@ -1,4 +1,4 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 +pytest~=7.1.0 pytest-cov>=2.8.1 -pytest-randomly == 1.2.3 # needed for python 2.7+3.4 -Flask-Testing == 0.8.0 +pytest-randomly>=1.2.3 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_Auditing_API/tox.ini b/services/TS29222_CAPIF_Auditing_API/tox.ini index 865c84958eb54cb4c30ea558c1d26f9bc10bd19f..1afa603e238fe893584dbde9e05a0a0a81c7841a 100644 --- a/services/TS29222_CAPIF_Auditing_API/tox.ini +++ b/services/TS29222_CAPIF_Auditing_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= pytest --cov=logs diff --git a/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/FILES index e51407a84d6773ba25fcc8ecfcdd1043458ba25a..a2f706ddcae717fe58062908b3ab43a83c38e0e1 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/FILES @@ -4,40 +4,61 @@ Dockerfile README.md git_push.sh -requirements.txt service_apis/__init__.py service_apis/__main__.py service_apis/controllers/__init__.py service_apis/controllers/default_controller.py -service_apis/controllers/security_controller_.py +service_apis/controllers/security_controller.py service_apis/encoder.py service_apis/models/__init__.py +service_apis/models/aef_location.py service_apis/models/aef_profile.py -service_apis/models/base_model_.py +service_apis/models/api_status.py +service_apis/models/base_model.py +service_apis/models/civic_address.py service_apis/models/communication_type.py -service_apis/models/communication_type_any_of.py service_apis/models/custom_operation.py service_apis/models/data_format.py -service_apis/models/data_format_any_of.py service_apis/models/discovered_apis.py +service_apis/models/ellipsoid_arc.py +service_apis/models/gad_shape.py +service_apis/models/geographic_area.py +service_apis/models/geographical_coordinates.py service_apis/models/interface_description.py service_apis/models/invalid_param.py +service_apis/models/ip_addr_info.py +service_apis/models/ip_addr_range.py +service_apis/models/ipv4_address_range.py +service_apis/models/ipv6_addr1.py +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/operation.py -service_apis/models/operation_any_of.py +service_apis/models/point.py +service_apis/models/point_altitude.py +service_apis/models/point_altitude_uncertainty.py +service_apis/models/point_uncertainty_circle.py +service_apis/models/point_uncertainty_ellipse.py +service_apis/models/polygon.py service_apis/models/problem_details.py service_apis/models/protocol.py -service_apis/models/protocol_any_of.py service_apis/models/published_api_path.py +service_apis/models/relative_cartesian_location.py service_apis/models/resource.py service_apis/models/security_method.py -service_apis/models/security_method_any_of.py service_apis/models/service_api_description.py +service_apis/models/service_kpis.py service_apis/models/shareable_information.py +service_apis/models/supported_gad_shapes.py +service_apis/models/uncertainty_ellipse.py +service_apis/models/uncertainty_ellipsoid.py service_apis/models/version.py service_apis/openapi/openapi.yaml service_apis/test/__init__.py service_apis/typing_utils.py service_apis/util.py +requirements.txt setup.py test-requirements.txt tox.ini diff --git a/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/VERSION index 4b448de535c7dd619da0df6d8221995dbd5d118a..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_Discover_Service_API/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_Discover_Service_API/Dockerfile b/services/TS29222_CAPIF_Discover_Service_API/Dockerfile index 1478af82410e6e25457620961e115073ab1bcdbc..350f5883ead9947dc54a608eee32cf2379d8d9fa 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/Dockerfile +++ b/services/TS29222_CAPIF_Discover_Service_API/Dockerfile @@ -1,11 +1,19 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/requirements.txt -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir -r requirements.txt COPY . /usr/src/app diff --git a/services/TS29222_CAPIF_Discover_Service_API/README.md b/services/TS29222_CAPIF_Discover_Service_API/README.md index f522a7de8792c85b4b772ac934da91bc1be45fb1..d27fa9b368278b43c5782f7e38988d4c78927499 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/README.md +++ b/services/TS29222_CAPIF_Discover_Service_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 service_apis +python3 -m openapi_server ``` and open your browser to here: diff --git a/services/TS29222_CAPIF_Discover_Service_API/git_push.sh b/services/TS29222_CAPIF_Discover_Service_API/git_push.sh index 9405f72e950cdb8ca24c3cf4d15cee7eac62fde7..f53a75d4fabe760cce49eddfd62fcc702938ea90 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/git_push.sh +++ b/services/TS29222_CAPIF_Discover_Service_API/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/services/TS29222_CAPIF_Discover_Service_API/prepare_discover.sh b/services/TS29222_CAPIF_Discover_Service_API/prepare_discover.sh index dd9ad7d8b8b4a431a0623ad1da3b3a0c38e684a1..dd3f3612ac0e74093c40677f2154c92f2f07f0c7 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/prepare_discover.sh +++ b/services/TS29222_CAPIF_Discover_Service_API/prepare_discover.sh @@ -1,6 +1,6 @@ #!/bin/bash -gunicorn --bind 0.0.0.0:8080 \ +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/service_apis wsgi:app diff --git a/services/TS29222_CAPIF_Discover_Service_API/requirements.txt b/services/TS29222_CAPIF_Discover_Service_API/requirements.txt index 1c57f79a6c75be2813dbca4d36f7c119adabe6a2..32a15be25ab0afc062f029940f58f84ccb466548 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/requirements.txt +++ b/services/TS29222_CAPIF_Discover_Service_API/requirements.txt @@ -1,25 +1,24 @@ -connexion[swagger-ui] == 2.14.2; python_version>="3.6" +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 +setuptools == 74.0.0 +Flask == 3.0.3 pymongo == 4.7.3 -flask_jwt_extended == 4.4.4 +redis == 4.5.4 +flask_jwt_extended == 4.6.0 cryptography == 42.0.8 rfc3987 == 1.3.8 -redis == 4.5.4 -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.17.0 +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 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.17.0 -opentelemetry-sdk == 1.17.0 -flask_executor == 1.0.0 +opentelemetry-api == 1.19.0 +opentelemetry-sdk == 1.19.0 flask_executor == 1.0.0 -Werkzeug == 2.2.3 +werkzeug == 3.0.4 gunicorn == 22.0.0 packaging == 24.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 beec70806ff45a9d3795b952efb09906773a3eb3..4084bfdb45306b7bd78a1130930a76d8eaefa7a1 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/app.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/app.py @@ -1,24 +1,23 @@ #!/usr/bin/env python3 -import connexion - -import encoder - import logging -from flask_jwt_extended import JWTManager, jwt_required, create_access_token +import os from logging.handlers import RotatingFileHandler -from config import Config -import os +import connexion +from flask_jwt_extended import JWTManager from fluent import sender -from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry import trace from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +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.instrumentation.redis import RedisInstrumentor +from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator + +import encoder +from config import Config NAME = "Discover-Service" @@ -109,8 +108,8 @@ def verbose_formatter(): datefmt='%d/%m/%Y %H:%M:%S' ) -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = encoder.CustomJSONEncoder app.add_api('openapi.yaml', arguments={'title': 'CAPIF_Discover_Service_API'}, pythonic_params=True) diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/config.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/config.py index 97ab831fc7a69163163f7182f1f8c61bd9e3ffc4..2ac31772c592bd967935a873ae08d3ba2c0791fc 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/config.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): 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 2c81a78e019e640b140dbde5f6463f7784502ee2..2ce066eeba789cd59771cdb8c8e9823d151d0bc6 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,17 +1,23 @@ +from service_apis.models.discovered_apis import DiscoveredAPIs # noqa: E501 + +import json + +from flask import request, current_app +from service_apis.models.discovered_apis import DiscoveredAPIs # noqa: E501 from ..core.discoveredapis import DiscoverApisOperations -from flask import Response, request, current_app discover_apis = DiscoverApisOperations() -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, supported_features=None, api_supported_features=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, supported_features=None, api_supported_features=None, ue_ip_addr=None, service_kpis=None): # noqa: E501 """all_service_apis_get - Discover published service APIs and retrieve a collection of APIs according to certain filter criteria. # noqa: E501 + 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. + :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 subclause 4.4 of 3GPP TS 29.501. + :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. :type api_name: str :param api_version: API major version the URI (e.g. v1). :type api_version: str @@ -25,17 +31,36 @@ def all_service_apis_get(api_invoker_id, api_name=None, api_version=None, comm_t :type data_format: dict | bytes :param api_cat: The service API category to which the service API belongs to. :type api_cat: str + :param preferred_aef_loc: The preferred AEF location. + :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. + :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 - :rtype: DiscoveredAPIs + :rtype: Union[DiscoveredAPIs, Tuple[DiscoveredAPIs, int], Tuple[DiscoveredAPIs, int, Dict[str, str]] """ current_app.logger.info("Discovering service apis") - query_params = {"api_name":api_name, "api_version":api_version, "comm_type":comm_type, - "protocol":protocol, "aef_id":aef_id, "data_format":data_format, - "api_cat":api_cat, "supported_features":supported_features, "api_supported_features":api_supported_features} + + query_params = {"api_name": api_name, "api_version": api_version, "comm_type": comm_type, + "protocol": protocol, "aef_id": aef_id, "data_format": data_format, + "api_cat": api_cat, "api_supported_features": api_supported_features, + "supported_features": supported_features} + + if supported_features is not None: + supp_feat_dict = DiscoveredAPIs.return_supp_feat_dict(supported_features) + current_app.logger.info(supp_feat_dict) + if supp_feat_dict['VendSpecQueryParams']: + for q_params in request.args: + if "vend-spec" in q_params: + query_params[q_params] = json.loads(request.args[q_params]) + response = discover_apis.get_discoveredapis(api_invoker_id, query_params) return response 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 new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller.py @@ -0,0 +1,2 @@ + + 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 deleted file mode 100644 index 6d294ffd6df1a26a469dbb4e72533b01503468dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/controllers/security_controller_.py +++ /dev/null @@ -1,2 +0,0 @@ -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 487ceb14b65d6b7cca68b665257e0023dbcf926d..f4b0d8fdf5800ec6c0c995e1432a3f542547fcd0 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 @@ -1,9 +1,27 @@ -from flask import current_app, Flask, Response -from ..core.responses import internal_server_error, forbidden_error ,make_response, not_found_error +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 ..models.discovered_apis import DiscoveredAPIs from ..util import serialize_clean_camel_case -from ..core.resources import Resource +from ..vendor_specific import find_attribute_in_body, filter_apis_with_vendor_specific_params, \ + remove_vendor_specific_fields + + +def filter_fields(filtered_apis): + key_filter = [ + "api_name", "api_id", "aef_profiles", "description", + "supported_features", "shareable_info", "service_api_category", + "api_supp_feats", "pub_api_path", "ccf_id", "api_status" + ] + field_filtered_api = {} + for key in filtered_apis.keys(): + if key in key_filter or 'vendorSpecific' in key: + field_filtered_api[key] = filtered_apis[key] + return field_filtered_api class DiscoverApisOperations(Resource): @@ -23,21 +41,60 @@ class DiscoverApisOperations(Resource): my_params = [] my_query = {} - quey_params_name = {"api_name":"api_name", "api_version":"aef_profiles.0.versions.0.api_version", "comm_type":"aef_profiles.0.versions.0.resources.0.comm_type", - "protocol":"aef_profiles.0.protocol", "aef_id":"aef_profiles.0.aef_id", "data_format":"aef_profiles.0.data_format", - "api_cat":"service_api_category", "supported_features":"supported_features", "api_supported_features":"api_supp_feats"} + # QPV = Query Parameter Value + query_params_name = { + "api_name": "api_name", + "api_version": '{"aef_profiles": {"$elemMatch": {"versions" : {"$elemMatch": {"api_version": "QPV"}}}}}', + "comm_type": '{"aef_profiles": {"$elemMatch": {"versions" : {"$elemMatch": {"resources": {"$elemMatch": {"comm_type":"QPV"}}}}}}}', + "protocol": '{"aef_profiles": {"$elemMatch": {"protocol":"QPV"}}}', + "aef_id": '{"aef_profiles": {"$elemMatch": {"aef_id":"QPV"}}}', + "data_format": '{"aef_profiles": {"$elemMatch": {"data_format":"QPV"}}}', + "api_cat": "service_api_category", + "supported_features": "supported_features", + "api_supported_features": "api_supp_feats" + } + + vend_spec_query_params_n_values = {} + supp_feat = query_params["supported_features"] + del query_params["supported_features"] for param in query_params: if query_params[param] is not None: - my_params.append({quey_params_name[param]: query_params[param]}) + if "vend-spec" in param: + vend_param = param.split("vend-spec-")[1] + attribute_path = query_params[param]["target"].split('/') + vend_spec_query_params_n_values[attribute_path[1] + "." + vend_param] = query_params[param]["value"] + elif param in ["api_version", "comm_type", "protocol", "aef_id", "data_format"]: + my_params.append(json.loads(query_params_name[param].replace("QPV", query_params[param]))) + else: + my_params.append({query_params_name[param]: query_params[param]}) if my_params: my_query = {"$and": my_params} - discoved_apis = services.find(my_query, {"_id":0, "api_name":1, "api_id":1, "aef_profiles":1, "description":1, "supported_features":1, "shareable_info":1, "service_api_category":1, "api_supp_feats":1, "pub_api_path":1, "ccf_id":1}) + discoved_apis = services.find(my_query, {"_id":0}) json_docs = [] - for discoved_api in discoved_apis: - json_docs.append(discoved_api) + if supp_feat is None: + for discoved_api in discoved_apis: + vendor_specific_fields_path = find_attribute_in_body(discoved_api, '') + json_docs.append(filter_fields(remove_vendor_specific_fields(discoved_api, vendor_specific_fields_path))) + else: + supported_features = DiscoveredAPIs.return_supp_feat_dict(supp_feat) + if supported_features['VendSpecQueryParams']: + for discoved_api in discoved_apis: + vendor_specific_fields_path = find_attribute_in_body(discoved_api, '') + if vendor_specific_fields_path: + if vend_spec_query_params_n_values: + vs_filtered_apis = filter_apis_with_vendor_specific_params(discoved_api, vend_spec_query_params_n_values, vendor_specific_fields_path) + if vs_filtered_apis: + json_docs.append(filter_fields(vs_filtered_apis)) + else: + json_docs.append(filter_fields(discoved_api)) + else: + for discoved_api in discoved_apis: + vendor_specific_fields_path = find_attribute_in_body(discoved_api, '') + if not vendor_specific_fields_path: + json_docs.append(filter_fields(discoved_api)) if len(json_docs) == 0: return not_found_error(detail="API Invoker " + api_invoker_id + " has no API Published that accomplish filter conditions", cause="No API Published accomplish filter conditions") diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/resources.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/resources.py index efbe3c2d4cf28cec298ef17b394011dcd6aa66cb..053c10786ef6135e5fa994c2d825c36419c95112 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/resources.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/core/resources.py @@ -1,6 +1,8 @@ -from abc import ABC, abstractmethod +from abc import ABC + from db.db import MongoDatabse + class Resource(ABC): def __init__(self): 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 b54555bf6178395418c0e3d378feddf6fe072f3f..0aafcc670abba4ff62f51e9c6feef77815589a1c 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 @@ -1,14 +1,16 @@ -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder +import json + from flask import Response + +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case -import json mimetype = "application/json" def make_response(object, status): - res = Response(json.dumps(object, cls=JSONEncoder), status=status, mimetype=mimetype) + res = Response(json.dumps(object, cls=CustomJSONEncoder), status=status, mimetype=mimetype) return res @@ -17,25 +19,25 @@ def internal_server_error(detail, cause): prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=500, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=500, mimetype=mimetype) def forbidden_error(detail, cause): prob = ProblemDetails(title="Forbidden", status=403, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=403, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=403, mimetype=mimetype) 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=JSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) 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=JSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/db/db.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/db/db.py index fb741fbfa6d23a29ce7df142f68a02b7885c946c..39b1889d6b77c982f18986385e4fc04a7178d583 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/db/db.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/db/db.py @@ -1,10 +1,11 @@ +import os import time -from pymongo import MongoClient -from pymongo.errors import AutoReconnect -from config import Config + from bson.codec_options import CodecOptions -import os +from config import Config from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from pymongo import MongoClient +from pymongo.errors import AutoReconnect monitoring_value = os.environ.get("MONITORING", "").lower() if monitoring_value == "true": 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 80bad8fa9220ab873e044b7adc0a849746088ad5..c741e68b91b490a5548c213daf3bd032c74831d0 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/encoder.py @@ -1,20 +1,19 @@ -from connexion.apps.flask_app import FlaskJSONEncoder -import six +from connexion.jsonifier import JSONEncoder -from models.base_model_ import Model +from service_apis.models.base_model import Model -class JSONEncoder(FlaskJSONEncoder): +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + return JSONEncoder.default(self, o) 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 f340ca4cbe53761655055bedcf5a80432fba729a..d036df693ea41dfaa3debffffad0462c1fcd8e4a 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,26 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # import models into model package -from service_apis.models.aef_profile import AefProfile -from service_apis.models.communication_type import CommunicationType -from service_apis.models.communication_type_any_of import CommunicationTypeAnyOf -from service_apis.models.custom_operation import CustomOperation -from service_apis.models.data_format import DataFormat -from service_apis.models.data_format_any_of import DataFormatAnyOf -from service_apis.models.discovered_apis import DiscoveredAPIs -from service_apis.models.interface_description import InterfaceDescription -from service_apis.models.invalid_param import InvalidParam -from service_apis.models.operation import Operation -from service_apis.models.operation_any_of import OperationAnyOf -from service_apis.models.problem_details import ProblemDetails -from service_apis.models.protocol import Protocol -from service_apis.models.protocol_any_of import ProtocolAnyOf -from service_apis.models.published_api_path import PublishedApiPath -from service_apis.models.resource import Resource -from service_apis.models.security_method import SecurityMethod -from service_apis.models.security_method_any_of import SecurityMethodAnyOf -from service_apis.models.service_api_description import ServiceAPIDescription -from service_apis.models.shareable_information import ShareableInformation -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 new file mode 100644 index 0000000000000000000000000000000000000000..1174800e0fe1f17bfa0276948c4d9890a3c88084 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_location.py @@ -0,0 +1,116 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + 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_Discover_Service_API/service_apis/models/aef_profile.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/aef_profile.py index 03ed0fd9dd6d5071e907bb311d2f241a2bc8effe..4c1ce31df166ccdf798ad532997afa0400ce00fd 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,31 +1,25 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.data_format import DataFormat -from service_apis.models.interface_description import InterfaceDescription -from service_apis.models.protocol import Protocol -from service_apis.models.security_method import SecurityMethod -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 from service_apis.models.protocol import Protocol # noqa: E501 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). 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): # noqa: E501 + 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, 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 @@ -42,6 +36,12 @@ class AefProfile(Model): :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, @@ -50,7 +50,10 @@ class AefProfile(Model): 'data_format': DataFormat, 'security_methods': List[SecurityMethod], 'domain_name': str, - 'interface_descriptions': List[InterfaceDescription] + 'interface_descriptions': List[InterfaceDescription], + 'aef_location': AefLocation, + 'service_kpis': ServiceKpis, + 'ue_ip_range': IpAddrRange } self.attribute_map = { @@ -60,7 +63,10 @@ class AefProfile(Model): 'data_format': 'dataFormat', 'security_methods': 'securityMethods', 'domain_name': 'domainName', - 'interface_descriptions': 'interfaceDescriptions' + 'interface_descriptions': 'interfaceDescriptions', + 'aef_location': 'aefLocation', + 'service_kpis': 'serviceKpis', + 'ue_ip_range': 'ueIpRange' } self._aef_id = aef_id @@ -70,6 +76,9 @@ class AefProfile(Model): self._security_methods = security_methods 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': @@ -83,7 +92,7 @@ class AefProfile(Model): return util.deserialize_model(dikt, cls) @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -94,7 +103,7 @@ class AefProfile(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -108,7 +117,7 @@ class AefProfile(Model): self._aef_id = aef_id @property - def versions(self): + def versions(self) -> List[Version]: """Gets the versions of this AefProfile. API version # noqa: E501 @@ -119,7 +128,7 @@ class AefProfile(Model): return self._versions @versions.setter - def versions(self, versions): + def versions(self, versions: List[Version]): """Sets the versions of this AefProfile. API version # noqa: E501 @@ -135,7 +144,7 @@ class AefProfile(Model): self._versions = versions @property - def protocol(self): + def protocol(self) -> Protocol: """Gets the protocol of this AefProfile. @@ -145,7 +154,7 @@ class AefProfile(Model): return self._protocol @protocol.setter - def protocol(self, protocol): + def protocol(self, protocol: Protocol): """Sets the protocol of this AefProfile. @@ -156,7 +165,7 @@ class AefProfile(Model): self._protocol = protocol @property - def data_format(self): + def data_format(self) -> DataFormat: """Gets the data_format of this AefProfile. @@ -166,7 +175,7 @@ class AefProfile(Model): return self._data_format @data_format.setter - def data_format(self, data_format): + def data_format(self, data_format: DataFormat): """Sets the data_format of this AefProfile. @@ -177,7 +186,7 @@ class AefProfile(Model): self._data_format = data_format @property - def security_methods(self): + def security_methods(self) -> List[SecurityMethod]: """Gets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -188,7 +197,7 @@ class AefProfile(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + def security_methods(self, security_methods: List[SecurityMethod]): """Sets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -202,7 +211,7 @@ class AefProfile(Model): self._security_methods = security_methods @property - def domain_name(self): + def domain_name(self) -> str: """Gets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -213,7 +222,7 @@ class AefProfile(Model): return self._domain_name @domain_name.setter - def domain_name(self, domain_name): + def domain_name(self, domain_name: str): """Sets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -225,7 +234,7 @@ class AefProfile(Model): self._domain_name = domain_name @property - def interface_descriptions(self): + def interface_descriptions(self) -> List[InterfaceDescription]: """Gets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -236,7 +245,7 @@ class AefProfile(Model): return self._interface_descriptions @interface_descriptions.setter - def interface_descriptions(self, interface_descriptions): + def interface_descriptions(self, interface_descriptions: List[InterfaceDescription]): """Sets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -248,3 +257,66 @@ class AefProfile(Model): 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 + + @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/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py new file mode 100644 index 0000000000000000000000000000000000000000..2cb1a216ee786c7f0eaa6a45f042337cb357f963 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/api_status.py @@ -0,0 +1,64 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model + + +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 this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # 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 this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # 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_Discover_Service_API/service_apis/models/base_model_.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py similarity index 92% rename from services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model_.py rename to services/TS29222_CAPIF_Discover_Service_API/service_apis/models/base_model.py index c9cf2aeb94fdc98e52cc5b2fc92580dcfbdb9a0f..a083ea9489c03a70869dbd2e2cfe026c016472e6 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,6 +1,4 @@ import pprint - -import six import typing from service_apis import util @@ -8,14 +6,14 @@ from service_apis import util T = typing.TypeVar('T') -class Model(object): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. - openapi_types = {} + openapi_types: typing.Dict[str, type] = {} # attributeMap: The key is attribute name and the # value is json key in definition. - attribute_map = {} + attribute_map: typing.Dict[str, str] = {} @classmethod def from_dict(cls: typing.Type[T], dikt) -> T: @@ -29,7 +27,7 @@ class Model(object): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 new file mode 100644 index 0000000000000000000000000000000000000000..5e8fb961815bd0a4250a42f78d5514f17caef189 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/civic_address.py @@ -0,0 +1,918 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model + + +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_Discover_Service_API/service_apis/models/communication_type.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type.py index 793701c97c65291a6a2b5963d9ce036d72620e3f..e6b697a16299e357bfd4f9796fc95c392dfa855d 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type_any_of import CommunicationTypeAnyOf from service_apis import util +from service_apis.models.base_model import Model -from service_apis.models.communication_type_any_of import CommunicationTypeAnyOf # noqa: E501 class CommunicationType(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/communication_type_any_of.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type_any_of.py deleted file mode 100644 index 72b1a5399542f280e37398e67b0e521aaeaf8354..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/communication_type_any_of.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 import util - - -class CommunicationTypeAnyOf(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 - """CommunicationTypeAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'CommunicationTypeAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The CommunicationType_anyOf of this CommunicationTypeAnyOf. # noqa: E501 - :rtype: CommunicationTypeAnyOf - """ - return util.deserialize_model(dikt, cls) 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 fdbb2cb3ff1727caa48cde4530c4297be28f3528..7c93f551fd7dc53cd6eaf4c077a27504ec3feea9 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type import CommunicationType -from service_apis.models.operation import Operation from service_apis import util - +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). @@ -62,7 +56,7 @@ class CustomOperation(Model): return util.deserialize_model(dikt, cls) @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this CustomOperation. @@ -72,7 +66,7 @@ class CustomOperation(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this CustomOperation. @@ -85,10 +79,10 @@ class CustomOperation(Model): self._comm_type = comm_type @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -96,10 +90,10 @@ class CustomOperation(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -110,10 +104,10 @@ class CustomOperation(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -121,10 +115,10 @@ class CustomOperation(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -135,7 +129,7 @@ class CustomOperation(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this CustomOperation. Text description of the custom operation # noqa: E501 @@ -146,7 +140,7 @@ class CustomOperation(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this CustomOperation. Text description of the custom operation # noqa: E501 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 7fcf16131a48c558994eceeee671bd198a26280a..9cbf6ff5b314fd81f7ffb6670eebaf043d0f867d 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.data_format_any_of import DataFormatAnyOf from service_apis import util +from service_apis.models.base_model import Model -from service_apis.models.data_format_any_of import DataFormatAnyOf # noqa: E501 class DataFormat(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/discovered_apis.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/discovered_apis.py index 10eca4993c19ef144c5dbea121ed312248a7ea20..cce42aefced990612b5ad36cafb7408099880942 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,16 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.service_api_description import ServiceAPIDescription from service_apis import util - +from service_apis.models.base_model import Model from service_apis.models.service_api_description import ServiceAPIDescription # noqa: E501 + class DiscoveredAPIs(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,6 +28,18 @@ class DiscoveredAPIs(Model): self._service_api_descriptions = service_api_descriptions + @classmethod + def return_supp_feat_dict(cls, supp_feat): + TOTAL_FEATURES = 3 + supp_feat_in_hex = int(supp_feat, 16) + supp_feat_in_bin = bin(supp_feat_in_hex)[2:].zfill(TOTAL_FEATURES)[::-1] + + return { + "ApiSupportedFeatureQuery": True if supp_feat_in_bin[0] == "1" else False, + "VendSpecQueryParams": True if supp_feat_in_bin[1] == "1" else False, + "RNAA": True if supp_feat_in_bin[2] == "1" else False + } + @classmethod def from_dict(cls, dikt) -> 'DiscoveredAPIs': """Returns the dict as a model @@ -45,10 +52,10 @@ class DiscoveredAPIs(Model): return util.deserialize_model(dikt, cls) @property - def service_api_descriptions(self): + def service_api_descriptions(self) -> List[ServiceAPIDescription]: """Gets the service_api_descriptions of this DiscoveredAPIs. - Description of the service API as published by the service. Each service API description shall include AEF profiles matching the filter criteria. # noqa: E501 + Description of the service API as published by the service. Each service API description shall include AEF profiles matching the filter criteria. # noqa: E501 :return: The service_api_descriptions of this DiscoveredAPIs. :rtype: List[ServiceAPIDescription] @@ -56,10 +63,10 @@ class DiscoveredAPIs(Model): return self._service_api_descriptions @service_api_descriptions.setter - def service_api_descriptions(self, service_api_descriptions): + def service_api_descriptions(self, service_api_descriptions: List[ServiceAPIDescription]): """Sets the service_api_descriptions of this DiscoveredAPIs. - Description of the service API as published by the service. Each service API description shall include AEF profiles matching the filter criteria. # noqa: E501 + Description of the service API as published by the service. Each service API description shall include AEF profiles matching the filter criteria. # noqa: E501 :param service_api_descriptions: The service_api_descriptions of this DiscoveredAPIs. :type service_api_descriptions: List[ServiceAPIDescription] 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 new file mode 100644 index 0000000000000000000000000000000000000000..98745d95e1024eebc8021380b4951503333facbf --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ellipsoid_arc.py @@ -0,0 +1,260 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + 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_Discover_Service_API/service_apis/models/gad_shape.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py new file mode 100644 index 0000000000000000000000000000000000000000..7e4f7c4a4859991c1104d7b7234cd9803c8198f1 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/gad_shape.py @@ -0,0 +1,63 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + 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_Discover_Service_API/service_apis/models/geographic_area.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py new file mode 100644 index 0000000000000000000000000000000000000000..bc7034d3b3334c6c673daf8879e6746e6f8e6f1c --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographic_area.py @@ -0,0 +1,453 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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 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_Discover_Service_API/service_apis/models/geographical_coordinates.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py new file mode 100644 index 0000000000000000000000000000000000000000..c07d138fb41e81a3fa7d8040f1d63472877da0c9 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/geographical_coordinates.py @@ -0,0 +1,98 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model + + +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_Discover_Service_API/service_apis/models/interface_description.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/interface_description.py index a51d99038c10e2ee7e69d760e1ed3edb87b81890..74bf6544fd466c37e56e3928a20690fc4a120a16 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,51 +1,57 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.security_method import SecurityMethod from service_apis import util - +from service_apis.models.base_model import Model from service_apis.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 + def __init__(self, ipv4_addr=None, ipv6_addr=None, fqdn=None, port=None, api_prefix=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 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] """ self.openapi_types = { 'ipv4_addr': str, 'ipv6_addr': str, + 'fqdn': str, 'port': int, + 'api_prefix': str, 'security_methods': List[SecurityMethod] } self.attribute_map = { 'ipv4_addr': 'ipv4Addr', 'ipv6_addr': 'ipv6Addr', + 'fqdn': 'fqdn', 'port': 'port', + 'api_prefix': 'apiPrefix', 'security_methods': 'securityMethods' } 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 @classmethod @@ -60,10 +66,10 @@ class InterfaceDescription(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr(self): + 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 + 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 @@ -71,10 +77,10 @@ class InterfaceDescription(Model): return self._ipv4_addr @ipv4_addr.setter - def ipv4_addr(self, ipv4_addr): + 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 + 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 @@ -83,10 +89,10 @@ class InterfaceDescription(Model): self._ipv4_addr = ipv4_addr @property - def ipv6_addr(self): + 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 + 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 @@ -94,10 +100,10 @@ class InterfaceDescription(Model): return self._ipv6_addr @ipv6_addr.setter - def ipv6_addr(self, ipv6_addr): + 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 + 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 @@ -106,7 +112,36 @@ class InterfaceDescription(Model): self._ipv6_addr = ipv6_addr @property - def port(self): + def fqdn(self) -> str: + """Gets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :return: The fqdn of this InterfaceDescription. + :rtype: str + """ + return self._fqdn + + @fqdn.setter + def fqdn(self, fqdn: str): + """Sets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :param fqdn: The fqdn of this InterfaceDescription. + :type fqdn: str + """ + if fqdn is not None and len(fqdn) > 253: + raise ValueError("Invalid value for `fqdn`, length must be less than or equal to `253`") # noqa: E501 + if fqdn is not None and len(fqdn) < 4: + raise ValueError("Invalid value for `fqdn`, length must be greater than or equal to `4`") # noqa: E501 + if fqdn is not None and not re.search(r'^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$', fqdn): # noqa: E501 + raise ValueError("Invalid value for `fqdn`, must be a follow pattern or equal to `/^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$/`") # noqa: E501 + + self._fqdn = fqdn + + @property + def port(self) -> int: """Gets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -117,7 +152,7 @@ class InterfaceDescription(Model): return self._port @port.setter - def port(self, port): + def port(self, port: int): """Sets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -133,10 +168,33 @@ class InterfaceDescription(Model): self._port = port @property - def security_methods(self): + def api_prefix(self) -> str: + """Gets the api_prefix of this InterfaceDescription. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. - Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + 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] @@ -144,10 +202,10 @@ class InterfaceDescription(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + 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 + 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] 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 7e3d8d7b3df0a628cc251ff89cc72c228c40bfef..75965c054a9c0c8d1105ec8b2c4f24bc97171a98 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from service_apis.models.base_model import Model class InvalidParam(Model): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 new file mode 100644 index 0000000000000000000000000000000000000000..3f40627b5357d5d830be9aba4fe902833b467d47 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_info.py @@ -0,0 +1,90 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model + + +class IpAddrInfo(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): # noqa: E501 + """IpAddrInfo - a model defined in OpenAPI + + :param ipv4_addr: The ipv4_addr of this IpAddrInfo. # noqa: E501 + :type ipv4_addr: str + :param ipv6_addr: The ipv6_addr of this IpAddrInfo. # noqa: E501 + :type ipv6_addr: str + """ + self.openapi_types = { + 'ipv4_addr': str, + 'ipv6_addr': str + } + + self.attribute_map = { + 'ipv4_addr': 'ipv4Addr', + 'ipv6_addr': 'ipv6Addr' + } + + self._ipv4_addr = ipv4_addr + self._ipv6_addr = ipv6_addr + + @classmethod + def from_dict(cls, dikt) -> 'IpAddrInfo': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The IpAddrInfo of this IpAddrInfo. # noqa: E501 + :rtype: IpAddrInfo + """ + return util.deserialize_model(dikt, cls) + + @property + def ipv4_addr(self) -> str: + """Gets the ipv4_addr of this IpAddrInfo. + + 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 IpAddrInfo. + :rtype: str + """ + return self._ipv4_addr + + @ipv4_addr.setter + def ipv4_addr(self, ipv4_addr: str): + """Sets the ipv4_addr of this IpAddrInfo. + + 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 IpAddrInfo. + :type ipv4_addr: str + """ + + self._ipv4_addr = ipv4_addr + + @property + def ipv6_addr(self) -> str: + """Gets the ipv6_addr of this IpAddrInfo. + + 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 IpAddrInfo. + :rtype: str + """ + return self._ipv6_addr + + @ipv6_addr.setter + def ipv6_addr(self, ipv6_addr: str): + """Sets the ipv6_addr of this IpAddrInfo. + + 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 IpAddrInfo. + :type ipv6_addr: str + """ + + self._ipv6_addr = ipv6_addr 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 new file mode 100644 index 0000000000000000000000000000000000000000..7d19e3393ff119578dfabda9e913a8cd631051cb --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ip_addr_range.py @@ -0,0 +1,96 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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, ue_ipv6_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[Ipv4AddressRange] + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. # noqa: E501 + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange] + """ + self.openapi_types = { + 'ue_ipv4_addr_ranges': List[Ipv4AddressRange], + 'ue_ipv6_addr_ranges': List[Ipv6AddressRange] + } + + self.attribute_map = { + 'ue_ipv4_addr_ranges': 'ueIpv4AddrRanges', + 'ue_ipv6_addr_ranges': 'ueIpv6AddrRanges' + } + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + self._ue_ipv6_addr_ranges = ue_ipv6_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[Ipv4AddressRange]: + """Gets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv4_addr_ranges of this IpAddrRange. + :rtype: List[Ipv4AddressRange] + """ + return self._ue_ipv4_addr_ranges + + @ue_ipv4_addr_ranges.setter + def ue_ipv4_addr_ranges(self, ue_ipv4_addr_ranges: List[Ipv4AddressRange]): + """Sets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv4_addr_ranges: The ue_ipv4_addr_ranges of this IpAddrRange. + :type ue_ipv4_addr_ranges: List[Ipv4AddressRange] + """ + if ue_ipv4_addr_ranges is not None and len(ue_ipv4_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv4_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + + @property + def ue_ipv6_addr_ranges(self) -> List[Ipv6AddressRange]: + """Gets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv6_addr_ranges of this IpAddrRange. + :rtype: List[Ipv6AddressRange] + """ + return self._ue_ipv6_addr_ranges + + @ue_ipv6_addr_ranges.setter + def ue_ipv6_addr_ranges(self, ue_ipv6_addr_ranges: List[Ipv6AddressRange]): + """Sets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange] + """ + if ue_ipv6_addr_ranges is not None and len(ue_ipv6_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv6_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv6_addr_ranges = ue_ipv6_addr_ranges 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 new file mode 100644 index 0000000000000000000000000000000000000000..a7e40ff61897e85c65dc94952d2cc8b102be222f --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv4_address_range.py @@ -0,0 +1,99 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model + + +class Ipv4AddressRange(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 + """Ipv4AddressRange - a model defined in OpenAPI + + :param start: The start of this Ipv4AddressRange. # noqa: E501 + :type start: str + :param end: The end of this Ipv4AddressRange. # 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) -> 'Ipv4AddressRange': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv4AddressRange of this Ipv4AddressRange. # noqa: E501 + :rtype: Ipv4AddressRange + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> str: + """Gets the start of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The start of this Ipv4AddressRange. + :rtype: str + """ + return self._start + + @start.setter + def start(self, start: str): + """Sets the start of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param start: The start of this Ipv4AddressRange. + :type start: str + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + if start is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', start): # noqa: E501 + raise ValueError("Invalid value for `start`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._start = start + + @property + def end(self) -> str: + """Gets the end of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The end of this Ipv4AddressRange. + :rtype: str + """ + return self._end + + @end.setter + def end(self, end: str): + """Sets the end of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param end: The end of this Ipv4AddressRange. + :type end: str + """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 + if end is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', end): # noqa: E501 + raise ValueError("Invalid value for `end`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._end = end diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format_any_of.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py similarity index 58% rename from services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format_any_of.py rename to services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py index 1c78b7cb57cad8fe2536540efe7db3c38edb22a1..b7af560a0407e1f381e2d515d1fc72db35ac10bc 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/data_format_any_of.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_addr1.py @@ -1,26 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from service_apis.models.base_model import Model -class DataFormatAnyOf(Model): +class Ipv6Addr1(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" def __init__(self): # noqa: E501 - """DataFormatAnyOf - a model defined in OpenAPI + """Ipv6Addr1 - a model defined in OpenAPI """ self.openapi_types = { @@ -30,12 +22,12 @@ class DataFormatAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'DataFormatAnyOf': + def from_dict(cls, dikt) -> 'Ipv6Addr1': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The DataFormat_anyOf of this DataFormatAnyOf. # noqa: E501 - :rtype: DataFormatAnyOf + :return: The Ipv6Addr_1 of this Ipv6Addr1. # noqa: E501 + :rtype: Ipv6Addr1 """ return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..841f7dad5d14bbaa2c82e3d8b40b83d396350333 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/ipv6_address_range.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + Do not edit the class manually. + """ + + def __init__(self, start=None, end=None): # noqa: E501 + """Ipv6AddressRange - a model defined in OpenAPI + + :param start: The start of this Ipv6AddressRange. # noqa: E501 + :type start: Ipv6Addr1 + :param end: The end of this Ipv6AddressRange. # noqa: E501 + :type end: Ipv6Addr1 + """ + self.openapi_types = { + 'start': Ipv6Addr1, + 'end': Ipv6Addr1 + } + + self.attribute_map = { + 'start': 'start', + 'end': 'end' + } + + self._start = start + self._end = end + + @classmethod + def from_dict(cls, dikt) -> 'Ipv6AddressRange': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv6AddressRange of this Ipv6AddressRange. # noqa: E501 + :rtype: Ipv6AddressRange + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> Ipv6Addr1: + """Gets the start of this Ipv6AddressRange. + + + :return: The start of this Ipv6AddressRange. + :rtype: Ipv6Addr1 + """ + return self._start + + @start.setter + def start(self, start: Ipv6Addr1): + """Sets the start of this Ipv6AddressRange. + + + :param start: The start of this Ipv6AddressRange. + :type start: Ipv6Addr1 + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + + self._start = start + + @property + def end(self) -> Ipv6Addr1: + """Gets the end of this Ipv6AddressRange. + + + :return: The end of this Ipv6AddressRange. + :rtype: Ipv6Addr1 + """ + return self._end + + @end.setter + def end(self, end: Ipv6Addr1): + """Sets the end of this Ipv6AddressRange. + + + :param end: The end of this Ipv6AddressRange. + :type end: Ipv6Addr1 + """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 + + self._end = end 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 new file mode 100644 index 0000000000000000000000000000000000000000..1d99c36b21761bea841c92cd4a3101e281d38758 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local2d_point_uncertainty_ellipse.py @@ -0,0 +1,184 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..4ab20c6b308caf952b54eda94ef862c141c3288a --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local3d_point_uncertainty_ellipsoid.py @@ -0,0 +1,184 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, local_origin=None, point=None, uncertainty_ellipsoid=None, 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 + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'local_origin': LocalOrigin, + 'point': RelativeCartesianLocation, + 'uncertainty_ellipsoid': UncertaintyEllipsoid, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'local_origin': 'localOrigin', + 'point': 'point', + 'uncertainty_ellipsoid': 'uncertaintyEllipsoid', + 'confidence': 'confidence' + } + + self._shape = shape + self._local_origin = local_origin + self._point = point + self._uncertainty_ellipsoid = uncertainty_ellipsoid + self._confidence = 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..f7e3fc5808ae288022ff8858a834bd7ab6f6637a --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/local_origin.py @@ -0,0 +1,87 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + Do not edit the class manually. + """ + + def __init__(self, coordinate_id=None, point=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 + """ + self.openapi_types = { + 'coordinate_id': str, + 'point': GeographicalCoordinates + } + + self.attribute_map = { + 'coordinate_id': 'coordinateId', + 'point': 'point' + } + + self._coordinate_id = coordinate_id + self._point = point + + @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 + """ + + 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 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 96d3ead2bb94c623601aa05c482024dc3541b6a5..db7461ed893b86a2de0ce0434f803574605ea7b3 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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_any_of import OperationAnyOf from service_apis import util +from service_apis.models.base_model import Model -from service_apis.models.operation_any_of import OperationAnyOf # noqa: E501 class Operation(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/operation_any_of.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation_any_of.py deleted file mode 100644 index d69836bd47b4a6ba49ef1eae04c792a36b05221e..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/operation_any_of.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 import util - - -class OperationAnyOf(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 - """OperationAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'OperationAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Operation_anyOf of this OperationAnyOf. # noqa: E501 - :rtype: OperationAnyOf - """ - return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..4dd203f43833394159db68ddcafa2de8869f0f27 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point.py @@ -0,0 +1,92 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + 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_Discover_Service_API/service_apis/models/point_altitude.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py new file mode 100644 index 0000000000000000000000000000000000000000..c692296e84767fff568c5f15b29cb359e9e82301 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude.py @@ -0,0 +1,126 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + 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_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py new file mode 100644 index 0000000000000000000000000000000000000000..8cb287ae555465cc844bb26bd00156ec1007a150 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_altitude_uncertainty.py @@ -0,0 +1,253 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + 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_Discover_Service_API/service_apis/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py new file mode 100644 index 0000000000000000000000000000000000000000..aa0d9101133ac4effd0b3d13ad5a0d1a23917c4a --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_circle.py @@ -0,0 +1,124 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + 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_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py new file mode 100644 index 0000000000000000000000000000000000000000..498296e30cce3b71236705e359aab270cad0f456 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/point_uncertainty_ellipse.py @@ -0,0 +1,155 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + 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_Discover_Service_API/service_apis/models/polygon.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py new file mode 100644 index 0000000000000000000000000000000000000000..e8c152b2e9f89117b1479b8159075e50e520ba7e --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/polygon.py @@ -0,0 +1,98 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model +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). + + 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_Discover_Service_API/service_apis/models/problem_details.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/problem_details.py index c9e028d410cd69cf4ca8e152c47f803e630b5f17..371d6452270de67424a20bc33418b92f10889455 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.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). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,10 +239,10 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 + 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 @@ -256,10 +250,10 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 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 311b8e855bc31c12f57ad6c4e9b285fb092fc30c..bd8783f2b51286cbe93199465b0c05f38c3da89e 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.protocol_any_of import ProtocolAnyOf from service_apis import util +from service_apis.models.base_model import Model -from service_apis.models.protocol_any_of import ProtocolAnyOf # noqa: E501 class Protocol(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/published_api_path.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/published_api_path.py index 959ae6edc13e8815094174a13eea315c68dcbd0f..5135c5a7e4aff1e2fb979606665fd6a56cf9ff8b 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from service_apis.models.base_model import Model class PublishedApiPath(Model): @@ -43,7 +39,7 @@ class PublishedApiPath(Model): return util.deserialize_model(dikt, cls) @property - def ccf_ids(self): + 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 @@ -54,7 +50,7 @@ class PublishedApiPath(Model): return self._ccf_ids @ccf_ids.setter - def ccf_ids(self, ccf_ids): + 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..b40cde6be43a3cf40843f00500e5a1bfb162a374 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/relative_cartesian_location.py @@ -0,0 +1,122 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model + + +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_Discover_Service_API/service_apis/models/resource.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/resource.py index c78abb0e4bdba4f1fb50915e74d24c42f6e408e6..6e0a6c356c95406644737e12df8018f253f8e514 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,25 +1,20 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type import CommunicationType -from service_apis.models.operation import Operation from service_apis import util - +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). 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 + 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 @@ -30,6 +25,8 @@ class Resource(Model): :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 @@ -40,6 +37,7 @@ class Resource(Model): 'comm_type': CommunicationType, 'uri': str, 'cust_op_name': str, + 'cust_operations': List[CustomOperation], 'operations': List[Operation], 'description': str } @@ -49,6 +47,7 @@ class Resource(Model): 'comm_type': 'commType', 'uri': 'uri', 'cust_op_name': 'custOpName', + 'cust_operations': 'custOperations', 'operations': 'operations', 'description': 'description' } @@ -57,6 +56,7 @@ class Resource(Model): 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 @@ -72,7 +72,7 @@ class Resource(Model): return util.deserialize_model(dikt, cls) @property - def resource_name(self): + def resource_name(self) -> str: """Gets the resource_name of this Resource. Resource name # noqa: E501 @@ -83,7 +83,7 @@ class Resource(Model): return self._resource_name @resource_name.setter - def resource_name(self, resource_name): + def resource_name(self, resource_name: str): """Sets the resource_name of this Resource. Resource name # noqa: E501 @@ -97,7 +97,7 @@ class Resource(Model): self._resource_name = resource_name @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this Resource. @@ -107,7 +107,7 @@ class Resource(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this Resource. @@ -120,10 +120,10 @@ class Resource(Model): self._comm_type = comm_type @property - def uri(self): + def uri(self) -> str: """Gets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -131,10 +131,10 @@ class Resource(Model): return self._uri @uri.setter - def uri(self, uri): + def uri(self, uri: str): """Sets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -145,10 +145,10 @@ class Resource(Model): self._uri = uri @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -156,10 +156,10 @@ class Resource(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -168,10 +168,35 @@ class Resource(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -179,10 +204,10 @@ class Resource(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -193,7 +218,7 @@ class Resource(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this Resource. Text description of the API resource # noqa: E501 @@ -204,7 +229,7 @@ class Resource(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this Resource. Text description of the API resource # noqa: E501 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 aa5a6a867110291e085122708f079f3f06b45a32..62ebc962cd9c1cb4162d2e83969626e9fb83d238 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.security_method_any_of import SecurityMethodAnyOf from service_apis import util +from service_apis.models.base_model import Model -from service_apis.models.security_method_any_of import SecurityMethodAnyOf # noqa: E501 class SecurityMethod(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_any_of.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method_any_of.py deleted file mode 100644 index 15ad9efd5cf4ee7283136d4d812fac45c45c3143..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/security_method_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 import util - - -class SecurityMethodAnyOf(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 - """SecurityMethodAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'SecurityMethodAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The SecurityMethod_anyOf of this SecurityMethodAnyOf. # noqa: E501 - :rtype: SecurityMethodAnyOf - """ - return util.deserialize_model(dikt, cls) 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 2941555999fae509abe236fe233ec6a16beb214f..339b35c67ce6e89fc2fc8519caccbfe529849527 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,21 +1,14 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.aef_profile import AefProfile -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.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). @@ -23,13 +16,15 @@ class ServiceAPIDescription(Model): 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 + 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 @@ -46,10 +41,13 @@ class ServiceAPIDescription(Model): :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, @@ -57,12 +55,14 @@ class ServiceAPIDescription(Model): 'service_api_category': str, 'api_supp_feats': str, 'pub_api_path': PublishedApiPath, - 'ccf_id': str + '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', @@ -70,11 +70,13 @@ class ServiceAPIDescription(Model): 'service_api_category': 'serviceAPICategory', 'api_supp_feats': 'apiSuppFeats', 'pub_api_path': 'pubApiPath', - 'ccf_id': 'ccfId' + '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 @@ -83,6 +85,7 @@ class ServiceAPIDescription(Model): 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': @@ -96,10 +99,10 @@ class ServiceAPIDescription(Model): return util.deserialize_model(dikt, cls) @property - def api_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -107,10 +110,10 @@ class ServiceAPIDescription(Model): return self._api_name @api_name.setter - def api_name(self, api_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -121,10 +124,10 @@ class ServiceAPIDescription(Model): self._api_name = api_name @property - def api_id(self): + 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 + 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 @@ -132,10 +135,10 @@ class ServiceAPIDescription(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + 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 + 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 @@ -144,10 +147,31 @@ class ServiceAPIDescription(Model): self._api_id = api_id @property - def aef_profiles(self): + 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. - AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 + AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 :return: The aef_profiles of this ServiceAPIDescription. :rtype: List[AefProfile] @@ -155,10 +179,10 @@ class ServiceAPIDescription(Model): return self._aef_profiles @aef_profiles.setter - def aef_profiles(self, aef_profiles): + 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 + 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] @@ -169,7 +193,7 @@ class ServiceAPIDescription(Model): self._aef_profiles = aef_profiles @property - def description(self): + def description(self) -> str: """Gets the description of this ServiceAPIDescription. Text description of the API # noqa: E501 @@ -180,7 +204,7 @@ class ServiceAPIDescription(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this ServiceAPIDescription. Text description of the API # noqa: E501 @@ -192,10 +216,10 @@ class ServiceAPIDescription(Model): self._description = description @property - def supported_features(self): + 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 + 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 @@ -203,10 +227,10 @@ class ServiceAPIDescription(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 @@ -217,7 +241,7 @@ class ServiceAPIDescription(Model): self._supported_features = supported_features @property - def shareable_info(self): + def shareable_info(self) -> ShareableInformation: """Gets the shareable_info of this ServiceAPIDescription. @@ -227,7 +251,7 @@ class ServiceAPIDescription(Model): return self._shareable_info @shareable_info.setter - def shareable_info(self, shareable_info): + def shareable_info(self, shareable_info: ShareableInformation): """Sets the shareable_info of this ServiceAPIDescription. @@ -238,9 +262,10 @@ class ServiceAPIDescription(Model): self._shareable_info = shareable_info @property - def service_api_category(self): + def service_api_category(self) -> str: """Gets the service_api_category of this ServiceAPIDescription. + The service API category to which the service API belongs to. # noqa: E501 :return: The service_api_category of this ServiceAPIDescription. :rtype: str @@ -248,9 +273,10 @@ class ServiceAPIDescription(Model): return self._service_api_category @service_api_category.setter - def service_api_category(self, service_api_category): + def service_api_category(self, service_api_category: str): """Sets the service_api_category of this ServiceAPIDescription. + The service API category to which the service API belongs to. # noqa: E501 :param service_api_category: The service_api_category of this ServiceAPIDescription. :type service_api_category: str @@ -259,10 +285,10 @@ class ServiceAPIDescription(Model): self._service_api_category = service_api_category @property - def api_supp_feats(self): + 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 + 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 @@ -270,10 +296,10 @@ class ServiceAPIDescription(Model): return self._api_supp_feats @api_supp_feats.setter - def api_supp_feats(self, api_supp_feats): + 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 + 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 @@ -284,7 +310,7 @@ class ServiceAPIDescription(Model): self._api_supp_feats = api_supp_feats @property - def pub_api_path(self): + def pub_api_path(self) -> PublishedApiPath: """Gets the pub_api_path of this ServiceAPIDescription. @@ -294,7 +320,7 @@ class ServiceAPIDescription(Model): return self._pub_api_path @pub_api_path.setter - def pub_api_path(self, pub_api_path): + def pub_api_path(self, pub_api_path: PublishedApiPath): """Sets the pub_api_path of this ServiceAPIDescription. @@ -305,7 +331,7 @@ class ServiceAPIDescription(Model): self._pub_api_path = pub_api_path @property - def ccf_id(self): + def ccf_id(self) -> str: """Gets the ccf_id of this ServiceAPIDescription. CAPIF core function identifier. # noqa: E501 @@ -316,7 +342,7 @@ class ServiceAPIDescription(Model): return self._ccf_id @ccf_id.setter - def ccf_id(self, ccf_id): + def ccf_id(self, ccf_id: str): """Sets the ccf_id of this ServiceAPIDescription. CAPIF core function identifier. # noqa: E501 @@ -326,3 +352,26 @@ class ServiceAPIDescription(Model): """ self._ccf_id = ccf_id + + @property + def api_prov_name(self) -> str: + """Gets the api_prov_name of this ServiceAPIDescription. + + Represents the API provider name. # noqa: E501 + + :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. + + Represents the API provider name. # noqa: E501 + + :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/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py new file mode 100644 index 0000000000000000000000000000000000000000..b8024ec96416d6e066744acc7828945bc46c65e7 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/service_kpis.py @@ -0,0 +1,275 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model + + +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("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("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("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("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_Discover_Service_API/service_apis/models/shareable_information.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/shareable_information.py index ed04a4b3ae9bf3bb10cd9e0ae8044af699cc5c86..6970e3dae428e3d4a557117bea7b654cd1937ab1 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from service_apis.models.base_model import Model class ShareableInformation(Model): @@ -48,10 +44,10 @@ class ShareableInformation(Model): return util.deserialize_model(dikt, cls) @property - def is_shareable(self): + 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 + 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 @@ -59,10 +55,10 @@ class ShareableInformation(Model): return self._is_shareable @is_shareable.setter - def is_shareable(self, is_shareable): + 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 + 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 @@ -73,10 +69,10 @@ class ShareableInformation(Model): self._is_shareable = is_shareable @property - def capif_prov_doms(self): + 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 + 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] @@ -84,10 +80,10 @@ class ShareableInformation(Model): return self._capif_prov_doms @capif_prov_doms.setter - def capif_prov_doms(self, capif_prov_doms): + 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 + 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] diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol_any_of.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py similarity index 57% rename from services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol_any_of.py rename to services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py index a75ee92e976340df042d7f70cb2276acdb703c08..2f2a6aea3070500e6387121c48c2aac2d69aaed6 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/protocol_any_of.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/supported_gad_shapes.py @@ -1,27 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from service_apis.models.base_model import Model -class ProtocolAnyOf(Model): +class SupportedGADShapes(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - """ - allowed enum values - """ - _1_1 = "HTTP_1_1" - _2 = "HTTP_2" def __init__(self): # noqa: E501 - """ProtocolAnyOf - a model defined in OpenAPI + """SupportedGADShapes - a model defined in OpenAPI """ self.openapi_types = { @@ -31,12 +22,12 @@ class ProtocolAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'ProtocolAnyOf': + def from_dict(cls, dikt) -> 'SupportedGADShapes': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The Protocol_anyOf of this ProtocolAnyOf. # noqa: E501 - :rtype: ProtocolAnyOf + :return: The SupportedGADShapes of this SupportedGADShapes. # noqa: E501 + :rtype: SupportedGADShapes """ return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..0250ace198fbcf2726f0ed3b660051f458d7d824 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipse.py @@ -0,0 +1,132 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model + + +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_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py new file mode 100644 index 0000000000000000000000000000000000000000..0779259693afc8ce63822d337f008972f8ce787c --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/uncertainty_ellipsoid.py @@ -0,0 +1,164 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from service_apis import util +from service_apis.models.base_model import Model + + +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_Discover_Service_API/service_apis/models/version.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/models/version.py index 8f395e7fc7a5822da6c2caa6b6c8295c7b2129ae..3e4f6efa3593cc2a326a957b89af81437e458d5f 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.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). @@ -62,7 +56,7 @@ class Version(Model): return util.deserialize_model(dikt, cls) @property - def api_version(self): + def api_version(self) -> str: """Gets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -73,7 +67,7 @@ class Version(Model): return self._api_version @api_version.setter - def api_version(self, api_version): + def api_version(self, api_version: str): """Sets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -87,7 +81,7 @@ class Version(Model): self._api_version = api_version @property - def expiry(self): + def expiry(self) -> datetime: """Gets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -98,7 +92,7 @@ class Version(Model): return self._expiry @expiry.setter - def expiry(self, expiry): + def expiry(self, expiry: datetime): """Sets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -110,7 +104,7 @@ class Version(Model): self._expiry = expiry @property - def resources(self): + def resources(self) -> List[Resource]: """Gets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -121,7 +115,7 @@ class Version(Model): return self._resources @resources.setter - def resources(self, resources): + def resources(self, resources: List[Resource]): """Sets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -135,7 +129,7 @@ class Version(Model): self._resources = resources @property - def cust_operations(self): + def cust_operations(self) -> List[CustomOperation]: """Gets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 @@ -146,7 +140,7 @@ class Version(Model): return self._cust_operations @cust_operations.setter - def cust_operations(self, cust_operations): + def cust_operations(self, cust_operations: List[CustomOperation]): """Sets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 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 748f74a56266bc7e67d278d125971b45d0d95f3b..c0c2608827529438b279e370570467dbc75aa6c3 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,29 +1,27 @@ openapi: 3.0.0 info: - description: | - API for discovering service APIs. - © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). - All rights reserved. + description: "API for discovering service APIs. \n© 2023, 3GPP Organizational Partners\ + \ (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Discover_Service_API - version: 1.2.0-alpha.1 + version: 1.3.0-alpha.2 externalDocs: - description: 3GPP TS 29.222 V17.1.0 Common API Framework for 3GPP Northbound APIs - url: http://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ + description: 3GPP TS 29.222 V18.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' +- url: "{apiRoot}/service-apis/v1" variables: apiRoot: default: https://example.com - description: apiRoot as defined in subclause 7.5 of 3GPP TS 29.222. + description: apiRoot as defined in clause 7.5 of 3GPP TS 29.222. paths: /allServiceAPIs: get: - description: Discover published service APIs and retrieve a collection of APIs - according to certain filter criteria. + description: | + Discover published service APIs and retrieve a collection of APIs according to certain filter criteria. operationId: all_service_apis_get parameters: - - description: String identifying the API invoker assigned by the CAPIF core - function. It also represents the CCF identifier in the CAPIF-6/6e interface. + - description: | + String identifying the API invoker assigned by the CAPIF core function. It also represents the CCF identifier in the CAPIF-6/6e interface. explode: true in: query name: api-invoker-id @@ -31,8 +29,8 @@ paths: schema: type: string style: form - - description: API name, it is set as {apiName} part of the URI structure as - defined in subclause 4.4 of 3GPP TS 29.501. + - 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. explode: true in: query name: api-name @@ -89,6 +87,22 @@ paths: schema: type: string style: form + - content: + application/json: + schema: + $ref: '#/components/schemas/AefLocation' + description: The preferred AEF location. + in: query + name: preferred-aef-loc + required: false + - description: Represents the required API provider name. + explode: true + in: query + name: req-api-prov-name + required: false + schema: + type: string + style: form - description: Features supported by the NF consumer for the CAPIF Discover Service API. explode: true @@ -98,9 +112,8 @@ paths: 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. + - 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 in: query name: api-supported-features @@ -108,14 +121,31 @@ paths: schema: $ref: '#/components/schemas/SupportedFeatures' style: form + - description: Represents the UE IP address information. + explode: true + in: query + name: ue-ip-addr + required: false + schema: + $ref: '#/components/schemas/IpAddrInfo' + style: form + - 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 responses: "200": content: application/json: schema: $ref: '#/components/schemas/DiscoveredAPIs' - description: The response body contains the result of the search over the - list of registered APIs. + description: | + The response body contains the result of the search over the list of registered APIs. "307": description: Temporary Redirect headers: @@ -190,10 +220,83 @@ paths: description: Generic Error x-openapi-router-controller: service_apis.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: DiscoveredAPIs: - description: Represents a list of APIs currently registered in the CAPIF core - function and satisfying a number of filter criteria provided by the API consumer. + description: | + Represents a list of APIs currently registered in the CAPIF core function and satisfying a number of filter criteria provided by the API consumer. example: serviceAPIDescriptions: - serviceAPICategory: serviceAPICategory @@ -204,20 +307,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -225,19 +359,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -246,6 +396,20 @@ components: - 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 @@ -253,46 +417,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -300,19 +562,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -321,6 +599,20 @@ components: - 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 @@ -328,37 +620,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 @@ -371,20 +735,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -392,19 +787,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -413,6 +824,20 @@ components: - 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 @@ -420,46 +845,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -467,19 +990,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -488,6 +1027,20 @@ components: - 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 @@ -495,46 +1048,117 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 properties: serviceAPIDescriptions: - description: Description of the service API as published by the service. - Each service API description shall include AEF profiles matching the filter - criteria. + description: | + Description of the service API as published by the service. Each service API description shall include AEF profiles matching the filter criteria. items: $ref: '#/components/schemas/ServiceAPIDescription' minItems: 1 @@ -542,49 +1166,196 @@ components: type: array title: DiscoveredAPIs type: object + IpAddrInfo: + description: Represents the UE IP address information. + 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 + type: object CommunicationType: + type: string anyOf: - - $ref: '#/components/schemas/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 + 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 anyOf: - - $ref: '#/components/schemas/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: | - Possible values are - HTTP_1_1: HTTP version 1.1 - HTTP_2: HTTP version 2 + 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: + type: string anyOf: - - $ref: '#/components/schemas/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: | - Possible values are - JSON: JavaScript Object Notation + 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: 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 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]*$ + 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 ProblemDetails: description: Represents additional information and details on an error response. properties: @@ -593,8 +1364,8 @@ components: 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. + 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: @@ -611,33 +1382,22 @@ components: 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. + 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. + 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]*$ + 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 @@ -647,15 +1407,16 @@ components: title: type type: string InvalidParam: - description: Represents the description of invalid parameters, for a request - rejected due to invalid parameters. + 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. + 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". + description: "A human-readable reason, e.g. \"must be a positive integer\"\ + ." title: reason type: string required: @@ -674,20 +1435,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -695,19 +1487,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -716,6 +1524,20 @@ components: - 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 @@ -723,46 +1545,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -770,19 +1690,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -791,6 +1727,20 @@ components: - 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 @@ -798,59 +1748,129 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 properties: apiName: - description: API name, it is set as {apiName} part of the URI structure - as defined in subclause 4.4 of 3GPP TS 29.501. + 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). + 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 + apiStatus: + $ref: '#/components/schemas/ApiStatus' aefProfiles: - description: AEF profile information, which includes the exposed API details - (e.g. protocol). + description: | + AEF profile information, which includes the exposed API details (e.g. protocol). items: $ref: '#/components/schemas/AefProfile' minItems: 1 @@ -861,40 +1881,21 @@ components: 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]*$ + 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: + description: The service API category to which the service API belongs to. 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]*$ + 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: @@ -903,22 +1904,71 @@ components: description: CAPIF core function identifier. title: ccfId type: string + apiProvName: + description: Represents the API provider name. + title: apiProvName + type: string required: - apiName title: ServiceAPIDescription 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 this attribute is omitted, the API is inactive at all AEF(s) defined in the "aefProfiles" attribute within the ServiceAPIDescription data structure. + items: + type: string + title: aefIds + type: array + required: + - aefIds + title: ApiStatus + type: object AefProfile: description: Represents the AEF profile data. example: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -926,19 +1976,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -947,6 +2013,20 @@ components: - 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 @@ -954,42 +2034,111 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - oneOf: - - required: - - domainName - - required: - - interfaceDescriptions + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + nullable: true + oneOf: [] properties: aefId: description: Identifier of the API exposing function @@ -1024,6 +2173,12 @@ components: minItems: 1 title: interfaceDescriptions type: array + aefLocation: + $ref: '#/components/schemas/AefLocation' + serviceKpis: + $ref: '#/components/schemas/ServiceKpis' + ueIpRange: + $ref: '#/components/schemas/IpAddrRange' required: - aefId - versions @@ -1037,6 +2192,20 @@ components: - 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 @@ -1044,19 +2213,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1094,6 +2279,20 @@ components: 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 @@ -1106,19 +2305,26 @@ components: commType: $ref: '#/components/schemas/CommunicationType' uri: - description: Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} - part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. + 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 subclause 4.4 of 3GPP - TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -1134,35 +2340,26 @@ components: - uri title: Resource type: object - Operation: - anyOf: - - $ref: '#/components/schemas/Operation_anyOf' - - 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 CustomOperation: description: Represents the description of a custom operation. example: operations: - - null - - null + - 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 subclause 4.4 of - 3GPP TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -1177,14 +2374,36 @@ components: - 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 SecurityMethod: anyOf: - - $ref: '#/components/schemas/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 + description: "Indicates the security method. \nPossible values are:\n- PSK:\ + \ Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122.\n- PKI:\ + \ 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 InterfaceDescription: description: Represents the description of an API's interface. @@ -1193,34 +2412,45 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - oneOf: - - required: - - ipv4Addr - - required: - - ipv6Addr + nullable: true + oneOf: [] properties: ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted - decimal" notation as defined in IETF RFC 1166. + 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. + 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 + fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer + apiPrefix: + description: | + A string representing a sequence of path segments that starts with the slash character. + title: apiPrefix + type: string securityMethods: - description: Security methods supported by the interface, it take precedence - over the security methods provided in AefProfile, for this specific interface. + 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 @@ -1228,9 +2458,41 @@ components: type: array title: InterfaceDescription type: object + IpAddrRange: + anyOf: [] + description: Represents the list of public IP ranges + example: + 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 + nullable: true + properties: + ueIpv4AddrRanges: + description: Represents the IPv4 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv4AddressRange' + minItems: 1 + title: ueIpv4AddrRanges + type: array + ueIpv6AddrRanges: + description: Represents the Ipv6 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv6AddressRange' + minItems: 1 + title: ueIpv6AddrRanges + type: array + title: IpAddrRange + 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. + 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 @@ -1238,14 +2500,13 @@ components: 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". + 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. + description: | + List of CAPIF provider domains to which the service API information to be shared. items: type: string minItems: 1 @@ -1273,58 +2534,615 @@ components: type: array title: PublishedApiPath type: object - DateTime: - description: string with format "date-time" as defined in OpenAPI. - format: date-time - title: DateTime - type: string Ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted decimal" - notation as defined in IETF RFC 1166. + 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. + 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 + 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 + 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: 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 + 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' + title: LocalOrigin + type: object + 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' + 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 + Fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string Port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer - CommunicationType_anyOf: - enum: - - REQUEST_RESPONSE - - SUBSCRIBE_NOTIFY - title: CommunicationType_anyOf - type: string - Protocol_anyOf: - enum: - - HTTP_1_1 - - HTTP_2 - title: Protocol_anyOf - type: string - DataFormat_anyOf: - enum: - - JSON - title: DataFormat_anyOf - type: string - Operation_anyOf: - enum: - - GET - - POST - - PUT - - PATCH - - DELETE - title: Operation_anyOf + Ipv4AddressRange: + description: Range of IPv4 addresses + example: + start: 198.51.100.1 + end: 198.51.100.1 + properties: + start: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 + type: string + end: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 + type: string + required: + - end + - start + title: Ipv4AddressRange + type: object + Ipv4Addr_1: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 type: string - SecurityMethod_anyOf: - enum: - - PSK - - PKI - - OAUTH - title: SecurityMethod_anyOf + Ipv6AddressRange: + description: Range of IPv6 addresses + example: + start: 2001:db8:85a3::8a2e:370:7334 + end: 2001:db8:85a3::8a2e:370:7334 + properties: + start: + $ref: '#/components/schemas/Ipv6Addr_1' + end: + $ref: '#/components/schemas/Ipv6Addr_1' + required: + - end + - start + title: Ipv6AddressRange + type: object + Ipv6Addr_1: + allOf: + - pattern: "^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})):){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))$" + - pattern: "^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))$" + description: | + String identifying an IPv6 address formatted according to clause 4 of RFC5952. The mixed IPv4 IPv6 notation according to clause 5 of RFC5952 shall not be used. + example: 2001:db8:85a3::8a2e:370:7334 + title: Ipv6Addr_1 type: string + Float: + description: string with format 'float' as defined in OpenAPI. + format: float + title: Float + type: number 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 new file mode 100644 index 0000000000000000000000000000000000000000..8b9b70a839674a77e3bc56a313be554c897da204 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/__init__.py @@ -0,0 +1,15 @@ +import logging + +import connexion +from flask_testing import TestCase +from service_apis.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_Discover_Service_API/service_apis/test/test_default_controller.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4afdbc502e49678a51a31478d1c0c451d6c32c --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/test/test_default_controller.py @@ -0,0 +1,41 @@ +import unittest + +from service_apis.test import BaseTestCase + + +class TestDefaultController(BaseTestCase): + """DefaultController integration test stubs""" + + def test_all_service_apis_get(self): + """Test case for all_service_apis_get + + + """ + query_string = [('api-invoker-id', 'api_invoker_id_example'), + ('api-name', 'api_name_example'), + ('api-version', 'api_version_example'), + ('comm-type', openapi_server.CommunicationType()), + ('protocol', openapi_server.Protocol()), + ('aef-id', 'aef_id_example'), + ('data-format', openapi_server.DataFormat()), + ('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())] + headers = { + 'Accept': 'application/json', + } + response = self.client.open( + '/service-apis/v1/allServiceAPIs', + 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_Discover_Service_API/service_apis/typing_utils.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..d21c4f633653a0eae75d04b2f6eff684ff9d200d 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/typing_utils.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/typing_utils.py @@ -1,9 +1,6 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): - import typing def is_generic(klass): """ Determine whether klass is a generic class """ 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 cfa4391ef80ec1d4177c26ba64e08795b28c8397..9800793ffdd0e93696b79badb75b99f5b66c1040 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/util.py @@ -1,7 +1,6 @@ import datetime -import six -import typing_utils +from service_apis import typing_utils def serialize_clean_camel_case(obj): @@ -17,10 +16,10 @@ def clean_empty(d): return { k: v for k, v in ((k, clean_empty(v)) for k, v in d.items()) - if v + if v is not None or (isinstance(v, list) and len(v) == 0) } if isinstance(d, list): - return [v for v in map(clean_empty, d) if v] + return [v for v in map(clean_empty, d) if v is not None] return d @@ -57,7 +56,6 @@ def dict_to_camel_case(my_dict): return result - def _deserialize(data, klass): """Deserializes dict, list, str into an object. @@ -66,11 +64,10 @@ def _deserialize(data, klass): :return: object. """ - if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -99,7 +96,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -121,10 +118,9 @@ def deserialize_date(string): :return: date. :rtype: date """ - if string is None: return None - + try: from dateutil.parser import parse return parse(string).date() @@ -142,10 +138,9 @@ def deserialize_datetime(string): :return: datetime. :rtype: datetime """ - if string is None: return None - + try: from dateutil.parser import parse return parse(string) @@ -166,7 +161,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -201,4 +196,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_Discover_Service_API/service_apis/vendor_specific.py b/services/TS29222_CAPIF_Discover_Service_API/service_apis/vendor_specific.py new file mode 100644 index 0000000000000000000000000000000000000000..f7a71ebb339d1e0b874b1824724d05de12a114c6 --- /dev/null +++ b/services/TS29222_CAPIF_Discover_Service_API/service_apis/vendor_specific.py @@ -0,0 +1,91 @@ +import re + + +def find_attribute_in_body(test, path): + f_key = [] + if type(test) == dict: + for k, v in test.items(): + if 'vendorSpecific' in k: + if path == '': + temp_path = k + else: + temp_path = path + "." + k + f_key.append(temp_path) + elif type(v) == dict: + if path == '': + temp_path = k + else: + temp_path = path + "." + k + f_key += find_attribute_in_body(v, temp_path) + elif type(v) == list: + if path == '': + temp_path = k + else: + temp_path = path + "." + k + for i, val in enumerate(v): + f_key += find_attribute_in_body(val, temp_path + "." + str(i)) + return f_key + + +def vendor_specific_key_n_value(vendor_specific_fields, body): + vendor_specific = {} + for field in vendor_specific_fields: + parts = field.split('.') + tmp_body = body + for part in parts: + if part.isnumeric(): + part = int(part) + v = tmp_body[part] + tmp_body = v + vendor_specific[field] = v + return vendor_specific + + +def add_vend_spec_fields(vendor_specific, serviceapidescription_dict): + pattern = re.compile(r'(?=2.8.1 -pytest-randomly == 1.2.3 # needed for python 2.7+3.4 -Flask-Testing == 0.8.0 +pytest-randomly==1.2.3 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_Discover_Service_API/tox.ini b/services/TS29222_CAPIF_Discover_Service_API/tox.ini index bfe39a403a24c73d4db2bce74d66d25fa4b48f1f..70e1a9012d0038af2d41bd76f78debb007c1cec7 100644 --- a/services/TS29222_CAPIF_Discover_Service_API/tox.ini +++ b/services/TS29222_CAPIF_Discover_Service_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= pytest --cov=service_apis diff --git a/services/TS29222_CAPIF_Events_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Events_API/.openapi-generator/FILES index edfb88675128a3f43b3e824f52f4e10b09cf0b5b..54c709f66c81094be746c23eac6df18d20638d18 100644 --- a/services/TS29222_CAPIF_Events_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Events_API/.openapi-generator/FILES @@ -3,64 +3,84 @@ .travis.yml Dockerfile README.md +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/security_controller_.py +capif_events/controllers/security_controller.py capif_events/encoder.py capif_events/models/__init__.py capif_events/models/access_control_policy_list.py capif_events/models/access_control_policy_list_ext.py -capif_events/models/access_control_policy_list_ext_all_of.py +capif_events/models/aef_location.py capif_events/models/aef_profile.py capif_events/models/api_invoker_policy.py -capif_events/models/base_model_.py +capif_events/models/api_status.py +capif_events/models/base_model.py +capif_events/models/buffered_notifications_action.py capif_events/models/capif_event.py -capif_events/models/capif_event_any_of.py capif_events/models/capif_event_detail.py capif_events/models/capif_event_filter.py +capif_events/models/civic_address.py capif_events/models/communication_type.py -capif_events/models/communication_type_any_of.py capif_events/models/custom_operation.py capif_events/models/data_format.py -capif_events/models/data_format_any_of.py +capif_events/models/ellipsoid_arc.py capif_events/models/event_notification.py capif_events/models/event_subscription.py +capif_events/models/event_subscription_patch.py +capif_events/models/gad_shape.py +capif_events/models/geographic_area.py +capif_events/models/geographical_coordinates.py capif_events/models/interface_description.py capif_events/models/invalid_param.py capif_events/models/invocation_log.py +capif_events/models/ip_addr_range.py capif_events/models/ipv4_address_range.py +capif_events/models/ipv4_address_range1.py +capif_events/models/ipv6_addr1.py capif_events/models/ipv6_address_range.py +capif_events/models/ipv6_address_range1.py +capif_events/models/local2d_point_uncertainty_ellipse.py +capif_events/models/local3d_point_uncertainty_ellipsoid.py +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/notification_flag.py -capif_events/models/notification_flag_any_of.py capif_events/models/notification_method.py -capif_events/models/notification_method_any_of.py capif_events/models/operation.py -capif_events/models/operation_any_of.py capif_events/models/partitioning_criteria.py -capif_events/models/partitioning_criteria_any_of.py +capif_events/models/point.py +capif_events/models/point_altitude.py +capif_events/models/point_altitude_uncertainty.py +capif_events/models/point_uncertainty_circle.py +capif_events/models/point_uncertainty_ellipse.py +capif_events/models/polygon.py capif_events/models/problem_details.py capif_events/models/protocol.py -capif_events/models/protocol_any_of.py capif_events/models/published_api_path.py +capif_events/models/relative_cartesian_location.py capif_events/models/reporting_information.py capif_events/models/resource.py capif_events/models/routing_rule.py capif_events/models/security_method.py -capif_events/models/security_method_any_of.py capif_events/models/service_api_description.py +capif_events/models/service_kpis.py capif_events/models/shareable_information.py +capif_events/models/subscription_action.py +capif_events/models/supported_gad_shapes.py capif_events/models/time_range_list.py capif_events/models/topology_hiding.py +capif_events/models/uncertainty_ellipse.py +capif_events/models/uncertainty_ellipsoid.py capif_events/models/version.py capif_events/models/websock_notif_config.py capif_events/openapi/openapi.yaml capif_events/test/__init__.py capif_events/typing_utils.py capif_events/util.py -git_push.sh requirements.txt setup.py test-requirements.txt diff --git a/services/TS29222_CAPIF_Events_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_Events_API/.openapi-generator/VERSION index 4b448de535c7dd619da0df6d8221995dbd5d118a..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_Events_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_Events_API/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_Events_API/Dockerfile b/services/TS29222_CAPIF_Events_API/Dockerfile index b8ba685688c633bd6ea2957c85839d6bf8a5555d..b69327af156c0105c49fd0378186c6ebe1d4ea94 100644 --- a/services/TS29222_CAPIF_Events_API/Dockerfile +++ b/services/TS29222_CAPIF_Events_API/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app @@ -6,7 +6,15 @@ WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/requirements.txt COPY config.yaml /usr/src/app/config.yaml -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir -r requirements.txt COPY . /usr/src/app diff --git a/services/TS29222_CAPIF_Events_API/README.md b/services/TS29222_CAPIF_Events_API/README.md index 9f89fecda371a76b63bfccae48159dc22eb216da..e6189d5346f7d95bbab11277ddcd18acbc6dfbbe 100644 --- a/services/TS29222_CAPIF_Events_API/README.md +++ b/services/TS29222_CAPIF_Events_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_events +python3 -m openapi_server ``` and open your browser to here: diff --git a/services/TS29222_CAPIF_Events_API/capif_events/app.py b/services/TS29222_CAPIF_Events_API/capif_events/app.py index d1d3de3c2a39e30afe0b02aea4ae85738f47fd67..ef1d8c3a535c0c5658b4babb1458fcd3dcf0bf0f 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/app.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/app.py @@ -1,36 +1,28 @@ #!/usr/bin/env python3 -import connexion -import sys import logging +import os +from datetime import datetime +from logging.handlers import RotatingFileHandler -import encoder - - -from flask import Flask, jsonify, request -from flask_jwt_extended import JWTManager, jwt_required, create_access_token -from pymongo import MongoClient - -from core.notifications import Notifications -from core.consumer_messager import Subscriber -from multiprocessing import Process -from threading import Thread -from flask_executor import Executor +import connexion from flask_apscheduler import APScheduler -from logging.handlers import RotatingFileHandler -from config import Config -import os -from fluent import sender from flask_executor import Executor -from opentelemetry.instrumentation.flask import FlaskInstrumentor +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.trace.propagation.tracecontext import TraceContextTextMapPropagator +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.instrumentation.redis import RedisInstrumentor +from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +import encoder +from config import Config +from core.consumer_messager import Subscriber +from core.notifications import Notifications NAME = "Events-Service" @@ -123,8 +115,8 @@ def verbose_formatter(): datefmt='%d/%m/%Y %H:%M:%S' ) -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = encoder.CustomJSONEncoder app.add_api('openapi.yaml', arguments={'title': 'CAPIF_Events_API'}, pythonic_params=True) @@ -144,9 +136,11 @@ if monitoring_value == "true": config = Config() executor = Executor(app.app) subscriber = Subscriber() -# scheduler = APScheduler() -# scheduler.init_app(app.app) - -@app.app.before_first_request -def create_listener_message(): - executor.submit(subscriber.listen) +scheduler = APScheduler() +scheduler.init_app(app.app) +scheduler.start() + +@scheduler.task('date', id='listener', next_run_time=datetime.now()) +def up_listener(): + with scheduler.app.app_context(): + executor.submit(subscriber.listen()) diff --git a/services/TS29222_CAPIF_Events_API/capif_events/config.py b/services/TS29222_CAPIF_Events_API/capif_events/config.py index bed212ac136607ee7459f333b0f50bf7f3481b6b..404434feca0f72cd914c4cbdb94a3fa589bc94b0 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/config.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): diff --git a/services/TS29222_CAPIF_Events_API/capif_events/controllers/default_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/controllers/default_controller.py index 839f0b0db7934b586d6369160da6f4a930e965c5..2e071c8bd0b60f7be06ff5118f3c8cf175a99244 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/controllers/default_controller.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/default_controller.py @@ -1,16 +1,13 @@ -import connexion +from functools import wraps + from capif_events.models.event_subscription import EventSubscription # noqa: E501 -from ..core.events_apis import EventSubscriptionsOperations -import json -from flask import Response, request, current_app -from flask_jwt_extended import jwt_required, get_jwt_identity -from ..encoder import JSONEncoder -from ..models.problem_details import ProblemDetails +from capif_events.models.event_subscription_patch import EventSubscriptionPatch # noqa: E501 from cryptography import x509 from cryptography.hazmat.backends import default_backend +from flask import request, current_app + +from ..core.events_apis import EventSubscriptionsOperations from ..core.validate_user import ControlAccess -from functools import wraps -import pymongo events_ops = EventSubscriptionsOperations() valid_user = ControlAccess() @@ -50,12 +47,11 @@ def subscriber_id_subscriptions_post(subscriber_id, body): # noqa: E501 :param event_subscription: :type event_subscription: dict | bytes - :rtype: EventSubscription + :rtype: Union[EventSubscription, Tuple[EventSubscription, int], Tuple[EventSubscription, int, Dict[str, str]] """ - current_app.logger.info("Creating event subscription") - if connexion.request.is_json: - body = EventSubscription.from_dict(connexion.request.get_json()) # noqa: E501 + if request.is_json: + body = EventSubscription.from_dict(request.get_json()) # noqa: E501 res = events_ops.create_event(subscriber_id, body) @@ -72,11 +68,52 @@ def subscriber_id_subscriptions_subscription_id_delete(subscriber_id, subscripti :param subscription_id: Identifier of an individual Events Subscription :type subscription_id: str - :rtype: None + :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] """ - current_app.logger.info("Removing event subscription") res = events_ops.delete_event(subscriber_id, subscription_id) return res + + +def subscriber_id_subscriptions_subscription_id_patch(subscriber_id, subscription_id, body): # noqa: E501 + """subscriber_id_subscriptions_subscription_id_patch + + Modification of an existing individual CAPIF Event Subscription. # noqa: E501 + + :param subscriber_id: Identifier of the Subscriber + :type subscriber_id: str + :param subscription_id: Identifier of the individual Subscriber + :type subscription_id: str + :param event_subscription_patch: + :type event_subscription_patch: dict | bytes + + :rtype: Union[EventSubscription, Tuple[EventSubscription, int], Tuple[EventSubscription, int, Dict[str, str]] + """ + if request.is_json: + body = EventSubscriptionPatch.from_dict(request.get_json()) # noqa: E501 + + res = events_ops.patch_event(body, subscriber_id, subscription_id) + return res + + +def subscriber_id_subscriptions_subscription_id_put(subscriber_id, subscription_id, body): # noqa: E501 + """subscriber_id_subscriptions_subscription_id_put + + Update of an existing individual CAPIF Event Subscription. # noqa: E501 + + :param subscriber_id: Identifier of the Subscriber + :type subscriber_id: str + :param subscription_id: Identifier of the individual Subscriber + :type subscription_id: str + :param event_subscription: + :type event_subscription: dict | bytes + + :rtype: Union[EventSubscription, Tuple[EventSubscription, int], Tuple[EventSubscription, int, Dict[str, str]] + """ + if request.is_json: + body = EventSubscription.from_dict(request.get_json()) # noqa: E501 + + res = events_ops.put_event(body, subscriber_id, subscription_id) + return res 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 new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller.py @@ -0,0 +1,2 @@ + + 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 deleted file mode 100644 index 6d294ffd6df1a26a469dbb4e72533b01503468dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Events_API/capif_events/controllers/security_controller_.py +++ /dev/null @@ -1,2 +0,0 @@ -from typing import List - diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/auth_manager.py b/services/TS29222_CAPIF_Events_API/capif_events/core/auth_manager.py index 7a5fb82f886af2a6cfbdc80bdf0953ac63a7c3ab..013889b0a2a5f47dd30368987b2979b096bb51b3 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/auth_manager.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/auth_manager.py @@ -1,7 +1,6 @@ from flask import current_app -from cryptography import x509 -from cryptography.hazmat.backends import default_backend + from .resources import Resource diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/consumer_messager.py b/services/TS29222_CAPIF_Events_API/capif_events/core/consumer_messager.py index ce6479afb5c3537246cb1b2192709c6e4ed83d8c..902ea4657d659a285c1ec58e348649eaaa9978ae 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/consumer_messager.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/consumer_messager.py @@ -1,14 +1,13 @@ # subscriber.py -import redis -import time -import sys import json -import asyncio -from threading import Thread -from .notifications import Notifications -from .internal_event_ops import InternalEventOperations + +import redis from flask import current_app +from .internal_event_ops import InternalEventOperations +from .notifications import Notifications + + class Subscriber(): def __init__(self): @@ -23,15 +22,20 @@ class Subscriber(): current_app.logger.info(raw_message) if raw_message["type"] == "message" and raw_message["channel"].decode('utf-8') == "events": current_app.logger.info("Event received") - redis_event=json.loads(raw_message["data"].decode('utf-8')) + redis_event = json.loads(raw_message["data"].decode('utf-8')) current_app.logger.info(json.dumps(redis_event, indent=4)) self.notification.send_notifications(redis_event) elif raw_message["type"] == "message" and raw_message["channel"].decode('utf-8') == "internal-messages": - message, *subscriber_ids = raw_message["data"].decode('utf-8').split(":") - if message == "invoker-removed" and len(subscriber_ids)>0: - self.event_ops.delete_all_events(subscriber_ids) - if message == "provider-removed" and len(subscriber_ids)>0: - self.event_ops.delete_all_events(subscriber_ids) - - - + current_app.logger.info("New internal event received") + internal_redis_event = json.loads( + raw_message["data"].decode('utf-8')) + if internal_redis_event.get('event') == "INVOKER-REMOVED": + api_invoker_id = internal_redis_event.get( + 'information', {"api_invoker_id": None}).get('api_invoker_id') + if api_invoker_id is not None: + self.event_ops.delete_all_events([api_invoker_id]) + elif internal_redis_event.get('event') == "PROVIDER-REMOVED": + all_ids = internal_redis_event.get( + 'information', {"all_ids": None}).get('all_ids') + if all_ids is not None: + self.event_ops.delete_all_events(all_ids) 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 14cddb0c1501edcf9f17426b59789a3fd23a5196..57fe0c70c0b3bbd1b9745b8423a8e21d44c42afb 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,19 +1,14 @@ -import sys +import os +import secrets import rfc3987 -import pymongo -import secrets -import re -from flask import current_app, Flask, Response -import json -from ..encoder import JSONEncoder -from ..models.problem_details import ProblemDetails +from capif_events.models.event_subscription import EventSubscription # noqa: E501 +from flask import current_app, Response + +from .auth_manager import AuthManager from .resources import Resource -from bson import json_util from .responses import internal_server_error, not_found_error, make_response, bad_request_error -from ..db.db import MongoDatabse -from ..util import serialize_clean_camel_case -from .auth_manager import AuthManager +from ..util import serialize_clean_camel_case, clean_empty, dict_to_camel_case class EventSubscriptionsOperations(Resource): @@ -53,6 +48,13 @@ class EventSubscriptionsOperations(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 event_subscription.supported_features is None: + return bad_request_error( + detail="supportedFeatures not present in request", + cause="supportedFeatures not present", + invalid_params=[{"param": "supportedFeatures", "reason": "not defined"}] + ) + ## Verify that this subscriberID exist in publishers or invokers result = self.__check_subscriber_id(subscriber_id) @@ -75,8 +77,7 @@ class EventSubscriptionsOperations(Resource): self.auth_manager.add_auth_event(subscription_id, subscriber_id) res = make_response(object=serialize_clean_camel_case(event_subscription), status=201) - res.headers['Location'] = "http://localhost:8080/capif-events/v1/" + \ - str(subscriber_id) + "/subscriptions/" + str(subscription_id) + res.headers['Location'] = f"https://{os.getenv("CAPIF_HOSTNAME")}/capif-events/v1/{str(subscriber_id)}/subscriptions/{str(subscription_id)}" return res @@ -118,5 +119,80 @@ class EventSubscriptionsOperations(Resource): exception= "An exception occurred in delete event" current_app.logger.error(exception + "::" + str(e)) return internal_server_error(detail=exception, cause=str(e)) + + def put_event(self, event_subscription, subscriber_id, subscription_id): + try: + mycol = self.db.get_col_by_name(self.db.event_collection) + + current_app.logger.debug("Updating event subscription") + + if event_subscription.supported_features is None: + return bad_request_error( + detail="supportedFeatures not present in request", + cause="supportedFeatures not present", + invalid_params=[{"param": "supportedFeatures", "reason": "not defined"}] + ) + + result = self.__check_subscriber_id(subscriber_id) + + if isinstance(result, Response): + return result + + my_query = {'subscriber_id': subscriber_id, + 'subscription_id': subscription_id} + eventdescription = mycol.find_one(my_query) + + if eventdescription is None: + current_app.logger.error("Event subscription not found") + return not_found_error(detail="Event subscription not exist", cause="Event API subscription id not found") + body = event_subscription.to_dict() + + body["subscriber_id"] = subscriber_id + body["subscription_id"] = subscription_id + + mycol.replace_one(my_query, body) + current_app.logger.debug("Event subscription updated from database") + + + res = make_response(object=serialize_clean_camel_case(event_subscription), status=200) + return res + + except Exception as e: + exception= "An exception occurred in updating event" + current_app.logger.error(exception + "::" + str(e)) + return internal_server_error(detail=exception, cause=str(e)) + + + def patch_event(self, event_subscription, subscriber_id, subscription_id): + try: + mycol = self.db.get_col_by_name(self.db.event_collection) + + current_app.logger.debug("Patching event subscription") + + result = self.__check_subscriber_id(subscriber_id) + + if isinstance(result, Response): + return result + my_query = {'subscriber_id': subscriber_id, + 'subscription_id': subscription_id} + eventdescription = mycol.find_one(my_query) + + if eventdescription is None: + current_app.logger.error("Event subscription not found") + return not_found_error(detail="Event subscription not exist", cause="Event API subscription id not found") + + body = clean_empty(event_subscription.to_dict()) + document = mycol.update_one(my_query, {"$set":body}) + document = mycol.find_one(my_query) + current_app.logger.debug("Event subscription patched from database") + + res = make_response(object=EventSubscription.from_dict(dict_to_camel_case(document)), status=200) + + return res + + except Exception as e: + exception= "An exception occurred in patching event" + current_app.logger.error(exception + "::" + str(e)) + return internal_server_error(detail=exception, cause=str(e)) diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/internal_event_ops.py b/services/TS29222_CAPIF_Events_API/capif_events/core/internal_event_ops.py index e49089a3756b4b3946bafa93b4138721e8a1be7b..f9daf00889930f64567a573ba7bbb219ecf585ec 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/internal_event_ops.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/internal_event_ops.py @@ -1,6 +1,8 @@ from flask import current_app -from .resources import Resource + from .auth_manager import AuthManager +from .resources import Resource + class InternalEventOperations(Resource): 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 e005e7a8f53c25b18d9ceb0232f41a4a6934a6d7..6288c3386414bdc967a09cae787bb89bb79874c6 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py @@ -1,16 +1,18 @@ #import concurrent -import requests -from .internal_event_ops import InternalEventOperations -from models.event_notification import EventNotification -from models.access_control_policy_list_ext import AccessControlPolicyListExt -from models.capif_event_detail import CAPIFEventDetail -from encoder import JSONEncoder -import sys -import json -from flask import current_app import asyncio +import json +import os + import aiohttp -from util import dict_to_camel_case, clean_empty, serialize_clean_camel_case +import requests +from encoder import CustomJSONEncoder +from flask import current_app +from models.event_notification import EventNotification +from models.event_subscription import EventSubscription +from util import serialize_clean_camel_case + +from .internal_event_ops import InternalEventOperations + class Notifications(): @@ -19,22 +21,43 @@ class Notifications(): def send_notifications(self, redis_event): try: - if redis_event.get('event', None) == None: + event = redis_event.get('event', None) + if event is None: raise("Event value is not present on received event from REDIS") - current_app.logger.info("Received event " + redis_event.get('event') + ", sending notifications") - subscriptions = self.events_ops.get_event_subscriptions(redis_event.get('event')) + + current_app.logger.info("Received event " + event + ", sending notifications") + subscriptions = self.events_ops.get_event_subscriptions(event) current_app.logger.info(subscriptions) for sub in subscriptions: url = sub["notification_destination"] current_app.logger.debug(url) - event_detail=None - if redis_event.get('key', None) != None and redis_event.get('information', None) != None: - event_detail={redis_event.get('key'):redis_event.get('information')} - current_app.logger.debug(event_detail) - data = EventNotification(sub["subscription_id"], events=redis_event.get('event'), event_detail=event_detail) - current_app.logger.debug(json.dumps(data.to_dict(),cls=JSONEncoder)) + data = EventNotification(sub["subscription_id"], events=event) + event_detail_redis=redis_event.get('event_detail', None) + if event_detail_redis is not None: + if EventSubscription.return_supp_feat_dict(sub["supported_features"])["EnhancedEventReport"]: + event_detail={} + current_app.logger.debug(f"event: {event_detail_redis}") + if event in ["SERVICE_API_AVAILABLE", "SERVICE_API_UNAVAILABLE"]: + event_detail["apiIds"]=event_detail_redis.get('apiIds', None) + if EventSubscription.return_supp_feat_dict(sub["supported_features"])["ApiStatusMonitoring"]: + event_detail["serviceAPIDescriptions"]=event_detail_redis.get('serviceAPIDescriptions', None) + elif event in ["SERVICE_API_UPDATE"]: + event_detail["serviceAPIDescriptions"]=event_detail_redis.get('serviceAPIDescriptions', None) + elif event in ["API_INVOKER_ONBOARDED", "API_INVOKER_OFFBOARDED", "API_INVOKER_UPDATED"]: + event_detail["apiInvokerIds"]=event_detail_redis.get('apiInvokerIds', None) + elif event in ["ACCESS_CONTROL_POLICY_UPDATE"]: + event_detail["accCtrlPolList"]=event_detail_redis.get('accCtrlPolList', None) + elif event in ["SERVICE_API_INVOCATION_SUCCESS", "SERVICE_API_INVOCATION_FAILURE"]: + event_detail["invocationLogs"]=event_detail_redis.get('invocationLogs', None) + elif event in ["API_TOPOLOGY_HIDING_CREATED", "API_TOPOLOGY_HIDING_REVOKED"]: + event_detail["apiTopoHide"]=event_detail_redis.get('apiTopoHide', None) + + current_app.logger.debug(event_detail) + data.event_detail=event_detail + + current_app.logger.debug(json.dumps(data.to_dict(),cls=CustomJSONEncoder)) asyncio.run(self.send(url, serialize_clean_camel_case(data))) @@ -44,7 +67,7 @@ class Notifications(): def request_post(self, url, data): headers = {'content-type': 'application/json'} - return requests.post(url, json={'text': str(data.to_str())}, headers=headers) + return requests.post(url, json={'text': str(data.to_str())}, headers=headers, timeout=os.getenv("TIMEOUT", "30")) async def send_request(self, url, data): async with aiohttp.ClientSession() as session: diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/resources.py b/services/TS29222_CAPIF_Events_API/capif_events/core/resources.py index efbe3c2d4cf28cec298ef17b394011dcd6aa66cb..053c10786ef6135e5fa994c2d825c36419c95112 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/resources.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/resources.py @@ -1,6 +1,8 @@ -from abc import ABC, abstractmethod +from abc import ABC + from db.db import MongoDatabse + class Resource(ABC): def __init__(self): 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 89689a9e7b3a936e3ea953ed621853ce164d2d70..8f975cbf426c304c4ae0681f65af67fcad9abca5 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/responses.py @@ -1,14 +1,16 @@ -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder +import json + from flask import Response + +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case -import json mimetype = "application/json" def make_response(object, status): - res = Response(json.dumps(object, cls=JSONEncoder), status=status, mimetype=mimetype) + res = Response(json.dumps(object, cls=CustomJSONEncoder), status=status, mimetype=mimetype) return res @@ -17,25 +19,25 @@ def internal_server_error(detail, cause): prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=500, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=500, mimetype=mimetype) def forbidden_error(detail, cause): prob = ProblemDetails(title="Forbidden", status=403, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=403, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=403, mimetype=mimetype) 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=JSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) 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=JSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=404, mimetype=mimetype) \ No newline at end of file diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/validate_user.py b/services/TS29222_CAPIF_Events_API/capif_events/core/validate_user.py index e7ddee1c50f58ef418483ab58056058f413bb62c..168e903f1f9f272b6f8bdf5e289aa97ec0c2c23c 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/validate_user.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/validate_user.py @@ -1,9 +1,11 @@ -from flask import current_app, Response import json -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder + +from flask import current_app, Response + from .resources import Resource from .responses import internal_server_error +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case @@ -22,7 +24,7 @@ class ControlAccess(Resource): prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype="application/json") except Exception as e: exception = "An exception occurred in validate subscriber" diff --git a/services/TS29222_CAPIF_Events_API/capif_events/db/db.py b/services/TS29222_CAPIF_Events_API/capif_events/db/db.py index 68391d8866eaa6f88cbbbb5ab90fe07e792b17d6..adfc472a567be9deb866e90eab1d8986281be0e8 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/db/db.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/db/db.py @@ -1,11 +1,11 @@ -import atexit +import os import time -from pymongo import MongoClient -from pymongo.errors import AutoReconnect -from config import Config + from bson.codec_options import CodecOptions -import os +from config import Config from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from pymongo import MongoClient +from pymongo.errors import AutoReconnect monitoring_value = os.environ.get("MONITORING", "").lower() if monitoring_value == "true": diff --git a/services/TS29222_CAPIF_Events_API/capif_events/encoder.py b/services/TS29222_CAPIF_Events_API/capif_events/encoder.py index 80bad8fa9220ab873e044b7adc0a849746088ad5..66b0c8c5cd556870bb6d019c2aa254d7e5b01dce 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/encoder.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/encoder.py @@ -1,20 +1,18 @@ -from connexion.apps.flask_app import FlaskJSONEncoder -import six +from capif_events.models.base_model import Model +from connexion.jsonifier import JSONEncoder -from models.base_model_ import Model - -class JSONEncoder(FlaskJSONEncoder): +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + return JSONEncoder.default(self, o) 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 5628bb7ee9399718f9a40e6847bd4d99a5c88162..d036df693ea41dfaa3debffffad0462c1fcd8e4a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/__init__.py @@ -1,50 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # 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.access_control_policy_list_ext_all_of import AccessControlPolicyListExtAllOf -from capif_events.models.aef_profile import AefProfile -from capif_events.models.api_invoker_policy import ApiInvokerPolicy -from capif_events.models.capif_event import CAPIFEvent -from capif_events.models.capif_event_any_of import CAPIFEventAnyOf -from capif_events.models.capif_event_detail import CAPIFEventDetail -from capif_events.models.capif_event_filter import CAPIFEventFilter -from capif_events.models.communication_type import CommunicationType -from capif_events.models.communication_type_any_of import CommunicationTypeAnyOf -from capif_events.models.custom_operation import CustomOperation -from capif_events.models.data_format import DataFormat -from capif_events.models.data_format_any_of import DataFormatAnyOf -from capif_events.models.event_notification import EventNotification -from capif_events.models.event_subscription import EventSubscription -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.ipv4_address_range import Ipv4AddressRange -from capif_events.models.ipv6_address_range import Ipv6AddressRange -from capif_events.models.log import Log -from capif_events.models.notification_flag import NotificationFlag -from capif_events.models.notification_flag_any_of import NotificationFlagAnyOf -from capif_events.models.notification_method import NotificationMethod -from capif_events.models.notification_method_any_of import NotificationMethodAnyOf -from capif_events.models.operation import Operation -from capif_events.models.operation_any_of import OperationAnyOf -from capif_events.models.partitioning_criteria import PartitioningCriteria -from capif_events.models.partitioning_criteria_any_of import PartitioningCriteriaAnyOf -from capif_events.models.problem_details import ProblemDetails -from capif_events.models.protocol import Protocol -from capif_events.models.protocol_any_of import ProtocolAnyOf -from capif_events.models.published_api_path import PublishedApiPath -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.security_method_any_of import SecurityMethodAnyOf -from capif_events.models.service_api_description import ServiceAPIDescription -from capif_events.models.shareable_information import ShareableInformation -from capif_events.models.time_range_list import TimeRangeList -from capif_events.models.topology_hiding import TopologyHiding -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 4cca41d86e375c9fd35f583d7d1b94194f34d0c2..95e986c1f31988d0b6ce011546d89d7180cb4ffe 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,15 +1,10 @@ -# coding: utf-8 - -from __future__ import absolute_import 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_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 + class AccessControlPolicyList(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -45,7 +40,7 @@ class AccessControlPolicyList(Model): return util.deserialize_model(dikt, cls) @property - def api_invoker_policies(self): + def api_invoker_policies(self) -> List[ApiInvokerPolicy]: """Gets the api_invoker_policies of this AccessControlPolicyList. Policy of each API invoker. # noqa: E501 @@ -56,7 +51,7 @@ class AccessControlPolicyList(Model): return self._api_invoker_policies @api_invoker_policies.setter - def api_invoker_policies(self, api_invoker_policies): + def api_invoker_policies(self, api_invoker_policies: List[ApiInvokerPolicy]): """Sets the api_invoker_policies of this AccessControlPolicyList. Policy of each API invoker. # noqa: E501 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 6f5709c1b82bbeb2b7cce48ea99e5d45c1614aec..2492b928ec63192f90df8c7f56943bcc69846c23 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,19 +1,10 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.access_control_policy_list import AccessControlPolicyList -from capif_events.models.access_control_policy_list_ext_all_of import AccessControlPolicyListExtAllOf -from capif_events.models.api_invoker_policy import ApiInvokerPolicy from capif_events import util - -from capif_events.models.access_control_policy_list import AccessControlPolicyList # noqa: E501 -from capif_events.models.access_control_policy_list_ext_all_of import AccessControlPolicyListExtAllOf # noqa: E501 from capif_events.models.api_invoker_policy import ApiInvokerPolicy # noqa: E501 +from capif_events.models.base_model import Model + class AccessControlPolicyListExt(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,7 +45,7 @@ class AccessControlPolicyListExt(Model): return util.deserialize_model(dikt, cls) @property - def api_invoker_policies(self): + def api_invoker_policies(self) -> List[ApiInvokerPolicy]: """Gets the api_invoker_policies of this AccessControlPolicyListExt. Policy of each API invoker. # noqa: E501 @@ -65,7 +56,7 @@ class AccessControlPolicyListExt(Model): return self._api_invoker_policies @api_invoker_policies.setter - def api_invoker_policies(self, api_invoker_policies): + def api_invoker_policies(self, api_invoker_policies: List[ApiInvokerPolicy]): """Sets the api_invoker_policies of this AccessControlPolicyListExt. Policy of each API invoker. # noqa: E501 @@ -79,7 +70,7 @@ class AccessControlPolicyListExt(Model): self._api_invoker_policies = api_invoker_policies @property - def api_id(self): + def api_id(self) -> str: """Gets the api_id of this AccessControlPolicyListExt. @@ -89,7 +80,7 @@ class AccessControlPolicyListExt(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + def api_id(self, api_id: str): """Sets the api_id of this AccessControlPolicyListExt. diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext_all_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext_all_of.py deleted file mode 100644 index cd1dda02bb64e5b79761e3e0dd8b9f5a6354cbcc..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/access_control_policy_list_ext_all_of.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 AccessControlPolicyListExtAllOf(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): # noqa: E501 - """AccessControlPolicyListExtAllOf - a model defined in OpenAPI - - :param api_id: The api_id of this AccessControlPolicyListExtAllOf. # noqa: E501 - :type api_id: str - """ - self.openapi_types = { - 'api_id': str - } - - self.attribute_map = { - 'api_id': 'apiId' - } - - self._api_id = api_id - - @classmethod - def from_dict(cls, dikt) -> 'AccessControlPolicyListExtAllOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The AccessControlPolicyListExt_allOf of this AccessControlPolicyListExtAllOf. # noqa: E501 - :rtype: AccessControlPolicyListExtAllOf - """ - return util.deserialize_model(dikt, cls) - - @property - def api_id(self): - """Gets the api_id of this AccessControlPolicyListExtAllOf. - - - :return: The api_id of this AccessControlPolicyListExtAllOf. - :rtype: str - """ - return self._api_id - - @api_id.setter - def api_id(self, api_id): - """Sets the api_id of this AccessControlPolicyListExtAllOf. - - - :param api_id: The api_id of this AccessControlPolicyListExtAllOf. - :type api_id: str - """ - - self._api_id = api_id 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 new file mode 100644 index 0000000000000000000000000000000000000000..3487b6f38820c2c3312f02c86538bc0a30a868f3 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_location.py @@ -0,0 +1,116 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + 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_Events_API/capif_events/models/aef_profile.py b/services/TS29222_CAPIF_Events_API/capif_events/models/aef_profile.py index ea2ce8bc10d54b812124173e592351edfbcbfef8..c59fc51faeed458a548864e126eebede10fd7e57 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,31 +1,25 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.data_format import DataFormat -from capif_events.models.interface_description import InterfaceDescription -from capif_events.models.protocol import Protocol -from capif_events.models.security_method import SecurityMethod -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 from capif_events.models.protocol import Protocol # noqa: E501 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). 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): # noqa: E501 + 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, 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 @@ -42,6 +36,12 @@ class AefProfile(Model): :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, @@ -50,7 +50,10 @@ class AefProfile(Model): 'data_format': DataFormat, 'security_methods': List[SecurityMethod], 'domain_name': str, - 'interface_descriptions': List[InterfaceDescription] + 'interface_descriptions': List[InterfaceDescription], + 'aef_location': AefLocation, + 'service_kpis': ServiceKpis, + 'ue_ip_range': IpAddrRange } self.attribute_map = { @@ -60,7 +63,10 @@ class AefProfile(Model): 'data_format': 'dataFormat', 'security_methods': 'securityMethods', 'domain_name': 'domainName', - 'interface_descriptions': 'interfaceDescriptions' + 'interface_descriptions': 'interfaceDescriptions', + 'aef_location': 'aefLocation', + 'service_kpis': 'serviceKpis', + 'ue_ip_range': 'ueIpRange' } self._aef_id = aef_id @@ -70,6 +76,9 @@ class AefProfile(Model): self._security_methods = security_methods 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': @@ -83,7 +92,7 @@ class AefProfile(Model): return util.deserialize_model(dikt, cls) @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -94,7 +103,7 @@ class AefProfile(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -108,7 +117,7 @@ class AefProfile(Model): self._aef_id = aef_id @property - def versions(self): + def versions(self) -> List[Version]: """Gets the versions of this AefProfile. API version # noqa: E501 @@ -119,7 +128,7 @@ class AefProfile(Model): return self._versions @versions.setter - def versions(self, versions): + def versions(self, versions: List[Version]): """Sets the versions of this AefProfile. API version # noqa: E501 @@ -135,7 +144,7 @@ class AefProfile(Model): self._versions = versions @property - def protocol(self): + def protocol(self) -> Protocol: """Gets the protocol of this AefProfile. @@ -145,7 +154,7 @@ class AefProfile(Model): return self._protocol @protocol.setter - def protocol(self, protocol): + def protocol(self, protocol: Protocol): """Sets the protocol of this AefProfile. @@ -156,7 +165,7 @@ class AefProfile(Model): self._protocol = protocol @property - def data_format(self): + def data_format(self) -> DataFormat: """Gets the data_format of this AefProfile. @@ -166,7 +175,7 @@ class AefProfile(Model): return self._data_format @data_format.setter - def data_format(self, data_format): + def data_format(self, data_format: DataFormat): """Sets the data_format of this AefProfile. @@ -177,7 +186,7 @@ class AefProfile(Model): self._data_format = data_format @property - def security_methods(self): + def security_methods(self) -> List[SecurityMethod]: """Gets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -188,7 +197,7 @@ class AefProfile(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + def security_methods(self, security_methods: List[SecurityMethod]): """Sets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -202,7 +211,7 @@ class AefProfile(Model): self._security_methods = security_methods @property - def domain_name(self): + def domain_name(self) -> str: """Gets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -213,7 +222,7 @@ class AefProfile(Model): return self._domain_name @domain_name.setter - def domain_name(self, domain_name): + def domain_name(self, domain_name: str): """Sets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -225,7 +234,7 @@ class AefProfile(Model): self._domain_name = domain_name @property - def interface_descriptions(self): + def interface_descriptions(self) -> List[InterfaceDescription]: """Gets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -236,7 +245,7 @@ class AefProfile(Model): return self._interface_descriptions @interface_descriptions.setter - def interface_descriptions(self, interface_descriptions): + def interface_descriptions(self, interface_descriptions: List[InterfaceDescription]): """Sets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -248,3 +257,66 @@ class AefProfile(Model): 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 + + @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/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 dbc1d9867c0703f64ee83a82c0fdd29566a2709c..30c021c2c6c067dc6e9f8ccbf3d1428b36816c19 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,16 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.time_range_list import TimeRangeList from capif_events import util - +from capif_events.models.base_model import Model 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). @@ -60,7 +55,7 @@ class ApiInvokerPolicy(Model): return util.deserialize_model(dikt, cls) @property - def api_invoker_id(self): + def api_invoker_id(self) -> str: """Gets the api_invoker_id of this ApiInvokerPolicy. API invoker ID assigned by the CAPIF core function # noqa: E501 @@ -71,7 +66,7 @@ class ApiInvokerPolicy(Model): return self._api_invoker_id @api_invoker_id.setter - def api_invoker_id(self, api_invoker_id): + def api_invoker_id(self, api_invoker_id: str): """Sets the api_invoker_id of this ApiInvokerPolicy. API invoker ID assigned by the CAPIF core function # noqa: E501 @@ -85,7 +80,7 @@ class ApiInvokerPolicy(Model): self._api_invoker_id = api_invoker_id @property - def allowed_total_invocations(self): + def allowed_total_invocations(self) -> int: """Gets the allowed_total_invocations of this ApiInvokerPolicy. Total number of invocations allowed on the service API by the API invoker. # noqa: E501 @@ -96,7 +91,7 @@ class ApiInvokerPolicy(Model): return self._allowed_total_invocations @allowed_total_invocations.setter - def allowed_total_invocations(self, allowed_total_invocations): + def allowed_total_invocations(self, allowed_total_invocations: int): """Sets the allowed_total_invocations of this ApiInvokerPolicy. Total number of invocations allowed on the service API by the API invoker. # noqa: E501 @@ -108,7 +103,7 @@ class ApiInvokerPolicy(Model): self._allowed_total_invocations = allowed_total_invocations @property - def allowed_invocations_per_second(self): + def allowed_invocations_per_second(self) -> int: """Gets the allowed_invocations_per_second of this ApiInvokerPolicy. Invocations per second allowed on the service API by the API invoker. # noqa: E501 @@ -119,7 +114,7 @@ class ApiInvokerPolicy(Model): return self._allowed_invocations_per_second @allowed_invocations_per_second.setter - def allowed_invocations_per_second(self, allowed_invocations_per_second): + def allowed_invocations_per_second(self, allowed_invocations_per_second: int): """Sets the allowed_invocations_per_second of this ApiInvokerPolicy. Invocations per second allowed on the service API by the API invoker. # noqa: E501 @@ -131,10 +126,10 @@ class ApiInvokerPolicy(Model): self._allowed_invocations_per_second = allowed_invocations_per_second @property - def allowed_invocation_time_range_list(self): + def allowed_invocation_time_range_list(self) -> List[TimeRangeList]: """Gets the allowed_invocation_time_range_list of this ApiInvokerPolicy. - The time ranges during which the invocations are allowed on the service API by the API invoker. # noqa: E501 + The time ranges during which the invocations are allowed on the service API by the API invoker. # noqa: E501 :return: The allowed_invocation_time_range_list of this ApiInvokerPolicy. :rtype: List[TimeRangeList] @@ -142,10 +137,10 @@ class ApiInvokerPolicy(Model): return self._allowed_invocation_time_range_list @allowed_invocation_time_range_list.setter - def allowed_invocation_time_range_list(self, allowed_invocation_time_range_list): + def allowed_invocation_time_range_list(self, allowed_invocation_time_range_list: List[TimeRangeList]): """Sets the allowed_invocation_time_range_list of this ApiInvokerPolicy. - The time ranges during which the invocations are allowed on the service API by the API invoker. # noqa: E501 + The time ranges during which the invocations are allowed on the service API by the API invoker. # noqa: E501 :param allowed_invocation_time_range_list: The allowed_invocation_time_range_list of this ApiInvokerPolicy. :type allowed_invocation_time_range_list: List[TimeRangeList] 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 new file mode 100644 index 0000000000000000000000000000000000000000..c088f5bd2f98e04e0f69e2073adbb6f163b4bc11 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/api_status.py @@ -0,0 +1,64 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +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 this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # 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 this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # 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_Events_API/capif_events/models/base_model_.py b/services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py similarity index 92% rename from services/TS29222_CAPIF_Events_API/capif_events/models/base_model_.py rename to services/TS29222_CAPIF_Events_API/capif_events/models/base_model.py index c71e9d080b3a748e674725984adcc9d010740533..336bc44c7987e97e113531749fda0a9f61c3b60e 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,6 +1,4 @@ import pprint - -import six import typing from capif_events import util @@ -8,14 +6,14 @@ from capif_events import util T = typing.TypeVar('T') -class Model(object): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. - openapi_types = {} + openapi_types: typing.Dict[str, type] = {} # attributeMap: The key is attribute name and the # value is json key in definition. - attribute_map = {} + attribute_map: typing.Dict[str, str] = {} @classmethod def from_dict(cls: typing.Type[T], dikt) -> T: @@ -29,7 +27,7 @@ class Model(object): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/protocol_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py similarity index 57% rename from services/TS29222_CAPIF_Events_API/capif_events/models/protocol_any_of.py rename to services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py index fe2fe7c2787db319b162d62d6957ed0d782d55cd..4275f2907b2720077cbf443e4cbe385ec679dbcf 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/protocol_any_of.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/buffered_notifications_action.py @@ -1,27 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from capif_events.models.base_model import Model -class ProtocolAnyOf(Model): +class BufferedNotificationsAction(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - """ - allowed enum values - """ - _1_1 = "HTTP_1_1" - _2 = "HTTP_2" def __init__(self): # noqa: E501 - """ProtocolAnyOf - a model defined in OpenAPI + """BufferedNotificationsAction - a model defined in OpenAPI """ self.openapi_types = { @@ -31,12 +22,12 @@ class ProtocolAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'ProtocolAnyOf': + def from_dict(cls, dikt) -> 'BufferedNotificationsAction': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The Protocol_anyOf of this ProtocolAnyOf. # noqa: E501 - :rtype: ProtocolAnyOf + :return: The BufferedNotificationsAction of this BufferedNotificationsAction. # noqa: E501 + :rtype: BufferedNotificationsAction """ return util.deserialize_model(dikt, cls) 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 86648b4cfe5e983cf50d582fa32375ea385b050c..381df838bb3d53c3eef4a68bc14ed3c23b2aee76 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.capif_event_any_of import CAPIFEventAnyOf from capif_events import util +from capif_events.models.base_model import Model -from capif_events.models.capif_event_any_of import CAPIFEventAnyOf # noqa: E501 class CAPIFEvent(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_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_any_of.py deleted file mode 100644 index 3b2f4d73d75cd97ca69f819e4342d46cbb0ff79e..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/capif_event_any_of.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 CAPIFEventAnyOf(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - SERVICE_API_AVAILABLE = "SERVICE_API_AVAILABLE" - SERVICE_API_UNAVAILABLE = "SERVICE_API_UNAVAILABLE" - SERVICE_API_UPDATE = "SERVICE_API_UPDATE" - API_INVOKER_ONBOARDED = "API_INVOKER_ONBOARDED" - API_INVOKER_OFFBOARDED = "API_INVOKER_OFFBOARDED" - SERVICE_API_INVOCATION_SUCCESS = "SERVICE_API_INVOCATION_SUCCESS" - SERVICE_API_INVOCATION_FAILURE = "SERVICE_API_INVOCATION_FAILURE" - ACCESS_CONTROL_POLICY_UPDATE = "ACCESS_CONTROL_POLICY_UPDATE" - ACCESS_CONTROL_POLICY_UNAVAILABLE = "ACCESS_CONTROL_POLICY_UNAVAILABLE" - API_INVOKER_AUTHORIZATION_REVOKED = "API_INVOKER_AUTHORIZATION_REVOKED" - API_INVOKER_UPDATED = "API_INVOKER_UPDATED" - API_TOPOLOGY_HIDING_CREATED = "API_TOPOLOGY_HIDING_CREATED" - API_TOPOLOGY_HIDING_REVOKED = "API_TOPOLOGY_HIDING_REVOKED" - def __init__(self): # noqa: E501 - """CAPIFEventAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'CAPIFEventAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The CAPIFEvent_anyOf of this CAPIFEventAnyOf. # noqa: E501 - :rtype: CAPIFEventAnyOf - """ - return util.deserialize_model(dikt, cls) 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 f9c21eb993a9ed6631998a7bd69b38e6e06ba1a4..ebc44655810f491d8b54322167fa858b8a657107 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,22 +1,14 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.access_control_policy_list_ext import AccessControlPolicyListExt -from capif_events.models.invocation_log import InvocationLog -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.invocation_log import InvocationLog # 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). @@ -76,7 +68,7 @@ class CAPIFEventDetail(Model): return util.deserialize_model(dikt, cls) @property - def service_api_descriptions(self): + def service_api_descriptions(self) -> List[ServiceAPIDescription]: """Gets the service_api_descriptions of this CAPIFEventDetail. Description of the service API as published by the APF. # noqa: E501 @@ -87,7 +79,7 @@ class CAPIFEventDetail(Model): return self._service_api_descriptions @service_api_descriptions.setter - def service_api_descriptions(self, service_api_descriptions): + def service_api_descriptions(self, service_api_descriptions: List[ServiceAPIDescription]): """Sets the service_api_descriptions of this CAPIFEventDetail. Description of the service API as published by the APF. # noqa: E501 @@ -101,7 +93,7 @@ class CAPIFEventDetail(Model): self._service_api_descriptions = service_api_descriptions @property - def api_ids(self): + def api_ids(self) -> List[str]: """Gets the api_ids of this CAPIFEventDetail. Identifier of the service API # noqa: E501 @@ -112,7 +104,7 @@ class CAPIFEventDetail(Model): return self._api_ids @api_ids.setter - def api_ids(self, api_ids): + def api_ids(self, api_ids: List[str]): """Sets the api_ids of this CAPIFEventDetail. Identifier of the service API # noqa: E501 @@ -126,7 +118,7 @@ class CAPIFEventDetail(Model): self._api_ids = api_ids @property - def api_invoker_ids(self): + def api_invoker_ids(self) -> List[str]: """Gets the api_invoker_ids of this CAPIFEventDetail. Identity of the API invoker # noqa: E501 @@ -137,7 +129,7 @@ class CAPIFEventDetail(Model): return self._api_invoker_ids @api_invoker_ids.setter - def api_invoker_ids(self, api_invoker_ids): + 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 @@ -151,7 +143,7 @@ class CAPIFEventDetail(Model): self._api_invoker_ids = api_invoker_ids @property - def acc_ctrl_pol_list(self): + def acc_ctrl_pol_list(self) -> AccessControlPolicyListExt: """Gets the acc_ctrl_pol_list of this CAPIFEventDetail. @@ -161,7 +153,7 @@ class CAPIFEventDetail(Model): return self._acc_ctrl_pol_list @acc_ctrl_pol_list.setter - def acc_ctrl_pol_list(self, acc_ctrl_pol_list): + def acc_ctrl_pol_list(self, acc_ctrl_pol_list: AccessControlPolicyListExt): """Sets the acc_ctrl_pol_list of this CAPIFEventDetail. @@ -172,7 +164,7 @@ class CAPIFEventDetail(Model): self._acc_ctrl_pol_list = acc_ctrl_pol_list @property - def invocation_logs(self): + def invocation_logs(self) -> List[InvocationLog]: """Gets the invocation_logs of this CAPIFEventDetail. Invocation logs. # noqa: E501 @@ -183,7 +175,7 @@ class CAPIFEventDetail(Model): return self._invocation_logs @invocation_logs.setter - def invocation_logs(self, invocation_logs): + def invocation_logs(self, invocation_logs: List[InvocationLog]): """Sets the invocation_logs of this CAPIFEventDetail. Invocation logs. # noqa: E501 @@ -197,7 +189,7 @@ class CAPIFEventDetail(Model): self._invocation_logs = invocation_logs @property - def api_topo_hide(self): + def api_topo_hide(self) -> TopologyHiding: """Gets the api_topo_hide of this CAPIFEventDetail. @@ -207,7 +199,7 @@ class CAPIFEventDetail(Model): return self._api_topo_hide @api_topo_hide.setter - def api_topo_hide(self, api_topo_hide): + def api_topo_hide(self, api_topo_hide: TopologyHiding): """Sets the api_topo_hide of this CAPIFEventDetail. 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 19aa9e5b9e9469652084083c195eac0cb8eabc7d..6db6dce0dff50e6415c2e8a12ee4a05781648827 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from capif_events.models.base_model import Model class CAPIFEventFilter(Model): @@ -53,7 +49,7 @@ class CAPIFEventFilter(Model): return util.deserialize_model(dikt, cls) @property - def api_ids(self): + def api_ids(self) -> List[str]: """Gets the api_ids of this CAPIFEventFilter. Identifier of the service API # noqa: E501 @@ -64,7 +60,7 @@ class CAPIFEventFilter(Model): return self._api_ids @api_ids.setter - def api_ids(self, api_ids): + def api_ids(self, api_ids: List[str]): """Sets the api_ids of this CAPIFEventFilter. Identifier of the service API # noqa: E501 @@ -78,7 +74,7 @@ class CAPIFEventFilter(Model): self._api_ids = api_ids @property - def api_invoker_ids(self): + def api_invoker_ids(self) -> List[str]: """Gets the api_invoker_ids of this CAPIFEventFilter. Identity of the API invoker # noqa: E501 @@ -89,7 +85,7 @@ class CAPIFEventFilter(Model): return self._api_invoker_ids @api_invoker_ids.setter - def api_invoker_ids(self, api_invoker_ids): + 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 @@ -103,7 +99,7 @@ class CAPIFEventFilter(Model): self._api_invoker_ids = api_invoker_ids @property - def aef_ids(self): + def aef_ids(self) -> List[str]: """Gets the aef_ids of this CAPIFEventFilter. Identifier of the API exposing function # noqa: E501 @@ -114,7 +110,7 @@ class CAPIFEventFilter(Model): return self._aef_ids @aef_ids.setter - def aef_ids(self, aef_ids): + def aef_ids(self, aef_ids: List[str]): """Sets the aef_ids of this CAPIFEventFilter. Identifier of the API exposing function # noqa: E501 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 new file mode 100644 index 0000000000000000000000000000000000000000..34b6e912a343a93ee359914305261e68d8e3158f --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/civic_address.py @@ -0,0 +1,918 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +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_Events_API/capif_events/models/communication_type.py b/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type.py index 76054ffcf55261286b24b66e7b6c4ce087005d37..93fb327500a8881a97fe944506217bd744ce836f 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type_any_of import CommunicationTypeAnyOf from capif_events import util +from capif_events.models.base_model import Model -from capif_events.models.communication_type_any_of import CommunicationTypeAnyOf # noqa: E501 class CommunicationType(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/communication_type_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type_any_of.py deleted file mode 100644 index de71aeaad3e3a4029872cbcbc906e311f9fdf04d..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/communication_type_any_of.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 CommunicationTypeAnyOf(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 - """CommunicationTypeAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'CommunicationTypeAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The CommunicationType_anyOf of this CommunicationTypeAnyOf. # noqa: E501 - :rtype: CommunicationTypeAnyOf - """ - return util.deserialize_model(dikt, cls) 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 190dae7102b29ac3d84be23a105a8578928b26ef..57deea3beed891b9805a84b82d303cfeec05ee90 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type import CommunicationType -from capif_events.models.operation import Operation from capif_events import util - +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). @@ -62,7 +56,7 @@ class CustomOperation(Model): return util.deserialize_model(dikt, cls) @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this CustomOperation. @@ -72,7 +66,7 @@ class CustomOperation(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this CustomOperation. @@ -85,10 +79,10 @@ class CustomOperation(Model): self._comm_type = comm_type @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -96,10 +90,10 @@ class CustomOperation(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -110,10 +104,10 @@ class CustomOperation(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -121,10 +115,10 @@ class CustomOperation(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -135,7 +129,7 @@ class CustomOperation(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this CustomOperation. Text description of the custom operation # noqa: E501 @@ -146,7 +140,7 @@ class CustomOperation(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this CustomOperation. Text description of the custom operation # noqa: E501 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 61f13fea01cb28c6afb98d680c70d2aa8687450a..751627ee5b61091654f48a6e4a65113f6b7a03b4 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.data_format_any_of import DataFormatAnyOf from capif_events import util +from capif_events.models.base_model import Model -from capif_events.models.data_format_any_of import DataFormatAnyOf # noqa: E501 class DataFormat(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/ellipsoid_arc.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py new file mode 100644 index 0000000000000000000000000000000000000000..05a4ea3eb8267b5f83d8bdeb71476385e58de204 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ellipsoid_arc.py @@ -0,0 +1,260 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + 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_Events_API/capif_events/models/event_notification.py b/services/TS29222_CAPIF_Events_API/capif_events/models/event_notification.py index 633ddcfdc599d6525b3758b8957abf4f43c66627..e59efbbc35e41ed537930e1ae20b9a133dd83dba 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.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 + class EventNotification(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -57,10 +51,10 @@ class EventNotification(Model): return util.deserialize_model(dikt, cls) @property - def subscription_id(self): + 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 – CAPIF resource identifier # noqa: E501 :return: The subscription_id of this EventNotification. :rtype: str @@ -68,10 +62,10 @@ class EventNotification(Model): return self._subscription_id @subscription_id.setter - def subscription_id(self, subscription_id): + 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 – CAPIF resource identifier # noqa: E501 :param subscription_id: The subscription_id of this EventNotification. :type subscription_id: str @@ -82,7 +76,7 @@ class EventNotification(Model): self._subscription_id = subscription_id @property - def events(self): + def events(self) -> CAPIFEvent: """Gets the events of this EventNotification. @@ -92,7 +86,7 @@ class EventNotification(Model): return self._events @events.setter - def events(self, events): + def events(self, events: CAPIFEvent): """Sets the events of this EventNotification. @@ -105,7 +99,7 @@ class EventNotification(Model): self._events = events @property - def event_detail(self): + def event_detail(self) -> CAPIFEventDetail: """Gets the event_detail of this EventNotification. @@ -115,7 +109,7 @@ class EventNotification(Model): return self._event_detail @event_detail.setter - def event_detail(self, event_detail): + def event_detail(self, event_detail: CAPIFEventDetail): """Sets the event_detail of this EventNotification. 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 c7ae736405e3a607f46350561884b8b9748528b7..fef528652c2bfef2c4b7ee1bc00af5129a1eadf1 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,23 +1,14 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.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 + class EventSubscription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -71,6 +62,19 @@ class EventSubscription(Model): self._websock_notif_config = websock_notif_config self._supported_features = supported_features + @classmethod + def return_supp_feat_dict(cls, supp_feat): + TOTAL_FEATURES=4 + supp_feat_in_hex = int(supp_feat, 16) + supp_feat_in_bin = bin(supp_feat_in_hex)[2:].zfill(TOTAL_FEATURES)[::-1] + + return { + "NotificationTestEvent": True if supp_feat_in_bin[0] == "1" else False, + "NotificationWebsocket": True if supp_feat_in_bin[1] == "1" else False, + "EnhancedEventReport": True if supp_feat_in_bin[2] == "1" else False, + "ApiStatusMonitoring": True if supp_feat_in_bin[3] == "1" else False + } + @classmethod def from_dict(cls, dikt) -> 'EventSubscription': """Returns the dict as a model @@ -83,7 +87,7 @@ class EventSubscription(Model): return util.deserialize_model(dikt, cls) @property - def events(self): + def events(self) -> List[CAPIFEvent]: """Gets the events of this EventSubscription. Subscribed events # noqa: E501 @@ -94,7 +98,7 @@ class EventSubscription(Model): return self._events @events.setter - def events(self, events): + def events(self, events: List[CAPIFEvent]): """Sets the events of this EventSubscription. Subscribed events # noqa: E501 @@ -110,7 +114,7 @@ class EventSubscription(Model): self._events = events @property - def event_filters(self): + def event_filters(self) -> List[CAPIFEventFilter]: """Gets the event_filters of this EventSubscription. Subscribed event filters # noqa: E501 @@ -121,7 +125,7 @@ class EventSubscription(Model): return self._event_filters @event_filters.setter - def event_filters(self, event_filters): + def event_filters(self, event_filters: List[CAPIFEventFilter]): """Sets the event_filters of this EventSubscription. Subscribed event filters # noqa: E501 @@ -135,7 +139,7 @@ class EventSubscription(Model): self._event_filters = event_filters @property - def event_req(self): + def event_req(self) -> ReportingInformation: """Gets the event_req of this EventSubscription. @@ -145,7 +149,7 @@ class EventSubscription(Model): return self._event_req @event_req.setter - def event_req(self, event_req): + def event_req(self, event_req: ReportingInformation): """Sets the event_req of this EventSubscription. @@ -156,7 +160,7 @@ class EventSubscription(Model): self._event_req = event_req @property - def notification_destination(self): + def notification_destination(self) -> str: """Gets the notification_destination of this EventSubscription. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -167,7 +171,7 @@ class EventSubscription(Model): return self._notification_destination @notification_destination.setter - def notification_destination(self, notification_destination): + 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 @@ -181,10 +185,10 @@ class EventSubscription(Model): self._notification_destination = notification_destination @property - def request_test_notification(self): + 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 subclause 7.6. Set to false or omitted otherwise. # noqa: E501 + 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 @@ -192,10 +196,10 @@ class EventSubscription(Model): return self._request_test_notification @request_test_notification.setter - def request_test_notification(self, request_test_notification): + 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 subclause 7.6. Set to false or omitted otherwise. # noqa: E501 + 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 @@ -204,7 +208,7 @@ class EventSubscription(Model): self._request_test_notification = request_test_notification @property - def websock_notif_config(self): + def websock_notif_config(self) -> WebsockNotifConfig: """Gets the websock_notif_config of this EventSubscription. @@ -214,7 +218,7 @@ class EventSubscription(Model): return self._websock_notif_config @websock_notif_config.setter - def websock_notif_config(self, websock_notif_config): + def websock_notif_config(self, websock_notif_config: WebsockNotifConfig): """Sets the websock_notif_config of this EventSubscription. @@ -225,10 +229,10 @@ class EventSubscription(Model): self._websock_notif_config = websock_notif_config @property - def supported_features(self): + 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 + 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 @@ -236,10 +240,10 @@ class EventSubscription(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..401b92e577156034ea63bca357c5f536485da7b3 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/event_subscription_patch.py @@ -0,0 +1,151 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +class EventSubscriptionPatch(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): # noqa: E501 + """EventSubscriptionPatch - a model defined in OpenAPI + + :param events: The events of this EventSubscriptionPatch. # noqa: E501 + :type events: List[CAPIFEvent] + :param event_filters: The event_filters of this EventSubscriptionPatch. # noqa: E501 + :type event_filters: List[CAPIFEventFilter] + :param event_req: The event_req of this EventSubscriptionPatch. # noqa: E501 + :type event_req: ReportingInformation + :param notification_destination: The notification_destination of this EventSubscriptionPatch. # noqa: E501 + :type notification_destination: str + """ + self.openapi_types = { + 'events': List[CAPIFEvent], + 'event_filters': List[CAPIFEventFilter], + 'event_req': ReportingInformation, + 'notification_destination': str + } + + self.attribute_map = { + 'events': 'events', + 'event_filters': 'eventFilters', + 'event_req': 'eventReq', + 'notification_destination': 'notificationDestination' + } + + self._events = events + self._event_filters = event_filters + self._event_req = event_req + self._notification_destination = notification_destination + + @classmethod + def from_dict(cls, dikt) -> 'EventSubscriptionPatch': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The EventSubscriptionPatch of this EventSubscriptionPatch. # noqa: E501 + :rtype: EventSubscriptionPatch + """ + return util.deserialize_model(dikt, cls) + + @property + def events(self) -> List[CAPIFEvent]: + """Gets the events of this EventSubscriptionPatch. + + Subscribed events # noqa: E501 + + :return: The events of this EventSubscriptionPatch. + :rtype: List[CAPIFEvent] + """ + return self._events + + @events.setter + def events(self, events: List[CAPIFEvent]): + """Sets the events of this EventSubscriptionPatch. + + Subscribed events # noqa: E501 + + :param events: The events of this EventSubscriptionPatch. + :type events: List[CAPIFEvent] + """ + 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 EventSubscriptionPatch. + + Subscribed event filters # noqa: E501 + + :return: The event_filters of this EventSubscriptionPatch. + :rtype: List[CAPIFEventFilter] + """ + return self._event_filters + + @event_filters.setter + def event_filters(self, event_filters: List[CAPIFEventFilter]): + """Sets the event_filters of this EventSubscriptionPatch. + + Subscribed event filters # noqa: E501 + + :param event_filters: The event_filters of this EventSubscriptionPatch. + :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 EventSubscriptionPatch. + + + :return: The event_req of this EventSubscriptionPatch. + :rtype: ReportingInformation + """ + return self._event_req + + @event_req.setter + def event_req(self, event_req: ReportingInformation): + """Sets the event_req of this EventSubscriptionPatch. + + + :param event_req: The event_req of this EventSubscriptionPatch. + :type event_req: ReportingInformation + """ + + self._event_req = event_req + + @property + def notification_destination(self) -> str: + """Gets the notification_destination of this EventSubscriptionPatch. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The notification_destination of this EventSubscriptionPatch. + :rtype: str + """ + return self._notification_destination + + @notification_destination.setter + def notification_destination(self, notification_destination: str): + """Sets the notification_destination of this EventSubscriptionPatch. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param notification_destination: The notification_destination of this EventSubscriptionPatch. + :type notification_destination: str + """ + + self._notification_destination = notification_destination 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 new file mode 100644 index 0000000000000000000000000000000000000000..568a10bf718e11d663b2ab6792734cdde7612f4f --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/gad_shape.py @@ -0,0 +1,63 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + 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_Events_API/capif_events/models/geographic_area.py b/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py new file mode 100644 index 0000000000000000000000000000000000000000..69ee22dac20e1a6fdb3d9d79477097f2df6eec2b --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/geographic_area.py @@ -0,0 +1,453 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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 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_Events_API/capif_events/models/geographical_coordinates.py b/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py new file mode 100644 index 0000000000000000000000000000000000000000..8337fc1bba7149a56bbaf39aed2c969142065ec3 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/geographical_coordinates.py @@ -0,0 +1,98 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +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_Events_API/capif_events/models/interface_description.py b/services/TS29222_CAPIF_Events_API/capif_events/models/interface_description.py index 14b2b5d553d4b09562730ff867a5bc68f310c64c..42ddd5f046ded87bbda36eabbd63c046e342c58b 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,51 +1,57 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.security_method import SecurityMethod from capif_events import util - +from capif_events.models.base_model import Model from capif_events.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 + def __init__(self, ipv4_addr=None, ipv6_addr=None, fqdn=None, port=None, api_prefix=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 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] """ self.openapi_types = { 'ipv4_addr': str, 'ipv6_addr': str, + 'fqdn': str, 'port': int, + 'api_prefix': str, 'security_methods': List[SecurityMethod] } self.attribute_map = { 'ipv4_addr': 'ipv4Addr', 'ipv6_addr': 'ipv6Addr', + 'fqdn': 'fqdn', 'port': 'port', + 'api_prefix': 'apiPrefix', 'security_methods': 'securityMethods' } 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 @classmethod @@ -60,10 +66,10 @@ class InterfaceDescription(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr(self): + 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 + 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 @@ -71,10 +77,10 @@ class InterfaceDescription(Model): return self._ipv4_addr @ipv4_addr.setter - def ipv4_addr(self, ipv4_addr): + 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 + 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 @@ -83,10 +89,10 @@ class InterfaceDescription(Model): self._ipv4_addr = ipv4_addr @property - def ipv6_addr(self): + 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 + 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 @@ -94,10 +100,10 @@ class InterfaceDescription(Model): return self._ipv6_addr @ipv6_addr.setter - def ipv6_addr(self, ipv6_addr): + 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 + 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 @@ -106,7 +112,36 @@ class InterfaceDescription(Model): self._ipv6_addr = ipv6_addr @property - def port(self): + def fqdn(self) -> str: + """Gets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :return: The fqdn of this InterfaceDescription. + :rtype: str + """ + return self._fqdn + + @fqdn.setter + def fqdn(self, fqdn: str): + """Sets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :param fqdn: The fqdn of this InterfaceDescription. + :type fqdn: str + """ + if fqdn is not None and len(fqdn) > 253: + raise ValueError("Invalid value for `fqdn`, length must be less than or equal to `253`") # noqa: E501 + if fqdn is not None and len(fqdn) < 4: + raise ValueError("Invalid value for `fqdn`, length must be greater than or equal to `4`") # noqa: E501 + if fqdn is not None and not re.search(r'^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$', fqdn): # noqa: E501 + raise ValueError("Invalid value for `fqdn`, must be a follow pattern or equal to `/^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$/`") # noqa: E501 + + self._fqdn = fqdn + + @property + def port(self) -> int: """Gets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -117,7 +152,7 @@ class InterfaceDescription(Model): return self._port @port.setter - def port(self, port): + def port(self, port: int): """Sets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -133,10 +168,33 @@ class InterfaceDescription(Model): self._port = port @property - def security_methods(self): + def api_prefix(self) -> str: + """Gets the api_prefix of this InterfaceDescription. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. - Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + 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] @@ -144,10 +202,10 @@ class InterfaceDescription(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + 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 + 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] 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 e9bc8ca459c4bdef2d67b2aa583fbfc980e4369e..795b8890bcbf7a77e9f4105bdf965e959a0eb672 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from capif_events.models.base_model import Model class InvalidParam(Model): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 bbe488649304eb1b44b751124a1f2dcb5d2ce177..1762fbc704b1604c3219ba6759004e1eeb00df50 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.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). @@ -62,10 +56,10 @@ class InvocationLog(Model): return util.deserialize_model(dikt, cls) @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this InvocationLog. - Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 + Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 :return: The aef_id of this InvocationLog. :rtype: str @@ -73,10 +67,10 @@ class InvocationLog(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this InvocationLog. - Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 + Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 :param aef_id: The aef_id of this InvocationLog. :type aef_id: str @@ -87,7 +81,7 @@ class InvocationLog(Model): self._aef_id = aef_id @property - def api_invoker_id(self): + def api_invoker_id(self) -> str: """Gets the api_invoker_id of this InvocationLog. Identity of the API invoker which invoked the service API # noqa: E501 @@ -98,7 +92,7 @@ class InvocationLog(Model): return self._api_invoker_id @api_invoker_id.setter - def api_invoker_id(self, api_invoker_id): + def api_invoker_id(self, api_invoker_id: str): """Sets the api_invoker_id of this InvocationLog. Identity of the API invoker which invoked the service API # noqa: E501 @@ -112,7 +106,7 @@ class InvocationLog(Model): self._api_invoker_id = api_invoker_id @property - def logs(self): + def logs(self) -> List[Log]: """Gets the logs of this InvocationLog. Service API invocation log # noqa: E501 @@ -123,7 +117,7 @@ class InvocationLog(Model): return self._logs @logs.setter - def logs(self, logs): + def logs(self, logs: List[Log]): """Sets the logs of this InvocationLog. Service API invocation log # noqa: E501 @@ -139,10 +133,10 @@ class InvocationLog(Model): self._logs = logs @property - def supported_features(self): + def supported_features(self) -> str: """Gets the supported_features of this InvocationLog. - 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 + 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 InvocationLog. :rtype: str @@ -150,10 +144,10 @@ class InvocationLog(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + def supported_features(self, supported_features: str): """Sets the supported_features of this InvocationLog. - 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 + 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 InvocationLog. :type supported_features: str 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 new file mode 100644 index 0000000000000000000000000000000000000000..f2b3d3b0712234587ab1ea6b576156b3cd03c776 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ip_addr_range.py @@ -0,0 +1,96 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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, ue_ipv6_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[Ipv4AddressRange] + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. # noqa: E501 + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange1] + """ + self.openapi_types = { + 'ue_ipv4_addr_ranges': List[Ipv4AddressRange], + 'ue_ipv6_addr_ranges': List[Ipv6AddressRange1] + } + + self.attribute_map = { + 'ue_ipv4_addr_ranges': 'ueIpv4AddrRanges', + 'ue_ipv6_addr_ranges': 'ueIpv6AddrRanges' + } + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + self._ue_ipv6_addr_ranges = ue_ipv6_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[Ipv4AddressRange]: + """Gets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv4_addr_ranges of this IpAddrRange. + :rtype: List[Ipv4AddressRange] + """ + return self._ue_ipv4_addr_ranges + + @ue_ipv4_addr_ranges.setter + def ue_ipv4_addr_ranges(self, ue_ipv4_addr_ranges: List[Ipv4AddressRange]): + """Sets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv4_addr_ranges: The ue_ipv4_addr_ranges of this IpAddrRange. + :type ue_ipv4_addr_ranges: List[Ipv4AddressRange] + """ + if ue_ipv4_addr_ranges is not None and len(ue_ipv4_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv4_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + + @property + def ue_ipv6_addr_ranges(self) -> List[Ipv6AddressRange1]: + """Gets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv6_addr_ranges of this IpAddrRange. + :rtype: List[Ipv6AddressRange1] + """ + return self._ue_ipv6_addr_ranges + + @ue_ipv6_addr_ranges.setter + def ue_ipv6_addr_ranges(self, ue_ipv6_addr_ranges: List[Ipv6AddressRange1]): + """Sets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange1] + """ + if ue_ipv6_addr_ranges is not None and len(ue_ipv6_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv6_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv6_addr_ranges = ue_ipv6_addr_ranges 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 2741ca33bef70b79ed5837573a84b5d692c20f4a..a76dee2138581594b9b50b2e1213f97c4e5caf94 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,15 +1,10 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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 +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). @@ -50,10 +45,10 @@ class Ipv4AddressRange(Model): return util.deserialize_model(dikt, cls) @property - def start(self): + def start(self) -> str: """Gets the start of this Ipv4AddressRange. - String identifying a IPv4 address formatted in the \"dotted decimal\" notation as defined in RFC 1166. # noqa: E501 + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 :return: The start of this Ipv4AddressRange. :rtype: str @@ -61,24 +56,26 @@ class Ipv4AddressRange(Model): return self._start @start.setter - def start(self, start): + def start(self, start: str): """Sets the start of this Ipv4AddressRange. - String identifying a IPv4 address formatted in the \"dotted decimal\" notation as defined in RFC 1166. # noqa: E501 + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 :param start: The start of this Ipv4AddressRange. :type start: str """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 if start is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', start): # noqa: E501 raise ValueError("Invalid value for `start`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 self._start = start @property - def end(self): + def end(self) -> str: """Gets the end of this Ipv4AddressRange. - String identifying a IPv4 address formatted in the \"dotted decimal\" notation as defined in RFC 1166. # noqa: E501 + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 :return: The end of this Ipv4AddressRange. :rtype: str @@ -86,14 +83,16 @@ class Ipv4AddressRange(Model): return self._end @end.setter - def end(self, end): + def end(self, end: str): """Sets the end of this Ipv4AddressRange. - String identifying a IPv4 address formatted in the \"dotted decimal\" notation as defined in RFC 1166. # noqa: E501 + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 :param end: The end of this Ipv4AddressRange. :type end: str """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 if end is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', end): # noqa: E501 raise ValueError("Invalid value for `end`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 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 new file mode 100644 index 0000000000000000000000000000000000000000..6773c80c93f75858879e198bfaaaf732d700b1b0 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv4_address_range1.py @@ -0,0 +1,95 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +class Ipv4AddressRange1(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 + """Ipv4AddressRange1 - a model defined in OpenAPI + + :param start: The start of this Ipv4AddressRange1. # noqa: E501 + :type start: str + :param end: The end of this Ipv4AddressRange1. # 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) -> 'Ipv4AddressRange1': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv4AddressRange_1 of this Ipv4AddressRange1. # noqa: E501 + :rtype: Ipv4AddressRange1 + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> str: + """Gets the start of this Ipv4AddressRange1. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The start of this Ipv4AddressRange1. + :rtype: str + """ + return self._start + + @start.setter + def start(self, start: str): + """Sets the start of this Ipv4AddressRange1. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param start: The start of this Ipv4AddressRange1. + :type start: str + """ + if start is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', start): # noqa: E501 + raise ValueError("Invalid value for `start`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._start = start + + @property + def end(self) -> str: + """Gets the end of this Ipv4AddressRange1. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The end of this Ipv4AddressRange1. + :rtype: str + """ + return self._end + + @end.setter + def end(self, end: str): + """Sets the end of this Ipv4AddressRange1. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param end: The end of this Ipv4AddressRange1. + :type end: str + """ + if end is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', end): # noqa: E501 + raise ValueError("Invalid value for `end`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._end = end diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/data_format_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py similarity index 58% rename from services/TS29222_CAPIF_Events_API/capif_events/models/data_format_any_of.py rename to services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py index 6ccaf763e6c32eb277ffeef2aef4f7072d7e1a84..01cf6762ff9df505614f9fa8478a669f46760918 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/data_format_any_of.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_addr1.py @@ -1,26 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from capif_events.models.base_model import Model -class DataFormatAnyOf(Model): +class Ipv6Addr1(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" def __init__(self): # noqa: E501 - """DataFormatAnyOf - a model defined in OpenAPI + """Ipv6Addr1 - a model defined in OpenAPI """ self.openapi_types = { @@ -30,12 +22,12 @@ class DataFormatAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'DataFormatAnyOf': + def from_dict(cls, dikt) -> 'Ipv6Addr1': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The DataFormat_anyOf of this DataFormatAnyOf. # noqa: E501 - :rtype: DataFormatAnyOf + :return: The Ipv6Addr_1 of this Ipv6Addr1. # noqa: E501 + :rtype: Ipv6Addr1 """ return util.deserialize_model(dikt, cls) 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 a979db9e1a925ba732d94f8c594255af5b6c65a4..3d7e5c83f6413e3fd7dd181682785e8744b7d069 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from capif_events.models.base_model import Model class Ipv6AddressRange(Model): @@ -48,10 +44,10 @@ class Ipv6AddressRange(Model): return util.deserialize_model(dikt, cls) @property - def start(self): + def start(self) -> str: """Gets the start of this Ipv6AddressRange. - 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 + 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 start of this Ipv6AddressRange. :rtype: str @@ -59,10 +55,10 @@ class Ipv6AddressRange(Model): return self._start @start.setter - def start(self, start): + def start(self, start: str): """Sets the start of this Ipv6AddressRange. - 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 + 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 start: The start of this Ipv6AddressRange. :type start: str @@ -73,10 +69,10 @@ class Ipv6AddressRange(Model): self._start = start @property - def end(self): + def end(self) -> str: """Gets the end of this Ipv6AddressRange. - 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 + 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 end of this Ipv6AddressRange. :rtype: str @@ -84,10 +80,10 @@ class Ipv6AddressRange(Model): return self._end @end.setter - def end(self, end): + def end(self, end: str): """Sets the end of this Ipv6AddressRange. - 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 + 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 end: The end of this Ipv6AddressRange. :type end: str 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 new file mode 100644 index 0000000000000000000000000000000000000000..4eff20b6fc392738fe7383b0de538eb7b80a5307 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/ipv6_address_range1.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + Do not edit the class manually. + """ + + def __init__(self, start=None, end=None): # noqa: E501 + """Ipv6AddressRange1 - a model defined in OpenAPI + + :param start: The start of this Ipv6AddressRange1. # noqa: E501 + :type start: Ipv6Addr1 + :param end: The end of this Ipv6AddressRange1. # noqa: E501 + :type end: Ipv6Addr1 + """ + self.openapi_types = { + 'start': Ipv6Addr1, + 'end': Ipv6Addr1 + } + + self.attribute_map = { + 'start': 'start', + 'end': 'end' + } + + self._start = start + self._end = end + + @classmethod + def from_dict(cls, dikt) -> 'Ipv6AddressRange1': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv6AddressRange_1 of this Ipv6AddressRange1. # noqa: E501 + :rtype: Ipv6AddressRange1 + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> Ipv6Addr1: + """Gets the start of this Ipv6AddressRange1. + + + :return: The start of this Ipv6AddressRange1. + :rtype: Ipv6Addr1 + """ + return self._start + + @start.setter + def start(self, start: Ipv6Addr1): + """Sets the start of this Ipv6AddressRange1. + + + :param start: The start of this Ipv6AddressRange1. + :type start: Ipv6Addr1 + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + + self._start = start + + @property + def end(self) -> Ipv6Addr1: + """Gets the end of this Ipv6AddressRange1. + + + :return: The end of this Ipv6AddressRange1. + :rtype: Ipv6Addr1 + """ + return self._end + + @end.setter + def end(self, end: Ipv6Addr1): + """Sets the end of this Ipv6AddressRange1. + + + :param end: The end of this Ipv6AddressRange1. + :type end: Ipv6Addr1 + """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 + + self._end = end 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 new file mode 100644 index 0000000000000000000000000000000000000000..588ecb63c229e45a6f39a0970598a8160699df9d --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/local2d_point_uncertainty_ellipse.py @@ -0,0 +1,184 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + 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_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py new file mode 100644 index 0000000000000000000000000000000000000000..a70f1a00f53bbeb181d38273e49d029427a51e23 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/local3d_point_uncertainty_ellipsoid.py @@ -0,0 +1,184 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, local_origin=None, point=None, uncertainty_ellipsoid=None, 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 + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'local_origin': LocalOrigin, + 'point': RelativeCartesianLocation, + 'uncertainty_ellipsoid': UncertaintyEllipsoid, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'local_origin': 'localOrigin', + 'point': 'point', + 'uncertainty_ellipsoid': 'uncertaintyEllipsoid', + 'confidence': 'confidence' + } + + self._shape = shape + self._local_origin = local_origin + self._point = point + self._uncertainty_ellipsoid = uncertainty_ellipsoid + self._confidence = 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..4cb83ca670e926e5391a3583e5a52b539ff7f029 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/local_origin.py @@ -0,0 +1,87 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + Do not edit the class manually. + """ + + def __init__(self, coordinate_id=None, point=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 + """ + self.openapi_types = { + 'coordinate_id': str, + 'point': GeographicalCoordinates + } + + self.attribute_map = { + 'coordinate_id': 'coordinateId', + 'point': 'point' + } + + self._coordinate_id = coordinate_id + self._point = point + + @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 + """ + + 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 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 1ac69f9d486c68225eb615625cbada67eb9c0388..5b9f5bb7b6df2d174ec3f7d3334c97fa9b901cd5 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,13 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.interface_description import InterfaceDescription -from capif_events.models.operation import Operation -from capif_events.models.protocol import Protocol from capif_events import util - +from capif_events.models.base_model import Model from capif_events.models.interface_description import InterfaceDescription # 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). @@ -119,7 +112,7 @@ class Log(Model): return util.deserialize_model(dikt, cls) @property - def api_id(self): + def api_id(self) -> str: """Gets the api_id of this Log. String identifying the API invoked. # noqa: E501 @@ -130,7 +123,7 @@ class Log(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + def api_id(self, api_id: str): """Sets the api_id of this Log. String identifying the API invoked. # noqa: E501 @@ -144,10 +137,10 @@ class Log(Model): self._api_id = api_id @property - def api_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 :return: The api_name of this Log. :rtype: str @@ -155,10 +148,10 @@ class Log(Model): return self._api_name @api_name.setter - def api_name(self, api_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 :param api_name: The api_name of this Log. :type api_name: str @@ -169,7 +162,7 @@ class Log(Model): self._api_name = api_name @property - def api_version(self): + def api_version(self) -> str: """Gets the api_version of this Log. Version of the API which was invoked # noqa: E501 @@ -180,7 +173,7 @@ class Log(Model): return self._api_version @api_version.setter - def api_version(self, api_version): + def api_version(self, api_version: str): """Sets the api_version of this Log. Version of the API which was invoked # noqa: E501 @@ -194,7 +187,7 @@ class Log(Model): self._api_version = api_version @property - def resource_name(self): + def resource_name(self) -> str: """Gets the resource_name of this Log. Name of the specific resource invoked # noqa: E501 @@ -205,7 +198,7 @@ class Log(Model): return self._resource_name @resource_name.setter - def resource_name(self, resource_name): + def resource_name(self, resource_name: str): """Sets the resource_name of this Log. Name of the specific resource invoked # noqa: E501 @@ -219,7 +212,7 @@ class Log(Model): self._resource_name = resource_name @property - def uri(self): + def uri(self) -> str: """Gets the uri of this Log. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -230,7 +223,7 @@ class Log(Model): return self._uri @uri.setter - def uri(self, uri): + def uri(self, uri: str): """Sets the uri of this Log. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -242,7 +235,7 @@ class Log(Model): self._uri = uri @property - def protocol(self): + def protocol(self) -> Protocol: """Gets the protocol of this Log. @@ -252,7 +245,7 @@ class Log(Model): return self._protocol @protocol.setter - def protocol(self, protocol): + def protocol(self, protocol: Protocol): """Sets the protocol of this Log. @@ -265,7 +258,7 @@ class Log(Model): self._protocol = protocol @property - def operation(self): + def operation(self) -> Operation: """Gets the operation of this Log. @@ -275,7 +268,7 @@ class Log(Model): return self._operation @operation.setter - def operation(self, operation): + def operation(self, operation: Operation): """Sets the operation of this Log. @@ -286,7 +279,7 @@ class Log(Model): self._operation = operation @property - def result(self): + def result(self) -> str: """Gets the result of this Log. For HTTP protocol, it contains HTTP status code of the invocation # noqa: E501 @@ -297,7 +290,7 @@ class Log(Model): return self._result @result.setter - def result(self, result): + def result(self, result: str): """Sets the result of this Log. For HTTP protocol, it contains HTTP status code of the invocation # noqa: E501 @@ -311,7 +304,7 @@ class Log(Model): self._result = result @property - def invocation_time(self): + def invocation_time(self) -> datetime: """Gets the invocation_time of this Log. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -322,7 +315,7 @@ class Log(Model): return self._invocation_time @invocation_time.setter - def invocation_time(self, invocation_time): + def invocation_time(self, invocation_time: datetime): """Sets the invocation_time of this Log. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -334,10 +327,10 @@ class Log(Model): self._invocation_time = invocation_time @property - def invocation_latency(self): + def invocation_latency(self) -> int: """Gets the invocation_latency of this Log. - Unsigned integer identifying a period of time in units of milliseconds. # noqa: E501 + Represents a period of time in units of milliseconds. # noqa: E501 :return: The invocation_latency of this Log. :rtype: int @@ -345,10 +338,10 @@ class Log(Model): return self._invocation_latency @invocation_latency.setter - def invocation_latency(self, invocation_latency): + def invocation_latency(self, invocation_latency: int): """Sets the invocation_latency of this Log. - Unsigned integer identifying a period of time in units of milliseconds. # noqa: E501 + Represents a period of time in units of milliseconds. # noqa: E501 :param invocation_latency: The invocation_latency of this Log. :type invocation_latency: int @@ -359,10 +352,10 @@ class Log(Model): self._invocation_latency = invocation_latency @property - def input_parameters(self): + def input_parameters(self) -> object: """Gets the input_parameters of this Log. - List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :return: The input_parameters of this Log. :rtype: object @@ -370,10 +363,10 @@ class Log(Model): return self._input_parameters @input_parameters.setter - def input_parameters(self, input_parameters): + def input_parameters(self, input_parameters: object): """Sets the input_parameters of this Log. - List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :param input_parameters: The input_parameters of this Log. :type input_parameters: object @@ -382,10 +375,10 @@ class Log(Model): self._input_parameters = input_parameters @property - def output_parameters(self): + def output_parameters(self) -> object: """Gets the output_parameters of this Log. - List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :return: The output_parameters of this Log. :rtype: object @@ -393,10 +386,10 @@ class Log(Model): return self._output_parameters @output_parameters.setter - def output_parameters(self, output_parameters): + def output_parameters(self, output_parameters: object): """Sets the output_parameters of this Log. - List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :param output_parameters: The output_parameters of this Log. :type output_parameters: object @@ -405,7 +398,7 @@ class Log(Model): self._output_parameters = output_parameters @property - def src_interface(self): + def src_interface(self) -> InterfaceDescription: """Gets the src_interface of this Log. @@ -415,7 +408,7 @@ class Log(Model): return self._src_interface @src_interface.setter - def src_interface(self, src_interface): + def src_interface(self, src_interface: InterfaceDescription): """Sets the src_interface of this Log. @@ -426,7 +419,7 @@ class Log(Model): self._src_interface = src_interface @property - def dest_interface(self): + def dest_interface(self) -> InterfaceDescription: """Gets the dest_interface of this Log. @@ -436,7 +429,7 @@ class Log(Model): return self._dest_interface @dest_interface.setter - def dest_interface(self, dest_interface): + def dest_interface(self, dest_interface: InterfaceDescription): """Sets the dest_interface of this Log. @@ -447,10 +440,10 @@ class Log(Model): self._dest_interface = dest_interface @property - def fwd_interface(self): + def fwd_interface(self) -> str: """Gets the fwd_interface of this Log. - 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 # noqa: E501 + 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 # noqa: E501 :return: The fwd_interface of this Log. :rtype: str @@ -458,10 +451,10 @@ class Log(Model): return self._fwd_interface @fwd_interface.setter - def fwd_interface(self, fwd_interface): + def fwd_interface(self, fwd_interface: str): """Sets the fwd_interface of this Log. - 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 # noqa: E501 + 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 # noqa: E501 :param fwd_interface: The fwd_interface of this Log. :type fwd_interface: str 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 new file mode 100644 index 0000000000000000000000000000000000000000..d8882bfbbbcda2a01fabe7b827cfb91dd2743def --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_exception_instructions.py @@ -0,0 +1,88 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +class MutingExceptionInstructions(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, buffered_notifs=None, subscription=None): # noqa: E501 + """MutingExceptionInstructions - a model defined in OpenAPI + + :param buffered_notifs: The buffered_notifs of this MutingExceptionInstructions. # noqa: E501 + :type buffered_notifs: BufferedNotificationsAction + :param subscription: The subscription of this MutingExceptionInstructions. # noqa: E501 + :type subscription: SubscriptionAction + """ + self.openapi_types = { + 'buffered_notifs': BufferedNotificationsAction, + 'subscription': SubscriptionAction + } + + self.attribute_map = { + 'buffered_notifs': 'bufferedNotifs', + 'subscription': 'subscription' + } + + self._buffered_notifs = buffered_notifs + self._subscription = subscription + + @classmethod + def from_dict(cls, dikt) -> 'MutingExceptionInstructions': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The MutingExceptionInstructions of this MutingExceptionInstructions. # noqa: E501 + :rtype: MutingExceptionInstructions + """ + return util.deserialize_model(dikt, cls) + + @property + def buffered_notifs(self) -> BufferedNotificationsAction: + """Gets the buffered_notifs of this MutingExceptionInstructions. + + + :return: The buffered_notifs of this MutingExceptionInstructions. + :rtype: BufferedNotificationsAction + """ + return self._buffered_notifs + + @buffered_notifs.setter + def buffered_notifs(self, buffered_notifs: BufferedNotificationsAction): + """Sets the buffered_notifs of this MutingExceptionInstructions. + + + :param buffered_notifs: The buffered_notifs of this MutingExceptionInstructions. + :type buffered_notifs: BufferedNotificationsAction + """ + + self._buffered_notifs = buffered_notifs + + @property + def subscription(self) -> SubscriptionAction: + """Gets the subscription of this MutingExceptionInstructions. + + + :return: The subscription of this MutingExceptionInstructions. + :rtype: SubscriptionAction + """ + return self._subscription + + @subscription.setter + def subscription(self, subscription: SubscriptionAction): + """Sets the subscription of this MutingExceptionInstructions. + + + :param subscription: The subscription of this MutingExceptionInstructions. + :type subscription: SubscriptionAction + """ + + self._subscription = subscription 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 new file mode 100644 index 0000000000000000000000000000000000000000..902cf1933feccfd4e1dfa2b293a6598afb903d38 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/muting_notifications_settings.py @@ -0,0 +1,88 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +class MutingNotificationsSettings(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, max_no_of_notif=None, duration_buffered_notif=None): # noqa: E501 + """MutingNotificationsSettings - a model defined in OpenAPI + + :param max_no_of_notif: The max_no_of_notif of this MutingNotificationsSettings. # noqa: E501 + :type max_no_of_notif: int + :param duration_buffered_notif: The duration_buffered_notif of this MutingNotificationsSettings. # noqa: E501 + :type duration_buffered_notif: int + """ + self.openapi_types = { + 'max_no_of_notif': int, + 'duration_buffered_notif': int + } + + self.attribute_map = { + 'max_no_of_notif': 'maxNoOfNotif', + 'duration_buffered_notif': 'durationBufferedNotif' + } + + self._max_no_of_notif = max_no_of_notif + self._duration_buffered_notif = duration_buffered_notif + + @classmethod + def from_dict(cls, dikt) -> 'MutingNotificationsSettings': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The MutingNotificationsSettings of this MutingNotificationsSettings. # noqa: E501 + :rtype: MutingNotificationsSettings + """ + return util.deserialize_model(dikt, cls) + + @property + def max_no_of_notif(self) -> int: + """Gets the max_no_of_notif of this MutingNotificationsSettings. + + + :return: The max_no_of_notif of this MutingNotificationsSettings. + :rtype: int + """ + return self._max_no_of_notif + + @max_no_of_notif.setter + def max_no_of_notif(self, max_no_of_notif: int): + """Sets the max_no_of_notif of this MutingNotificationsSettings. + + + :param max_no_of_notif: The max_no_of_notif of this MutingNotificationsSettings. + :type max_no_of_notif: int + """ + + self._max_no_of_notif = max_no_of_notif + + @property + def duration_buffered_notif(self) -> int: + """Gets the duration_buffered_notif of this MutingNotificationsSettings. + + indicating a time in seconds. # noqa: E501 + + :return: The duration_buffered_notif of this MutingNotificationsSettings. + :rtype: int + """ + return self._duration_buffered_notif + + @duration_buffered_notif.setter + def duration_buffered_notif(self, duration_buffered_notif: int): + """Sets the duration_buffered_notif of this MutingNotificationsSettings. + + indicating a time in seconds. # noqa: E501 + + :param duration_buffered_notif: The duration_buffered_notif of this MutingNotificationsSettings. + :type duration_buffered_notif: int + """ + + self._duration_buffered_notif = duration_buffered_notif 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 6bc032cef4dbbf28c450390e02cbd2433e47c48d..17eff44ae2171e0ac5304e39a20abc2aa583d5c1 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.notification_flag_any_of import NotificationFlagAnyOf from capif_events import util +from capif_events.models.base_model import Model -from capif_events.models.notification_flag_any_of import NotificationFlagAnyOf # noqa: E501 class NotificationFlag(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_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag_any_of.py deleted file mode 100644 index f1133b14bf798d662ec0a9979c882d7ff4f2481f..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_flag_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 NotificationFlagAnyOf(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - ACTIVATE = "ACTIVATE" - DEACTIVATE = "DEACTIVATE" - RETRIEVAL = "RETRIEVAL" - def __init__(self): # noqa: E501 - """NotificationFlagAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'NotificationFlagAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The NotificationFlag_anyOf of this NotificationFlagAnyOf. # noqa: E501 - :rtype: NotificationFlagAnyOf - """ - return util.deserialize_model(dikt, cls) 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 b8600df3b54d753be33b90d7db30d72b7e5a1c39..f8676038ea967eb7e4720c1a5a4f26db9fd3bb35 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.notification_method_any_of import NotificationMethodAnyOf from capif_events import util +from capif_events.models.base_model import Model -from capif_events.models.notification_method_any_of import NotificationMethodAnyOf # noqa: E501 class NotificationMethod(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_method_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method_any_of.py deleted file mode 100644 index 3bf0f8349fc5cbde49d0aca4c77e278539caa3dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/notification_method_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 NotificationMethodAnyOf(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - PERIODIC = "PERIODIC" - ONE_TIME = "ONE_TIME" - ON_EVENT_DETECTION = "ON_EVENT_DETECTION" - def __init__(self): # noqa: E501 - """NotificationMethodAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'NotificationMethodAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The NotificationMethod_anyOf of this NotificationMethodAnyOf. # noqa: E501 - :rtype: NotificationMethodAnyOf - """ - return util.deserialize_model(dikt, cls) 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 3c85bfbaa73059b4355ba0336f308f6782eb6b07..1a8a1f97a4ba1a0e927975d9c63f76db7b095c16 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/operation.py @@ -1,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.operation_any_of import OperationAnyOf from capif_events import util +from capif_events.models.base_model import Model -from capif_events.models.operation_any_of import OperationAnyOf # noqa: E501 class Operation(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_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/operation_any_of.py deleted file mode 100644 index 4c6b9094314af69471111dceb0a591f3c4c33644..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/operation_any_of.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 OperationAnyOf(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 - """OperationAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'OperationAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Operation_anyOf of this OperationAnyOf. # noqa: E501 - :rtype: OperationAnyOf - """ - return util.deserialize_model(dikt, cls) 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 063782b5267ab5f519b692fcecf45b6ea31705bc..40a8bf7bbec0b9b1ccc6a1e7e20d27698eab840d 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.partitioning_criteria_any_of import PartitioningCriteriaAnyOf from capif_events import util +from capif_events.models.base_model import Model -from capif_events.models.partitioning_criteria_any_of import PartitioningCriteriaAnyOf # noqa: E501 class PartitioningCriteria(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/partitioning_criteria_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria_any_of.py deleted file mode 100644 index 4c0faedcde0c1860034fd7d5366ff9e23b0fe9fc..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/partitioning_criteria_any_of.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 PartitioningCriteriaAnyOf(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - TAC = "TAC" - SUBPLMN = "SUBPLMN" - GEOAREA = "GEOAREA" - SNSSAI = "SNSSAI" - DNN = "DNN" - def __init__(self): # noqa: E501 - """PartitioningCriteriaAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'PartitioningCriteriaAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The PartitioningCriteria_anyOf of this PartitioningCriteriaAnyOf. # noqa: E501 - :rtype: PartitioningCriteriaAnyOf - """ - return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_Events_API/capif_events/models/point.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point.py new file mode 100644 index 0000000000000000000000000000000000000000..3f9f2e2376f97455575e1663e1328cc01997dbb1 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point.py @@ -0,0 +1,92 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + 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_Events_API/capif_events/models/point_altitude.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py new file mode 100644 index 0000000000000000000000000000000000000000..64134eca71ac18bedea9675a7dbc58592ab09c68 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude.py @@ -0,0 +1,126 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + 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_Events_API/capif_events/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py new file mode 100644 index 0000000000000000000000000000000000000000..f45227d1d0f258105f1071b21ccbd44a092c6f0b --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_altitude_uncertainty.py @@ -0,0 +1,253 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + 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_Events_API/capif_events/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py new file mode 100644 index 0000000000000000000000000000000000000000..a62a475cec8f7161a6d6bd48ffcefe41c33846a8 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_circle.py @@ -0,0 +1,124 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + 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_Events_API/capif_events/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py new file mode 100644 index 0000000000000000000000000000000000000000..618bb46d93e05119f0b4292c2dfeb6a2b4f586d9 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/point_uncertainty_ellipse.py @@ -0,0 +1,155 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + 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_Events_API/capif_events/models/polygon.py b/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py new file mode 100644 index 0000000000000000000000000000000000000000..7d89244dfd0f6a0390c8878eefda89988cc17cb5 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/polygon.py @@ -0,0 +1,98 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model +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). + + 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_Events_API/capif_events/models/problem_details.py b/services/TS29222_CAPIF_Events_API/capif_events/models/problem_details.py index 04f1577f8316c536702a3bc52a2cbf96252f7990..bbf924527ac4e21018e437e264614f8e1175bd84 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.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). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,10 +239,10 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 + 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 @@ -256,10 +250,10 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 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 e62d3cdde7fd2eb83a33afbd26f1c0ef46a66c85..a92a428aa51087ffc42b7bce764e117e877d2c4a 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/protocol.py @@ -1,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.protocol_any_of import ProtocolAnyOf from capif_events import util +from capif_events.models.base_model import Model -from capif_events.models.protocol_any_of import ProtocolAnyOf # noqa: E501 class Protocol(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/published_api_path.py b/services/TS29222_CAPIF_Events_API/capif_events/models/published_api_path.py index 6554d778c32ff0c13b123bcb392ec501a3631d7a..6f2ae66268e0b014b12f50e956c568313a500944 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from capif_events.models.base_model import Model class PublishedApiPath(Model): @@ -43,7 +39,7 @@ class PublishedApiPath(Model): return util.deserialize_model(dikt, cls) @property - def ccf_ids(self): + 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 @@ -54,7 +50,7 @@ class PublishedApiPath(Model): return self._ccf_ids @ccf_ids.setter - def ccf_ids(self, ccf_ids): + 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..e6c06126627a42f13a61c59cac93a5dca5e4c061 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/relative_cartesian_location.py @@ -0,0 +1,122 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +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_Events_API/capif_events/models/reporting_information.py b/services/TS29222_CAPIF_Events_API/capif_events/models/reporting_information.py index 8a1a517b4bd52fa97bc13cad1da27126753cae4c..cb2fcfe99585407811692e031c81b8d73f2ae570 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,27 +1,22 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.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 + 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 + 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, notif_flag_instruct=None, muting_setting=None): # noqa: E501 """ReportingInformation - a model defined in OpenAPI :param imm_rep: The imm_rep of this ReportingInformation. # noqa: E501 @@ -42,6 +37,10 @@ class ReportingInformation(Model): :type grp_rep_time: int :param notif_flag: The notif_flag of this ReportingInformation. # noqa: E501 :type notif_flag: NotificationFlag + :param notif_flag_instruct: The notif_flag_instruct of this ReportingInformation. # noqa: E501 + :type notif_flag_instruct: MutingExceptionInstructions + :param muting_setting: The muting_setting of this ReportingInformation. # noqa: E501 + :type muting_setting: MutingNotificationsSettings """ self.openapi_types = { 'imm_rep': bool, @@ -52,7 +51,9 @@ class ReportingInformation(Model): 'samp_ratio': int, 'partition_criteria': List[PartitioningCriteria], 'grp_rep_time': int, - 'notif_flag': NotificationFlag + 'notif_flag': NotificationFlag, + 'notif_flag_instruct': MutingExceptionInstructions, + 'muting_setting': MutingNotificationsSettings } self.attribute_map = { @@ -64,7 +65,9 @@ class ReportingInformation(Model): 'samp_ratio': 'sampRatio', 'partition_criteria': 'partitionCriteria', 'grp_rep_time': 'grpRepTime', - 'notif_flag': 'notifFlag' + 'notif_flag': 'notifFlag', + 'notif_flag_instruct': 'notifFlagInstruct', + 'muting_setting': 'mutingSetting' } self._imm_rep = imm_rep @@ -76,6 +79,8 @@ class ReportingInformation(Model): self._partition_criteria = partition_criteria self._grp_rep_time = grp_rep_time self._notif_flag = notif_flag + self._notif_flag_instruct = notif_flag_instruct + self._muting_setting = muting_setting @classmethod def from_dict(cls, dikt) -> 'ReportingInformation': @@ -89,7 +94,7 @@ class ReportingInformation(Model): return util.deserialize_model(dikt, cls) @property - def imm_rep(self): + def imm_rep(self) -> bool: """Gets the imm_rep of this ReportingInformation. @@ -99,7 +104,7 @@ class ReportingInformation(Model): return self._imm_rep @imm_rep.setter - def imm_rep(self, imm_rep): + def imm_rep(self, imm_rep: bool): """Sets the imm_rep of this ReportingInformation. @@ -110,7 +115,7 @@ class ReportingInformation(Model): self._imm_rep = imm_rep @property - def notif_method(self): + def notif_method(self) -> NotificationMethod: """Gets the notif_method of this ReportingInformation. @@ -120,7 +125,7 @@ class ReportingInformation(Model): return self._notif_method @notif_method.setter - def notif_method(self, notif_method): + def notif_method(self, notif_method: NotificationMethod): """Sets the notif_method of this ReportingInformation. @@ -131,7 +136,7 @@ class ReportingInformation(Model): self._notif_method = notif_method @property - def max_report_nbr(self): + 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 @@ -142,7 +147,7 @@ class ReportingInformation(Model): return self._max_report_nbr @max_report_nbr.setter - def max_report_nbr(self, max_report_nbr): + 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 @@ -156,10 +161,10 @@ class ReportingInformation(Model): self._max_report_nbr = max_report_nbr @property - def mon_dur(self): + def mon_dur(self) -> datetime: """Gets the mon_dur of this ReportingInformation. - string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + string with format 'date-time' as defined in OpenAPI. # noqa: E501 :return: The mon_dur of this ReportingInformation. :rtype: datetime @@ -167,10 +172,10 @@ class ReportingInformation(Model): return self._mon_dur @mon_dur.setter - def mon_dur(self, mon_dur): + 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 + string with format 'date-time' as defined in OpenAPI. # noqa: E501 :param mon_dur: The mon_dur of this ReportingInformation. :type mon_dur: datetime @@ -179,7 +184,7 @@ class ReportingInformation(Model): self._mon_dur = mon_dur @property - def rep_period(self): + def rep_period(self) -> int: """Gets the rep_period of this ReportingInformation. indicating a time in seconds. # noqa: E501 @@ -190,7 +195,7 @@ class ReportingInformation(Model): return self._rep_period @rep_period.setter - def rep_period(self, rep_period): + def rep_period(self, rep_period: int): """Sets the rep_period of this ReportingInformation. indicating a time in seconds. # noqa: E501 @@ -202,10 +207,10 @@ class ReportingInformation(Model): self._rep_period = rep_period @property - def samp_ratio(self): + 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 + 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 @@ -213,10 +218,10 @@ class ReportingInformation(Model): return self._samp_ratio @samp_ratio.setter - def samp_ratio(self, samp_ratio): + 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 + 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 @@ -229,7 +234,7 @@ class ReportingInformation(Model): self._samp_ratio = samp_ratio @property - def partition_criteria(self): + 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 @@ -240,7 +245,7 @@ class ReportingInformation(Model): return self._partition_criteria @partition_criteria.setter - def partition_criteria(self, partition_criteria): + 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 @@ -254,7 +259,7 @@ class ReportingInformation(Model): self._partition_criteria = partition_criteria @property - def grp_rep_time(self): + def grp_rep_time(self) -> int: """Gets the grp_rep_time of this ReportingInformation. indicating a time in seconds. # noqa: E501 @@ -265,7 +270,7 @@ class ReportingInformation(Model): return self._grp_rep_time @grp_rep_time.setter - def grp_rep_time(self, grp_rep_time): + def grp_rep_time(self, grp_rep_time: int): """Sets the grp_rep_time of this ReportingInformation. indicating a time in seconds. # noqa: E501 @@ -277,7 +282,7 @@ class ReportingInformation(Model): self._grp_rep_time = grp_rep_time @property - def notif_flag(self): + def notif_flag(self) -> NotificationFlag: """Gets the notif_flag of this ReportingInformation. @@ -287,7 +292,7 @@ class ReportingInformation(Model): return self._notif_flag @notif_flag.setter - def notif_flag(self, notif_flag): + def notif_flag(self, notif_flag: NotificationFlag): """Sets the notif_flag of this ReportingInformation. @@ -296,3 +301,45 @@ class ReportingInformation(Model): """ self._notif_flag = notif_flag + + @property + def notif_flag_instruct(self) -> MutingExceptionInstructions: + """Gets the notif_flag_instruct of this ReportingInformation. + + + :return: The notif_flag_instruct of this ReportingInformation. + :rtype: MutingExceptionInstructions + """ + return self._notif_flag_instruct + + @notif_flag_instruct.setter + def notif_flag_instruct(self, notif_flag_instruct: MutingExceptionInstructions): + """Sets the notif_flag_instruct of this ReportingInformation. + + + :param notif_flag_instruct: The notif_flag_instruct of this ReportingInformation. + :type notif_flag_instruct: MutingExceptionInstructions + """ + + self._notif_flag_instruct = notif_flag_instruct + + @property + def muting_setting(self) -> MutingNotificationsSettings: + """Gets the muting_setting of this ReportingInformation. + + + :return: The muting_setting of this ReportingInformation. + :rtype: MutingNotificationsSettings + """ + return self._muting_setting + + @muting_setting.setter + def muting_setting(self, muting_setting: MutingNotificationsSettings): + """Sets the muting_setting of this ReportingInformation. + + + :param muting_setting: The muting_setting of this ReportingInformation. + :type muting_setting: MutingNotificationsSettings + """ + + self._muting_setting = muting_setting 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 36e1623b9657a1ea69034a50dcd17303c2bf80c1..9ab8c7718399c694a099c25489f47cadc81fda95 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/resource.py @@ -1,25 +1,20 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type import CommunicationType -from capif_events.models.operation import Operation from capif_events import util - +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). 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 + 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 @@ -30,6 +25,8 @@ class Resource(Model): :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 @@ -40,6 +37,7 @@ class Resource(Model): 'comm_type': CommunicationType, 'uri': str, 'cust_op_name': str, + 'cust_operations': List[CustomOperation], 'operations': List[Operation], 'description': str } @@ -49,6 +47,7 @@ class Resource(Model): 'comm_type': 'commType', 'uri': 'uri', 'cust_op_name': 'custOpName', + 'cust_operations': 'custOperations', 'operations': 'operations', 'description': 'description' } @@ -57,6 +56,7 @@ class Resource(Model): 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 @@ -72,7 +72,7 @@ class Resource(Model): return util.deserialize_model(dikt, cls) @property - def resource_name(self): + def resource_name(self) -> str: """Gets the resource_name of this Resource. Resource name # noqa: E501 @@ -83,7 +83,7 @@ class Resource(Model): return self._resource_name @resource_name.setter - def resource_name(self, resource_name): + def resource_name(self, resource_name: str): """Sets the resource_name of this Resource. Resource name # noqa: E501 @@ -97,7 +97,7 @@ class Resource(Model): self._resource_name = resource_name @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this Resource. @@ -107,7 +107,7 @@ class Resource(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this Resource. @@ -120,10 +120,10 @@ class Resource(Model): self._comm_type = comm_type @property - def uri(self): + def uri(self) -> str: """Gets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -131,10 +131,10 @@ class Resource(Model): return self._uri @uri.setter - def uri(self, uri): + def uri(self, uri: str): """Sets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -145,10 +145,10 @@ class Resource(Model): self._uri = uri @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -156,10 +156,10 @@ class Resource(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -168,10 +168,35 @@ class Resource(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -179,10 +204,10 @@ class Resource(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -193,7 +218,7 @@ class Resource(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this Resource. Text description of the API resource # noqa: E501 @@ -204,7 +229,7 @@ class Resource(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this Resource. Text description of the API resource # noqa: E501 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 a4e4d0719a767c8424312da786c0a14163c66276..0560f90fd1e414b9da2cde14f59d179c61d4df5d 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,15 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.aef_profile import AefProfile -from capif_events.models.ipv4_address_range import Ipv4AddressRange -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). @@ -21,14 +18,14 @@ class RoutingRule(Model): """RoutingRule - a model defined in OpenAPI :param ipv4_addr_ranges: The ipv4_addr_ranges of this RoutingRule. # noqa: E501 - :type ipv4_addr_ranges: List[Ipv4AddressRange] + :type ipv4_addr_ranges: List[Ipv4AddressRange1] :param ipv6_addr_ranges: The ipv6_addr_ranges of this RoutingRule. # noqa: E501 :type ipv6_addr_ranges: List[Ipv6AddressRange] :param aef_profile: The aef_profile of this RoutingRule. # noqa: E501 :type aef_profile: AefProfile """ self.openapi_types = { - 'ipv4_addr_ranges': List[Ipv4AddressRange], + 'ipv4_addr_ranges': List[Ipv4AddressRange1], 'ipv6_addr_ranges': List[Ipv6AddressRange], 'aef_profile': AefProfile } @@ -55,22 +52,22 @@ class RoutingRule(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr_ranges(self): + def ipv4_addr_ranges(self) -> List[Ipv4AddressRange1]: """Gets the ipv4_addr_ranges of this RoutingRule. :return: The ipv4_addr_ranges of this RoutingRule. - :rtype: List[Ipv4AddressRange] + :rtype: List[Ipv4AddressRange1] """ return self._ipv4_addr_ranges @ipv4_addr_ranges.setter - def ipv4_addr_ranges(self, ipv4_addr_ranges): + def ipv4_addr_ranges(self, ipv4_addr_ranges: List[Ipv4AddressRange1]): """Sets the ipv4_addr_ranges of this RoutingRule. :param ipv4_addr_ranges: The ipv4_addr_ranges of this RoutingRule. - :type ipv4_addr_ranges: List[Ipv4AddressRange] + :type ipv4_addr_ranges: List[Ipv4AddressRange1] """ if ipv4_addr_ranges is not None and len(ipv4_addr_ranges) < 1: raise ValueError("Invalid value for `ipv4_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 @@ -78,7 +75,7 @@ class RoutingRule(Model): self._ipv4_addr_ranges = ipv4_addr_ranges @property - def ipv6_addr_ranges(self): + def ipv6_addr_ranges(self) -> List[Ipv6AddressRange]: """Gets the ipv6_addr_ranges of this RoutingRule. @@ -88,7 +85,7 @@ class RoutingRule(Model): return self._ipv6_addr_ranges @ipv6_addr_ranges.setter - def ipv6_addr_ranges(self, ipv6_addr_ranges): + def ipv6_addr_ranges(self, ipv6_addr_ranges: List[Ipv6AddressRange]): """Sets the ipv6_addr_ranges of this RoutingRule. @@ -101,7 +98,7 @@ class RoutingRule(Model): self._ipv6_addr_ranges = ipv6_addr_ranges @property - def aef_profile(self): + def aef_profile(self) -> AefProfile: """Gets the aef_profile of this RoutingRule. @@ -111,7 +108,7 @@ class RoutingRule(Model): return self._aef_profile @aef_profile.setter - def aef_profile(self, aef_profile): + def aef_profile(self, aef_profile: AefProfile): """Sets the aef_profile of this RoutingRule. 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 4aec36033eb09b96a97a9d89f92a0e4347d79e90..fa70435cf343f93ef8fb6d1243d908a3a93730de 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.security_method_any_of import SecurityMethodAnyOf from capif_events import util +from capif_events.models.base_model import Model -from capif_events.models.security_method_any_of import SecurityMethodAnyOf # noqa: E501 class SecurityMethod(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_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/security_method_any_of.py deleted file mode 100644 index 2ceeb4d11ca5c54375c16fdac78cd63edef723a5..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/security_method_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 SecurityMethodAnyOf(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 - """SecurityMethodAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'SecurityMethodAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The SecurityMethod_anyOf of this SecurityMethodAnyOf. # noqa: E501 - :rtype: SecurityMethodAnyOf - """ - return util.deserialize_model(dikt, cls) 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 5c902fe24809564979aa5b5084a2fa09e213c307..ac3bb24275fe24527cd8377294fd3228c767f25e 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,21 +1,14 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.aef_profile import AefProfile -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.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). @@ -23,13 +16,15 @@ class ServiceAPIDescription(Model): 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 + 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 @@ -46,10 +41,13 @@ class ServiceAPIDescription(Model): :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, @@ -57,12 +55,14 @@ class ServiceAPIDescription(Model): 'service_api_category': str, 'api_supp_feats': str, 'pub_api_path': PublishedApiPath, - 'ccf_id': str + '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', @@ -70,11 +70,13 @@ class ServiceAPIDescription(Model): 'service_api_category': 'serviceAPICategory', 'api_supp_feats': 'apiSuppFeats', 'pub_api_path': 'pubApiPath', - 'ccf_id': 'ccfId' + '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 @@ -83,6 +85,7 @@ class ServiceAPIDescription(Model): 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': @@ -96,10 +99,10 @@ class ServiceAPIDescription(Model): return util.deserialize_model(dikt, cls) @property - def api_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -107,10 +110,10 @@ class ServiceAPIDescription(Model): return self._api_name @api_name.setter - def api_name(self, api_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -121,10 +124,10 @@ class ServiceAPIDescription(Model): self._api_name = api_name @property - def api_id(self): + 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 + 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 @@ -132,10 +135,10 @@ class ServiceAPIDescription(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + 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 + 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 @@ -144,10 +147,31 @@ class ServiceAPIDescription(Model): self._api_id = api_id @property - def aef_profiles(self): + 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. - AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 + AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 :return: The aef_profiles of this ServiceAPIDescription. :rtype: List[AefProfile] @@ -155,10 +179,10 @@ class ServiceAPIDescription(Model): return self._aef_profiles @aef_profiles.setter - def aef_profiles(self, aef_profiles): + 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 + 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] @@ -169,7 +193,7 @@ class ServiceAPIDescription(Model): self._aef_profiles = aef_profiles @property - def description(self): + def description(self) -> str: """Gets the description of this ServiceAPIDescription. Text description of the API # noqa: E501 @@ -180,7 +204,7 @@ class ServiceAPIDescription(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this ServiceAPIDescription. Text description of the API # noqa: E501 @@ -192,10 +216,10 @@ class ServiceAPIDescription(Model): self._description = description @property - def supported_features(self): + 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 + 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 @@ -203,10 +227,10 @@ class ServiceAPIDescription(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 @@ -217,7 +241,7 @@ class ServiceAPIDescription(Model): self._supported_features = supported_features @property - def shareable_info(self): + def shareable_info(self) -> ShareableInformation: """Gets the shareable_info of this ServiceAPIDescription. @@ -227,7 +251,7 @@ class ServiceAPIDescription(Model): return self._shareable_info @shareable_info.setter - def shareable_info(self, shareable_info): + def shareable_info(self, shareable_info: ShareableInformation): """Sets the shareable_info of this ServiceAPIDescription. @@ -238,9 +262,10 @@ class ServiceAPIDescription(Model): self._shareable_info = shareable_info @property - def service_api_category(self): + def service_api_category(self) -> str: """Gets the service_api_category of this ServiceAPIDescription. + The service API category to which the service API belongs to. # noqa: E501 :return: The service_api_category of this ServiceAPIDescription. :rtype: str @@ -248,9 +273,10 @@ class ServiceAPIDescription(Model): return self._service_api_category @service_api_category.setter - def service_api_category(self, service_api_category): + def service_api_category(self, service_api_category: str): """Sets the service_api_category of this ServiceAPIDescription. + The service API category to which the service API belongs to. # noqa: E501 :param service_api_category: The service_api_category of this ServiceAPIDescription. :type service_api_category: str @@ -259,10 +285,10 @@ class ServiceAPIDescription(Model): self._service_api_category = service_api_category @property - def api_supp_feats(self): + 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 + 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 @@ -270,10 +296,10 @@ class ServiceAPIDescription(Model): return self._api_supp_feats @api_supp_feats.setter - def api_supp_feats(self, api_supp_feats): + 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 + 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 @@ -284,7 +310,7 @@ class ServiceAPIDescription(Model): self._api_supp_feats = api_supp_feats @property - def pub_api_path(self): + def pub_api_path(self) -> PublishedApiPath: """Gets the pub_api_path of this ServiceAPIDescription. @@ -294,7 +320,7 @@ class ServiceAPIDescription(Model): return self._pub_api_path @pub_api_path.setter - def pub_api_path(self, pub_api_path): + def pub_api_path(self, pub_api_path: PublishedApiPath): """Sets the pub_api_path of this ServiceAPIDescription. @@ -305,7 +331,7 @@ class ServiceAPIDescription(Model): self._pub_api_path = pub_api_path @property - def ccf_id(self): + def ccf_id(self) -> str: """Gets the ccf_id of this ServiceAPIDescription. CAPIF core function identifier. # noqa: E501 @@ -316,7 +342,7 @@ class ServiceAPIDescription(Model): return self._ccf_id @ccf_id.setter - def ccf_id(self, ccf_id): + def ccf_id(self, ccf_id: str): """Sets the ccf_id of this ServiceAPIDescription. CAPIF core function identifier. # noqa: E501 @@ -326,3 +352,26 @@ class ServiceAPIDescription(Model): """ self._ccf_id = ccf_id + + @property + def api_prov_name(self) -> str: + """Gets the api_prov_name of this ServiceAPIDescription. + + Represents the API provider name. # noqa: E501 + + :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. + + Represents the API provider name. # noqa: E501 + + :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/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py b/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py new file mode 100644 index 0000000000000000000000000000000000000000..1bbabf845871d651475e7da75d0763bde4c45490 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/service_kpis.py @@ -0,0 +1,275 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +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("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("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("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("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_Events_API/capif_events/models/shareable_information.py b/services/TS29222_CAPIF_Events_API/capif_events/models/shareable_information.py index 134674a984d2cb7daee3955a7588070cd8e97530..0521026981694ad6bda7f3a7810f3fea1dd47c0b 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from capif_events.models.base_model import Model class ShareableInformation(Model): @@ -48,10 +44,10 @@ class ShareableInformation(Model): return util.deserialize_model(dikt, cls) @property - def is_shareable(self): + 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 + 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 @@ -59,10 +55,10 @@ class ShareableInformation(Model): return self._is_shareable @is_shareable.setter - def is_shareable(self, is_shareable): + 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 + 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 @@ -73,10 +69,10 @@ class ShareableInformation(Model): self._is_shareable = is_shareable @property - def capif_prov_doms(self): + 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 + 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] @@ -84,10 +80,10 @@ class ShareableInformation(Model): return self._capif_prov_doms @capif_prov_doms.setter - def capif_prov_doms(self, capif_prov_doms): + 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 + 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] diff --git a/services/TS29222_CAPIF_Auditing_API/logs/models/protocol_any_of.py b/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py similarity index 55% rename from services/TS29222_CAPIF_Auditing_API/logs/models/protocol_any_of.py rename to services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py index c6de47fdece14e9ca95daad84067a1122b02aa4f..99f4aab2780db0706387659caa861045cb198cc1 100644 --- a/services/TS29222_CAPIF_Auditing_API/logs/models/protocol_any_of.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/subscription_action.py @@ -1,27 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from logs.models.base_model_ import Model -from logs import util +from capif_events import util +from capif_events.models.base_model import Model -class ProtocolAnyOf(Model): +class SubscriptionAction(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - """ - allowed enum values - """ - _1_1 = "HTTP_1_1" - _2 = "HTTP_2" def __init__(self): # noqa: E501 - """ProtocolAnyOf - a model defined in OpenAPI + """SubscriptionAction - a model defined in OpenAPI """ self.openapi_types = { @@ -31,12 +22,12 @@ class ProtocolAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'ProtocolAnyOf': + def from_dict(cls, dikt) -> 'SubscriptionAction': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The Protocol_anyOf of this ProtocolAnyOf. # noqa: E501 - :rtype: ProtocolAnyOf + :return: The SubscriptionAction of this SubscriptionAction. # noqa: E501 + :rtype: SubscriptionAction """ return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..e78e057a3ca56201e0cdb0ae9ac5a4265dc8270d --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/supported_gad_shapes.py @@ -0,0 +1,33 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +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_Events_API/capif_events/models/time_range_list.py b/services/TS29222_CAPIF_Events_API/capif_events/models/time_range_list.py index 71c9987291be72767977bc59c1cad42b193b6548..ad689a1382d2d0b9f89fa89eec8343f9976385d3 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from capif_events.models.base_model import Model class TimeRangeList(Model): @@ -48,7 +44,7 @@ class TimeRangeList(Model): return util.deserialize_model(dikt, cls) @property - def start_time(self): + def start_time(self) -> datetime: """Gets the start_time of this TimeRangeList. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -59,7 +55,7 @@ class TimeRangeList(Model): return self._start_time @start_time.setter - def start_time(self, start_time): + def start_time(self, start_time: datetime): """Sets the start_time of this TimeRangeList. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -71,7 +67,7 @@ class TimeRangeList(Model): self._start_time = start_time @property - def stop_time(self): + def stop_time(self) -> datetime: """Gets the stop_time of this TimeRangeList. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -82,7 +78,7 @@ class TimeRangeList(Model): return self._stop_time @stop_time.setter - def stop_time(self, stop_time): + def stop_time(self, stop_time: datetime): """Sets the stop_time of this TimeRangeList. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 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 5d22b9ce2f67a0a468bfe65845529f816523a77e..7f56cc9f9d114209df1dc5f7553362ad8a89d76f 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,16 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.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). @@ -50,7 +45,7 @@ class TopologyHiding(Model): return util.deserialize_model(dikt, cls) @property - def api_id(self): + def api_id(self) -> str: """Gets the api_id of this TopologyHiding. @@ -60,7 +55,7 @@ class TopologyHiding(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + def api_id(self, api_id: str): """Sets the api_id of this TopologyHiding. @@ -73,7 +68,7 @@ class TopologyHiding(Model): self._api_id = api_id @property - def routing_rules(self): + def routing_rules(self) -> List[RoutingRule]: """Gets the routing_rules of this TopologyHiding. @@ -83,7 +78,7 @@ class TopologyHiding(Model): return self._routing_rules @routing_rules.setter - def routing_rules(self, routing_rules): + def routing_rules(self, routing_rules: List[RoutingRule]): """Sets the routing_rules of this TopologyHiding. 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 new file mode 100644 index 0000000000000000000000000000000000000000..c10203df5d243e4d1113d46889a179cec6a2cbf5 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipse.py @@ -0,0 +1,132 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +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_Events_API/capif_events/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py new file mode 100644 index 0000000000000000000000000000000000000000..e1a4a1f24c6a5f648737d9c402914cd3af050049 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/uncertainty_ellipsoid.py @@ -0,0 +1,164 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_events import util +from capif_events.models.base_model import Model + + +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_Events_API/capif_events/models/version.py b/services/TS29222_CAPIF_Events_API/capif_events/models/version.py index 3b78d8f2b21eb6c450444c66c21f7e429abbad92..5777e684360941e7db1f5413d3abd0594c458009 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/models/version.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/models/version.py @@ -1,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.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). @@ -62,7 +56,7 @@ class Version(Model): return util.deserialize_model(dikt, cls) @property - def api_version(self): + def api_version(self) -> str: """Gets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -73,7 +67,7 @@ class Version(Model): return self._api_version @api_version.setter - def api_version(self, api_version): + def api_version(self, api_version: str): """Sets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -87,7 +81,7 @@ class Version(Model): self._api_version = api_version @property - def expiry(self): + def expiry(self) -> datetime: """Gets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -98,7 +92,7 @@ class Version(Model): return self._expiry @expiry.setter - def expiry(self, expiry): + def expiry(self, expiry: datetime): """Sets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -110,7 +104,7 @@ class Version(Model): self._expiry = expiry @property - def resources(self): + def resources(self) -> List[Resource]: """Gets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -121,7 +115,7 @@ class Version(Model): return self._resources @resources.setter - def resources(self, resources): + def resources(self, resources: List[Resource]): """Sets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -135,7 +129,7 @@ class Version(Model): self._resources = resources @property - def cust_operations(self): + def cust_operations(self) -> List[CustomOperation]: """Gets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 @@ -146,7 +140,7 @@ class Version(Model): return self._cust_operations @cust_operations.setter - def cust_operations(self, cust_operations): + def cust_operations(self, cust_operations: List[CustomOperation]): """Sets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 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 9a7c40bf246d840b7714b335f9db2d0d306dece8..f1ceeb001a04c47189d64f7f3cd379e533f1769f 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 +from capif_events.models.base_model import Model class WebsockNotifConfig(Model): @@ -48,7 +44,7 @@ class WebsockNotifConfig(Model): return util.deserialize_model(dikt, cls) @property - def websocket_uri(self): + 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 @@ -59,7 +55,7 @@ class WebsockNotifConfig(Model): return self._websocket_uri @websocket_uri.setter - def websocket_uri(self, websocket_uri): + 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 @@ -71,7 +67,7 @@ class WebsockNotifConfig(Model): self._websocket_uri = websocket_uri @property - def request_websocket_uri(self): + 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 @@ -82,7 +78,7 @@ class WebsockNotifConfig(Model): return self._request_websocket_uri @request_websocket_uri.setter - def request_websocket_uri(self, request_websocket_uri): + 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 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 d89f8dd381d9da7fbbec77fc3c57bfe53e7dff93..892a7a2b13e51a0105dd6e7edb43a2a22a0481af 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/openapi/openapi.yaml +++ b/services/TS29222_CAPIF_Events_API/capif_events/openapi/openapi.yaml @@ -1,20 +1,18 @@ openapi: 3.0.0 info: - description: | - API for event subscription management. - © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). - All rights reserved. + description: "API for event subscription management. \n© 2023, 3GPP Organizational\ + \ Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Events_API - version: 1.2.0-alpha.1 + version: 1.3.0-alpha.4 externalDocs: - description: 3GPP TS 29.222 V17.1.0 Common API Framework for 3GPP Northbound APIs - url: http://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ + description: 3GPP TS 29.222 V18.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' +- url: "{apiRoot}/capif-events/v1" variables: apiRoot: default: https://example.com - description: apiRoot as defined in subclause 7.5 of 3GPP TS 29.222 + description: apiRoot as defined in clause 7.5 of 3GPP TS 29.222 paths: /{subscriberId}/subscriptions: post: @@ -83,7 +81,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -137,8 +135,8 @@ paths: 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}' + description: | + Contains the URI of the newly created resource, according to the structure {apiRoot}/capif-events/v1/{subscriberId}/subscriptions/{subscriptionId} explode: false required: true schema: @@ -179,7 +177,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -230,8 +228,8 @@ paths: style: simple responses: "204": - description: The individual CAPIF Events Subscription matching the subscriptionId - is deleted. + description: | + The individual CAPIF Events Subscription matching the subscriptionId is deleted. "307": description: Temporary Redirect headers: @@ -293,7 +291,282 @@ paths: default: description: Generic Error x-openapi-router-controller: capif_events.controllers.default_controller + patch: + description: Modification of an existing individual CAPIF Event Subscription. + operationId: subscriber_id_subscriptions_subscription_id_patch + parameters: + - description: Identifier of the Subscriber + explode: false + in: path + name: subscriberId + required: true + schema: + type: string + style: simple + - description: Identifier of the individual Subscriber + explode: false + in: path + name: subscriptionId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EventSubscriptionPatch' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EventSubscription' + description: OK (Successful update of the subscription) + "204": + description: No Content + "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-openapi-router-controller: capif_events.controllers.default_controller + put: + description: Update of an existing individual CAPIF Event Subscription. + operationId: subscriber_id_subscriptions_subscription_id_put + parameters: + - description: Identifier of the Subscriber + explode: false + in: path + name: subscriberId + required: true + schema: + type: string + style: simple + - description: Identifier of the individual Subscriber + explode: false + in: path + name: subscriptionId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EventSubscription' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EventSubscription' + description: OK (Successful update of the subscription). + "204": + description: No Content + "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-openapi-router-controller: capif_events.controllers.default_controller components: + responses: + "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 + "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 schemas: EventSubscription: description: Represents an individual CAPIF Event Subscription resource. @@ -320,21 +593,29 @@ components: - apiIds supportedFeatures: supportedFeatures eventReq: + notifMethod: PERIODIC partitionCriteria: - - null - - null + - 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: - - null - - null + - SERVICE_API_AVAILABLE + - SERVICE_API_AVAILABLE requestTestNotification: true properties: events: @@ -358,27 +639,16 @@ components: 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 subclause 7.6. Set to false - or omitted otherwise. + 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]*$ + 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: @@ -406,7 +676,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -414,14 +686,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" - apiName: apiName @@ -431,7 +707,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -439,14 +717,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" - supportedFeatures: supportedFeatures @@ -460,7 +742,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -468,14 +752,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" - apiName: apiName @@ -485,7 +773,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -493,14 +783,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" apiTopoHide: @@ -512,15 +806,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -528,19 +848,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -549,6 +885,20 @@ components: - 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 @@ -556,37 +906,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 @@ -598,15 +1020,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -614,19 +1062,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -635,6 +1099,20 @@ components: - 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 @@ -642,42 +1120,133 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 - start: 198.51.100.1 end: 198.51.100.1 + accCtrlPolList: + apiInvokerPolicies: + - apiInvokerId: apiInvokerId + allowedTotalInvocations: 9 + 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 + - apiInvokerId: apiInvokerId + allowedTotalInvocations: 9 + 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 + apiId: apiId serviceAPIDescriptions: - serviceAPICategory: serviceAPICategory ccfId: ccfId @@ -687,20 +1256,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -708,19 +1308,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -729,6 +1345,20 @@ components: - 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 @@ -736,46 +1366,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -783,19 +1511,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -804,6 +1548,20 @@ components: - 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 @@ -811,37 +1569,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 @@ -854,20 +1684,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -875,19 +1736,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -896,6 +1773,20 @@ components: - 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 @@ -903,46 +1794,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -950,19 +1939,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -971,6 +1976,20 @@ components: - 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 @@ -978,37 +1997,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 @@ -1016,10 +2107,12 @@ components: apiIds: - apiIds - apiIds + events: SERVICE_API_AVAILABLE properties: subscriptionId: - description: Identifier of the subscription resource to which the notification - is related – CAPIF resource identifier + description: | + Identifier of the subscription resource to which the notification is related – CAPIF resource identifier + title: subscriptionId type: string events: $ref: '#/components/schemas/CAPIFEvent' @@ -1028,6 +2121,7 @@ components: required: - events - subscriptionId + title: EventNotification type: object CAPIFEventFilter: description: Represents a CAPIF event filter. @@ -1083,7 +2177,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -1091,14 +2187,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" - apiName: apiName @@ -1108,7 +2208,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -1116,14 +2218,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" - supportedFeatures: supportedFeatures @@ -1137,7 +2243,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -1145,14 +2253,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" - apiName: apiName @@ -1162,7 +2274,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -1170,14 +2284,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" apiTopoHide: @@ -1189,15 +2307,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -1205,19 +2349,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1226,6 +2386,20 @@ components: - 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 @@ -1233,37 +2407,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 @@ -1275,15 +2521,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -1291,19 +2563,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1312,6 +2600,20 @@ components: - 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 @@ -1319,42 +2621,133 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 - start: 198.51.100.1 end: 198.51.100.1 + accCtrlPolList: + apiInvokerPolicies: + - apiInvokerId: apiInvokerId + allowedTotalInvocations: 9 + 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 + - apiInvokerId: apiInvokerId + allowedTotalInvocations: 9 + 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 + apiId: apiId serviceAPIDescriptions: - serviceAPICategory: serviceAPICategory ccfId: ccfId @@ -1364,20 +2757,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -1385,19 +2809,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1406,6 +2846,20 @@ components: - 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 @@ -1413,46 +2867,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -1460,19 +3012,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1481,6 +3049,20 @@ components: - 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 @@ -1488,37 +3070,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 @@ -1531,20 +3185,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -1552,19 +3237,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1573,6 +3274,20 @@ components: - 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 @@ -1580,46 +3295,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -1627,19 +3440,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1648,6 +3477,20 @@ components: - 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 @@ -1655,37 +3498,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 @@ -1731,14 +3646,32 @@ components: AccessControlPolicyListExt: allOf: - $ref: '#/components/schemas/AccessControlPolicyList' - - $ref: '#/components/schemas/AccessControlPolicyListExt_allOf' + - properties: + apiId: + type: string + type: object description: Represents the extension for access control policies. + example: + apiInvokerPolicies: + - apiInvokerId: apiInvokerId + allowedTotalInvocations: 9 + 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 + - apiInvokerId: apiInvokerId + allowedTotalInvocations: 9 + 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 + apiId: apiId required: - apiId - properties: - apiId: - title: apiId - type: string title: AccessControlPolicyListExt TopologyHiding: description: Represents the routing rules information of a service API. @@ -1751,15 +3684,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -1767,19 +3726,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1788,6 +3763,20 @@ components: - 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 @@ -1795,37 +3784,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 @@ -1837,15 +3898,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -1853,19 +3940,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1874,6 +3977,20 @@ components: - 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 @@ -1881,37 +3998,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 @@ -1932,14 +4121,72 @@ components: - routingRules title: TopologyHiding type: object + EventSubscriptionPatch: + description: | + Represents the parameters to request the updated of an individual CAPIF Event Subscription resource. + 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 + title: EventSubscriptionPatch + type: object CAPIFEvent: anyOf: - - $ref: '#/components/schemas/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. + 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\ + \ are\n published.\n- SERVICE_API_UNAVAILABLE:\n Events related to the unavailability\ + \ of service APIs after the service APIs are\n unpublished.\n- SERVICE_API_UPDATE:\ + \ Events related to change in service API information.\n- API_INVOKER_ONBOARDED:\ + \ Events related to API invoker onboarded to CAPIF.\n- API_INVOKER_OFFBOARDED:\ + \ Events related to API invoker offboarded from CAPIF.\n- SERVICE_API_INVOCATION_SUCCESS:\n\ + \ Events related to the successful invocation of service APIs.\n- SERVICE_API_INVOCATION_FAILURE:\ + \ Events related to the failed invocation of service APIs.\n- ACCESS_CONTROL_POLICY_UPDATE:\n\ + \ Events related to the update for the access control policy related to the\ + \ service APIs.\n- ACCESS_CONTROL_POLICY_UNAVAILABLE:\n Events related to\ + \ the unavailability of the access control policy related to\n the service\ + \ APIs.\n- API_INVOKER_AUTHORIZATION_REVOKED: Events related to the revocation\ + \ of the authorization\n of API invokers to access the service APIs.\n- API_INVOKER_UPDATED:\ + \ Events related to API invoker profile updated to CAPIF.\n- API_TOPOLOGY_HIDING_CREATED:\n\ + \ Events related to the creation or update of the API topology hiding\n \ + \ 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" title: CAPIFEvent ProblemDetails: description: Represents additional information and details on an error response. @@ -1949,8 +4196,8 @@ components: title: Uri type: string title: - description: A short, human-readable summary of the problem type. It should - not change from occurrence to occurrence of the problem. + 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: @@ -1967,33 +4214,22 @@ components: title: Uri 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. + 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. + 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]*$ + 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 @@ -2003,15 +4239,16 @@ components: title: Uri type: string InvalidParam: - description: Represents the description of invalid parameters, for a request - rejected due to invalid parameters. + 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. + 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". + description: "A human-readable reason, e.g. \"must be a positive integer\"\ + ." title: reason type: string required: @@ -2021,15 +4258,23 @@ components: ReportingInformation: description: Represents the type of reporting that the subscription requires. example: + notifMethod: PERIODIC partitionCriteria: - - null - - null + - 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 properties: immRep: title: immRep @@ -2037,13 +4282,13 @@ components: notifMethod: $ref: '#/components/schemas/NotificationMethod' maxReportNbr: - description: Unsigned Integer, i.e. only value 0 and integers above 0 are - permissible. + 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. + description: string with format 'date-time' as defined in OpenAPI. format: date-time title: DateTime type: string @@ -2052,8 +4297,8 @@ components: title: DurationSec type: integer sampRatio: - description: Unsigned integer indicating Sampling Ratio (see clauses 4.15.1 - of 3GPP TS 23.502), expressed in percent. + 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 @@ -2072,11 +4317,15 @@ components: type: integer notifFlag: $ref: '#/components/schemas/NotificationFlag' + notifFlagInstruct: + $ref: '#/components/schemas/MutingExceptionInstructions' + mutingSetting: + $ref: '#/components/schemas/MutingNotificationsSettings' title: ReportingInformation type: object WebsockNotifConfig: - description: Represents the configuration information for the delivery of notifications - over Websockets. + description: | + Represents the configuration information for the delivery of notifications over Websockets. example: requestWebsocketUri: true websocketUri: websocketUri @@ -2099,19 +4348,9 @@ components: 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]*$ + 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: @@ -2126,20 +4365,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -2147,19 +4417,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -2168,6 +4454,20 @@ components: - 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 @@ -2175,46 +4475,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -2222,19 +4620,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -2243,6 +4657,20 @@ components: - 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 @@ -2250,59 +4678,129 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 properties: apiName: - description: API name, it is set as {apiName} part of the URI structure - as defined in subclause 4.4 of 3GPP TS 29.501. + 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). + 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 + apiStatus: + $ref: '#/components/schemas/ApiStatus' aefProfiles: - description: AEF profile information, which includes the exposed API details - (e.g. protocol). + description: | + AEF profile information, which includes the exposed API details (e.g. protocol). items: $ref: '#/components/schemas/AefProfile' minItems: 1 @@ -2313,40 +4811,21 @@ components: 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]*$ + 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: + description: The service API category to which the service API belongs to. 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]*$ + 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: @@ -2355,22 +4834,71 @@ components: description: CAPIF core function identifier. title: ccfId type: string + apiProvName: + description: Represents the API provider name. + title: apiProvName + type: string required: - apiName title: ServiceAPIDescription 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 this attribute is omitted, the API is inactive at all AEF(s) defined in the "aefProfiles" attribute within the ServiceAPIDescription data structure. + items: + type: string + title: aefIds + type: array + required: + - aefIds + title: ApiStatus + type: object AefProfile: description: Represents the AEF profile data. example: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -2378,19 +4906,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -2399,6 +4943,20 @@ components: - 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 @@ -2406,42 +4964,117 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - oneOf: + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + nullable: true + oneOf: - required: - - domainName + - ipv4Addr - required: - - interfaceDescriptions + - ipv6Addr + - required: + - fqdn properties: aefId: description: Identifier of the API exposing function @@ -2476,6 +5109,12 @@ components: minItems: 1 title: interfaceDescriptions type: array + aefLocation: + $ref: '#/components/schemas/AefLocation' + serviceKpis: + $ref: '#/components/schemas/ServiceKpis' + ueIpRange: + $ref: '#/components/schemas/IpAddrRange' required: - aefId - versions @@ -2489,6 +5128,20 @@ components: - 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 @@ -2496,19 +5149,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -2520,7 +5189,7 @@ components: expiry: description: string with format "date-time" as defined in OpenAPI. format: date-time - title: DateTime + title: DateTime_1 type: string resources: description: Resources supported by the API. @@ -2546,6 +5215,20 @@ components: 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 @@ -2558,19 +5241,26 @@ components: commType: $ref: '#/components/schemas/CommunicationType' uri: - description: Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} - part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. + 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 subclause 4.4 of 3GPP - TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -2588,42 +5278,38 @@ components: type: object CommunicationType: anyOf: - - $ref: '#/components/schemas/CommunicationType_anyOf' - - 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. + - enum: + - REQUEST_RESPONSE + - SUBSCRIBE_NOTIFY 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: - - $ref: '#/components/schemas/Operation_anyOf' - 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 + 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 CustomOperation: description: Represents the description of a custom operation. example: operations: - - null - - null + - 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 subclause 4.4 of - 3GPP TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -2638,32 +5324,68 @@ components: - 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 Protocol: anyOf: - - $ref: '#/components/schemas/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: | - Possible values are - HTTP_1_1: HTTP version 1.1 - HTTP_2: HTTP version 2 + 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: - - $ref: '#/components/schemas/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: | - Possible values are - JSON: JavaScript Object Notation + 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 SecurityMethod: anyOf: - - $ref: '#/components/schemas/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 + description: "Indicates the security method. \nPossible values are:\n- PSK:\ + \ Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122.\n- PKI:\ + \ 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 InterfaceDescription: description: Represents the description of an API's interface. @@ -2672,34 +5394,49 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + nullable: true oneOf: - required: - - ipv4Addr + - domainName - required: - - ipv6Addr + - interfaceDescriptions properties: ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted - decimal" notation as defined in IETF RFC 1166. + 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. + 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 + fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer + apiPrefix: + description: | + A string representing a sequence of path segments that starts with the slash character. + title: apiPrefix + type: string securityMethods: - description: Security methods supported by the interface, it take precedence - over the security methods provided in AefProfile, for this specific interface. + 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 @@ -2707,9 +5444,160 @@ components: type: array title: InterfaceDescription type: object + 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: 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 + 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_1 + 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 + IpAddrRange: + anyOf: [] + description: Represents the list of public IP ranges + example: + 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 + nullable: true + properties: + ueIpv4AddrRanges: + description: Represents the IPv4 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv4AddressRange' + minItems: 1 + title: ueIpv4AddrRanges + type: array + ueIpv6AddrRanges: + description: Represents the Ipv6 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv6AddressRange_1' + minItems: 1 + title: ueIpv6AddrRanges + type: array + title: IpAddrRange + 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. + 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 @@ -2717,14 +5605,13 @@ components: 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". + 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. + description: | + List of CAPIF provider domains to which the service API information to be shared. items: type: string minItems: 1 @@ -2753,8 +5640,8 @@ components: title: PublishedApiPath type: object InvocationLog: - description: Represents a set of Service API invocation logs to be stored in - a CAPIF core function. + description: | + Represents a set of Service API invocation logs to be stored in a CAPIF core function. example: supportedFeatures: supportedFeatures apiInvokerId: apiInvokerId @@ -2767,7 +5654,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -2775,14 +5664,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" - apiName: apiName @@ -2792,7 +5685,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -2800,20 +5695,24 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" properties: aefId: - description: Identity information of the API exposing function requesting - logging of service API invocations + description: | + Identity information of the API exposing function requesting logging of service API invocations title: aefId type: string apiInvokerId: @@ -2828,19 +5727,9 @@ components: title: logs 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]*$ + 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: @@ -2859,7 +5748,9 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -2867,14 +5758,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: null apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: null apiId: apiId outputParameters: "" properties: @@ -2883,8 +5778,8 @@ components: title: apiId type: string apiName: - description: Name of the API which was invoked, it is set as {apiName} part - of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. + 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. title: apiName type: string apiVersion: @@ -2904,35 +5799,34 @@ components: operation: $ref: '#/components/schemas/Operation' result: - description: For HTTP protocol, it contains HTTP status code of the invocation + description: "For HTTP protocol, it contains HTTP status code of the invocation" title: result type: string invocationTime: description: string with format "date-time" as defined in OpenAPI. format: date-time - title: DateTime + title: DateTime_1 type: string invocationLatency: - description: Unsigned integer identifying a period of time in units of milliseconds. + description: Represents a period of time in units of milliseconds. minimum: 0 title: DurationMs type: integer inputParameters: - description: List of input parameters. Can be any value - string, number, - boolean, array or object. + description: | + List of input parameters. Can be any value - string, number, boolean, array or object. title: inputParameters outputParameters: - description: List of output parameters. Can be any value - string, number, - boolean, array or object. + description: | + List of output parameters. Can be any value - string, number, boolean, array or object. title: outputParameters srcInterface: $ref: '#/components/schemas/InterfaceDescription' destInterface: $ref: '#/components/schemas/InterfaceDescription' fwdInterface: - description: 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 + description: | + 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 required: @@ -2945,7 +5839,7 @@ components: title: Log type: object DurationMs: - description: Unsigned integer identifying a period of time in units of milliseconds. + description: Represents a period of time in units of milliseconds. minimum: 0 title: DurationMs type: integer @@ -2964,6 +5858,15 @@ components: type: object ApiInvokerPolicy: description: Represents the policy of an API Invoker. + example: + apiInvokerId: apiInvokerId + allowedTotalInvocations: 9 + 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 properties: apiInvokerId: description: API invoker ID assigned by the CAPIF core function @@ -2980,8 +5883,8 @@ components: title: allowedInvocationsPerSecond type: integer allowedInvocationTimeRangeList: - description: The time ranges during which the invocations are allowed on - the service API by the API invoker. + description: | + The time ranges during which the invocations are allowed on the service API by the API invoker. items: $ref: '#/components/schemas/TimeRangeList' minItems: 0 @@ -2992,18 +5895,21 @@ components: title: ApiInvokerPolicy type: object TimeRangeList: - description: Represents the time range during which the invocation of a service - API is allowed by the API invoker. + description: | + Represents the time range during which the invocation of a service API is allowed by the API invoker. + example: + startTime: 2000-01-23T04:56:07.000+00:00 + stopTime: 2000-01-23T04:56:07.000+00:00 properties: startTime: description: string with format "date-time" as defined in OpenAPI. format: date-time - title: DateTime + title: DateTime_1 type: string stopTime: description: string with format "date-time" as defined in OpenAPI. format: date-time - title: DateTime + title: DateTime_1 type: string title: TimeRangeList type: object @@ -3016,15 +5922,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -3032,19 +5964,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -3053,6 +6001,20 @@ components: - 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 @@ -3060,37 +6022,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 @@ -3099,7 +6133,7 @@ components: properties: ipv4AddrRanges: items: - $ref: '#/components/schemas/Ipv4AddressRange' + $ref: '#/components/schemas/Ipv4AddressRange_1' minItems: 1 title: ipv4AddrRanges type: array @@ -3122,15 +6156,13 @@ components: end: end properties: start: - 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. + 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 end: - 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. + 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 required: @@ -3140,20 +6172,24 @@ components: type: object NotificationMethod: anyOf: - - $ref: '#/components/schemas/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. + This string provides forward-compatibility with future extensions to the enumeration and 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 + description: "Represents the notification methods that can be subscribed. \n\ + Possible values are:\n- PERIODIC\n- ONE_TIME\n- ON_EVENT_DETECTION\n" title: NotificationMethod Uinteger: - description: Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are permissible." minimum: 0 title: Uinteger type: integer DateTime: - description: string with format "date-time" as defined in OpenAPI. + description: string with format 'date-time' as defined in OpenAPI. format: date-time title: DateTime type: string @@ -3162,47 +6198,646 @@ components: title: DurationSec type: integer SamplingRatio: - description: Unsigned integer indicating Sampling Ratio (see clauses 4.15.1 - of 3GPP TS 23.502), expressed in percent. + 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: - - $ref: '#/components/schemas/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 + 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: - - $ref: '#/components/schemas/NotificationFlag_anyOf' - - 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. + - enum: + - ACTIVATE + - DEACTIVATE + - RETRIEVAL 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. + - 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:\n- ACTIVATE: The event notification is activated.\n\ + - DEACTIVATE: The event notification is deactivated and shall be muted. The\ + \ available\n event(s) shall be stored.\n- RETRIEVAL: The event notification\ + \ shall be sent to the NF service consumer(s),\n after that, is muted again.\ + \ \n" title: NotificationFlag + MutingExceptionInstructions: + description: | + Indicates to an Event producer NF instructions for the subscription and stored events when an exception (e.g. full buffer) occurs at the Event producer NF while the event is muted. + example: + bufferedNotifs: SEND_ALL + subscription: CLOSE + properties: + bufferedNotifs: + $ref: '#/components/schemas/BufferedNotificationsAction' + subscription: + $ref: '#/components/schemas/SubscriptionAction' + title: MutingExceptionInstructions + type: object + BufferedNotificationsAction: + anyOf: + - enum: + - SEND_ALL + - DISCARD_ALL + - DROP_OLD + type: string + - type: string + description: | + Indicates the required action by the event producer NF on the buffered Notifications. + title: BufferedNotificationsAction + SubscriptionAction: + anyOf: + - enum: + - CLOSE + - CONTINUE_WITH_MUTING + - CONTINUE_WITHOUT_MUTING + type: string + - type: string + description: | + Indicates the required action by the event producer NF on the event subscription if an exception occurs while the event is muted. + title: SubscriptionAction + MutingNotificationsSettings: + description: | + Indicates the Event producer NF settings to the Event consumer NF + example: + maxNoOfNotif: 5 + durationBufferedNotif: 2 + properties: + maxNoOfNotif: + title: maxNoOfNotif + type: integer + durationBufferedNotif: + description: indicating a time in seconds. + title: DurationSec + type: integer + title: MutingNotificationsSettings + type: object + DateTime_1: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime_1 + type: string Ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted decimal" - notation as defined in IETF RFC 1166. + 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. + 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 + Fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string Port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer + 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 + 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: 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 + 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' + title: LocalOrigin + type: object + 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' + 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 + DurationSec_1: + description: Unsigned integer identifying a period of time in units of seconds. + minimum: 0 + title: DurationSec_1 + type: integer Ipv4AddressRange: description: Range of IPv4 addresses example: @@ -3210,105 +6845,79 @@ components: end: 198.51.100.1 properties: start: - description: String identifying a IPv4 address formatted in the "dotted - decimal" notation as defined in RFC 1166. + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. example: 198.51.100.1 - pattern: ^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$ + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" title: Ipv4Addr_1 type: string end: - description: String identifying a IPv4 address formatted in the "dotted - decimal" notation as defined in RFC 1166. + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. example: 198.51.100.1 - pattern: ^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$ + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" title: Ipv4Addr_1 type: string + required: + - end + - start title: Ipv4AddressRange type: object Ipv4Addr_1: - description: String identifying a IPv4 address formatted in the "dotted decimal" - notation as defined in RFC 1166. + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. example: 198.51.100.1 - pattern: ^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$ + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" title: Ipv4Addr_1 type: string - AccessControlPolicyListExt_allOf: + Ipv6AddressRange_1: + description: Range of IPv6 addresses + example: + start: 2001:db8:85a3::8a2e:370:7334 + end: 2001:db8:85a3::8a2e:370:7334 + properties: + start: + $ref: '#/components/schemas/Ipv6Addr_1' + end: + $ref: '#/components/schemas/Ipv6Addr_1' + required: + - end + - start + title: Ipv6AddressRange_1 + type: object + Ipv6Addr_1: + allOf: + - pattern: "^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})):){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))$" + - pattern: "^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))$" + description: | + String identifying an IPv6 address formatted according to clause 4 of RFC5952. The mixed IPv4 IPv6 notation according to clause 5 of RFC5952 shall not be used. + example: 2001:db8:85a3::8a2e:370:7334 + title: Ipv6Addr_1 + type: string + Ipv4AddressRange_1: + description: Range of IPv4 addresses + example: + start: 198.51.100.1 + end: 198.51.100.1 properties: - apiId: - title: apiId + start: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 + type: string + end: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 type: string - title: AccessControlPolicyListExt_allOf + title: Ipv4AddressRange_1 type: object - 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 - title: CAPIFEvent_anyOf - type: string - CommunicationType_anyOf: - enum: - - REQUEST_RESPONSE - - SUBSCRIBE_NOTIFY - title: CommunicationType_anyOf - type: string - Operation_anyOf: - enum: - - GET - - POST - - PUT - - PATCH - - DELETE - title: Operation_anyOf - type: string - Protocol_anyOf: - enum: - - HTTP_1_1 - - HTTP_2 - title: Protocol_anyOf - type: string - DataFormat_anyOf: - enum: - - JSON - title: DataFormat_anyOf - type: string - SecurityMethod_anyOf: - enum: - - PSK - - PKI - - OAUTH - title: SecurityMethod_anyOf - type: string - NotificationMethod_anyOf: - enum: - - PERIODIC - - ONE_TIME - - ON_EVENT_DETECTION - title: NotificationMethod_anyOf - type: string - PartitioningCriteria_anyOf: - enum: - - TAC - - SUBPLMN - - GEOAREA - - SNSSAI - - DNN - title: PartitioningCriteria_anyOf - type: string - NotificationFlag_anyOf: - enum: - - ACTIVATE - - DEACTIVATE - - RETRIEVAL - title: NotificationFlag_anyOf - type: string + Float: + description: string with format 'float' as defined in OpenAPI. + format: float + title: Float + type: number diff --git a/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py b/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8da9951b2baa6ecbba37bb2ce6f00d944854faf8 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/test/__init__.py @@ -0,0 +1,15 @@ +import logging + +import connexion +from capif_events.encoder import JSONEncoder +from flask_testing import TestCase + + +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_Events_API/capif_events/test/test_default_controller.py b/services/TS29222_CAPIF_Events_API/capif_events/test/test_default_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..b724d9aef5f5a791e47b4e381d347ee72d743b58 --- /dev/null +++ b/services/TS29222_CAPIF_Events_API/capif_events/test/test_default_controller.py @@ -0,0 +1,84 @@ +import unittest + +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')) + + def test_subscriber_id_subscriptions_subscription_id_delete(self): + """Test case for subscriber_id_subscriptions_subscription_id_delete + + + """ + headers = { + 'Accept': 'application/problem+json', + } + response = self.client.open( + '/capif-events/v1/{subscriber_id}/subscriptions/{subscription_id}'.format(subscriber_id='subscriber_id_example', subscription_id='subscription_id_example'), + method='DELETE', + headers=headers) + 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 + + + """ + event_subscription_patch = openapi_server.EventSubscriptionPatch() + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/merge-patch+json', + } + response = self.client.open( + '/capif-events/v1/{subscriber_id}/subscriptions/{subscription_id}'.format(subscriber_id='subscriber_id_example', subscription_id='subscription_id_example'), + method='PATCH', + headers=headers, + data=json.dumps(event_subscription_patch), + content_type='application/merge-patch+json') + 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 + + + """ + 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/{subscription_id}'.format(subscriber_id='subscriber_id_example', subscription_id='subscription_id_example'), + method='PUT', + 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/typing_utils.py b/services/TS29222_CAPIF_Events_API/capif_events/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..d21c4f633653a0eae75d04b2f6eff684ff9d200d 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/typing_utils.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/typing_utils.py @@ -1,9 +1,6 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): - import typing def is_generic(klass): """ Determine whether klass is a generic class """ diff --git a/services/TS29222_CAPIF_Events_API/capif_events/util.py b/services/TS29222_CAPIF_Events_API/capif_events/util.py index 28a9e46b722f32c666f92850d09bf12d74b4d743..f09cd65c231f3f6b13fed43eb91a7531064382db 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/util.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/util.py @@ -1,7 +1,6 @@ import datetime -import six -import typing_utils +from capif_events import typing_utils def serialize_clean_camel_case(obj): @@ -17,31 +16,44 @@ def clean_empty(d): return { k: v for k, v in ((k, clean_empty(v)) for k, v in d.items()) - if v is not None or v == 0 + if v is not None or (isinstance(v, list) and len(v) == 0) } if isinstance(d, list): - return [v for v in map(clean_empty, d) if v is not None or v == 0] + return [v for v in map(clean_empty, d) if v is not None] return d def dict_to_camel_case(my_dict): + + result = {} + for attr, value in my_dict.items(): + if len(attr.split('_')) != 1: my_key = ''.join(word.title() for word in attr.split('_')) - my_key= ''.join([my_key[0].lower(), my_key[1:]]) + my_key = ''.join([my_key[0].lower(), my_key[1:]]) else: my_key = attr + + if my_key == "serviceApiCategory": + my_key = "serviceAPICategory" + elif my_key == "serviceApiDescriptions": + my_key = "serviceAPIDescriptions" + if isinstance(value, list): result[my_key] = list(map( lambda x: dict_to_camel_case(x) if isinstance(x, dict) else x, value )) + elif hasattr(value, "to_dict"): result[my_key] = dict_to_camel_case(value) + elif isinstance(value, dict): value = dict_to_camel_case(value) result[my_key] = value else: result[my_key] = value + return result @@ -56,7 +68,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -85,7 +97,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -150,7 +162,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -185,4 +197,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_Events_API/git_push.sh b/services/TS29222_CAPIF_Events_API/git_push.sh index 9405f72e950cdb8ca24c3cf4d15cee7eac62fde7..f53a75d4fabe760cce49eddfd62fcc702938ea90 100644 --- a/services/TS29222_CAPIF_Events_API/git_push.sh +++ b/services/TS29222_CAPIF_Events_API/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/services/TS29222_CAPIF_Events_API/prepare_events.sh b/services/TS29222_CAPIF_Events_API/prepare_events.sh index 62bd7ee283c58a5e48b3cbc27c80bded443f1e14..bf16c7f30a46cc93a9c04356bd799f3bc1a86ba1 100644 --- a/services/TS29222_CAPIF_Events_API/prepare_events.sh +++ b/services/TS29222_CAPIF_Events_API/prepare_events.sh @@ -1,4 +1,4 @@ #!/bin/bash -gunicorn --bind 0.0.0.0:8080 \ +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/capif_events wsgi:app diff --git a/services/TS29222_CAPIF_Events_API/requirements.txt b/services/TS29222_CAPIF_Events_API/requirements.txt index 22b0d352078a44b38cf8d82c4d4cbfcc083ae5c0..bfe2e17c53647b77962f50b9885fef525393c33f 100644 --- a/services/TS29222_CAPIF_Events_API/requirements.txt +++ b/services/TS29222_CAPIF_Events_API/requirements.txt @@ -1,28 +1,28 @@ -connexion[swagger-ui] == 2.14.2; python_version>="3.6" +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 +setuptools == 74.0.0 +Flask == 3.0.3 pymongo == 4.7.3 -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.17.0 +redis == 4.5.4 +flask_jwt_extended == 4.6.0 +cryptography == 42.0.8 +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 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.17.0 -opentelemetry-sdk == 1.17.0 +opentelemetry-api == 1.19.0 +opentelemetry-sdk == 1.19.0 flask_executor == 1.0.0 -flask_jwt_extended -cryptography == 42.0.8 -rfc3987 == 1.3.8 -redis == 4.5.4 -Flask-APScheduler == 1.12.4 -aiohttp == 3.9.5 +Flask-APScheduler == 1.13.1 +aiohttp == 3.10.5 async-timeout == 4.0.3 -Werkzeug == 2.2.3 -pyopenssl == 24.1.0 +werkzeug == 3.0.4 +pyopenssl == 24.2.1 gunicorn == 22.0.0 -packaging == 24.0 +packaging == 24.0 \ No newline at end of file diff --git a/services/TS29222_CAPIF_Events_API/setup.py b/services/TS29222_CAPIF_Events_API/setup.py index 6ac5631dac95d9c1e7c12c25cfad23e2545309e5..defed2ccdf4811792f1c8e90ff70d50eec1d89f6 100644 --- a/services/TS29222_CAPIF_Events_API/setup.py +++ b/services/TS29222_CAPIF_Events_API/setup.py @@ -1,6 +1,3 @@ -# coding: utf-8 - -import sys from setuptools import setup, find_packages NAME = "capif_events" @@ -33,7 +30,7 @@ setup( entry_points={ 'console_scripts': ['capif_events=capif_events.__main__:main']}, long_description="""\ - API for event subscription management. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for event subscription management. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) diff --git a/services/TS29222_CAPIF_Events_API/tox.ini b/services/TS29222_CAPIF_Events_API/tox.ini index 8ef20cd60fb4784affc6da7cb242fb29f10a3e3e..157b48f1afa0b9bc2bce24520d7e7ba8b261cbba 100644 --- a/services/TS29222_CAPIF_Events_API/tox.ini +++ b/services/TS29222_CAPIF_Events_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= pytest --cov=capif_events 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 42622dc2876ba25dcf5b2283ab3136c094690452..691fa78ca682780032ad7499166c9dbc98db38ed 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/FILES @@ -1,32 +1,31 @@ .dockerignore .gitignore +.openapi-generator-ignore .travis.yml Dockerfile README.md +git_push.sh api_invocation_logs/__init__.py api_invocation_logs/__main__.py api_invocation_logs/controllers/__init__.py api_invocation_logs/controllers/default_controller.py -api_invocation_logs/controllers/security_controller_.py +api_invocation_logs/controllers/security_controller.py api_invocation_logs/encoder.py api_invocation_logs/models/__init__.py -api_invocation_logs/models/base_model_.py +api_invocation_logs/models/base_model.py 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/operation.py -api_invocation_logs/models/operation_any_of.py api_invocation_logs/models/problem_details.py api_invocation_logs/models/protocol.py -api_invocation_logs/models/protocol_any_of.py api_invocation_logs/models/security_method.py -api_invocation_logs/models/security_method_any_of.py api_invocation_logs/openapi/openapi.yaml api_invocation_logs/test/__init__.py +api_invocation_logs/test/test_default_controller.py api_invocation_logs/typing_utils.py api_invocation_logs/util.py -git_push.sh requirements.txt setup.py test-requirements.txt diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/VERSION index 4b448de535c7dd619da0df6d8221995dbd5d118a..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/Dockerfile b/services/TS29222_CAPIF_Logging_API_Invocation_API/Dockerfile index f7cd99b2c94367d6bd968f4ea597854e478ac9ec..d68f8ce5c0030446f8e5c5a32f09ac0abc5f7cd3 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/Dockerfile +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/Dockerfile @@ -1,11 +1,19 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/requirements.txt -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir -r requirements.txt COPY . /usr/src/app diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/README.md b/services/TS29222_CAPIF_Logging_API_Invocation_API/README.md index 4c9ab923afeaccca940210e6dab592af62487c1e..9d330236d45009a4712233fbfd4e9e3aa202de6c 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/README.md +++ b/services/TS29222_CAPIF_Logging_API_Invocation_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 api_invocation_logs +python3 -m openapi_server ``` and open your browser to here: 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 bf76d0fcdfd8abff158fb8473a82ca04bb9a9455..eda5d2bcae556fc1c4515520812a8984813dc8ca 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 @@ -1,20 +1,21 @@ #!/usr/bin/env python3 -import connexion import logging -from logging.handlers import RotatingFileHandler -import encoder -from config import Config import os +from logging.handlers import RotatingFileHandler + +import connexion from fluent import sender -from opentelemetry.instrumentation.flask import FlaskInstrumentor from opentelemetry import trace from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter -from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator +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 +import encoder +from config import Config NAME = "Logging-Service" @@ -105,8 +106,8 @@ def verbose_formatter(): datefmt='%d/%m/%Y %H:%M:%S' ) -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = encoder.CustomJSONEncoder app.add_api('openapi.yaml', arguments={'title': 'CAPIF_Logging_API_Invocation_API'}, pythonic_params=True) diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/config.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/config.py index 97ab831fc7a69163163f7182f1f8c61bd9e3ffc4..2ac31772c592bd967935a873ae08d3ba2c0791fc 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/config.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): 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 7ce9972710b904bdd045e6ca7525f0e46785fa06..6877196b2e5eda95aad456588eff4d9279c047f6 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,20 +1,17 @@ -import connexion +from api_invocation_logs.models.invocation_log import InvocationLog # noqa: E501 -from ..models.invocation_log import InvocationLog # noqa: E501 +from api_invocation_logs.models.invocation_log import InvocationLog # noqa: E501 +from cryptography import x509 +from cryptography.hazmat.backends import default_backend +from flask import request, current_app from ..core.invocationlogs import LoggingInvocationOperations - -from flask import Response, request, current_app - from ..core.validate_user import ControlAccess -from cryptography import x509 -from cryptography.hazmat.backends import default_backend logging_invocation_operations = LoggingInvocationOperations() valid_user = ControlAccess() - def cert_validation(): def _cert_validation(f): @wraps(f) @@ -51,12 +48,12 @@ def aef_id_logs_post(aef_id, body): # noqa: E501 :param invocation_log: :type invocation_log: dict | bytes - :rtype: InvocationLog + :rtype: Union[InvocationLog, Tuple[InvocationLog, int], Tuple[InvocationLog, int, Dict[str, str]] """ current_app.logger.info("API Invocation Logs") - if connexion.request.is_json: - body = InvocationLog.from_dict(connexion.request.get_json()) # noqa: E501 + if request.is_json: + body = InvocationLog.from_dict(request.get_json()) # noqa: E501 res = logging_invocation_operations.add_invocationlog(aef_id, body) @@ -64,4 +61,3 @@ def aef_id_logs_post(aef_id, body): # noqa: E501 current_app.logger.info("Invocation Logs stored successfully") return res - 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 new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller.py @@ -0,0 +1,2 @@ + + 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 deleted file mode 100644 index 6d294ffd6df1a26a469dbb4e72533b01503468dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/controllers/security_controller_.py +++ /dev/null @@ -1,2 +0,0 @@ -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 bae9c5a4f26e04d589818041aba15aca27e491bf..43106643a5b2b328108e858b417ed68217ca18d6 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 @@ -1,18 +1,16 @@ +import json import os - import secrets -from flask import current_app, Flask, Response +from flask import current_app from pymongo import ReturnDocument -from ..util import serialize_clean_camel_case -from ..encoder import JSONEncoder -from .resources import Resource -from .responses import internal_server_error, not_found_error, unauthorized_error, make_response from .redis_event import RedisEvent -import json - +from .resources import Resource +from .responses import internal_server_error, not_found_error, unauthorized_error, make_response +from ..encoder import CustomJSONEncoder +from ..util import serialize_clean_camel_case class LoggingInvocationOperations(Resource): @@ -22,7 +20,8 @@ class LoggingInvocationOperations(Resource): prov_col = self.db.get_col_by_name(self.db.provider_details) current_app.logger.debug("Checking aef id") - aef_res = prov_col.find_one({'api_prov_funcs': {'$elemMatch': {'api_prov_func_role': 'AEF', 'api_prov_func_id': request_aef_id}}}) + aef_res = prov_col.find_one({'api_prov_funcs': {'$elemMatch': { + 'api_prov_func_role': 'AEF', 'api_prov_func_id': request_aef_id}}}) if aef_res is None: current_app.logger.error("Exposer not exist") @@ -31,7 +30,6 @@ class LoggingInvocationOperations(Resource): if request_aef_id != body_aef_id: return unauthorized_error(detail="AEF id not matching in request and body", cause="Not identical AEF id") - return None def __check_invoker(self, invoker_id): @@ -50,18 +48,20 @@ class LoggingInvocationOperations(Resource): serv_apis = self.db.get_col_by_name(self.db.service_apis) current_app.logger.debug("Checking service apis") - services_api_res = serv_apis.find_one({"$and": [{'api_id': api_id}, {'api_name': api_name}]}) + services_api_res = serv_apis.find_one( + {"$and": [{'api_id': api_id}, {'api_name': api_name}]}) if services_api_res is None: detail = "Service API not exist" - cause = "Service API with id {} and name {} not found".format(api_id, api_name) + cause = "Service API with id {} and name {} not found".format( + api_id, api_name) current_app.logger.error(detail) return not_found_error(detail=detail, cause=cause) return None def add_invocationlog(self, aef_id, invocationlog): - + mycol = self.db.get_col_by_name(self.db.invocation_logs) try: @@ -79,8 +79,9 @@ class LoggingInvocationOperations(Resource): return result current_app.logger.debug("Check service apis") - event=None - invocation_log_base=json.loads(json.dumps(invocationlog.to_dict(), cls=JSONEncoder)) + event = None + invocation_log_base = json.loads(json.dumps( + invocationlog.to_dict(), cls=CustomJSONEncoder)) for log in invocationlog.logs: result = self.__check_service_apis(log.api_id, log.api_name) @@ -88,23 +89,25 @@ class LoggingInvocationOperations(Resource): current_app.logger.debug("Inside for loop.") if result is not None: return result - + if log.result: current_app.logger.debug(log) if int(log.result) >= 200 and int(log.result) < 300: - event="SERVICE_API_INVOCATION_SUCCESS" + event = "SERVICE_API_INVOCATION_SUCCESS" else: - event="SERVICE_API_INVOCATION_FAILURE" + event = "SERVICE_API_INVOCATION_FAILURE" current_app.logger.info(event) - invocation_log_base['logs']=[log.to_dict()] - invocationLogs=[invocation_log_base] - RedisEvent(event,"invocation_logs",invocationLogs).send_event() + invocation_log_base['logs'] = [log.to_dict()] + invocationLogs = [invocation_log_base] + RedisEvent(event, invocation_logs= + invocationLogs).send_event() current_app.logger.debug("After log check") current_app.logger.debug("Check existing logs") - my_query = {'aef_id': aef_id, 'api_invoker_id': invocationlog.api_invoker_id} + my_query = {'aef_id': aef_id, + 'api_invoker_id': invocationlog.api_invoker_id} existing_invocationlog = mycol.find_one(my_query) if existing_invocationlog is None: @@ -119,21 +122,24 @@ class LoggingInvocationOperations(Resource): log_id = existing_invocationlog['log_id'] updated_invocation_logs = invocationlog.to_dict() for updated_invocation_log in updated_invocation_logs['logs']: - existing_invocationlog['logs'].append(updated_invocation_log) - mycol.find_one_and_update(my_query, {"$set": existing_invocationlog}, projection={'_id': 0, 'log_id': 0}, return_document=ReturnDocument.AFTER, upsert=False) + existing_invocationlog['logs'].append( + updated_invocation_log) + mycol.find_one_and_update(my_query, {"$set": existing_invocationlog}, projection={ + '_id': 0, 'log_id': 0}, return_document=ReturnDocument.AFTER, upsert=False) - res = make_response(object=serialize_clean_camel_case(invocationlog), status=201) + res = make_response(object=serialize_clean_camel_case( + invocationlog), status=201) current_app.logger.debug("Invocation Logs response ready") - apis_added = {log.api_id:log.api_name for log in invocationlog.logs} + apis_added = { + log.api_id: log.api_name for log in invocationlog.logs} current_app.logger.debug(f"Added log entry to apis: {apis_added}") + res.headers['Location'] = f"https://{os.getenv("CAPIF_HOSTNAME")}/api-invocation-logs/v1/{str(aef_id)}/logs/{str(log_id)}" - res.headers['Location'] = "https://{}/api-invocation-logs/v1/{}/logs/{}".format(os.getenv('CAPIF_HOSTNAME'), str(aef_id), str(log_id)) return res except Exception as e: exception = "An exception occurred in inserting invocation logs" current_app.logger.error(exception + "::" + str(e)) return internal_server_error(detail=exception, cause=str(e)) - diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/publisher.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/publisher.py index a15c0d90e8d00233317a6c1ab748b8ff150be80e..3a94b2c41a52c0eb7728eba6d1505991edd34397 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/publisher.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/publisher.py @@ -1,6 +1,5 @@ import redis -import sys -from flask import current_app + class Publisher(): diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/redis_event.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/redis_event.py index aadbdbb6b3116cf288648de41effdb12b9ca9143..c65a6a20313002902b4660493d05be5c4cd20a24 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/redis_event.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/redis_event.py @@ -1,12 +1,20 @@ -from ..encoder import JSONEncoder -from .publisher import Publisher import json +from .publisher import Publisher +from ..encoder import CustomJSONEncoder + publisher_ops = Publisher() class RedisEvent(): - def __init__(self, event, event_detail_key=None, information=None) -> None: + def __init__(self, + event, + service_api_descriptions=None, + api_ids=None, + api_invoker_ids=None, + acc_ctrl_pol_list=None, + invocation_logs=None, + api_topo_hide=None) -> None: self.EVENTS_ENUM = [ 'SERVICE_API_AVAILABLE', 'SERVICE_API_UNAVAILABLE', @@ -27,12 +35,26 @@ class RedisEvent(): self.redis_event = { "event": event } - if event_detail_key != None and information != None: - self.redis_event['key'] = event_detail_key - self.redis_event['information'] = information + # Add event filter keys to an auxiliary object + event_detail = { + "serviceAPIDescriptions": service_api_descriptions, + "apiIds": api_ids, + "apiInvokerIds": api_invoker_ids, + "accCtrlPolList": acc_ctrl_pol_list, + "invocationLogs": invocation_logs, + "apiTopoHide": api_topo_hide + } + + # Filter keys with not None values + filtered_event_detail = {k: v for k, + v in event_detail.items() if v is not None} + + # If there are valid values then add to redis event. + if filtered_event_detail: + self.redis_event["event_detail"] = filtered_event_detail def to_string(self): - return json.dumps(self.redis_event, cls=JSONEncoder) + return json.dumps(self.redis_event, cls=CustomJSONEncoder) def send_event(self): publisher_ops.publish_message("events", self.to_string()) diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/resources.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/resources.py index d5a3552d6b3459a77d30df65d0bbda4a86c7fa61..053c10786ef6135e5fa994c2d825c36419c95112 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/resources.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/resources.py @@ -1,4 +1,5 @@ from abc import ABC + from db.db import MongoDatabse 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 5c9803e85b6b639693ae33284b209ecbff38cc3a..1f0302f64b0ac1791aa594b5b16772343af286b9 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 @@ -1,14 +1,16 @@ -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder +import json + from flask import Response + +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case -import json mimetype = "application/json" def make_response(object, status): - res = Response(json.dumps(object, cls=JSONEncoder), status=status, mimetype=mimetype) + res = Response(json.dumps(object, cls=CustomJSONEncoder), status=status, mimetype=mimetype) return res @@ -17,32 +19,32 @@ def internal_server_error(detail, cause): prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=500, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=500, mimetype=mimetype) def forbidden_error(detail, cause): prob = ProblemDetails(title="Forbidden", status=403, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=403, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=403, mimetype=mimetype) 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=JSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) 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=JSONEncoder), status=404, mimetype=mimetype) + 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=JSONEncoder), status=401, mimetype=mimetype) \ No newline at end of file + 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/core/validate_user.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/validate_user.py index d9f7d5dc16def3abb9f92c5e6a0905657e0ccf54..c2bdf50f8cafd9a4119b9bbb4ccb7922afed8a81 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/validate_user.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/validate_user.py @@ -1,9 +1,11 @@ -from flask import current_app, Response import json -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder + +from flask import current_app, Response + from .resources import Resource from .responses import internal_server_error +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case @@ -21,7 +23,7 @@ class ControlAccess(Resource): if cert_entry["cert_signature"] != cert_signature: prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype="application/json") except Exception as e: exception = "An exception occurred in validate invoker" diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/db/db.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/db/db.py index 87cc3a65f5101267a9c81ca548812a533b6bca23..1999a2daf6fe02fafa11228a93bfdd50bf1de243 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/db/db.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/db/db.py @@ -1,10 +1,11 @@ +import os import time -from pymongo import MongoClient -from pymongo.errors import AutoReconnect + from config import Config -import os from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from pymongo import MongoClient +from pymongo.errors import AutoReconnect monitoring_value = os.environ.get("MONITORING", "").lower() if monitoring_value == "true": 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 80bad8fa9220ab873e044b7adc0a849746088ad5..28d876936c1dd8f8de5694d78ad88fbb9b7a3a77 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,20 +1,18 @@ -from connexion.apps.flask_app import FlaskJSONEncoder -import six +from api_invocation_logs.models.base_model import Model +from connexion.jsonifier import JSONEncoder -from models.base_model_ import Model - -class JSONEncoder(FlaskJSONEncoder): +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + return JSONEncoder.default(self, o) 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 6660505319cd082392acacb0fed61c72d34b47b9..d036df693ea41dfaa3debffffad0462c1fcd8e4a 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,16 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # 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.operation import Operation -from api_invocation_logs.models.operation_any_of import OperationAnyOf -from api_invocation_logs.models.problem_details import ProblemDetails -from api_invocation_logs.models.protocol import Protocol -from api_invocation_logs.models.protocol_any_of import ProtocolAnyOf -from api_invocation_logs.models.security_method import SecurityMethod -from api_invocation_logs.models.security_method_any_of import SecurityMethodAnyOf 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 similarity index 92% rename from services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model_.py rename to services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/base_model.py index 31d975116c556b940f7308a81ca3c1804e3f599f..d7f252ca640c86806a4848e35a4ac993966a6c03 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,6 +1,4 @@ import pprint - -import six import typing from api_invocation_logs import util @@ -8,14 +6,14 @@ from api_invocation_logs import util T = typing.TypeVar('T') -class Model(object): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. - openapi_types = {} + openapi_types: typing.Dict[str, type] = {} # attributeMap: The key is attribute name and the # value is json key in definition. - attribute_map = {} + attribute_map: typing.Dict[str, str] = {} @classmethod def from_dict(cls: typing.Type[T], dikt) -> T: @@ -29,7 +27,7 @@ class Model(object): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 b484946ec91f701c809493524a51ffb87006b0b8..cffe68d5dc05695e01201b37e088cb6e19d02936 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,51 +1,57 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.security_method import SecurityMethod from api_invocation_logs import util - +from api_invocation_logs.models.base_model import Model from api_invocation_logs.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 + def __init__(self, ipv4_addr=None, ipv6_addr=None, fqdn=None, port=None, api_prefix=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 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] """ self.openapi_types = { 'ipv4_addr': str, 'ipv6_addr': str, + 'fqdn': str, 'port': int, + 'api_prefix': str, 'security_methods': List[SecurityMethod] } self.attribute_map = { 'ipv4_addr': 'ipv4Addr', 'ipv6_addr': 'ipv6Addr', + 'fqdn': 'fqdn', 'port': 'port', + 'api_prefix': 'apiPrefix', 'security_methods': 'securityMethods' } 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 @classmethod @@ -60,10 +66,10 @@ class InterfaceDescription(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr(self): + 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 + 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 @@ -71,10 +77,10 @@ class InterfaceDescription(Model): return self._ipv4_addr @ipv4_addr.setter - def ipv4_addr(self, ipv4_addr): + 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 + 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 @@ -83,10 +89,10 @@ class InterfaceDescription(Model): self._ipv4_addr = ipv4_addr @property - def ipv6_addr(self): + 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 + 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 @@ -94,10 +100,10 @@ class InterfaceDescription(Model): return self._ipv6_addr @ipv6_addr.setter - def ipv6_addr(self, ipv6_addr): + 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 + 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 @@ -106,7 +112,36 @@ class InterfaceDescription(Model): self._ipv6_addr = ipv6_addr @property - def port(self): + def fqdn(self) -> str: + """Gets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :return: The fqdn of this InterfaceDescription. + :rtype: str + """ + return self._fqdn + + @fqdn.setter + def fqdn(self, fqdn: str): + """Sets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :param fqdn: The fqdn of this InterfaceDescription. + :type fqdn: str + """ + if fqdn is not None and len(fqdn) > 253: + raise ValueError("Invalid value for `fqdn`, length must be less than or equal to `253`") # noqa: E501 + if fqdn is not None and len(fqdn) < 4: + raise ValueError("Invalid value for `fqdn`, length must be greater than or equal to `4`") # noqa: E501 + if fqdn is not None and not re.search(r'^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$', fqdn): # noqa: E501 + raise ValueError("Invalid value for `fqdn`, must be a follow pattern or equal to `/^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$/`") # noqa: E501 + + self._fqdn = fqdn + + @property + def port(self) -> int: """Gets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -117,7 +152,7 @@ class InterfaceDescription(Model): return self._port @port.setter - def port(self, port): + def port(self, port: int): """Sets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -133,10 +168,33 @@ class InterfaceDescription(Model): self._port = port @property - def security_methods(self): + def api_prefix(self) -> str: + """Gets the api_prefix of this InterfaceDescription. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. - Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + 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] @@ -144,10 +202,10 @@ class InterfaceDescription(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + 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 + 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] 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 58f04d69ed3c64f3e218cc591c4afdb73edefcd3..cabf7c8aa0f77b157ff71e631a462be837e3b519 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from api_invocation_logs.models.base_model import Model class InvalidParam(Model): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 79a228cded1140db0c90229563babc16f8af0939..2ecb4d636c4afed8406f8950a0337a44253ec779 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.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). @@ -62,10 +56,10 @@ class InvocationLog(Model): return util.deserialize_model(dikt, cls) @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this InvocationLog. - Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 + Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 :return: The aef_id of this InvocationLog. :rtype: str @@ -73,10 +67,10 @@ class InvocationLog(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this InvocationLog. - Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 + Identity information of the API exposing function requesting logging of service API invocations # noqa: E501 :param aef_id: The aef_id of this InvocationLog. :type aef_id: str @@ -87,7 +81,7 @@ class InvocationLog(Model): self._aef_id = aef_id @property - def api_invoker_id(self): + def api_invoker_id(self) -> str: """Gets the api_invoker_id of this InvocationLog. Identity of the API invoker which invoked the service API # noqa: E501 @@ -98,7 +92,7 @@ class InvocationLog(Model): return self._api_invoker_id @api_invoker_id.setter - def api_invoker_id(self, api_invoker_id): + def api_invoker_id(self, api_invoker_id: str): """Sets the api_invoker_id of this InvocationLog. Identity of the API invoker which invoked the service API # noqa: E501 @@ -112,7 +106,7 @@ class InvocationLog(Model): self._api_invoker_id = api_invoker_id @property - def logs(self): + def logs(self) -> List[Log]: """Gets the logs of this InvocationLog. Service API invocation log # noqa: E501 @@ -123,7 +117,7 @@ class InvocationLog(Model): return self._logs @logs.setter - def logs(self, logs): + def logs(self, logs: List[Log]): """Sets the logs of this InvocationLog. Service API invocation log # noqa: E501 @@ -139,10 +133,10 @@ class InvocationLog(Model): self._logs = logs @property - def supported_features(self): + def supported_features(self) -> str: """Gets the supported_features of this InvocationLog. - 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 + 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 InvocationLog. :rtype: str @@ -150,10 +144,10 @@ class InvocationLog(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + def supported_features(self, supported_features: str): """Sets the supported_features of this InvocationLog. - 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 + 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 InvocationLog. :type supported_features: str 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 8f4570663c24619cdb9e754de6f8fc05d743a3f6..657d6a724c0fa288c0c2be3b36d3d5dac8b08858 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,13 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.interface_description import InterfaceDescription -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.base_model import Model from api_invocation_logs.models.interface_description import InterfaceDescription # 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). @@ -119,7 +112,7 @@ class Log(Model): return util.deserialize_model(dikt, cls) @property - def api_id(self): + def api_id(self) -> str: """Gets the api_id of this Log. String identifying the API invoked. # noqa: E501 @@ -130,7 +123,7 @@ class Log(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + def api_id(self, api_id: str): """Sets the api_id of this Log. String identifying the API invoked. # noqa: E501 @@ -144,10 +137,10 @@ class Log(Model): self._api_id = api_id @property - def api_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 :return: The api_name of this Log. :rtype: str @@ -155,10 +148,10 @@ class Log(Model): return self._api_name @api_name.setter - def api_name(self, api_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 :param api_name: The api_name of this Log. :type api_name: str @@ -169,7 +162,7 @@ class Log(Model): self._api_name = api_name @property - def api_version(self): + def api_version(self) -> str: """Gets the api_version of this Log. Version of the API which was invoked # noqa: E501 @@ -180,7 +173,7 @@ class Log(Model): return self._api_version @api_version.setter - def api_version(self, api_version): + def api_version(self, api_version: str): """Sets the api_version of this Log. Version of the API which was invoked # noqa: E501 @@ -194,7 +187,7 @@ class Log(Model): self._api_version = api_version @property - def resource_name(self): + def resource_name(self) -> str: """Gets the resource_name of this Log. Name of the specific resource invoked # noqa: E501 @@ -205,7 +198,7 @@ class Log(Model): return self._resource_name @resource_name.setter - def resource_name(self, resource_name): + def resource_name(self, resource_name: str): """Sets the resource_name of this Log. Name of the specific resource invoked # noqa: E501 @@ -219,7 +212,7 @@ class Log(Model): self._resource_name = resource_name @property - def uri(self): + def uri(self) -> str: """Gets the uri of this Log. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -230,7 +223,7 @@ class Log(Model): return self._uri @uri.setter - def uri(self, uri): + def uri(self, uri: str): """Sets the uri of this Log. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -242,7 +235,7 @@ class Log(Model): self._uri = uri @property - def protocol(self): + def protocol(self) -> Protocol: """Gets the protocol of this Log. @@ -252,7 +245,7 @@ class Log(Model): return self._protocol @protocol.setter - def protocol(self, protocol): + def protocol(self, protocol: Protocol): """Sets the protocol of this Log. @@ -265,7 +258,7 @@ class Log(Model): self._protocol = protocol @property - def operation(self): + def operation(self) -> Operation: """Gets the operation of this Log. @@ -275,7 +268,7 @@ class Log(Model): return self._operation @operation.setter - def operation(self, operation): + def operation(self, operation: Operation): """Sets the operation of this Log. @@ -286,7 +279,7 @@ class Log(Model): self._operation = operation @property - def result(self): + def result(self) -> str: """Gets the result of this Log. For HTTP protocol, it contains HTTP status code of the invocation # noqa: E501 @@ -297,7 +290,7 @@ class Log(Model): return self._result @result.setter - def result(self, result): + def result(self, result: str): """Sets the result of this Log. For HTTP protocol, it contains HTTP status code of the invocation # noqa: E501 @@ -311,7 +304,7 @@ class Log(Model): self._result = result @property - def invocation_time(self): + def invocation_time(self) -> datetime: """Gets the invocation_time of this Log. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -322,7 +315,7 @@ class Log(Model): return self._invocation_time @invocation_time.setter - def invocation_time(self, invocation_time): + def invocation_time(self, invocation_time: datetime): """Sets the invocation_time of this Log. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -334,10 +327,10 @@ class Log(Model): self._invocation_time = invocation_time @property - def invocation_latency(self): + def invocation_latency(self) -> int: """Gets the invocation_latency of this Log. - Unsigned integer identifying a period of time in units of milliseconds. # noqa: E501 + Represents a period of time in units of milliseconds. # noqa: E501 :return: The invocation_latency of this Log. :rtype: int @@ -345,10 +338,10 @@ class Log(Model): return self._invocation_latency @invocation_latency.setter - def invocation_latency(self, invocation_latency): + def invocation_latency(self, invocation_latency: int): """Sets the invocation_latency of this Log. - Unsigned integer identifying a period of time in units of milliseconds. # noqa: E501 + Represents a period of time in units of milliseconds. # noqa: E501 :param invocation_latency: The invocation_latency of this Log. :type invocation_latency: int @@ -359,10 +352,10 @@ class Log(Model): self._invocation_latency = invocation_latency @property - def input_parameters(self): + def input_parameters(self) -> object: """Gets the input_parameters of this Log. - List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :return: The input_parameters of this Log. :rtype: object @@ -370,10 +363,10 @@ class Log(Model): return self._input_parameters @input_parameters.setter - def input_parameters(self, input_parameters): + def input_parameters(self, input_parameters: object): """Sets the input_parameters of this Log. - List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of input parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :param input_parameters: The input_parameters of this Log. :type input_parameters: object @@ -382,10 +375,10 @@ class Log(Model): self._input_parameters = input_parameters @property - def output_parameters(self): + def output_parameters(self) -> object: """Gets the output_parameters of this Log. - List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :return: The output_parameters of this Log. :rtype: object @@ -393,10 +386,10 @@ class Log(Model): return self._output_parameters @output_parameters.setter - def output_parameters(self, output_parameters): + def output_parameters(self, output_parameters: object): """Sets the output_parameters of this Log. - List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 + List of output parameters. Can be any value - string, number, boolean, array or object. # noqa: E501 :param output_parameters: The output_parameters of this Log. :type output_parameters: object @@ -405,7 +398,7 @@ class Log(Model): self._output_parameters = output_parameters @property - def src_interface(self): + def src_interface(self) -> InterfaceDescription: """Gets the src_interface of this Log. @@ -415,7 +408,7 @@ class Log(Model): return self._src_interface @src_interface.setter - def src_interface(self, src_interface): + def src_interface(self, src_interface: InterfaceDescription): """Sets the src_interface of this Log. @@ -426,7 +419,7 @@ class Log(Model): self._src_interface = src_interface @property - def dest_interface(self): + def dest_interface(self) -> InterfaceDescription: """Gets the dest_interface of this Log. @@ -436,7 +429,7 @@ class Log(Model): return self._dest_interface @dest_interface.setter - def dest_interface(self, dest_interface): + def dest_interface(self, dest_interface: InterfaceDescription): """Sets the dest_interface of this Log. @@ -447,10 +440,10 @@ class Log(Model): self._dest_interface = dest_interface @property - def fwd_interface(self): + def fwd_interface(self) -> str: """Gets the fwd_interface of this Log. - 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 # noqa: E501 + 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 # noqa: E501 :return: The fwd_interface of this Log. :rtype: str @@ -458,10 +451,10 @@ class Log(Model): return self._fwd_interface @fwd_interface.setter - def fwd_interface(self, fwd_interface): + def fwd_interface(self, fwd_interface: str): """Sets the fwd_interface of this Log. - 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 # noqa: E501 + 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 # noqa: E501 :param fwd_interface: The fwd_interface of this Log. :type fwd_interface: str 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 e4cdbe45ceae0a9b19b18ae5efe5d0b6360c5d44..87835c09f561eebb4b19a5b4b2d1ec1dcd31295b 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.operation_any_of import OperationAnyOf from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.operation_any_of import OperationAnyOf # noqa: E501 class Operation(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/operation_any_of.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation_any_of.py deleted file mode 100644 index 46c192127c0075dbec133c6c11064527b23f2ad6..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/operation_any_of.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 import util - - -class OperationAnyOf(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 - """OperationAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'OperationAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Operation_anyOf of this OperationAnyOf. # noqa: E501 - :rtype: OperationAnyOf - """ - return util.deserialize_model(dikt, cls) 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 e4cb2c91e2f9bfb150b96f09212a0bc76d8182b1..0a10c19db834cc70ee16f422c6b113a0e2d72ef2 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.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). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,10 +239,10 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 + 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 @@ -256,10 +250,10 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 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 023ba4d925e237b05054d47cf5da1eb6d6f87253..708e8bc4f46ebbd8a31006f60bd7e02eaff4200e 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.protocol_any_of import ProtocolAnyOf from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.protocol_any_of import ProtocolAnyOf # noqa: E501 class Protocol(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_any_of.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol_any_of.py deleted file mode 100644 index b7966dfce8bfa44ee911ab3f55ecc527844a210d..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/protocol_any_of.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 import util - - -class ProtocolAnyOf(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - _1_1 = "HTTP_1_1" - _2 = "HTTP_2" - def __init__(self): # noqa: E501 - """ProtocolAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'ProtocolAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Protocol_anyOf of this ProtocolAnyOf. # noqa: E501 - :rtype: ProtocolAnyOf - """ - return util.deserialize_model(dikt, cls) 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 e059b81cb7383828d2dd95c5f2ce06c9c5d6601c..fe2fcfe31bcff642379cdbf6c5699b2c8baae61f 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.security_method_any_of import SecurityMethodAnyOf from api_invocation_logs import util +from api_invocation_logs.models.base_model import Model -from api_invocation_logs.models.security_method_any_of import SecurityMethodAnyOf # noqa: E501 class SecurityMethod(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/security_method_any_of.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method_any_of.py deleted file mode 100644 index 877c646311c51f2668894a4e9bf43b4c6c0d0bd1..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/models/security_method_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 import util - - -class SecurityMethodAnyOf(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 - """SecurityMethodAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'SecurityMethodAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The SecurityMethod_anyOf of this SecurityMethodAnyOf. # noqa: E501 - :rtype: SecurityMethodAnyOf - """ - return util.deserialize_model(dikt, cls) 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 85b35aa9453bdf4cda8efbae46abc61ccbb85450..f1a93904b8f72512de593c92b8dad3cad206a2c7 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,20 +1,18 @@ openapi: 3.0.0 info: - description: | - API for invocation logs. - © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). - All rights reserved. + description: "API for invocation logs. \n© 2022, 3GPP Organizational Partners (ARIB,\ + \ ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Logging_API_Invocation_API - version: 1.2.0-alpha.1 + version: 1.3.0-alpha.1 externalDocs: - description: 3GPP TS 29.222 V17.1.0 Common API Framework for 3GPP Northbound APIs - url: http://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ + description: 3GPP TS 29.222 V18.0.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' +- url: "{apiRoot}/api-invocation-logs/v1" variables: apiRoot: default: https://example.com - description: apiRoot as defined in subclause 7.5 of 3GPP TS 29.222 + description: apiRoot as defined in clause 7.5 of 3GPP TS 29.222 paths: /{aefId}/logs: post: @@ -41,12 +39,12 @@ paths: application/json: schema: $ref: '#/components/schemas/InvocationLog' - description: Log of service API invocations provided by API exposing function - successfully stored on the CAPIF core function. + description: | + Log of service API invocations provided by API exposing function successfully stored on the CAPIF core function. headers: Location: - description: 'Contains the URI of the newly created resource, according - to the structure: {apiRoot}/api-invocation-logs/v1/{aefId}/logs/{logId}' + description: | + Contains the URI of the newly created resource, according to the structure {apiRoot}/api-invocation-logs/v1/{aefId}/logs/{logId} explode: false required: true schema: @@ -87,7 +85,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -118,10 +116,73 @@ paths: /{aefId}/logs/{logId}: description: Creates a new log entry for service API invocations. components: + responses: + "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 schemas: InvocationLog: - description: Represents a set of Service API invocation logs to be stored in - a CAPIF core function. + description: | + Represents a set of Service API invocation logs to be stored in a CAPIF core function. example: supportedFeatures: supportedFeatures apiInvokerId: apiInvokerId @@ -132,9 +193,11 @@ components: srcInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -142,14 +205,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: HTTP_1_1 apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: GET apiId: apiId outputParameters: "" - apiName: apiName @@ -157,9 +224,11 @@ components: srcInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -167,20 +236,24 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: HTTP_1_1 apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: GET apiId: apiId outputParameters: "" properties: aefId: - description: Identity information of the API exposing function requesting - logging of service API invocations + description: | + Identity information of the API exposing function requesting logging of service API invocations title: aefId type: string apiInvokerId: @@ -195,19 +268,9 @@ components: title: logs 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]*$ + 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: @@ -224,9 +287,11 @@ components: srcInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr fwdInterface: fwdInterface resourceName: resourceName @@ -234,14 +299,18 @@ components: inputParameters: "" invocationLatency: 0 result: result + protocol: HTTP_1_1 apiVersion: apiVersion destInterface: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + operation: GET apiId: apiId outputParameters: "" properties: @@ -250,8 +319,8 @@ components: title: apiId type: string apiName: - description: Name of the API which was invoked, it is set as {apiName} part - of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. + 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. title: apiName type: string apiVersion: @@ -271,7 +340,7 @@ components: operation: $ref: '#/components/schemas/Operation' result: - description: For HTTP protocol, it contains HTTP status code of the invocation + description: "For HTTP protocol, it contains HTTP status code of the invocation" title: result type: string invocationTime: @@ -280,26 +349,25 @@ components: title: DateTime type: string invocationLatency: - description: Unsigned integer identifying a period of time in units of milliseconds. + description: Represents a period of time in units of milliseconds. minimum: 0 title: DurationMs type: integer inputParameters: - description: List of input parameters. Can be any value - string, number, - boolean, array or object. + description: | + List of input parameters. Can be any value - string, number, boolean, array or object. title: inputParameters outputParameters: - description: List of output parameters. Can be any value - string, number, - boolean, array or object. + description: | + List of output parameters. Can be any value - string, number, boolean, array or object. title: outputParameters srcInterface: $ref: '#/components/schemas/InterfaceDescription' destInterface: $ref: '#/components/schemas/InterfaceDescription' fwdInterface: - description: 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 + description: | + 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 required: @@ -312,7 +380,7 @@ components: title: Log type: object DurationMs: - description: Unsigned integer identifying a period of time in units of milliseconds. + description: Represents a period of time in units of milliseconds. minimum: 0 title: DurationMs type: integer @@ -324,8 +392,8 @@ components: title: Uri type: string title: - description: A short, human-readable summary of the problem type. It should - not change from occurrence to occurrence of the problem. + 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: @@ -342,33 +410,22 @@ components: title: Uri 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. + 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. + 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]*$ + 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 @@ -378,15 +435,16 @@ components: title: Uri type: string InvalidParam: - description: Represents the description of invalid parameters, for a request - rejected due to invalid parameters. + 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. + 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". + description: "A human-readable reason, e.g. \"must be a positive integer\"\ + ." title: reason type: string required: @@ -394,38 +452,43 @@ components: title: InvalidParam 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]*$ + 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 Protocol: anyOf: - - $ref: '#/components/schemas/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: | - Possible values are - HTTP_1_1: HTTP version 1.1 - HTTP_2: HTTP version 2 + 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 Operation: anyOf: - - $ref: '#/components/schemas/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 + 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 DateTime: description: string with format "date-time" as defined in OpenAPI. @@ -437,36 +500,53 @@ components: example: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 39500 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + nullable: true oneOf: - required: - ipv4Addr - required: - ipv6Addr + - required: + - fqdn properties: ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted - decimal" notation as defined in IETF RFC 1166. + 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. + 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 + fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer + apiPrefix: + description: | + A string representing a sequence of path segments that starts with the slash character. + title: apiPrefix + type: string securityMethods: - description: Security methods supported by the interface, it take precedence - over the security methods provided in AefProfile, for this specific interface. + 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 @@ -476,49 +556,40 @@ components: type: object SecurityMethod: anyOf: - - $ref: '#/components/schemas/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 + description: "Indicates the security method. \nPossible values are:\n- PSK:\ + \ Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122.\n- PKI:\ + \ 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 Ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted decimal" - notation as defined in IETF RFC 1166. + 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. + 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 + Fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string Port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer - Protocol_anyOf: - enum: - - HTTP_1_1 - - HTTP_2 - title: Protocol_anyOf - type: string - Operation_anyOf: - enum: - - GET - - POST - - PUT - - PATCH - - DELETE - title: Operation_anyOf - type: string - SecurityMethod_anyOf: - enum: - - PSK - - PKI - - OAUTH - title: SecurityMethod_anyOf - 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 new file mode 100644 index 0000000000000000000000000000000000000000..5282c992ea60156881f31ffd5928f3a91a5c9027 --- /dev/null +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/__init__.py @@ -0,0 +1,15 @@ +import logging + +import connexion +from api_invocation_logs.encoder import JSONEncoder +from flask_testing import TestCase + + +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_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 new file mode 100644 index 0000000000000000000000000000000000000000..f5c22b452718589984da98915642c2b09c9c6eb2 --- /dev/null +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/test/test_default_controller.py @@ -0,0 +1,31 @@ +import unittest + +from api_invocation_logs.test import BaseTestCase +from flask import json + + +class TestDefaultController(BaseTestCase): + """DefaultController integration test stubs""" + + def test_aef_id_logs_post(self): + """Test case for aef_id_logs_post + + + """ + invocation_log = {"supportedFeatures":"supportedFeatures","apiInvokerId":"apiInvokerId","aefId":"aefId","logs":[{"apiName":"apiName","invocationTime":"2000-01-23T04:56:07.000+00:00","srcInterface":{"ipv6Addr":"ipv6Addr","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","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","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","securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":39500,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"operation":"GET","apiId":"apiId","outputParameters":""}]} + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + response = self.client.open( + '/api-invocation-logs/v1/{aef_id}/logs'.format(aef_id='aef_id_example'), + method='POST', + headers=headers, + data=json.dumps(invocation_log), + 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_Logging_API_Invocation_API/api_invocation_logs/typing_utils.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..d21c4f633653a0eae75d04b2f6eff684ff9d200d 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/typing_utils.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/typing_utils.py @@ -1,9 +1,6 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): - import typing def is_generic(klass): """ Determine whether klass is a generic class """ 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 baaea564448deb45d356e5149aac29a9459e16f5..598868c398cd03ce49f988d8d60a633b082d1f1c 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,7 +1,6 @@ import datetime -import six -import typing_utils +from api_invocation_logs import typing_utils def serialize_clean_camel_case(obj): @@ -17,10 +16,10 @@ def clean_empty(d): return { k: v for k, v in ((k, clean_empty(v)) for k, v in d.items()) - if v + if v is not None or (isinstance(v, list) and len(v) == 0) } if isinstance(d, list): - return [v for v in map(clean_empty, d) if v] + return [v for v in map(clean_empty, d) if v is not None] return d @@ -55,7 +54,6 @@ def dict_to_camel_case(my_dict): return result - def _deserialize(data, klass): """Deserializes dict, list, str into an object. @@ -67,7 +65,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -96,7 +94,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -161,7 +159,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -196,4 +194,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/git_push.sh b/services/TS29222_CAPIF_Logging_API_Invocation_API/git_push.sh index 9405f72e950cdb8ca24c3cf4d15cee7eac62fde7..f53a75d4fabe760cce49eddfd62fcc702938ea90 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/git_push.sh +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/prepare_logging.sh b/services/TS29222_CAPIF_Logging_API_Invocation_API/prepare_logging.sh index 4cd01a6ccf928e437c96462700e785422275913f..25c0c0ecebebf208c78bf60c6e08cde0613a3fdf 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/prepare_logging.sh +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/prepare_logging.sh @@ -1,4 +1,4 @@ #!/bin/bash -gunicorn --bind 0.0.0.0:8080 \ +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/api_invocation_logs wsgi:app diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt b/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt index e92ae36d8fb1b0a19b8530808df64a440334547c..e5640804e1111309cbc5e90caf086b44916ed8e2 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/requirements.txt @@ -1,25 +1,25 @@ -connexion[swagger-ui] == 2.14.2; python_version>="3.6" +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 +setuptools == 74.0.0 +Flask == 3.0.3 pymongo == 4.7.3 elasticsearch == 8.4.3 -flask_jwt_extended == 4.4.4 +flask_jwt_extended == 4.6.0 +cryptography == 42.0.8 redis == 4.5.4 -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.17.0 +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 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.17.0 -opentelemetry-sdk == 1.17.0 +opentelemetry-api == 1.19.0 +opentelemetry-sdk == 1.19.0 flask_executor == 1.0.0 -cryptography == 42.0.8 -Werkzeug == 2.2.3 +werkzeug == 3.0.4 pyopenssl == 24.1.0 gunicorn == 22.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py b/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py index cf63e4a1b868b72d4be486250e1919437743123c..2edd1f3578279a90d77e9e8836f41d275b2b2eaa 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/setup.py @@ -1,6 +1,3 @@ -# coding: utf-8 - -import sys from setuptools import setup, find_packages NAME = "api_invocation_logs" @@ -33,7 +30,7 @@ setup( entry_points={ 'console_scripts': ['api_invocation_logs=api_invocation_logs.__main__:main']}, long_description="""\ - API for invocation logs. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for invocation logs. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/test-requirements.txt b/services/TS29222_CAPIF_Logging_API_Invocation_API/test-requirements.txt index 202a684feef71ff540d6aa528d348febf0b37d1e..58f51d6a00272d7515a20e3618f345b73c68afa0 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/test-requirements.txt +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/test-requirements.txt @@ -1,4 +1,4 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 +pytest~=7.1.0 pytest-cov>=2.8.1 -pytest-randomly == 1.2.3 # needed for python 2.7+3.4 -Flask-Testing == 0.8.0 +pytest-randomly>=1.2.3 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_Logging_API_Invocation_API/tox.ini b/services/TS29222_CAPIF_Logging_API_Invocation_API/tox.ini index 01a6d218dc3df53a27f797996c244658e113b2f0..312ba2e5a2425f7a66c9e5ba9aeae7691b6d1433 100644 --- a/services/TS29222_CAPIF_Logging_API_Invocation_API/tox.ini +++ b/services/TS29222_CAPIF_Logging_API_Invocation_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= pytest --cov=api_invocation_logs diff --git a/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/FILES index fc1b00e9235a5c80a8bc15fc870b21f7ca99b024..a238cf9c4aa9ace65c39dfb652a057ca53ab8ec9 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/FILES @@ -1,5 +1,6 @@ .dockerignore .gitignore +.openapi-generator-ignore .travis.yml Dockerfile README.md @@ -8,32 +9,56 @@ published_apis/__init__.py published_apis/__main__.py published_apis/controllers/__init__.py published_apis/controllers/default_controller.py -published_apis/controllers/security_controller_.py +published_apis/controllers/individual_apf_published_api_controller.py +published_apis/controllers/security_controller.py published_apis/encoder.py published_apis/models/__init__.py +published_apis/models/aef_location.py published_apis/models/aef_profile.py -published_apis/models/base_model_.py +published_apis/models/api_status.py +published_apis/models/base_model.py +published_apis/models/civic_address.py published_apis/models/communication_type.py -published_apis/models/communication_type_any_of.py published_apis/models/custom_operation.py published_apis/models/data_format.py -published_apis/models/data_format_any_of.py +published_apis/models/ellipsoid_arc.py +published_apis/models/gad_shape.py +published_apis/models/geographic_area.py +published_apis/models/geographical_coordinates.py published_apis/models/interface_description.py published_apis/models/invalid_param.py +published_apis/models/ip_addr_range.py +published_apis/models/ipv4_address_range.py +published_apis/models/ipv6_addr1.py +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/operation.py -published_apis/models/operation_any_of.py +published_apis/models/point.py +published_apis/models/point_altitude.py +published_apis/models/point_altitude_uncertainty.py +published_apis/models/point_uncertainty_circle.py +published_apis/models/point_uncertainty_ellipse.py +published_apis/models/polygon.py published_apis/models/problem_details.py published_apis/models/protocol.py -published_apis/models/protocol_any_of.py published_apis/models/published_api_path.py +published_apis/models/relative_cartesian_location.py published_apis/models/resource.py published_apis/models/security_method.py -published_apis/models/security_method_any_of.py 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/supported_gad_shapes.py +published_apis/models/uncertainty_ellipse.py +published_apis/models/uncertainty_ellipsoid.py published_apis/models/version.py published_apis/openapi/openapi.yaml published_apis/test/__init__.py +published_apis/test/test_default_controller.py +published_apis/test/test_individual_apf_published_api_controller.py published_apis/typing_utils.py published_apis/util.py requirements.txt diff --git a/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/VERSION index 4b448de535c7dd619da0df6d8221995dbd5d118a..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_Publish_Service_API/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_Publish_Service_API/Dockerfile b/services/TS29222_CAPIF_Publish_Service_API/Dockerfile index eca440204cf38f6f3ff1b27757be21deaaac7d09..fc3504b1abcb82718b3d0079bb59cb3be5e93b93 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/Dockerfile +++ b/services/TS29222_CAPIF_Publish_Service_API/Dockerfile @@ -1,11 +1,19 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/requirements.txt -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir -r requirements.txt COPY . /usr/src/app diff --git a/services/TS29222_CAPIF_Publish_Service_API/README.md b/services/TS29222_CAPIF_Publish_Service_API/README.md index 60ff8b067416f4815ed1c0b7b954e45a1a0e0189..a8ee25750f7e1979fac432c942c9975c6e9b778b 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/README.md +++ b/services/TS29222_CAPIF_Publish_Service_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 published_apis +python3 -m openapi_server ``` and open your browser to here: diff --git a/services/TS29222_CAPIF_Publish_Service_API/git_push.sh b/services/TS29222_CAPIF_Publish_Service_API/git_push.sh index 9405f72e950cdb8ca24c3cf4d15cee7eac62fde7..f53a75d4fabe760cce49eddfd62fcc702938ea90 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/git_push.sh +++ b/services/TS29222_CAPIF_Publish_Service_API/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/services/TS29222_CAPIF_Publish_Service_API/prepare_publish.sh b/services/TS29222_CAPIF_Publish_Service_API/prepare_publish.sh index d0eed0b94e7189472bd6c659e4850b79adbf26f6..8526fe8899f3bab0fceb15eb6c7420345536e849 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/prepare_publish.sh +++ b/services/TS29222_CAPIF_Publish_Service_API/prepare_publish.sh @@ -1,4 +1,4 @@ #!/bin/bash -gunicorn --bind 0.0.0.0:8080 \ +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/published_apis wsgi:app 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 dedd2b563f2f83cf36c9a16d542053e7828201bf..6cddfc9eca54d3914e8c0dfcc0102afce2331ff5 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/app.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/app.py @@ -1,27 +1,28 @@ #!/usr/bin/env python3 -import connexion -import logging - -# from published_apis import encoder -import encoder - -from flask_jwt_extended import JWTManager, jwt_required, create_access_token -from config import Config +import logging +import os +from datetime import datetime from logging.handlers import RotatingFileHandler -from core.consumer_messager import Subscriber -import os -from fluent import sender +import connexion +from flask_apscheduler import APScheduler from flask_executor import Executor -from opentelemetry.instrumentation.flask import FlaskInstrumentor +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.trace.propagation.tracecontext import TraceContextTextMapPropagator +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.instrumentation.redis import RedisInstrumentor +from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator + +# from published_apis import encoder +import encoder +from config import Config +from core.consumer_messager import Subscriber NAME = "Publish-Service" @@ -115,8 +116,8 @@ def verbose_formatter(): ) -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = encoder.CustomJSONEncoder app.add_api('openapi.yaml', arguments={'title': 'CAPIF_Publish_Service_API'}, pythonic_params=True) @@ -134,8 +135,12 @@ if monitoring_value == "true": executor = Executor(app.app) subscriber = Subscriber() +scheduler = APScheduler() +scheduler.init_app(app.app) +scheduler.start() - -@app.app.before_first_request +@scheduler.task('date', id='listener', next_run_time=datetime.now()) def up_listener(): - executor.submit(subscriber.listen) + with scheduler.app.app_context(): + executor.submit(subscriber.listen()) + diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/config.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/config.py index 01f9914cc141eb3c49fd73506e9b1c5470edd781..abfa40820dc99bf2c64c7bf0a31994eedc414e03 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/config.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): 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 62e506a6be747d94efa513917913f03a75f20ca3..695b3ae2d76701115deac7f2d80317cafaa8793f 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,14 +1,14 @@ -import connexion -from ..models.service_api_description import ServiceAPIDescription # noqa: E501 -from ..core.serviceapidescriptions import PublishServiceOperations - -from flask import Response, request, current_app +from functools import wraps from cryptography import x509 from cryptography.hazmat.backends import default_backend -from ..core.validate_user import ControlAccess -from functools import wraps +from flask import request, current_app +from published_apis.vendor_specific import vendor_specific_key_n_value, find_attribute_in_body +from ..core.responses import bad_request_error +from ..core.serviceapidescriptions import PublishServiceOperations +from ..core.validate_user import ControlAccess +from ..models.service_api_description import ServiceAPIDescription # noqa: E501 service_operations = PublishServiceOperations() @@ -32,8 +32,16 @@ def cert_validation(): if cn != "superadmin": cert_signature = cert.signature.hex() + service_api_id = None + if 'serviceApiId' in args: + service_api_id = args["serviceApiId"] result = valid_user.validate_user_cert( - args["apfId"], args["serviceApiId"], cert_signature) + args["apfId"], cert_signature, service_api_id) + + if result is not None: + return result + + result = service_operations.check_apf(args["apfId"]) if result is not None: return result @@ -44,6 +52,7 @@ def cert_validation(): return _cert_validation +@cert_validation() def apf_id_service_apis_get(apf_id): # noqa: E501 """apf_id_service_apis_get @@ -52,7 +61,7 @@ def apf_id_service_apis_get(apf_id): # noqa: E501 :param apf_id: :type apf_id: str - :rtype: ServiceAPIDescription + :rtype: Union[List[ServiceAPIDescription], Tuple[List[ServiceAPIDescription], int], Tuple[List[ServiceAPIDescription], int, Dict[str, str]] """ current_app.logger.info("Obtainig all service published") res = service_operations.get_serviceapis(apf_id) @@ -60,6 +69,7 @@ def apf_id_service_apis_get(apf_id): # noqa: E501 return res +@cert_validation() def apf_id_service_apis_post(apf_id, body): # noqa: E501 """apf_id_service_apis_post @@ -70,14 +80,37 @@ def apf_id_service_apis_post(apf_id, body): # noqa: E501 :param service_api_description: :type service_api_description: dict | bytes - :rtype: ServiceAPIDescription + :rtype: Union[ServiceAPIDescription, Tuple[ServiceAPIDescription, int], Tuple[ServiceAPIDescription, int, Dict[str, str]] """ - current_app.logger.info("Publishing service") - if connexion.request.is_json: - body = ServiceAPIDescription.from_dict(connexion.request.get_json()) # noqa: E501 - res = service_operations.add_serviceapidescription(apf_id, body) + if 'supportedFeatures' not in body: + return bad_request_error( + detail="supportedFeatures not present in request", + cause="supportedFeatures not present", + invalid_params=[{"param": "supportedFeatures", "reason": "not defined"}] + ) + + supp_feat_dict = ServiceAPIDescription.return_supp_feat_dict( + body['supportedFeatures']) + + vendor_specific = [] + vendor_specific_fields = find_attribute_in_body(body, '') + + if supp_feat_dict['VendorExt'] ^ bool(vendor_specific_fields): + return bad_request_error( + detail="If and only if VendorExt feature is enabled, then vendor-specific fields should be defined", + cause="Vendor extensibility misconfiguration", + invalid_params=[{"param": "vendor extensibility", "reason": "wrong definition"}] + ) + + if request.is_json: + if supp_feat_dict['VendorExt']: + vendor_specific = vendor_specific_key_n_value(vendor_specific_fields, body) + body = ServiceAPIDescription.from_dict(request.get_json()) + + res = service_operations.add_serviceapidescription( + apf_id, body, vendor_specific) return res @@ -93,9 +126,8 @@ def apf_id_service_apis_service_api_id_delete(service_api_id, apf_id): # noqa: :param apf_id: :type apf_id: str - :rtype: None + :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] """ - current_app.logger.info("Removing service published") res = service_operations.delete_serviceapidescription( service_api_id, apf_id) @@ -114,9 +146,8 @@ def apf_id_service_apis_service_api_id_get(service_api_id, apf_id): # noqa: E50 :param apf_id: :type apf_id: str - :rtype: ServiceAPIDescription + :rtype: Union[ServiceAPIDescription, Tuple[ServiceAPIDescription, int], Tuple[ServiceAPIDescription, int, Dict[str, str]] """ - current_app.logger.info("Obtaining service api with id: " + service_api_id) res = service_operations.get_one_serviceapi(service_api_id, apf_id) @@ -136,14 +167,20 @@ def apf_id_service_apis_service_api_id_put(service_api_id, apf_id, body): # noq :param service_api_description: :type service_api_description: dict | bytes - :rtype: ServiceAPIDescription + :rtype: Union[ServiceAPIDescription, Tuple[ServiceAPIDescription, int], Tuple[ServiceAPIDescription, int, Dict[str, str]] """ - current_app.logger.info( "Updating service api id with id: " + service_api_id) - if connexion.request.is_json: - body = ServiceAPIDescription.from_dict(connexion.request.get_json()) # noqa: E501 + if 'supportedFeatures' not in body: + return bad_request_error( + detail="supportedFeatures not present in request", + cause="supportedFeatures not present", + invalid_params=[{"param": "supportedFeatures", "reason": "not defined"}] + ) + + if request.is_json: + body = ServiceAPIDescription.from_dict(request.get_json()) # noqa: E501 response = service_operations.update_serviceapidescription( service_api_id, apf_id, body) 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 new file mode 100644 index 0000000000000000000000000000000000000000..0661991fe4961b9b4abc8f62cd31c07e7575c985 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/individual_apf_published_api_controller.py @@ -0,0 +1,73 @@ +from functools import wraps + +from cryptography import x509 +from cryptography.hazmat.backends import default_backend +from flask import request, current_app +from published_apis.models.service_api_description_patch import ServiceAPIDescriptionPatch # noqa: E501 + +from ..core.serviceapidescriptions import PublishServiceOperations +from ..core.validate_user import ControlAccess + +service_operations = PublishServiceOperations() +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() + service_api_id = None + if 'serviceApiId' in args: + service_api_id = args["serviceApiId"] + result = valid_user.validate_user_cert( + args["apfId"], cert_signature, service_api_id) + + if result is not None: + return result + + result = service_operations.check_apf(args["apfId"]) + + if result is not None: + return result + + result = f(**kwargs) + return result + return __cert_validation + return _cert_validation + +@cert_validation() +def modify_ind_apf_pub_api(service_api_id, apf_id, body): # noqa: E501 + """modify_ind_apf_pub_api + + Modify an existing published service API. # noqa: E501 + + :param service_api_id: + :type service_api_id: str + :param apf_id: + :type apf_id: str + :param service_api_description_patch: + :type service_api_description_patch: dict | bytes + + :rtype: Union[ServiceAPIDescription, Tuple[ServiceAPIDescription, int], Tuple[ServiceAPIDescription, int, Dict[str, str]] + """ + current_app.logger.info( + "Patching service api id with id: " + service_api_id) + if request.is_json: + body = ServiceAPIDescriptionPatch.from_dict(request.get_json()) # noqa: E501 + + response = service_operations.patch_serviceapidescription( + service_api_id, apf_id, body) + + return response 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 new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller.py @@ -0,0 +1,2 @@ + + 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 deleted file mode 100644 index 6d294ffd6df1a26a469dbb4e72533b01503468dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/controllers/security_controller_.py +++ /dev/null @@ -1,2 +0,0 @@ -from typing import List - diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/auth_manager.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/auth_manager.py index cb2f0b937a55d762a7f02bcdbc09d44a1865a5b9..d20daffd0d563609e153faada2fbd1f27dcba62f 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/auth_manager.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/auth_manager.py @@ -1,5 +1,6 @@ from flask import current_app + from .resources import Resource diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/consumer_messager.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/consumer_messager.py index f781ead9e3beb684bf6face38ef9c0e4fd5cc5bc..3814c71baae22c5e3c1d4ecbec43f4ae0cd75704 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/consumer_messager.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/consumer_messager.py @@ -1,8 +1,12 @@ # subscriber.py +import json + import redis -from .internal_service_ops import InternalServiceOps from flask import current_app +from .internal_service_ops import InternalServiceOps + + class Subscriber(): def __init__(self): @@ -15,10 +19,12 @@ class Subscriber(): current_app.logger.info("Listening publish messages") for raw_message in self.p.listen(): if raw_message["type"] == "message" and raw_message["channel"].decode('utf-8') == "internal-messages": - message, *ids = raw_message["data"].decode('utf-8').split(":") - if message == "provider-removed" and len(ids) > 0: - self.security_ops.delete_intern_service(ids[1]) - - - + current_app.logger.info("New internal event received") + internal_redis_event = json.loads( + raw_message["data"].decode('utf-8')) + if internal_redis_event.get('event') == "PROVIDER-REMOVED": + apf_ids = internal_redis_event.get( + 'information', {"apf_ids": []}).get('apf_ids') + if len(apf_ids) > 0: + self.security_ops.delete_intern_service(apf_ids) diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/internal_service_ops.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/internal_service_ops.py index 71c2759ddb2faeae4ddefc657055119bda31ee9d..fa7bc67ded52be54b4222c53b05e151d4062270a 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/internal_service_ops.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/internal_service_ops.py @@ -1,7 +1,9 @@ from flask import current_app -from .resources import Resource + from .auth_manager import AuthManager +from .resources import Resource + class InternalServiceOps(Resource): @@ -9,14 +11,15 @@ class InternalServiceOps(Resource): Resource.__init__(self) self.auth_manager = AuthManager() - def delete_intern_service(self, apf_id): + def delete_intern_service(self, apf_ids): current_app.logger.info("Provider removed, removing services published by APF") mycol = self.db.get_col_by_name(self.db.service_api_descriptions) - my_query = {'apf_id': apf_id} - mycol.delete_many(my_query) + for apf_id in apf_ids: + my_query = {'apf_id': apf_id} + mycol.delete_many(my_query) #We dont need remove all auth events, because when provider is removed, remove auth entry #self.auth_manager.remove_auth_all_service(apf_id) - current_app.logger.info("Removed service") \ No newline at end of file + current_app.logger.info("Removed service") diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/redis_event.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/redis_event.py index aadbdbb6b3116cf288648de41effdb12b9ca9143..f80e6b2e666574188740a99a0da0837ea899e01d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/redis_event.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/redis_event.py @@ -1,12 +1,20 @@ -from ..encoder import JSONEncoder -from .publisher import Publisher import json +from .publisher import Publisher +from ..encoder import JSONEncoder + publisher_ops = Publisher() class RedisEvent(): - def __init__(self, event, event_detail_key=None, information=None) -> None: + def __init__(self, + event, + service_api_descriptions=None, + api_ids=None, + api_invoker_ids=None, + acc_ctrl_pol_list=None, + invocation_logs=None, + api_topo_hide=None) -> None: self.EVENTS_ENUM = [ 'SERVICE_API_AVAILABLE', 'SERVICE_API_UNAVAILABLE', @@ -27,9 +35,23 @@ class RedisEvent(): self.redis_event = { "event": event } - if event_detail_key != None and information != None: - self.redis_event['key'] = event_detail_key - self.redis_event['information'] = information + # Add event filter keys to an auxiliary object + event_detail = { + "serviceAPIDescriptions": service_api_descriptions, + "apiIds": api_ids, + "apiInvokerIds": api_invoker_ids, + "accCtrlPolList": acc_ctrl_pol_list, + "invocationLogs": invocation_logs, + "apiTopoHide": api_topo_hide + } + + # Filter keys with not None values + filtered_event_detail = {k: v for k, + v in event_detail.items() if v is not None} + + # If there are valid values then add to redis event. + if filtered_event_detail: + self.redis_event["event_detail"] = filtered_event_detail def to_string(self): return json.dumps(self.redis_event, cls=JSONEncoder) diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/resources.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/resources.py index efbe3c2d4cf28cec298ef17b394011dcd6aa66cb..0673524049c90b5044e52d7f4faa8e199913b85b 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/resources.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/resources.py @@ -1,7 +1,9 @@ -from abc import ABC, abstractmethod +from abc import ABC + from db.db import MongoDatabse + class Resource(ABC): def __init__(self): - self.db = MongoDatabse() \ No newline at end of file + self.db = MongoDatabse() 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 3d10ff541afe36f7c3bc527a8a475805e532cdcc..1f0302f64b0ac1791aa594b5b16772343af286b9 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 @@ -1,15 +1,16 @@ -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder -from flask import Response -from ..util import serialize_clean_camel_case import json +from flask import Response + +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails +from ..util import serialize_clean_camel_case mimetype = "application/json" def make_response(object, status): - res = Response(json.dumps(object, cls=JSONEncoder), status=status, mimetype=mimetype) + res = Response(json.dumps(object, cls=CustomJSONEncoder), status=status, mimetype=mimetype) return res @@ -18,32 +19,32 @@ def internal_server_error(detail, cause): prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=500, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=500, mimetype=mimetype) def forbidden_error(detail, cause): prob = ProblemDetails(title="Forbidden", status=403, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=403, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=403, mimetype=mimetype) 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=JSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) 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=JSONEncoder), status=404, mimetype=mimetype) + 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=JSONEncoder), status=401, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype=mimetype) \ No newline at end of file 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 f32b7b2c1e652e08bdc98734bc9003d04e170c63..9e7ef755449e52e84b36ada01dcb54b5ce7eab62 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 @@ -1,14 +1,19 @@ -from pymongo import ReturnDocument +import os import secrets -from flask import current_app, Flask, Response - -from .resources import Resource from datetime import datetime -from ..util import dict_to_camel_case, clean_empty, serialize_clean_camel_case -from .responses import internal_server_error, forbidden_error, not_found_error, unauthorized_error, make_response + +from flask import current_app +from pymongo import ReturnDocument + from .auth_manager import AuthManager -from .redis_event import RedisEvent from .publisher import Publisher +from .redis_event import RedisEvent +from .resources import Resource +from .responses import internal_server_error, forbidden_error, not_found_error, unauthorized_error, make_response, \ + bad_request_error +from ..models.service_api_description import ServiceAPIDescription +from ..util import dict_to_camel_case, clean_empty, clean_n_camel_case +from ..vendor_specific import add_vend_spec_fields publisher_ops = Publisher() @@ -18,7 +23,7 @@ service_api_not_found_message = "Service API not found" class PublishServiceOperations(Resource): - def __check_apf(self, apf_id): + def check_apf(self, apf_id): providers_col = self.db.get_col_by_name(self.db.capif_provider_col) current_app.logger.debug("Checking apf id") @@ -27,13 +32,17 @@ class PublishServiceOperations(Resource): if provider is None: current_app.logger.error("Publisher not exist") - return unauthorized_error(detail="Publisher not existing", cause="Publisher id not found") + return unauthorized_error( + detail="Publisher not existing", + cause="Publisher id not found") list_apf_ids = [func["api_prov_func_id"] for func in provider["api_prov_funcs"] if func["api_prov_func_role"] == "APF"] if apf_id not in list_apf_ids: current_app.logger.debug("This id not belongs to APF") - return unauthorized_error(detail="You are not a publisher", cause="This API is only available for publishers") + return unauthorized_error( + detail="You are not a publisher", + cause="This API is only available for publishers") return None @@ -49,13 +58,20 @@ class PublishServiceOperations(Resource): current_app.logger.debug("Geting service apis") - result = self.__check_apf(apf_id) - - if result != None: - return result - - service = mycol.find({"apf_id": apf_id}, {"_id": 0, "api_name": 1, "api_id": 1, "aef_profiles": 1, "description": 1, - "supported_features": 1, "shareable_info": 1, "service_api_category": 1, "api_supp_feats": 1, "pub_api_path": 1, "ccf_id": 1}) + service = mycol.find( + {"apf_id": apf_id}, + {"_id": 0, + "api_name": 1, + "api_id": 1, + "aef_profiles": 1, + "description": 1, + "supported_features": 1, + "shareable_info": 1, + "service_api_category": 1, + "api_supp_feats": 1, + "pub_api_path": 1, + "ccf_id": 1, + "api_status": 1}) current_app.logger.debug(service) if service is None: current_app.logger.error("Not found services for this apf id") @@ -78,17 +94,12 @@ class PublishServiceOperations(Resource): current_app.logger.error(exception + "::" + str(e)) return internal_server_error(detail=exception, cause=str(e)) - def add_serviceapidescription(self, apf_id, serviceapidescription): + def add_serviceapidescription(self, apf_id, serviceapidescription, vendor_specific): mycol = self.db.get_col_by_name(self.db.service_api_descriptions) try: - current_app.logger.debug("Publishing service") - result = self.__check_apf(apf_id) - - if result != None: - return result service = mycol.find_one( {"api_name": serviceapidescription.api_name}) @@ -102,22 +113,39 @@ class PublishServiceOperations(Resource): rec = dict() rec['apf_id'] = apf_id rec['onboarding_date'] = datetime.now() - rec.update(serviceapidescription.to_dict()) - + serviceapidescription_dict = serviceapidescription.to_dict() + + if vendor_specific: + serviceapidescription_dict = add_vend_spec_fields( + vendor_specific, serviceapidescription_dict) + + rec.update(serviceapidescription_dict) + if not ServiceAPIDescription.return_supp_feat_dict(rec.get("supported_features"))["ApiStatusMonitoring"] and rec.get("api_status", None) is not None: + return bad_request_error( + detail="Set apiStatus with apiStatusMonitoring feature inactive at supportedFeatures if not allowed", + cause="apiStatus can't be set if apiStatusMonitoring is inactive", + invalid_params=[{"param": "apiStatus", "reason": "defined but apiStatusMoniroting feature not active"}] + ) mycol.insert_one(rec) self.auth_manager.add_auth_service(api_id, apf_id) current_app.logger.debug("Service inserted in database") - res = make_response(object=serialize_clean_camel_case(serviceapidescription), status=201) - res.headers['Location'] = "http://localhost:8080/published-apis/v1/" + \ - str(apf_id) + "/service-apis/" + str(api_id) + res = make_response(object=clean_n_camel_case( + serviceapidescription_dict), status=201) + res.headers['Location'] = f"https://{os.getenv("CAPIF_HOSTNAME")}/published-apis/v1/{str(apf_id)}/service-apis/{str(api_id)}" if res.status_code == 201: current_app.logger.info("Service published") - RedisEvent("SERVICE_API_AVAILABLE", "apiIds", - [str(api_id)]).send_event() + event_to_send = self.service_api_availability_event( + clean_n_camel_case( + serviceapidescription_dict)) + RedisEvent(event_to_send, + service_api_descriptions=[clean_n_camel_case( + serviceapidescription.to_dict())], + api_ids=[str(api_id)]).send_event() + return res except Exception as e: @@ -132,17 +160,25 @@ class PublishServiceOperations(Resource): try: current_app.logger.debug( "Geting service api with id: " + service_api_id) - result = self.__check_apf(apf_id) - - if result != None: - return result my_query = {'apf_id': apf_id, 'api_id': service_api_id} - service_api = mycol.find_one(my_query, {"_id": 0, "api_name": 1, "api_id": 1, "aef_profiles": 1, "description": 1, - "supported_features": 1, "shareable_info": 1, "service_api_category": 1, "api_supp_feats": 1, "pub_api_path": 1, "ccf_id": 1}) + service_api = mycol.find_one(my_query, {"_id": 0, + "api_name": 1, + "api_id": 1, + "aef_profiles": 1, + "description": 1, + "supported_features": 1, + "shareable_info": 1, + "service_api_category": 1, + "api_supp_feats": 1, + "pub_api_path": 1, + "ccf_id": 1, + "api_status": 1}) if service_api is None: current_app.logger.error(service_api_not_found_message) - return not_found_error(detail=service_api_not_found_message, cause="No Service with specific credentials exists") + return not_found_error( + detail=service_api_not_found_message, + cause="No Service with specific credentials exists") my_service_api = dict_to_camel_case(service_api) my_service_api = clean_empty(my_service_api) @@ -164,17 +200,26 @@ class PublishServiceOperations(Resource): current_app.logger.debug( "Removing api service with id: " + service_api_id) - result = self.__check_apf(apf_id) - - if result != None: - return result my_query = {'apf_id': apf_id, 'api_id': service_api_id} - serviceapidescription = mycol.find_one(my_query) - - if serviceapidescription is None: + serviceapidescription_dict = mycol.find_one(my_query, {"_id": 0, + "api_name": 1, + "api_id": 1, + "aef_profiles": 1, + "description": 1, + "supported_features": 1, + "shareable_info": 1, + "service_api_category": 1, + "api_supp_feats": 1, + "pub_api_path": 1, + "ccf_id": 1, + "api_status": 1}) + + if serviceapidescription_dict is None: current_app.logger.error(service_api_not_found_message) - return not_found_error(detail="Service API not existing", cause="Service API id not found") + return not_found_error( + detail="Service API not existing", + cause="Service API id not found") mycol.delete_one(my_query) @@ -183,12 +228,23 @@ class PublishServiceOperations(Resource): current_app.logger.debug("Removed service from database") out = "The service matching api_id " + service_api_id + " was deleted." res = make_response(out, status=204) + serviceapidescription = clean_empty( + dict_to_camel_case(serviceapidescription_dict)) if res.status_code == 204: - current_app.logger.info("Removed service published") - RedisEvent("SERVICE_API_UNAVAILABLE", "apiIds", - [service_api_id]).send_event() - publisher_ops.publish_message( - "internal-messages", f"service-removed:{service_api_id}") + current_app.logger.debug("Checking if SERVICE_API_UNAVAILABLE event must be notified") + event_to_send = self.service_api_availability_event( + clean_n_camel_case( + serviceapidescription_dict)) + if event_to_send != "SERVICE_API_UNAVAILABLE": + current_app.logger.info("Send SERVICE_API_UNAVAILABLE event") + RedisEvent( + "SERVICE_API_UNAVAILABLE", + service_api_descriptions=[serviceapidescription], + api_ids=[str(service_api_id)] + ).send_event() + else: + current_app.logger.info("Not send SERVICE_API_UNAVAILABLE because this Service API was unavailable previously") + return res except Exception as e: @@ -196,7 +252,9 @@ class PublishServiceOperations(Resource): current_app.logger.error(exception + "::" + str(e)) return internal_server_error(detail=exception, cause=str(e)) - def update_serviceapidescription(self, service_api_id, apf_id, service_api_description): + def update_serviceapidescription(self, + service_api_id, apf_id, + service_api_description): mycol = self.db.get_col_by_name(self.db.service_api_descriptions) @@ -205,37 +263,211 @@ class PublishServiceOperations(Resource): current_app.logger.debug( "Updating service api with id: " + service_api_id) - result = self.__check_apf(apf_id) - - if result != None: - return result - my_query = {'apf_id': apf_id, 'api_id': service_api_id} - serviceapidescription = mycol.find_one(my_query) - - if serviceapidescription is None: + serviceapidescription_old = mycol.find_one(my_query, {"_id": 0, + "api_name": 1, + "api_id": 1, + "aef_profiles": 1, + "description": 1, + "supported_features": 1, + "shareable_info": 1, + "service_api_category": 1, + "api_supp_feats": 1, + "pub_api_path": 1, + "ccf_id": 1, + "apf_id":1, + "onboarding_date": 1, + "api_status": 1}) + if serviceapidescription_old is None: current_app.logger.error(service_api_not_found_message) return not_found_error(detail="Service API not existing", cause="Service API id not found") service_api_description = service_api_description.to_dict() + api_status = service_api_description.get("api_status", None) service_api_description = clean_empty(service_api_description) - - result = mycol.find_one_and_update(serviceapidescription, {"$set": service_api_description}, projection={"_id": 0, "api_name": 1, "api_id": 1, "aef_profiles": 1, "description": 1, - "supported_features": 1, "shareable_info": 1, "service_api_category": 1, "api_supp_feats": 1, "pub_api_path": 1, "ccf_id": 1}, return_document=ReturnDocument.AFTER, upsert=False) + if api_status: + service_api_description["api_status"]=api_status + service_api_description["apf_id"] = serviceapidescription_old["apf_id"] + service_api_description["onboarding_date"] = serviceapidescription_old["onboarding_date"] + service_api_description["api_id"] = serviceapidescription_old["api_id"] + + if not ServiceAPIDescription.return_supp_feat_dict(service_api_description.get("supported_features"))["ApiStatusMonitoring"] and service_api_description.get("api_status", None) is not None: + return bad_request_error( + detail="Set apiStatus with apiStatusMonitoring feature inactive at supportedFeatures if not allowed", + cause="apiStatus can't be set if apiStatusMonitoring is inactive", + invalid_params=[{"param": "apiStatus", "reason": "defined but apiStatusMoniroting feature not active"}] + ) + + result = mycol.find_one_and_replace( + serviceapidescription_old, + service_api_description, + projection={"_id": 0, + "api_name": 1, + "api_id": 1, + "aef_profiles": 1, + "description": 1, + "supported_features": 1, + "shareable_info": 1, + "service_api_category": 1, + "api_supp_feats": 1, + "pub_api_path": 1, + "ccf_id": 1, + "api_status": 1}, + return_document=ReturnDocument.AFTER, upsert=False) result = clean_empty(result) current_app.logger.debug("Updated service api") + + service_api_description_updated = dict_to_camel_case(result) + + response = make_response( + object=service_api_description_updated, status=200) + + if response.status_code == 200: + RedisEvent("SERVICE_API_UPDATE", + service_api_descriptions=[service_api_description_updated]).send_event() + + my_service_api = clean_n_camel_case(serviceapidescription_old) + self.send_events_on_update( + service_api_id, + my_service_api, + service_api_description_updated) + + return response + + except Exception as e: + exception = "An exception occurred in update service" + current_app.logger.error(exception + "::" + str(e)) + return internal_server_error(detail=exception, cause=str(e)) + + def patch_serviceapidescription(self, + service_api_id, apf_id, + patch_service_api_description): + + mycol = self.db.get_col_by_name(self.db.service_api_descriptions) + + try: + + current_app.logger.debug( + "Patching service api with id: " + service_api_id) + + my_query = {'apf_id': apf_id, 'api_id': service_api_id} + serviceapidescription_old = mycol.find_one(my_query, {"_id": 0, + "api_name": 1, + "api_id": 1, + "aef_profiles": 1, + "description": 1, + "supported_features": 1, + "shareable_info": 1, + "service_api_category": 1, + "api_supp_feats": 1, + "pub_api_path": 1, + "ccf_id": 1, + "api_status": 1}) + if serviceapidescription_old is None: + current_app.logger.error(service_api_not_found_message) + return not_found_error(detail="Service API not existing", cause="Service API id not found") + + patch_service_api_description = patch_service_api_description.to_dict() + api_status = patch_service_api_description.get("api_status", None) + patch_service_api_description = clean_empty(patch_service_api_description) + if api_status: + patch_service_api_description["api_status"]=api_status + + if not ServiceAPIDescription.return_supp_feat_dict(serviceapidescription_old.get("supported_features"))["ApiStatusMonitoring"] and patch_service_api_description.get("api_status", None) is not None: + return bad_request_error( + detail="Set apiStatus with apiStatusMonitoring feature inactive at supportedFeatures if not allowed", + cause="apiStatus can't be set if apiStatusMonitoring is inactive", + invalid_params=[{"param": "apiStatus", "reason": "defined but apiStatusMoniroting feature not active"}] + ) + + result = mycol.find_one_and_update( + my_query, + {"$set": patch_service_api_description}, + projection={"_id": 0, + "api_name": 1, + "api_id": 1, + "aef_profiles": 1, + "description": 1, + "supported_features": 1, + "shareable_info": 1, + "service_api_category": 1, + "api_supp_feats": 1, + "pub_api_path": 1, + "ccf_id": 1, + "api_status": 1}, + return_document=ReturnDocument.AFTER, upsert=False) + + result = clean_empty(result) + + current_app.logger.debug("Patched service api") + service_api_description_updated = dict_to_camel_case(result) + current_app.logger.debug(service_api_description_updated) response = make_response( object=service_api_description_updated, status=200) + if response.status_code == 200: - RedisEvent("SERVICE_API_UPDATE", "serviceAPIDescriptions", [ - service_api_description_updated]).send_event() + RedisEvent("SERVICE_API_UPDATE", + service_api_descriptions=[service_api_description_updated]).send_event() + + my_service_api = clean_n_camel_case(serviceapidescription_old) + self.send_events_on_update( + service_api_id, + my_service_api, + service_api_description_updated) + return response except Exception as e: exception = "An exception occurred in update service" current_app.logger.error(exception + "::" + str(e)) return internal_server_error(detail=exception, cause=str(e)) + + + def send_events_on_update(self, + service_api_id, + service_api_description_old, + service_api_description_new): + current_app.logger.debug("Send Events if needed") + service_api_status_event_old = self.service_api_availability_event( + service_api_description_old) + current_app.logger.debug("Service API status before update is " + service_api_status_event_old) + service_api_status_event_new = self.service_api_availability_event( + service_api_description_new) + current_app.logger.debug("Service API status after update is " + service_api_status_event_new) + + if service_api_status_event_old == service_api_status_event_new: + current_app.logger.info( + "service_api_status not changed, it remains " + + service_api_status_event_new + + " Then no event will be sent") + else: + current_app.logger.info("service_api_status changed, event " + + service_api_status_event_new + + " Event will be sent") + RedisEvent(service_api_status_event_new, + service_api_descriptions=[ + service_api_description_new], + api_ids=[str(service_api_id)]).send_event() + + def service_api_availability_event(self, service_api_description): + service_api_status = "" + if ServiceAPIDescription.return_supp_feat_dict(service_api_description.get("supportedFeatures"))["ApiStatusMonitoring"]: + current_app.logger.info( + "ApiStatusMonitoring active") + if service_api_description.get("apiStatus") is None or len(service_api_description.get("apiStatus").get("aefIds")) > 0: + current_app.logger.info( + "Service available, at least one AEF is available") + service_api_status = "SERVICE_API_AVAILABLE" + else: + current_app.logger.info( + "Service unavailable, all AEFs are unavailable") + service_api_status = "SERVICE_API_UNAVAILABLE" + else: + current_app.logger.info("ApiStatusMonitoring") + current_app.logger.info("Service available") + service_api_status = "SERVICE_API_AVAILABLE" + return service_api_status diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/validate_user.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/validate_user.py index f48414943c1c384b10d52d21c1aac456a1d772bc..94fe1d4bc014038a11cefbbd2cfe82dfa5c7e14d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/validate_user.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/core/validate_user.py @@ -1,29 +1,49 @@ -from flask import current_app, Response import json -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder + +from flask import current_app, Response + from .resources import Resource from .responses import internal_server_error +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case class ControlAccess(Resource): - def validate_user_cert(self, apf_id, service_id, cert_signature): + def validate_user_cert(self, apf_id, cert_signature, service_id=None): cert_col = self.db.get_col_by_name(self.db.certs_col) try: - my_query = {'id':apf_id} + my_query = {'id': apf_id} cert_entry = cert_col.find_one(my_query) if cert_entry is not None: - if cert_entry["cert_signature"] != cert_signature or "services" not in cert_entry["resources"] or service_id not in cert_entry["resources"]["services"]: - prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") + is_user_owner = True + if cert_entry["cert_signature"] != cert_signature: + is_user_owner = False + elif service_id: + if "services" not in cert_entry["resources"]: + is_user_owner = False + elif cert_entry.get("resources") and cert_entry["resources"].get("services"): + if service_id not in cert_entry["resources"].get("services"): + is_user_owner = False + if is_user_owner == False: + current_app.logger.info("STEP3") + prob = ProblemDetails( + title="Unauthorized", + detail="User not authorized", + cause="You are not the owner of this resource") + current_app.logger.info("STEP4") prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") + current_app.logger.info("STEP5") + return Response( + json.dumps(prob, cls=CustomJSONEncoder), + status=401, + mimetype="application/json") except Exception as e: exception = "An exception occurred in validate apf" current_app.logger.error(exception + "::" + str(e)) - return internal_server_error(detail=exception, cause=str(e)) \ No newline at end of file + return internal_server_error(detail=exception, cause=str(e)) diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/db/db.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/db/db.py index 643dda4f7a96c4e663d6aac3fd956ba0797bb39b..e31b74f68003a921d8d3d3e2a60e851f4a8e5b15 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/db/db.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/db/db.py @@ -1,10 +1,11 @@ +import os import time -from pymongo import MongoClient -from pymongo.errors import AutoReconnect -from config import Config + from bson.codec_options import CodecOptions -import os +from config import Config from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from pymongo import MongoClient +from pymongo.errors import AutoReconnect monitoring_value = os.environ.get("MONITORING", "").lower() if monitoring_value == "true": @@ -13,6 +14,13 @@ if monitoring_value == "true": class MongoDatabse(): + # _instance = None + + # def __new__(cls): + # if cls._instance is None: + # cls._instance = super(MongoDatabse, cls).__new__(cls) + # return cls._instance + def __init__(self): self.config = Config().get_config() self.db = self.__connect() @@ -20,7 +28,6 @@ class MongoDatabse(): self.capif_provider_col = self.config['mongo']['capif_provider_col'] self.certs_col = self.config['mongo']['certs_col'] - def get_col_by_name(self, name): return self.db[name].with_options(codec_options=CodecOptions(tz_aware=True)) 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 80bad8fa9220ab873e044b7adc0a849746088ad5..4d957655c7a45b96d9a0193333a35f1de7a47acd 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/encoder.py @@ -1,20 +1,19 @@ -from connexion.apps.flask_app import FlaskJSONEncoder -import six +from connexion.jsonifier import JSONEncoder -from models.base_model_ import Model +from published_apis.models.base_model import Model -class JSONEncoder(FlaskJSONEncoder): +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + return JSONEncoder.default(self, o) 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 e80629d7c4c4a4a772946187c2f3710fe8574adc..d036df693ea41dfaa3debffffad0462c1fcd8e4a 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,25 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # import models into model package -from published_apis.models.aef_profile import AefProfile -from published_apis.models.communication_type import CommunicationType -from published_apis.models.communication_type_any_of import CommunicationTypeAnyOf -from published_apis.models.custom_operation import CustomOperation -from published_apis.models.data_format import DataFormat -from published_apis.models.data_format_any_of import DataFormatAnyOf -from published_apis.models.interface_description import InterfaceDescription -from published_apis.models.invalid_param import InvalidParam -from published_apis.models.operation import Operation -from published_apis.models.operation_any_of import OperationAnyOf -from published_apis.models.problem_details import ProblemDetails -from published_apis.models.protocol import Protocol -from published_apis.models.protocol_any_of import ProtocolAnyOf -from published_apis.models.published_api_path import PublishedApiPath -from published_apis.models.resource import Resource -from published_apis.models.security_method import SecurityMethod -from published_apis.models.security_method_any_of import SecurityMethodAnyOf -from published_apis.models.service_api_description import ServiceAPIDescription -from published_apis.models.shareable_information import ShareableInformation -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 new file mode 100644 index 0000000000000000000000000000000000000000..40e90aa6254b2b16f5338c80305125cdd9fbf05b --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_location.py @@ -0,0 +1,116 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + 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_Publish_Service_API/published_apis/models/aef_profile.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/aef_profile.py index ff3c3c505d870d361046e849a169b671d8446113..8d8ae4708c42e76200ee598aacf4d643a4df8c07 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,31 +1,25 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.data_format import DataFormat -from published_apis.models.interface_description import InterfaceDescription -from published_apis.models.protocol import Protocol -from published_apis.models.security_method import SecurityMethod -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 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). 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): # noqa: E501 + 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, 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 @@ -42,6 +36,12 @@ class AefProfile(Model): :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, @@ -50,7 +50,10 @@ class AefProfile(Model): 'data_format': DataFormat, 'security_methods': List[SecurityMethod], 'domain_name': str, - 'interface_descriptions': List[InterfaceDescription] + 'interface_descriptions': List[InterfaceDescription], + 'aef_location': AefLocation, + 'service_kpis': ServiceKpis, + 'ue_ip_range': IpAddrRange } self.attribute_map = { @@ -60,7 +63,10 @@ class AefProfile(Model): 'data_format': 'dataFormat', 'security_methods': 'securityMethods', 'domain_name': 'domainName', - 'interface_descriptions': 'interfaceDescriptions' + 'interface_descriptions': 'interfaceDescriptions', + 'aef_location': 'aefLocation', + 'service_kpis': 'serviceKpis', + 'ue_ip_range': 'ueIpRange' } self._aef_id = aef_id @@ -70,6 +76,9 @@ class AefProfile(Model): self._security_methods = security_methods 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': @@ -83,7 +92,7 @@ class AefProfile(Model): return util.deserialize_model(dikt, cls) @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -94,7 +103,7 @@ class AefProfile(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -108,7 +117,7 @@ class AefProfile(Model): self._aef_id = aef_id @property - def versions(self): + def versions(self) -> List[Version]: """Gets the versions of this AefProfile. API version # noqa: E501 @@ -119,7 +128,7 @@ class AefProfile(Model): return self._versions @versions.setter - def versions(self, versions): + def versions(self, versions: List[Version]): """Sets the versions of this AefProfile. API version # noqa: E501 @@ -135,7 +144,7 @@ class AefProfile(Model): self._versions = versions @property - def protocol(self): + def protocol(self) -> Protocol: """Gets the protocol of this AefProfile. @@ -145,7 +154,7 @@ class AefProfile(Model): return self._protocol @protocol.setter - def protocol(self, protocol): + def protocol(self, protocol: Protocol): """Sets the protocol of this AefProfile. @@ -156,7 +165,7 @@ class AefProfile(Model): self._protocol = protocol @property - def data_format(self): + def data_format(self) -> DataFormat: """Gets the data_format of this AefProfile. @@ -166,7 +175,7 @@ class AefProfile(Model): return self._data_format @data_format.setter - def data_format(self, data_format): + def data_format(self, data_format: DataFormat): """Sets the data_format of this AefProfile. @@ -177,7 +186,7 @@ class AefProfile(Model): self._data_format = data_format @property - def security_methods(self): + def security_methods(self) -> List[SecurityMethod]: """Gets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -188,7 +197,7 @@ class AefProfile(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + def security_methods(self, security_methods: List[SecurityMethod]): """Sets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -202,7 +211,7 @@ class AefProfile(Model): self._security_methods = security_methods @property - def domain_name(self): + def domain_name(self) -> str: """Gets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -213,7 +222,7 @@ class AefProfile(Model): return self._domain_name @domain_name.setter - def domain_name(self, domain_name): + def domain_name(self, domain_name: str): """Sets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -225,7 +234,7 @@ class AefProfile(Model): self._domain_name = domain_name @property - def interface_descriptions(self): + def interface_descriptions(self) -> List[InterfaceDescription]: """Gets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -236,7 +245,7 @@ class AefProfile(Model): return self._interface_descriptions @interface_descriptions.setter - def interface_descriptions(self, interface_descriptions): + def interface_descriptions(self, interface_descriptions: List[InterfaceDescription]): """Sets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -248,3 +257,66 @@ class AefProfile(Model): 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 + + @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/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py new file mode 100644 index 0000000000000000000000000000000000000000..14b0d36b47f51f02a1eba14e8904e281668bdd19 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/api_status.py @@ -0,0 +1,64 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model + + +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 this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # 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 this attribute is omitted, the API is inactive at all AEF(s) defined in the \"aefProfiles\" attribute within the ServiceAPIDescription data structure. # 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_Publish_Service_API/published_apis/models/base_model_.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py similarity index 92% rename from services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model_.py rename to services/TS29222_CAPIF_Publish_Service_API/published_apis/models/base_model.py index 2c63ab05edeb6eea0a182b86e45af166d2cbfaad..d4fac36d17bd2ff6e56040683fc20ccbc914a556 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,6 +1,4 @@ import pprint - -import six import typing from published_apis import util @@ -8,14 +6,14 @@ from published_apis import util T = typing.TypeVar('T') -class Model(object): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. - openapi_types = {} + openapi_types: typing.Dict[str, type] = {} # attributeMap: The key is attribute name and the # value is json key in definition. - attribute_map = {} + attribute_map: typing.Dict[str, str] = {} @classmethod def from_dict(cls: typing.Type[T], dikt) -> T: @@ -29,7 +27,7 @@ class Model(object): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 new file mode 100644 index 0000000000000000000000000000000000000000..94b868bebcd2edca4e57d5b7a1c7e6d87446f0a1 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/civic_address.py @@ -0,0 +1,918 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model + + +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_Publish_Service_API/published_apis/models/communication_type.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type.py index 2c4d15f1c8ca87a9295fa3e573d4fa6801947caa..d69e24ba75985f9a34b7370fd6ebdeb8d8bc36c6 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type_any_of import CommunicationTypeAnyOf from published_apis import util +from published_apis.models.base_model import Model -from published_apis.models.communication_type_any_of import CommunicationTypeAnyOf # noqa: E501 class CommunicationType(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/communication_type_any_of.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type_any_of.py deleted file mode 100644 index 831558346b6514656e91797323792be27e775cf0..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/communication_type_any_of.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 import util - - -class CommunicationTypeAnyOf(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 - """CommunicationTypeAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'CommunicationTypeAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The CommunicationType_anyOf of this CommunicationTypeAnyOf. # noqa: E501 - :rtype: CommunicationTypeAnyOf - """ - return util.deserialize_model(dikt, cls) 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 bf1cd38bee2f83061040cd7a993c7d129d3b2446..f99e4aedae9b09337c670881277243a2966f467f 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type import CommunicationType -from published_apis.models.operation import Operation from published_apis import util - +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). @@ -62,7 +56,7 @@ class CustomOperation(Model): return util.deserialize_model(dikt, cls) @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this CustomOperation. @@ -72,7 +66,7 @@ class CustomOperation(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this CustomOperation. @@ -85,10 +79,10 @@ class CustomOperation(Model): self._comm_type = comm_type @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -96,10 +90,10 @@ class CustomOperation(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -110,10 +104,10 @@ class CustomOperation(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -121,10 +115,10 @@ class CustomOperation(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -135,7 +129,7 @@ class CustomOperation(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this CustomOperation. Text description of the custom operation # noqa: E501 @@ -146,7 +140,7 @@ class CustomOperation(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this CustomOperation. Text description of the custom operation # noqa: E501 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 72e3f151d4e4d02d8be20644ca33f4b9dc1e197b..b8892d621d6c465009716813c0d4ce3010f849e6 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.data_format_any_of import DataFormatAnyOf from published_apis import util +from published_apis.models.base_model import Model -from published_apis.models.data_format_any_of import DataFormatAnyOf # noqa: E501 class DataFormat(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/ellipsoid_arc.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py new file mode 100644 index 0000000000000000000000000000000000000000..550649e40a9e3c4371175299c3a22a2ef8d06372 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ellipsoid_arc.py @@ -0,0 +1,260 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + 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_Publish_Service_API/published_apis/models/gad_shape.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py new file mode 100644 index 0000000000000000000000000000000000000000..1bee0024fd3a619ecf1d16813f26af9a3725b324 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/gad_shape.py @@ -0,0 +1,63 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + 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_Publish_Service_API/published_apis/models/geographic_area.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py new file mode 100644 index 0000000000000000000000000000000000000000..4c88245f94b88b140eeac6171d234019815855a2 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographic_area.py @@ -0,0 +1,453 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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 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_Publish_Service_API/published_apis/models/geographical_coordinates.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py new file mode 100644 index 0000000000000000000000000000000000000000..7ef6a2cd12e48b4c1ea27dbb6603a21b6c8a5b50 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/geographical_coordinates.py @@ -0,0 +1,98 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model + + +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_Publish_Service_API/published_apis/models/interface_description.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/interface_description.py index fd7e5b50fbec40fca391af92c96101f7763bf8c0..dec959628c16f492cff126fdd8c2928b700cccda 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,51 +1,57 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.security_method import SecurityMethod from published_apis import util - +from published_apis.models.base_model import Model from published_apis.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 + def __init__(self, ipv4_addr=None, ipv6_addr=None, fqdn=None, port=None, api_prefix=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 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] """ self.openapi_types = { 'ipv4_addr': str, 'ipv6_addr': str, + 'fqdn': str, 'port': int, + 'api_prefix': str, 'security_methods': List[SecurityMethod] } self.attribute_map = { 'ipv4_addr': 'ipv4Addr', 'ipv6_addr': 'ipv6Addr', + 'fqdn': 'fqdn', 'port': 'port', + 'api_prefix': 'apiPrefix', 'security_methods': 'securityMethods' } 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 @classmethod @@ -60,10 +66,10 @@ class InterfaceDescription(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr(self): + 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 + 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 @@ -71,10 +77,10 @@ class InterfaceDescription(Model): return self._ipv4_addr @ipv4_addr.setter - def ipv4_addr(self, ipv4_addr): + 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 + 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 @@ -83,10 +89,10 @@ class InterfaceDescription(Model): self._ipv4_addr = ipv4_addr @property - def ipv6_addr(self): + 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 + 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 @@ -94,10 +100,10 @@ class InterfaceDescription(Model): return self._ipv6_addr @ipv6_addr.setter - def ipv6_addr(self, ipv6_addr): + 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 + 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 @@ -106,7 +112,36 @@ class InterfaceDescription(Model): self._ipv6_addr = ipv6_addr @property - def port(self): + def fqdn(self) -> str: + """Gets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :return: The fqdn of this InterfaceDescription. + :rtype: str + """ + return self._fqdn + + @fqdn.setter + def fqdn(self, fqdn: str): + """Sets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :param fqdn: The fqdn of this InterfaceDescription. + :type fqdn: str + """ + if fqdn is not None and len(fqdn) > 253: + raise ValueError("Invalid value for `fqdn`, length must be less than or equal to `253`") # noqa: E501 + if fqdn is not None and len(fqdn) < 4: + raise ValueError("Invalid value for `fqdn`, length must be greater than or equal to `4`") # noqa: E501 + if fqdn is not None and not re.search(r'^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$', fqdn): # noqa: E501 + raise ValueError("Invalid value for `fqdn`, must be a follow pattern or equal to `/^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$/`") # noqa: E501 + + self._fqdn = fqdn + + @property + def port(self) -> int: """Gets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -117,7 +152,7 @@ class InterfaceDescription(Model): return self._port @port.setter - def port(self, port): + def port(self, port: int): """Sets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -133,10 +168,33 @@ class InterfaceDescription(Model): self._port = port @property - def security_methods(self): + def api_prefix(self) -> str: + """Gets the api_prefix of this InterfaceDescription. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. - Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + 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] @@ -144,10 +202,10 @@ class InterfaceDescription(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + 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 + 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] 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 8e794cf1f92f0771fedbf100d7ee7ce763349712..4dd00c7af87dc50fe1ad6b9940c8b470f10dcae9 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from published_apis.models.base_model import Model class InvalidParam(Model): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 new file mode 100644 index 0000000000000000000000000000000000000000..e4bffa1c6834d9da8fadd80a9ef0a58a4e8fdbc4 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ip_addr_range.py @@ -0,0 +1,96 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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, ue_ipv6_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[Ipv4AddressRange] + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. # noqa: E501 + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange] + """ + self.openapi_types = { + 'ue_ipv4_addr_ranges': List[Ipv4AddressRange], + 'ue_ipv6_addr_ranges': List[Ipv6AddressRange] + } + + self.attribute_map = { + 'ue_ipv4_addr_ranges': 'ueIpv4AddrRanges', + 'ue_ipv6_addr_ranges': 'ueIpv6AddrRanges' + } + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + self._ue_ipv6_addr_ranges = ue_ipv6_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[Ipv4AddressRange]: + """Gets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv4_addr_ranges of this IpAddrRange. + :rtype: List[Ipv4AddressRange] + """ + return self._ue_ipv4_addr_ranges + + @ue_ipv4_addr_ranges.setter + def ue_ipv4_addr_ranges(self, ue_ipv4_addr_ranges: List[Ipv4AddressRange]): + """Sets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv4_addr_ranges: The ue_ipv4_addr_ranges of this IpAddrRange. + :type ue_ipv4_addr_ranges: List[Ipv4AddressRange] + """ + if ue_ipv4_addr_ranges is not None and len(ue_ipv4_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv4_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + + @property + def ue_ipv6_addr_ranges(self) -> List[Ipv6AddressRange]: + """Gets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv6_addr_ranges of this IpAddrRange. + :rtype: List[Ipv6AddressRange] + """ + return self._ue_ipv6_addr_ranges + + @ue_ipv6_addr_ranges.setter + def ue_ipv6_addr_ranges(self, ue_ipv6_addr_ranges: List[Ipv6AddressRange]): + """Sets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange] + """ + if ue_ipv6_addr_ranges is not None and len(ue_ipv6_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv6_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv6_addr_ranges = ue_ipv6_addr_ranges 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 new file mode 100644 index 0000000000000000000000000000000000000000..bfca85a70a36e4bc6fa708d32a8d74c889f82e04 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv4_address_range.py @@ -0,0 +1,99 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model + + +class Ipv4AddressRange(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 + """Ipv4AddressRange - a model defined in OpenAPI + + :param start: The start of this Ipv4AddressRange. # noqa: E501 + :type start: str + :param end: The end of this Ipv4AddressRange. # 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) -> 'Ipv4AddressRange': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv4AddressRange of this Ipv4AddressRange. # noqa: E501 + :rtype: Ipv4AddressRange + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> str: + """Gets the start of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The start of this Ipv4AddressRange. + :rtype: str + """ + return self._start + + @start.setter + def start(self, start: str): + """Sets the start of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param start: The start of this Ipv4AddressRange. + :type start: str + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + if start is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', start): # noqa: E501 + raise ValueError("Invalid value for `start`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._start = start + + @property + def end(self) -> str: + """Gets the end of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The end of this Ipv4AddressRange. + :rtype: str + """ + return self._end + + @end.setter + def end(self, end: str): + """Sets the end of this Ipv4AddressRange. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param end: The end of this Ipv4AddressRange. + :type end: str + """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 + if end is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', end): # noqa: E501 + raise ValueError("Invalid value for `end`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._end = end diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format_any_of.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py similarity index 58% rename from services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format_any_of.py rename to services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py index 726b386d7958ba4256cd9cc372258f2aa6708a0d..082fbaf1aeb951e7199eb70647a2f8d39735f162 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/data_format_any_of.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_addr1.py @@ -1,26 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from published_apis.models.base_model import Model -class DataFormatAnyOf(Model): +class Ipv6Addr1(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" def __init__(self): # noqa: E501 - """DataFormatAnyOf - a model defined in OpenAPI + """Ipv6Addr1 - a model defined in OpenAPI """ self.openapi_types = { @@ -30,12 +22,12 @@ class DataFormatAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'DataFormatAnyOf': + def from_dict(cls, dikt) -> 'Ipv6Addr1': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The DataFormat_anyOf of this DataFormatAnyOf. # noqa: E501 - :rtype: DataFormatAnyOf + :return: The Ipv6Addr_1 of this Ipv6Addr1. # noqa: E501 + :rtype: Ipv6Addr1 """ return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..3270bfc550671772f04e9089e3c70e68cbeff70a --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/ipv6_address_range.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + Do not edit the class manually. + """ + + def __init__(self, start=None, end=None): # noqa: E501 + """Ipv6AddressRange - a model defined in OpenAPI + + :param start: The start of this Ipv6AddressRange. # noqa: E501 + :type start: Ipv6Addr1 + :param end: The end of this Ipv6AddressRange. # noqa: E501 + :type end: Ipv6Addr1 + """ + self.openapi_types = { + 'start': Ipv6Addr1, + 'end': Ipv6Addr1 + } + + self.attribute_map = { + 'start': 'start', + 'end': 'end' + } + + self._start = start + self._end = end + + @classmethod + def from_dict(cls, dikt) -> 'Ipv6AddressRange': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv6AddressRange of this Ipv6AddressRange. # noqa: E501 + :rtype: Ipv6AddressRange + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> Ipv6Addr1: + """Gets the start of this Ipv6AddressRange. + + + :return: The start of this Ipv6AddressRange. + :rtype: Ipv6Addr1 + """ + return self._start + + @start.setter + def start(self, start: Ipv6Addr1): + """Sets the start of this Ipv6AddressRange. + + + :param start: The start of this Ipv6AddressRange. + :type start: Ipv6Addr1 + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + + self._start = start + + @property + def end(self) -> Ipv6Addr1: + """Gets the end of this Ipv6AddressRange. + + + :return: The end of this Ipv6AddressRange. + :rtype: Ipv6Addr1 + """ + return self._end + + @end.setter + def end(self, end: Ipv6Addr1): + """Sets the end of this Ipv6AddressRange. + + + :param end: The end of this Ipv6AddressRange. + :type end: Ipv6Addr1 + """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 + + self._end = end 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 new file mode 100644 index 0000000000000000000000000000000000000000..777b98ed5fbc2c0337000ee68db6b003d80c1a08 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local2d_point_uncertainty_ellipse.py @@ -0,0 +1,184 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..728f69a97952fdd9d256ba460856f91bd8307d12 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local3d_point_uncertainty_ellipsoid.py @@ -0,0 +1,184 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, local_origin=None, point=None, uncertainty_ellipsoid=None, 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 + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'local_origin': LocalOrigin, + 'point': RelativeCartesianLocation, + 'uncertainty_ellipsoid': UncertaintyEllipsoid, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'local_origin': 'localOrigin', + 'point': 'point', + 'uncertainty_ellipsoid': 'uncertaintyEllipsoid', + 'confidence': 'confidence' + } + + self._shape = shape + self._local_origin = local_origin + self._point = point + self._uncertainty_ellipsoid = uncertainty_ellipsoid + self._confidence = 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..82df6391e1ac6b1253028f6edac90e0c7840b1ec --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/local_origin.py @@ -0,0 +1,87 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + Do not edit the class manually. + """ + + def __init__(self, coordinate_id=None, point=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 + """ + self.openapi_types = { + 'coordinate_id': str, + 'point': GeographicalCoordinates + } + + self.attribute_map = { + 'coordinate_id': 'coordinateId', + 'point': 'point' + } + + self._coordinate_id = coordinate_id + self._point = point + + @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 + """ + + 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 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 b985c08d9da5fdd1befa3e1ac6aed8bf289c6e22..c59a6702cbbb5458c6fb9df20adf3969f0f18006 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.operation_any_of import OperationAnyOf from published_apis import util +from published_apis.models.base_model import Model -from published_apis.models.operation_any_of import OperationAnyOf # noqa: E501 class Operation(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/operation_any_of.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation_any_of.py deleted file mode 100644 index 0e9b63fb8defa976274e92752a865a52f9e6caab..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/operation_any_of.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 import util - - -class OperationAnyOf(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 - """OperationAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'OperationAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Operation_anyOf of this OperationAnyOf. # noqa: E501 - :rtype: OperationAnyOf - """ - return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..433aa9e86eed54a6499d9592629ee17d96d8cf12 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point.py @@ -0,0 +1,92 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + 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_Publish_Service_API/published_apis/models/point_altitude.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py new file mode 100644 index 0000000000000000000000000000000000000000..7bfb24aea35a99d1598137df1cb78f603953e66b --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude.py @@ -0,0 +1,126 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + 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_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py new file mode 100644 index 0000000000000000000000000000000000000000..9bc6dbd52c146d8a6b477ec6d520f9c62c9fe00d --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_altitude_uncertainty.py @@ -0,0 +1,253 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + 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_Publish_Service_API/published_apis/models/point_uncertainty_circle.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py new file mode 100644 index 0000000000000000000000000000000000000000..7b15b671711acb96bf78cb2d285aa43c89613f9c --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_circle.py @@ -0,0 +1,124 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + 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_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py new file mode 100644 index 0000000000000000000000000000000000000000..13c8e1b728b0c0e5c1aa77b258e8b3eec1601aaa --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/point_uncertainty_ellipse.py @@ -0,0 +1,155 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + 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_Publish_Service_API/published_apis/models/polygon.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py new file mode 100644 index 0000000000000000000000000000000000000000..d4ce9418c9f81429e04d259f481296f6b0fb84d0 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/polygon.py @@ -0,0 +1,98 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model +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). + + 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_Publish_Service_API/published_apis/models/problem_details.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/problem_details.py index 2f5151f7712bc7103d53ef5a71d765b5c1b7b61d..ac7c9ee947d49dbbf350ba9b552285d5192504a0 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.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). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,10 +239,10 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 + 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 @@ -256,10 +250,10 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 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 6bb623c0fbd36fe613e798b5c6dfb468c5928493..dc6ae7eb66a5790f3ad46a5469d3e3edaa5adc50 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.protocol_any_of import ProtocolAnyOf from published_apis import util +from published_apis.models.base_model import Model -from published_apis.models.protocol_any_of import ProtocolAnyOf # noqa: E501 class Protocol(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/published_api_path.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/published_api_path.py index 0a347780223d0e76b8c682e203e726c89b2aadd8..a76f56fae938dacb1734239ba6e81cdf70038454 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from published_apis.models.base_model import Model class PublishedApiPath(Model): @@ -43,7 +39,7 @@ class PublishedApiPath(Model): return util.deserialize_model(dikt, cls) @property - def ccf_ids(self): + 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 @@ -54,7 +50,7 @@ class PublishedApiPath(Model): return self._ccf_ids @ccf_ids.setter - def ccf_ids(self, ccf_ids): + 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..35c9dbf5b7190a018396cd9529d63e23829b752f --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/relative_cartesian_location.py @@ -0,0 +1,122 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model + + +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_Publish_Service_API/published_apis/models/resource.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/resource.py index ef8bebe821da645734ae22310392d8c482d0b270..6c8d09d8689135cde8c056ccb40395e5a233eaf2 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,25 +1,20 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.communication_type import CommunicationType -from published_apis.models.operation import Operation from published_apis import util - +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). 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 + 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 @@ -30,6 +25,8 @@ class Resource(Model): :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 @@ -40,6 +37,7 @@ class Resource(Model): 'comm_type': CommunicationType, 'uri': str, 'cust_op_name': str, + 'cust_operations': List[CustomOperation], 'operations': List[Operation], 'description': str } @@ -49,6 +47,7 @@ class Resource(Model): 'comm_type': 'commType', 'uri': 'uri', 'cust_op_name': 'custOpName', + 'cust_operations': 'custOperations', 'operations': 'operations', 'description': 'description' } @@ -57,6 +56,7 @@ class Resource(Model): 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 @@ -72,7 +72,7 @@ class Resource(Model): return util.deserialize_model(dikt, cls) @property - def resource_name(self): + def resource_name(self) -> str: """Gets the resource_name of this Resource. Resource name # noqa: E501 @@ -83,7 +83,7 @@ class Resource(Model): return self._resource_name @resource_name.setter - def resource_name(self, resource_name): + def resource_name(self, resource_name: str): """Sets the resource_name of this Resource. Resource name # noqa: E501 @@ -97,7 +97,7 @@ class Resource(Model): self._resource_name = resource_name @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this Resource. @@ -107,7 +107,7 @@ class Resource(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this Resource. @@ -120,10 +120,10 @@ class Resource(Model): self._comm_type = comm_type @property - def uri(self): + def uri(self) -> str: """Gets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -131,10 +131,10 @@ class Resource(Model): return self._uri @uri.setter - def uri(self, uri): + def uri(self, uri: str): """Sets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -145,10 +145,10 @@ class Resource(Model): self._uri = uri @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -156,10 +156,10 @@ class Resource(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -168,10 +168,35 @@ class Resource(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -179,10 +204,10 @@ class Resource(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -193,7 +218,7 @@ class Resource(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this Resource. Text description of the API resource # noqa: E501 @@ -204,7 +229,7 @@ class Resource(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this Resource. Text description of the API resource # noqa: E501 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 643e41de0aa648d2121d8246731809baf74df552..01847e2b25c67b269906c42ed1c1bcda2cb2823c 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.security_method_any_of import SecurityMethodAnyOf from published_apis import util +from published_apis.models.base_model import Model -from published_apis.models.security_method_any_of import SecurityMethodAnyOf # noqa: E501 class SecurityMethod(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_any_of.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method_any_of.py deleted file mode 100644 index 061d64c6df3d70892d7b7603c161da26308d345e..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/security_method_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -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 import util - - -class SecurityMethodAnyOf(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 - """SecurityMethodAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'SecurityMethodAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The SecurityMethod_anyOf of this SecurityMethodAnyOf. # noqa: E501 - :rtype: SecurityMethodAnyOf - """ - return util.deserialize_model(dikt, cls) 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 e098f0bd2f4e1fe1b6ddcefb80163f3340e22739..e50c9e0156d90e4b43dc914951ff08f787b8e186 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,21 +1,14 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 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.aef_profile import AefProfile -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 ServiceAPIDescription(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,13 +16,15 @@ class ServiceAPIDescription(Model): 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 + 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 @@ -46,10 +41,13 @@ class ServiceAPIDescription(Model): :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, @@ -57,12 +55,14 @@ class ServiceAPIDescription(Model): 'service_api_category': str, 'api_supp_feats': str, 'pub_api_path': PublishedApiPath, - 'ccf_id': str + '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', @@ -70,11 +70,13 @@ class ServiceAPIDescription(Model): 'service_api_category': 'serviceAPICategory', 'api_supp_feats': 'apiSuppFeats', 'pub_api_path': 'pubApiPath', - 'ccf_id': 'ccfId' + '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 @@ -83,6 +85,26 @@ class ServiceAPIDescription(Model): 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 return_supp_feat_dict(cls, supp_feat): + TOTAL_FEATURES = 9 + supp_feat_in_hex = int(supp_feat, 16) + supp_feat_in_bin = bin(supp_feat_in_hex)[2:].zfill(TOTAL_FEATURES)[::-1] + + + return { + "ApiSupportedFeaturePublishing": True if supp_feat_in_bin[0] == "1" else False, + "PatchUpdate": True if supp_feat_in_bin[1] == "1" else False, + "ExtendedIntfDesc": True if supp_feat_in_bin[2] == "1" else False, + "MultipleCustomOperations": True if supp_feat_in_bin[3] == "1" else False, + "ProtocDataFormats_Ext1": True if supp_feat_in_bin[4] == "1" else False, + "ApiStatusMonitoring": True if supp_feat_in_bin[5] == "1" else False, + "EdgeApp_2": True if supp_feat_in_bin[6] == "1" else False, + "RNAA": True if supp_feat_in_bin[7] == "1" else False, + "VendorExt": True if supp_feat_in_bin[8] == "1" else False + } @classmethod def from_dict(cls, dikt) -> 'ServiceAPIDescription': @@ -96,10 +118,10 @@ class ServiceAPIDescription(Model): return util.deserialize_model(dikt, cls) @property - def api_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -107,10 +129,10 @@ class ServiceAPIDescription(Model): return self._api_name @api_name.setter - def api_name(self, api_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -121,10 +143,10 @@ class ServiceAPIDescription(Model): self._api_name = api_name @property - def api_id(self): + 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 + 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 @@ -132,10 +154,10 @@ class ServiceAPIDescription(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + 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 + 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 @@ -144,10 +166,31 @@ class ServiceAPIDescription(Model): self._api_id = api_id @property - def aef_profiles(self): + 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. - AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 + AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 :return: The aef_profiles of this ServiceAPIDescription. :rtype: List[AefProfile] @@ -155,10 +198,10 @@ class ServiceAPIDescription(Model): return self._aef_profiles @aef_profiles.setter - def aef_profiles(self, aef_profiles): + 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 + 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] @@ -169,7 +212,7 @@ class ServiceAPIDescription(Model): self._aef_profiles = aef_profiles @property - def description(self): + def description(self) -> str: """Gets the description of this ServiceAPIDescription. Text description of the API # noqa: E501 @@ -180,7 +223,7 @@ class ServiceAPIDescription(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this ServiceAPIDescription. Text description of the API # noqa: E501 @@ -192,10 +235,10 @@ class ServiceAPIDescription(Model): self._description = description @property - def supported_features(self): + 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 + 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 @@ -203,10 +246,10 @@ class ServiceAPIDescription(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 @@ -217,7 +260,7 @@ class ServiceAPIDescription(Model): self._supported_features = supported_features @property - def shareable_info(self): + def shareable_info(self) -> ShareableInformation: """Gets the shareable_info of this ServiceAPIDescription. @@ -227,7 +270,7 @@ class ServiceAPIDescription(Model): return self._shareable_info @shareable_info.setter - def shareable_info(self, shareable_info): + def shareable_info(self, shareable_info: ShareableInformation): """Sets the shareable_info of this ServiceAPIDescription. @@ -238,9 +281,10 @@ class ServiceAPIDescription(Model): self._shareable_info = shareable_info @property - def service_api_category(self): + def service_api_category(self) -> str: """Gets the service_api_category of this ServiceAPIDescription. + The service API category to which the service API belongs to. # noqa: E501 :return: The service_api_category of this ServiceAPIDescription. :rtype: str @@ -248,9 +292,10 @@ class ServiceAPIDescription(Model): return self._service_api_category @service_api_category.setter - def service_api_category(self, service_api_category): + def service_api_category(self, service_api_category: str): """Sets the service_api_category of this ServiceAPIDescription. + The service API category to which the service API belongs to. # noqa: E501 :param service_api_category: The service_api_category of this ServiceAPIDescription. :type service_api_category: str @@ -259,10 +304,10 @@ class ServiceAPIDescription(Model): self._service_api_category = service_api_category @property - def api_supp_feats(self): + 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 + 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 @@ -270,10 +315,10 @@ class ServiceAPIDescription(Model): return self._api_supp_feats @api_supp_feats.setter - def api_supp_feats(self, api_supp_feats): + 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 + 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 @@ -284,7 +329,7 @@ class ServiceAPIDescription(Model): self._api_supp_feats = api_supp_feats @property - def pub_api_path(self): + def pub_api_path(self) -> PublishedApiPath: """Gets the pub_api_path of this ServiceAPIDescription. @@ -294,7 +339,7 @@ class ServiceAPIDescription(Model): return self._pub_api_path @pub_api_path.setter - def pub_api_path(self, pub_api_path): + def pub_api_path(self, pub_api_path: PublishedApiPath): """Sets the pub_api_path of this ServiceAPIDescription. @@ -305,7 +350,7 @@ class ServiceAPIDescription(Model): self._pub_api_path = pub_api_path @property - def ccf_id(self): + def ccf_id(self) -> str: """Gets the ccf_id of this ServiceAPIDescription. CAPIF core function identifier. # noqa: E501 @@ -316,7 +361,7 @@ class ServiceAPIDescription(Model): return self._ccf_id @ccf_id.setter - def ccf_id(self, ccf_id): + def ccf_id(self, ccf_id: str): """Sets the ccf_id of this ServiceAPIDescription. CAPIF core function identifier. # noqa: E501 @@ -326,3 +371,26 @@ class ServiceAPIDescription(Model): """ self._ccf_id = ccf_id + + @property + def api_prov_name(self) -> str: + """Gets the api_prov_name of this ServiceAPIDescription. + + Represents the API provider name. # noqa: E501 + + :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. + + Represents the API provider name. # noqa: E501 + + :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/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 new file mode 100644 index 0000000000000000000000000000000000000000..d812d30d0c2d01195a9b3a1d8e13533df9900d60 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_api_description_patch.py @@ -0,0 +1,261 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +class ServiceAPIDescriptionPatch(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_status=None, aef_profiles=None, description=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None): # noqa: E501 + """ServiceAPIDescriptionPatch - a model defined in OpenAPI + + :param api_status: The api_status of this ServiceAPIDescriptionPatch. # noqa: E501 + :type api_status: ApiStatus + :param aef_profiles: The aef_profiles of this ServiceAPIDescriptionPatch. # noqa: E501 + :type aef_profiles: List[AefProfile] + :param description: The description of this ServiceAPIDescriptionPatch. # noqa: E501 + :type description: str + :param shareable_info: The shareable_info of this ServiceAPIDescriptionPatch. # noqa: E501 + :type shareable_info: ShareableInformation + :param service_api_category: The service_api_category of this ServiceAPIDescriptionPatch. # noqa: E501 + :type service_api_category: str + :param api_supp_feats: The api_supp_feats of this ServiceAPIDescriptionPatch. # noqa: E501 + :type api_supp_feats: str + :param pub_api_path: The pub_api_path of this ServiceAPIDescriptionPatch. # noqa: E501 + :type pub_api_path: PublishedApiPath + :param ccf_id: The ccf_id of this ServiceAPIDescriptionPatch. # noqa: E501 + :type ccf_id: str + """ + self.openapi_types = { + 'api_status': ApiStatus, + 'aef_profiles': List[AefProfile], + 'description': str, + 'shareable_info': ShareableInformation, + 'service_api_category': str, + 'api_supp_feats': str, + 'pub_api_path': PublishedApiPath, + 'ccf_id': str + } + + self.attribute_map = { + 'api_status': 'apiStatus', + 'aef_profiles': 'aefProfiles', + 'description': 'description', + 'shareable_info': 'shareableInfo', + 'service_api_category': 'serviceAPICategory', + 'api_supp_feats': 'apiSuppFeats', + 'pub_api_path': 'pubApiPath', + 'ccf_id': 'ccfId' + } + + self._api_status = api_status + self._aef_profiles = aef_profiles + self._description = description + 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) -> 'ServiceAPIDescriptionPatch': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ServiceAPIDescriptionPatch of this ServiceAPIDescriptionPatch. # noqa: E501 + :rtype: ServiceAPIDescriptionPatch + """ + return util.deserialize_model(dikt, cls) + + @property + def api_status(self) -> ApiStatus: + """Gets the api_status of this ServiceAPIDescriptionPatch. + + + :return: The api_status of this ServiceAPIDescriptionPatch. + :rtype: ApiStatus + """ + return self._api_status + + @api_status.setter + def api_status(self, api_status: ApiStatus): + """Sets the api_status of this ServiceAPIDescriptionPatch. + + + :param api_status: The api_status of this ServiceAPIDescriptionPatch. + :type api_status: ApiStatus + """ + + self._api_status = api_status + + @property + def aef_profiles(self) -> List[AefProfile]: + """Gets the aef_profiles of this ServiceAPIDescriptionPatch. + + AEF profile information, which includes the exposed API details. # noqa: E501 + + :return: The aef_profiles of this ServiceAPIDescriptionPatch. + :rtype: List[AefProfile] + """ + return self._aef_profiles + + @aef_profiles.setter + def aef_profiles(self, aef_profiles: List[AefProfile]): + """Sets the aef_profiles of this ServiceAPIDescriptionPatch. + + AEF profile information, which includes the exposed API details. # noqa: E501 + + :param aef_profiles: The aef_profiles of this ServiceAPIDescriptionPatch. + :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 ServiceAPIDescriptionPatch. + + Text description of the API # noqa: E501 + + :return: The description of this ServiceAPIDescriptionPatch. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this ServiceAPIDescriptionPatch. + + Text description of the API # noqa: E501 + + :param description: The description of this ServiceAPIDescriptionPatch. + :type description: str + """ + + self._description = description + + @property + def shareable_info(self) -> ShareableInformation: + """Gets the shareable_info of this ServiceAPIDescriptionPatch. + + + :return: The shareable_info of this ServiceAPIDescriptionPatch. + :rtype: ShareableInformation + """ + return self._shareable_info + + @shareable_info.setter + def shareable_info(self, shareable_info: ShareableInformation): + """Sets the shareable_info of this ServiceAPIDescriptionPatch. + + + :param shareable_info: The shareable_info of this ServiceAPIDescriptionPatch. + :type shareable_info: ShareableInformation + """ + + self._shareable_info = shareable_info + + @property + def service_api_category(self) -> str: + """Gets the service_api_category of this ServiceAPIDescriptionPatch. + + The service API category to which the service API belongs to. # noqa: E501 + + :return: The service_api_category of this ServiceAPIDescriptionPatch. + :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 ServiceAPIDescriptionPatch. + + The service API category to which the service API belongs to. # noqa: E501 + + :param service_api_category: The service_api_category of this ServiceAPIDescriptionPatch. + :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 ServiceAPIDescriptionPatch. + + 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 ServiceAPIDescriptionPatch. + :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 ServiceAPIDescriptionPatch. + + 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 ServiceAPIDescriptionPatch. + :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("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 ServiceAPIDescriptionPatch. + + + :return: The pub_api_path of this ServiceAPIDescriptionPatch. + :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 ServiceAPIDescriptionPatch. + + + :param pub_api_path: The pub_api_path of this ServiceAPIDescriptionPatch. + :type pub_api_path: PublishedApiPath + """ + + self._pub_api_path = pub_api_path + + @property + def ccf_id(self) -> str: + """Gets the ccf_id of this ServiceAPIDescriptionPatch. + + CAPIF core function identifier. # noqa: E501 + + :return: The ccf_id of this ServiceAPIDescriptionPatch. + :rtype: str + """ + return self._ccf_id + + @ccf_id.setter + def ccf_id(self, ccf_id: str): + """Sets the ccf_id of this ServiceAPIDescriptionPatch. + + CAPIF core function identifier. # noqa: E501 + + :param ccf_id: The ccf_id of this ServiceAPIDescriptionPatch. + :type ccf_id: str + """ + + self._ccf_id = ccf_id 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 new file mode 100644 index 0000000000000000000000000000000000000000..2d0b3c17db4afbc15b0b13d915399174cd6b9cc8 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/service_kpis.py @@ -0,0 +1,275 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model + + +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("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("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("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("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_Publish_Service_API/published_apis/models/shareable_information.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/shareable_information.py index c8bdc259517b83d9b55377981252cb3b7b4aeac9..548e3753599f8f5140d3f4fc30815af64dd70e03 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from published_apis.models.base_model import Model class ShareableInformation(Model): @@ -48,10 +44,10 @@ class ShareableInformation(Model): return util.deserialize_model(dikt, cls) @property - def is_shareable(self): + 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 + 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 @@ -59,10 +55,10 @@ class ShareableInformation(Model): return self._is_shareable @is_shareable.setter - def is_shareable(self, is_shareable): + 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 + 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 @@ -73,10 +69,10 @@ class ShareableInformation(Model): self._is_shareable = is_shareable @property - def capif_prov_doms(self): + 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 + 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] @@ -84,10 +80,10 @@ class ShareableInformation(Model): return self._capif_prov_doms @capif_prov_doms.setter - def capif_prov_doms(self, capif_prov_doms): + 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 + 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] diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol_any_of.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py similarity index 57% rename from services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol_any_of.py rename to services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py index cbbfd46e7b3ea88eb82e3b005bfe5bdf01a74c1b..7b5da39915dde3f281e64fed7538a37ec001d0b4 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/protocol_any_of.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/supported_gad_shapes.py @@ -1,27 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import 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 import util +from published_apis.models.base_model import Model -class ProtocolAnyOf(Model): +class SupportedGADShapes(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - """ - allowed enum values - """ - _1_1 = "HTTP_1_1" - _2 = "HTTP_2" def __init__(self): # noqa: E501 - """ProtocolAnyOf - a model defined in OpenAPI + """SupportedGADShapes - a model defined in OpenAPI """ self.openapi_types = { @@ -31,12 +22,12 @@ class ProtocolAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'ProtocolAnyOf': + def from_dict(cls, dikt) -> 'SupportedGADShapes': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The Protocol_anyOf of this ProtocolAnyOf. # noqa: E501 - :rtype: ProtocolAnyOf + :return: The SupportedGADShapes of this SupportedGADShapes. # noqa: E501 + :rtype: SupportedGADShapes """ return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..7fc3e1720fe863c3e4fcf1a5e108266b2377005f --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipse.py @@ -0,0 +1,132 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model + + +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_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py new file mode 100644 index 0000000000000000000000000000000000000000..7a89fe9675241a553b87ce3a27e81e53dbaa7547 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/uncertainty_ellipsoid.py @@ -0,0 +1,164 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from published_apis import util +from published_apis.models.base_model import Model + + +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_Publish_Service_API/published_apis/models/version.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/models/version.py index 6c7bc20efb9014c8fdccd6e66c9c270e3460bfd3..a53e20f2d53c692458e5042c6f57659efd32be3d 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import 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.custom_operation import CustomOperation -from published_apis.models.resource import Resource from published_apis import util - +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). @@ -62,7 +56,7 @@ class Version(Model): return util.deserialize_model(dikt, cls) @property - def api_version(self): + def api_version(self) -> str: """Gets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -73,7 +67,7 @@ class Version(Model): return self._api_version @api_version.setter - def api_version(self, api_version): + def api_version(self, api_version: str): """Sets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -87,7 +81,7 @@ class Version(Model): self._api_version = api_version @property - def expiry(self): + def expiry(self) -> datetime: """Gets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -98,7 +92,7 @@ class Version(Model): return self._expiry @expiry.setter - def expiry(self, expiry): + def expiry(self, expiry: datetime): """Sets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -110,7 +104,7 @@ class Version(Model): self._expiry = expiry @property - def resources(self): + def resources(self) -> List[Resource]: """Gets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -121,7 +115,7 @@ class Version(Model): return self._resources @resources.setter - def resources(self, resources): + def resources(self, resources: List[Resource]): """Sets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -135,7 +129,7 @@ class Version(Model): self._resources = resources @property - def cust_operations(self): + def cust_operations(self) -> List[CustomOperation]: """Gets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 @@ -146,7 +140,7 @@ class Version(Model): return self._cust_operations @cust_operations.setter - def cust_operations(self, cust_operations): + def cust_operations(self, cust_operations: List[CustomOperation]): """Sets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 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 6c2012ff5c284e0d3fdd9491bd6a86d879508a1e..041eed50493715bf874d53f509ae22769e7a3d11 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,20 +1,18 @@ openapi: 3.0.0 info: - description: | - API for publishing service APIs. - © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). - All rights reserved. + description: "API for publishing service APIs. \n© 2024, 3GPP Organizational Partners\ + \ (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Publish_Service_API - version: 1.2.0-alpha.2 + version: 1.3.0-alpha.5 externalDocs: - description: 3GPP TS 29.222 V17.2.0 Common API Framework for 3GPP Northbound APIs - url: http://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ + description: 3GPP TS 29.222 V18.5.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' +- url: "{apiRoot}/published-apis/v1" variables: apiRoot: default: https://example.com - description: apiRoot as defined in subclause 7.5 of 3GPP TS 29.222. + description: apiRoot as defined in clause 7.5 of 3GPP TS 29.222. paths: /{apfId}/service-apis: get: @@ -26,14 +24,17 @@ paths: name: apfId required: true schema: - $ref: '#/components/schemas/apfId' + type: string style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ServiceAPIDescription' + items: + $ref: '#/components/schemas/ServiceAPIDescription' + minItems: 0 + type: array description: Definition of all service API(s) published by the API publishing function. "307": @@ -112,7 +113,7 @@ paths: name: apfId required: true schema: - $ref: '#/components/schemas/apfId' + type: string style: simple requestBody: content: @@ -126,12 +127,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ServiceAPIDescription' - description: Service API published successfully The URI of the created resource - shall be returned in the "Location" HTTP header. + description: | + Service API published successfully The URI of the created resource shall be returned in the "Location" HTTP header. headers: Location: - description: 'Contains the URI of the newly created resource, according - to the structure: {apiRoot}/published-apis/v1/{apfId}/service-apis/{serviceApiId}' + description: | + Contains the URI of the newly created resource, according to the structure {apiRoot}/published-apis/v1/{apfId}/service-apis/{serviceApiId} explode: false required: true schema: @@ -172,7 +173,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -210,14 +211,14 @@ paths: name: serviceApiId required: true schema: - $ref: '#/components/schemas/serviceApiId' + type: string style: simple - explode: false in: path name: apfId required: true schema: - $ref: '#/components/schemas/apfId' + type: string style: simple responses: "204": @@ -293,14 +294,14 @@ paths: name: serviceApiId required: true schema: - $ref: '#/components/schemas/serviceApiId' + type: string style: simple - explode: false in: path name: apfId required: true schema: - $ref: '#/components/schemas/apfId' + type: string style: simple responses: "200": @@ -308,8 +309,8 @@ paths: application/json: schema: $ref: '#/components/schemas/ServiceAPIDescription' - description: Definition of all service API published by the API publishing - function. + description: | + Definition of individual service API published by the API publishing function. "307": description: Temporary Redirect headers: @@ -377,6 +378,121 @@ paths: default: description: Generic Error x-openapi-router-controller: published_apis.controllers.default_controller + patch: + description: Modify an existing published service API. + operationId: modify_ind_apf_pub_api + parameters: + - explode: false + in: path + name: serviceApiId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: apfId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/ServiceAPIDescriptionPatch' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAPIDescription' + description: | + The definition of the service API is modified successfully and a representation of the updated service API is returned in the request body. + "204": + description: No Content. The definition of the service API is modified successfully. + "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 + tags: + - Individual APF published API + x-openapi-router-controller: published_apis.controllers.individual_apf_published_api_controller put: description: Update a published service API. operationId: apf_id_service_apis_service_api_id_put @@ -386,14 +502,14 @@ paths: name: serviceApiId required: true schema: - $ref: '#/components/schemas/serviceApiId' + type: string style: simple - explode: false in: path name: apfId required: true schema: - $ref: '#/components/schemas/apfId' + type: string style: simple requestBody: content: @@ -461,7 +577,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -490,13 +606,92 @@ paths: description: Generic Error x-openapi-router-controller: published_apis.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 + "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 + "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 schemas: - apfId: - description: Identification of the API publishing function. - type: string - serviceApiId: - description: String identifying an individual published service API. - type: string ServiceAPIDescription: description: Represents the description of a service API as published by the APF. @@ -509,20 +704,51 @@ components: - capifProvDoms - capifProvDoms isShareable: true + apiProvName: apiProvName supportedFeatures: supportedFeatures description: description apiSuppFeats: apiSuppFeats apiId: apiId + apiStatus: + aefIds: + - aefIds + - aefIds aefProfiles: - - securityMethods: - - null - - null + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -530,19 +756,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -551,6 +793,20 @@ components: - 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 @@ -558,46 +814,144 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - - securityMethods: - - null - - null + serviceKpis: + avalMem: avalMem + avalStor: avalStor + avalComp: avalComp + conBand: 0 + maxRestime: 0 + availability: 0 + maxReqRate: 0 + avalGraComp: avalGraComp + - protocol: HTTP_1_1 + 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 + commType: null + description: description + custOpName: custOpName + - operations: + - GET + - GET + commType: null + description: description + custOpName: custOpName description: description resourceName: resourceName custOpName: custOpName @@ -605,19 +959,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -626,6 +996,20 @@ components: - 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 @@ -633,59 +1017,129 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 properties: apiName: - description: API name, it is set as {apiName} part of the URI structure - as defined in subclause 4.4 of 3GPP TS 29.501. + 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). + 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 + apiStatus: + $ref: '#/components/schemas/ApiStatus' aefProfiles: - description: AEF profile information, which includes the exposed API details - (e.g. protocol). + description: | + AEF profile information, which includes the exposed API details (e.g. protocol). items: $ref: '#/components/schemas/AefProfile' minItems: 1 @@ -696,40 +1150,21 @@ components: 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]*$ + 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: + description: The service API category to which the service API belongs to. 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]*$ + 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: @@ -738,6 +1173,10 @@ components: description: CAPIF core function identifier. title: ccfId type: string + apiProvName: + description: Represents the API provider name. + title: apiProvName + type: string required: - apiName title: ServiceAPIDescription @@ -749,34 +1188,51 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + nullable: true oneOf: - required: - ipv4Addr - required: - ipv6Addr + - required: + - fqdn properties: ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted - decimal" notation as defined in IETF RFC 1166. + 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. + 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 + fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer + apiPrefix: + description: | + A string representing a sequence of path segments that starts with the slash character. + title: apiPrefix + type: string securityMethods: - description: Security methods supported by the interface, it take precedence - over the security methods provided in AefProfile, for this specific interface. + 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 @@ -787,15 +1243,41 @@ components: AefProfile: description: Represents the AEF profile data. example: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -803,19 +1285,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -824,6 +1322,20 @@ components: - 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 @@ -831,37 +1343,110 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 + nullable: true oneOf: - required: - domainName @@ -901,6 +1486,12 @@ components: minItems: 1 title: interfaceDescriptions type: array + aefLocation: + $ref: '#/components/schemas/AefLocation' + serviceKpis: + $ref: '#/components/schemas/ServiceKpis' + ueIpRange: + $ref: '#/components/schemas/IpAddrRange' required: - aefId - versions @@ -912,6 +1503,20 @@ components: 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 @@ -924,19 +1529,26 @@ components: commType: $ref: '#/components/schemas/CommunicationType' uri: - description: Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} - part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. + 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 subclause 4.4 of 3GPP - TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -956,22 +1568,22 @@ components: description: Represents the description of a custom operation. example: operations: - - null - - null + - 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 subclause 4.4 of - 3GPP TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -994,6 +1606,20 @@ components: - 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 @@ -1001,19 +1627,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -1046,8 +1688,8 @@ components: title: Version 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. + 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 @@ -1055,14 +1697,13 @@ components: 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". + 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. + description: | + List of CAPIF provider domains to which the service API information to be shared. items: type: string minItems: 1 @@ -1090,50 +1731,289 @@ components: type: array title: PublishedApiPath type: object + 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: 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 + ServiceAPIDescriptionPatch: + description: | + Represents the parameters to request the modification of an APF published API resource. + properties: + apiStatus: + $ref: '#/components/schemas/ApiStatus' + aefProfiles: + description: "AEF profile information, which includes the exposed API details." + items: + $ref: '#/components/schemas/AefProfile' + minItems: 1 + title: aefProfiles + type: array + description: + description: Text description of the API + title: description + type: string + shareableInfo: + $ref: '#/components/schemas/ShareableInformation' + serviceAPICategory: + description: The service API category to which the service API belongs to. + 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 + title: ServiceAPIDescriptionPatch + 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 this attribute is omitted, the API is inactive at all AEF(s) defined in the "aefProfiles" attribute within the ServiceAPIDescription data structure. + items: + type: string + title: aefIds + type: array + required: + - aefIds + title: ApiStatus + type: object + 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 + IpAddrRange: + anyOf: [] + description: Represents the list of public IP ranges + example: + 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 + nullable: true + properties: + ueIpv4AddrRanges: + description: Represents the IPv4 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv4AddressRange' + minItems: 1 + title: ueIpv4AddrRanges + type: array + ueIpv6AddrRanges: + description: Represents the Ipv6 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv6AddressRange' + minItems: 1 + title: ueIpv6AddrRanges + type: array + title: IpAddrRange + type: object Protocol: anyOf: - - $ref: '#/components/schemas/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: | - Possible values are - HTTP_1_1: HTTP version 1.1 - HTTP_2: HTTP version 2 + 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 CommunicationType: anyOf: - - $ref: '#/components/schemas/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 + 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 DataFormat: anyOf: - - $ref: '#/components/schemas/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: | - Possible values are - JSON: JavaScript Object Notation + 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 SecurityMethod: anyOf: - - $ref: '#/components/schemas/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 + description: "Indicates the security method. \nPossible values are:\n- PSK:\ + \ Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122.\n- PKI:\ + \ 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 Operation: anyOf: - - $ref: '#/components/schemas/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 + 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 ProblemDetails: description: Represents additional information and details on an error response. @@ -1143,8 +2023,8 @@ components: 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. + 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: @@ -1161,33 +2041,22 @@ components: 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. + 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. + 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]*$ + 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 @@ -1197,15 +2066,16 @@ components: title: type type: string InvalidParam: - description: Represents the description of invalid parameters, for a request - rejected due to invalid parameters. + 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. + 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". + description: "A human-readable reason, e.g. \"must be a positive integer\"\ + ." title: reason type: string required: @@ -1213,32 +2083,29 @@ components: title: InvalidParam 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]*$ + 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 Ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted decimal" - notation as defined in IETF RFC 1166. + 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. + 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 + Fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string Port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 @@ -1250,36 +2117,586 @@ components: format: date-time title: DateTime type: string - Protocol_anyOf: - enum: - - HTTP_1_1 - - HTTP_2 - title: Protocol_anyOf - type: string - CommunicationType_anyOf: - enum: - - REQUEST_RESPONSE - - SUBSCRIBE_NOTIFY - title: CommunicationType_anyOf - type: string - DataFormat_anyOf: - enum: - - JSON - title: DataFormat_anyOf - type: string - SecurityMethod_anyOf: - enum: - - PSK - - PKI - - OAUTH - title: SecurityMethod_anyOf + 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 + 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: 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 + 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' + title: LocalOrigin + type: object + 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' + 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 + Ipv4AddressRange: + description: Range of IPv4 addresses + example: + start: 198.51.100.1 + end: 198.51.100.1 + properties: + start: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 + type: string + end: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 + type: string + required: + - end + - start + title: Ipv4AddressRange + type: object + Ipv4Addr_1: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr_1 type: string - Operation_anyOf: - enum: - - GET - - POST - - PUT - - PATCH - - DELETE - title: Operation_anyOf + Ipv6AddressRange: + description: Range of IPv6 addresses + example: + start: 2001:db8:85a3::8a2e:370:7334 + end: 2001:db8:85a3::8a2e:370:7334 + properties: + start: + $ref: '#/components/schemas/Ipv6Addr_1' + end: + $ref: '#/components/schemas/Ipv6Addr_1' + required: + - end + - start + title: Ipv6AddressRange + type: object + Ipv6Addr_1: + allOf: + - pattern: "^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})):){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))$" + - pattern: "^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))$" + description: | + String identifying an IPv6 address formatted according to clause 4 of RFC5952. The mixed IPv4 IPv6 notation according to clause 5 of RFC5952 shall not be used. + example: 2001:db8:85a3::8a2e:370:7334 + title: Ipv6Addr_1 type: string + Float: + description: string with format 'float' as defined in OpenAPI. + format: float + title: Float + type: number 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 new file mode 100644 index 0000000000000000000000000000000000000000..07e31c34943f330f77a4548c2e7f12628701a50e --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/__init__.py @@ -0,0 +1,15 @@ +import logging + +import connexion +from flask_testing import TestCase +from published_apis.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_Publish_Service_API/published_apis/test/test_default_controller.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..7f824b920aa117a74730d8d5cb6a7236e729534a --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_default_controller.py @@ -0,0 +1,95 @@ +import unittest + +from flask import json +from published_apis.test import BaseTestCase + + +class TestDefaultController(BaseTestCase): + """DefaultController integration test stubs""" + + def test_apf_id_service_apis_get(self): + """Test case for apf_id_service_apis_get + + + """ + headers = { + 'Accept': 'application/json', + } + response = self.client.open( + '/published-apis/v1/{apf_id}/service-apis'.format(apf_id='apf_id_example'), + method='GET', + headers=headers) + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_apf_id_service_apis_post(self): + """Test case for apf_id_service_apis_post + + + """ + 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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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( + '/published-apis/v1/{apf_id}/service-apis'.format(apf_id='apf_id_example'), + method='POST', + headers=headers, + data=json.dumps(service_api_description), + content_type='application/json') + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_apf_id_service_apis_service_api_id_delete(self): + """Test case for apf_id_service_apis_service_api_id_delete + + + """ + headers = { + 'Accept': 'application/problem+json', + } + response = self.client.open( + '/published-apis/v1/{apf_id}/service-apis/{service_api_id}'.format(service_api_id='service_api_id_example', apf_id='apf_id_example'), + method='DELETE', + headers=headers) + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_apf_id_service_apis_service_api_id_get(self): + """Test case for apf_id_service_apis_service_api_id_get + + + """ + headers = { + 'Accept': 'application/json', + } + response = self.client.open( + '/published-apis/v1/{apf_id}/service-apis/{service_api_id}'.format(service_api_id='service_api_id_example', apf_id='apf_id_example'), + method='GET', + headers=headers) + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_apf_id_service_apis_service_api_id_put(self): + """Test case for apf_id_service_apis_service_api_id_put + + + """ + 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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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","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","securityMethods":[null,null],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},{"ipv6Addr":"ipv6Addr","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( + '/published-apis/v1/{apf_id}/service-apis/{service_api_id}'.format(service_api_id='service_api_id_example', apf_id='apf_id_example'), + method='PUT', + headers=headers, + data=json.dumps(service_api_description), + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..76ef07950be6c5c7741944d89558faa4c457d238 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/test/test_individual_apf_published_api_controller.py @@ -0,0 +1,31 @@ +import unittest + +from flask import json +from published_apis.test import BaseTestCase + + +class TestIndividualAPFPublishedAPIController(BaseTestCase): + """IndividualAPFPublishedAPIController integration test stubs""" + + def test_modify_ind_apf_pub_api(self): + """Test case for modify_ind_apf_pub_api + + + """ + service_api_description_patch = openapi_server.ServiceAPIDescriptionPatch() + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/merge-patch+json', + } + response = self.client.open( + '/published-apis/v1/{apf_id}/service-apis/{service_api_id}'.format(service_api_id='service_api_id_example', apf_id='apf_id_example'), + method='PATCH', + headers=headers, + data=json.dumps(service_api_description_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_Publish_Service_API/published_apis/typing_utils.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..d21c4f633653a0eae75d04b2f6eff684ff9d200d 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/typing_utils.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/typing_utils.py @@ -1,9 +1,6 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): - import typing def is_generic(klass): """ Determine whether klass is a generic class """ 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 3d85256f947326515afce40014c53420ef7c4879..1b1956659bd24a0eb3af866e2001b7098986dd01 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/util.py @@ -1,7 +1,6 @@ import datetime -import six -import typing_utils +from published_apis import typing_utils def serialize_clean_camel_case(obj): @@ -11,16 +10,21 @@ def serialize_clean_camel_case(obj): return res +def clean_n_camel_case(res): + res = clean_empty(res) + res = dict_to_camel_case(res) + + return res def clean_empty(d): if isinstance(d, dict): return { k: v for k, v in ((k, clean_empty(v)) for k, v in d.items()) - if v + if v is not None or (isinstance(v, list) and len(v) == 0) } if isinstance(d, list): - return [v for v in map(clean_empty, d) if v] + return [v for v in map(clean_empty, d) if v is not None] return d @@ -54,7 +58,6 @@ def dict_to_camel_case(my_dict): return result - def _deserialize(data, klass): """Deserializes dict, list, str into an object. @@ -66,7 +69,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -95,7 +98,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -119,7 +122,7 @@ def deserialize_date(string): """ if string is None: return None - + try: from dateutil.parser import parse return parse(string).date() @@ -160,7 +163,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -195,4 +198,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_Publish_Service_API/published_apis/vendor_specific.py b/services/TS29222_CAPIF_Publish_Service_API/published_apis/vendor_specific.py new file mode 100644 index 0000000000000000000000000000000000000000..21fd6b6d0a6676e5a1b19efbaaf0adec32e694d4 --- /dev/null +++ b/services/TS29222_CAPIF_Publish_Service_API/published_apis/vendor_specific.py @@ -0,0 +1,55 @@ +import re + +def find_attribute_in_body(test, path): + f_key = [] + if type(test) == dict: + for k, v in test.items(): + if 'vendorSpecific' in k: + if path == '': + temp_path = k + else: + temp_path = path + "." + k + f_key.append(temp_path) + elif type(v) == dict: + if path == '': + temp_path = k + else: + temp_path = path + "." + k + f_key += find_attribute_in_body(v, temp_path) + elif type(v) == list: + if path == '': + temp_path = k + else: + temp_path = path + "." + k + for i, val in enumerate(v): + f_key += find_attribute_in_body(val, temp_path + "." + str(i)) + return f_key + + +def vendor_specific_key_n_value(vendor_specific_fields, body): + vendor_specific = {} + for field in vendor_specific_fields: + parts = field.split('.') + tmp_body = body + for part in parts: + if part.isnumeric(): + part = int(part) + v = tmp_body[part] + tmp_body = v + vendor_specific[field] = v + return vendor_specific + +def add_vend_spec_fields(vendor_specific, serviceapidescription_dict): + pattern = re.compile(r'(?="3.6" +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 +setuptools == 74.0.0 +Flask == 3.0.3 pymongo == 4.7.3 -flask_jwt_extended == 4.4.4 +redis == 4.5.4 +flask_jwt_extended == 4.6.0 +cryptography == 42.0.8 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.17.0 +opentelemetry-exporter-jaeger == 1.19.0 fluent == 0.10.0 fluent-logger == 0.10.0 opentelemetry-api == 1.17.0 opentelemetry-sdk == 1.17.0 flask_executor == 1.0.0 -cryptography == 42.0.8 -redis == 4.5.4 -flask_executor == 1.0.0 -Werkzeug == 2.2.3 +Flask-APScheduler == 1.13.1 +werkzeug == 3.0.4 gunicorn == 22.0.0 packaging == 24.0 + diff --git a/services/TS29222_CAPIF_Publish_Service_API/setup.py b/services/TS29222_CAPIF_Publish_Service_API/setup.py index 0b21a836f9c212c49a3e346e9c529bee53dd469f..8b1c991255816f36ad3ecced8745484a6162e5a6 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/setup.py +++ b/services/TS29222_CAPIF_Publish_Service_API/setup.py @@ -1,6 +1,3 @@ -# coding: utf-8 - -import sys from setuptools import setup, find_packages NAME = "published_apis" @@ -33,7 +30,7 @@ setup( entry_points={ 'console_scripts': ['published_apis=published_apis.__main__:main']}, long_description="""\ - API for publishing service APIs. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for publishing service APIs. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) diff --git a/services/TS29222_CAPIF_Publish_Service_API/test-requirements.txt b/services/TS29222_CAPIF_Publish_Service_API/test-requirements.txt index 202a684feef71ff540d6aa528d348febf0b37d1e..58f51d6a00272d7515a20e3618f345b73c68afa0 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/test-requirements.txt +++ b/services/TS29222_CAPIF_Publish_Service_API/test-requirements.txt @@ -1,4 +1,4 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 +pytest~=7.1.0 pytest-cov>=2.8.1 -pytest-randomly == 1.2.3 # needed for python 2.7+3.4 -Flask-Testing == 0.8.0 +pytest-randomly>=1.2.3 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_Publish_Service_API/tox.ini b/services/TS29222_CAPIF_Publish_Service_API/tox.ini index 17663abb51c05a354a07eedf89a94700a0f9902b..44ee4e42e7015ff06f6c778493735a4b30fb5a75 100644 --- a/services/TS29222_CAPIF_Publish_Service_API/tox.ini +++ b/services/TS29222_CAPIF_Publish_Service_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= pytest --cov=published_apis diff --git a/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/FILES index ddc37ec369377d3c3adc57a862078246ab953012..be8f43b72f15e9d43510b5fa60ebd25e0872a090 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/FILES @@ -1,42 +1,63 @@ .dockerignore .gitignore +.openapi-generator-ignore .travis.yml Dockerfile README.md +git_push.sh capif_routing_info/__init__.py capif_routing_info/__main__.py capif_routing_info/controllers/__init__.py capif_routing_info/controllers/default_controller.py -capif_routing_info/controllers/security_controller_.py +capif_routing_info/controllers/security_controller.py capif_routing_info/encoder.py capif_routing_info/models/__init__.py +capif_routing_info/models/aef_location.py capif_routing_info/models/aef_profile.py -capif_routing_info/models/base_model_.py +capif_routing_info/models/base_model.py +capif_routing_info/models/civic_address.py capif_routing_info/models/communication_type.py -capif_routing_info/models/communication_type_any_of.py capif_routing_info/models/custom_operation.py capif_routing_info/models/data_format.py -capif_routing_info/models/data_format_any_of.py +capif_routing_info/models/ellipsoid_arc.py +capif_routing_info/models/gad_shape.py +capif_routing_info/models/geographic_area.py +capif_routing_info/models/geographical_coordinates.py capif_routing_info/models/interface_description.py capif_routing_info/models/invalid_param.py +capif_routing_info/models/ip_addr_range.py capif_routing_info/models/ipv4_address_range.py +capif_routing_info/models/ipv4_address_range1.py +capif_routing_info/models/ipv6_addr1.py capif_routing_info/models/ipv6_address_range.py +capif_routing_info/models/ipv6_address_range1.py +capif_routing_info/models/local2d_point_uncertainty_ellipse.py +capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py +capif_routing_info/models/local_origin.py capif_routing_info/models/operation.py -capif_routing_info/models/operation_any_of.py +capif_routing_info/models/point.py +capif_routing_info/models/point_altitude.py +capif_routing_info/models/point_altitude_uncertainty.py +capif_routing_info/models/point_uncertainty_circle.py +capif_routing_info/models/point_uncertainty_ellipse.py +capif_routing_info/models/polygon.py capif_routing_info/models/problem_details.py capif_routing_info/models/protocol.py -capif_routing_info/models/protocol_any_of.py +capif_routing_info/models/relative_cartesian_location.py capif_routing_info/models/resource.py capif_routing_info/models/routing_info.py capif_routing_info/models/routing_rule.py capif_routing_info/models/security_method.py -capif_routing_info/models/security_method_any_of.py +capif_routing_info/models/service_kpis.py +capif_routing_info/models/supported_gad_shapes.py +capif_routing_info/models/uncertainty_ellipse.py +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 -git_push.sh requirements.txt setup.py test-requirements.txt diff --git a/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/VERSION index 4b448de535c7dd619da0df6d8221995dbd5d118a..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_Routing_Info_API/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_Routing_Info_API/Dockerfile b/services/TS29222_CAPIF_Routing_Info_API/Dockerfile index 470877e41836eedb6467794b8af2f4d7281c14cd..0f3e0e4662735f614c19a357c185d424463d04cb 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/Dockerfile +++ b/services/TS29222_CAPIF_Routing_Info_API/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app diff --git a/services/TS29222_CAPIF_Routing_Info_API/README.md b/services/TS29222_CAPIF_Routing_Info_API/README.md index b239418e6ca48afcab32df49aeb265a57a253a3c..edacb4a6f8839ed6e00ca6b7250bd7aca3d9df43 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: diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/app.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/app.py index 89135805b065ac22200eecdbf76b699f7035e680..48e8769b25cbe6c591bc4486b116d21def6a8fe0 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/app.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/app.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 import connexion -import encoder +import encoder -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = encoder.CustomJSONEncoder app.add_api('openapi.yaml', arguments={'title': 'CAPIF_Routing_Info_API'}, pythonic_params=True) 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 13c24a3a52464679a765141f1963cc5bb21248ec..9dafc055a9b0e9e95accef08aaf07610d76331ac 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,4 +1,11 @@ -from ..models.routing_info import RoutingInfo # noqa: E501 +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 @@ -13,6 +20,6 @@ def service_apis_service_api_id_get(service_api_id, aef_id, supp_feat=None): # :param supp_feat: To filter irrelevant responses related to unsupported features :type supp_feat: str - :rtype: RoutingInfo + :rtype: Union[RoutingInfo, Tuple[RoutingInfo, int], Tuple[RoutingInfo, int, Dict[str, str]] """ return 'do some magic!' diff --git a/services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller_.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py similarity index 100% rename from services/TS29222_CAPIF_API_Invoker_Management_API/api_invoker_management/controllers/security_controller_.py rename to services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller.py 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 deleted file mode 100644 index 6d294ffd6df1a26a469dbb4e72533b01503468dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/controllers/security_controller_.py +++ /dev/null @@ -1,2 +0,0 @@ -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 80bad8fa9220ab873e044b7adc0a849746088ad5..ba7c4d5e37a65102002ee1a785da9eb1e49da013 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,20 +1,20 @@ -from connexion.apps.flask_app import FlaskJSONEncoder +from connexion.jsonifier import JSONEncoder import six -from models.base_model_ import Model +from capif_routing_info.models.base_model import Model -class JSONEncoder(FlaskJSONEncoder): +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + return JSONEncoder.default(self, o) 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 68aa16c325023522d4355c315d2f92f0508ff0d6..d036df693ea41dfaa3debffffad0462c1fcd8e4a 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,26 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # import models into model package -from capif_routing_info.models.aef_profile import AefProfile -from capif_routing_info.models.communication_type import CommunicationType -from capif_routing_info.models.communication_type_any_of import CommunicationTypeAnyOf -from capif_routing_info.models.custom_operation import CustomOperation -from capif_routing_info.models.data_format import DataFormat -from capif_routing_info.models.data_format_any_of import DataFormatAnyOf -from capif_routing_info.models.interface_description import InterfaceDescription -from capif_routing_info.models.invalid_param import InvalidParam -from capif_routing_info.models.ipv4_address_range import Ipv4AddressRange -from capif_routing_info.models.ipv6_address_range import Ipv6AddressRange -from capif_routing_info.models.operation import Operation -from capif_routing_info.models.operation_any_of import OperationAnyOf -from capif_routing_info.models.problem_details import ProblemDetails -from capif_routing_info.models.protocol import Protocol -from capif_routing_info.models.protocol_any_of import ProtocolAnyOf -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.security_method_any_of import SecurityMethodAnyOf -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 new file mode 100644 index 0000000000000000000000000000000000000000..f0e756be690433fcf944def5f64229fd20e75748 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/aef_location.py @@ -0,0 +1,116 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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_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 9a7e083dd4ee6f28bb42ac2cd94e3e778b72a011..ccf24ad69e698692adb1f873fa673cd204a7b6fe 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,31 +1,25 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_routing_info.models.base_model_ import Model -from capif_routing_info.models.data_format import DataFormat -from capif_routing_info.models.interface_description import InterfaceDescription -from capif_routing_info.models.protocol import Protocol -from capif_routing_info.models.security_method import SecurityMethod -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 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.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). 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): # noqa: E501 + 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, 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 @@ -42,6 +36,12 @@ class AefProfile(Model): :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, @@ -50,7 +50,10 @@ class AefProfile(Model): 'data_format': DataFormat, 'security_methods': List[SecurityMethod], 'domain_name': str, - 'interface_descriptions': List[InterfaceDescription] + 'interface_descriptions': List[InterfaceDescription], + 'aef_location': AefLocation, + 'service_kpis': ServiceKpis, + 'ue_ip_range': IpAddrRange } self.attribute_map = { @@ -60,7 +63,10 @@ class AefProfile(Model): 'data_format': 'dataFormat', 'security_methods': 'securityMethods', 'domain_name': 'domainName', - 'interface_descriptions': 'interfaceDescriptions' + 'interface_descriptions': 'interfaceDescriptions', + 'aef_location': 'aefLocation', + 'service_kpis': 'serviceKpis', + 'ue_ip_range': 'ueIpRange' } self._aef_id = aef_id @@ -70,6 +76,9 @@ class AefProfile(Model): self._security_methods = security_methods 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': @@ -83,7 +92,7 @@ class AefProfile(Model): return util.deserialize_model(dikt, cls) @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -94,7 +103,7 @@ class AefProfile(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this AefProfile. Identifier of the API exposing function # noqa: E501 @@ -108,7 +117,7 @@ class AefProfile(Model): self._aef_id = aef_id @property - def versions(self): + def versions(self) -> List[Version]: """Gets the versions of this AefProfile. API version # noqa: E501 @@ -119,7 +128,7 @@ class AefProfile(Model): return self._versions @versions.setter - def versions(self, versions): + def versions(self, versions: List[Version]): """Sets the versions of this AefProfile. API version # noqa: E501 @@ -135,7 +144,7 @@ class AefProfile(Model): self._versions = versions @property - def protocol(self): + def protocol(self) -> Protocol: """Gets the protocol of this AefProfile. @@ -145,7 +154,7 @@ class AefProfile(Model): return self._protocol @protocol.setter - def protocol(self, protocol): + def protocol(self, protocol: Protocol): """Sets the protocol of this AefProfile. @@ -156,7 +165,7 @@ class AefProfile(Model): self._protocol = protocol @property - def data_format(self): + def data_format(self) -> DataFormat: """Gets the data_format of this AefProfile. @@ -166,7 +175,7 @@ class AefProfile(Model): return self._data_format @data_format.setter - def data_format(self, data_format): + def data_format(self, data_format: DataFormat): """Sets the data_format of this AefProfile. @@ -177,7 +186,7 @@ class AefProfile(Model): self._data_format = data_format @property - def security_methods(self): + def security_methods(self) -> List[SecurityMethod]: """Gets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -188,7 +197,7 @@ class AefProfile(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + def security_methods(self, security_methods: List[SecurityMethod]): """Sets the security_methods of this AefProfile. Security methods supported by the AEF # noqa: E501 @@ -202,7 +211,7 @@ class AefProfile(Model): self._security_methods = security_methods @property - def domain_name(self): + def domain_name(self) -> str: """Gets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -213,7 +222,7 @@ class AefProfile(Model): return self._domain_name @domain_name.setter - def domain_name(self, domain_name): + def domain_name(self, domain_name: str): """Sets the domain_name of this AefProfile. Domain to which API belongs to # noqa: E501 @@ -225,7 +234,7 @@ class AefProfile(Model): self._domain_name = domain_name @property - def interface_descriptions(self): + def interface_descriptions(self) -> List[InterfaceDescription]: """Gets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -236,7 +245,7 @@ class AefProfile(Model): return self._interface_descriptions @interface_descriptions.setter - def interface_descriptions(self, interface_descriptions): + def interface_descriptions(self, interface_descriptions: List[InterfaceDescription]): """Sets the interface_descriptions of this AefProfile. Interface details # noqa: E501 @@ -248,3 +257,66 @@ class AefProfile(Model): 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 + + @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/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 similarity index 92% rename from services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model_.py rename to services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/base_model.py index 4f38e97ff28a52c226a0c4e6293e9f8dcab7786f..57cac681050dbb58f484665598a3791402122dad 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,6 +1,4 @@ import pprint - -import six import typing from capif_routing_info import util @@ -8,14 +6,14 @@ from capif_routing_info import util T = typing.TypeVar('T') -class Model(object): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. - openapi_types = {} + openapi_types: typing.Dict[str, type] = {} # attributeMap: The key is attribute name and the # value is json key in definition. - attribute_map = {} + attribute_map: typing.Dict[str, str] = {} @classmethod def from_dict(cls: typing.Type[T], dikt) -> T: @@ -29,7 +27,7 @@ class Model(object): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 new file mode 100644 index 0000000000000000000000000000000000000000..e12616c961824a301b1af41fe3dbf471ec6ba956 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/civic_address.py @@ -0,0 +1,918 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model + + +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_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 090173b4c55081395d1fc7b03149f3580fab073e..02f3063dda850439667db3d3ee6a07c28d7be1e9 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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_any_of import CommunicationTypeAnyOf from capif_routing_info import util +from capif_routing_info.models.base_model import Model -from capif_routing_info.models.communication_type_any_of import CommunicationTypeAnyOf # noqa: E501 class CommunicationType(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/communication_type_any_of.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type_any_of.py deleted file mode 100644 index 439089433582ef08f02f32d911b6c1f09a4cf6ab..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/communication_type_any_of.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model_ import Model -from capif_routing_info import util - - -class CommunicationTypeAnyOf(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 - """CommunicationTypeAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'CommunicationTypeAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The CommunicationType_anyOf of this CommunicationTypeAnyOf. # noqa: E501 - :rtype: CommunicationTypeAnyOf - """ - return util.deserialize_model(dikt, cls) 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 fe5a6e9c93f9e881b35ea14cb196dcbc1da6cc54..6ea6b7059ce6f8d02a9b784008d62a95731d4e2f 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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.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). @@ -62,7 +56,7 @@ class CustomOperation(Model): return util.deserialize_model(dikt, cls) @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this CustomOperation. @@ -72,7 +66,7 @@ class CustomOperation(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this CustomOperation. @@ -85,10 +79,10 @@ class CustomOperation(Model): self._comm_type = comm_type @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -96,10 +90,10 @@ class CustomOperation(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -110,10 +104,10 @@ class CustomOperation(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -121,10 +115,10 @@ class CustomOperation(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -135,7 +129,7 @@ class CustomOperation(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this CustomOperation. Text description of the custom operation # noqa: E501 @@ -146,7 +140,7 @@ class CustomOperation(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this CustomOperation. Text description of the custom operation # noqa: E501 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 61a086c4b1ccb00e8fb3c2c71773297134ddeceb..3b453d17bc4f39e447f89c96913113c721558905 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_routing_info.models.base_model_ import Model -from capif_routing_info.models.data_format_any_of import DataFormatAnyOf from capif_routing_info import util +from capif_routing_info.models.base_model import Model -from capif_routing_info.models.data_format_any_of import DataFormatAnyOf # noqa: E501 class DataFormat(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/ellipsoid_arc.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py new file mode 100644 index 0000000000000000000000000000000000000000..790d70a094bdf1a4de495c033be74595d004de61 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ellipsoid_arc.py @@ -0,0 +1,260 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model +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). + + 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_Routing_Info_API/capif_routing_info/models/gad_shape.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py new file mode 100644 index 0000000000000000000000000000000000000000..de28747699d8840f565a4408119912eee256510f --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/gad_shape.py @@ -0,0 +1,63 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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_Routing_Info_API/capif_routing_info/models/geographic_area.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py new file mode 100644 index 0000000000000000000000000000000000000000..f0fd6607f0701b96db86c9be546b1f1cb823114b --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographic_area.py @@ -0,0 +1,453 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model +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 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_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py new file mode 100644 index 0000000000000000000000000000000000000000..8b0e51f2785d65a76975f5d71d8d1dfa80570f15 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/geographical_coordinates.py @@ -0,0 +1,99 @@ +from datetime import date, datetime # noqa: F401 + +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): + """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_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 1350c6ff66e92fe1aa0ac80deb708154e5b13bbb..6d0075be6c8732003d5184a3993e5df6e3183dd0 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,51 +1,57 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_routing_info.models.base_model_ import Model -from capif_routing_info.models.security_method import SecurityMethod from capif_routing_info import util - +from capif_routing_info.models.base_model import Model from capif_routing_info.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 + def __init__(self, ipv4_addr=None, ipv6_addr=None, fqdn=None, port=None, api_prefix=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 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] """ self.openapi_types = { 'ipv4_addr': str, 'ipv6_addr': str, + 'fqdn': str, 'port': int, + 'api_prefix': str, 'security_methods': List[SecurityMethod] } self.attribute_map = { 'ipv4_addr': 'ipv4Addr', 'ipv6_addr': 'ipv6Addr', + 'fqdn': 'fqdn', 'port': 'port', + 'api_prefix': 'apiPrefix', 'security_methods': 'securityMethods' } 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 @classmethod @@ -60,10 +66,10 @@ class InterfaceDescription(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr(self): + 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 + 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 @@ -71,10 +77,10 @@ class InterfaceDescription(Model): return self._ipv4_addr @ipv4_addr.setter - def ipv4_addr(self, ipv4_addr): + 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 + 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 @@ -83,10 +89,10 @@ class InterfaceDescription(Model): self._ipv4_addr = ipv4_addr @property - def ipv6_addr(self): + 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 + 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 @@ -94,10 +100,10 @@ class InterfaceDescription(Model): return self._ipv6_addr @ipv6_addr.setter - def ipv6_addr(self, ipv6_addr): + 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 + 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 @@ -106,7 +112,36 @@ class InterfaceDescription(Model): self._ipv6_addr = ipv6_addr @property - def port(self): + def fqdn(self) -> str: + """Gets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :return: The fqdn of this InterfaceDescription. + :rtype: str + """ + return self._fqdn + + @fqdn.setter + def fqdn(self, fqdn: str): + """Sets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :param fqdn: The fqdn of this InterfaceDescription. + :type fqdn: str + """ + if fqdn is not None and len(fqdn) > 253: + raise ValueError("Invalid value for `fqdn`, length must be less than or equal to `253`") # noqa: E501 + if fqdn is not None and len(fqdn) < 4: + raise ValueError("Invalid value for `fqdn`, length must be greater than or equal to `4`") # noqa: E501 + if fqdn is not None and not re.search(r'^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$', fqdn): # noqa: E501 + raise ValueError("Invalid value for `fqdn`, must be a follow pattern or equal to `/^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$/`") # noqa: E501 + + self._fqdn = fqdn + + @property + def port(self) -> int: """Gets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -117,7 +152,7 @@ class InterfaceDescription(Model): return self._port @port.setter - def port(self, port): + def port(self, port: int): """Sets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -133,10 +168,33 @@ class InterfaceDescription(Model): self._port = port @property - def security_methods(self): + def api_prefix(self) -> str: + """Gets the api_prefix of this InterfaceDescription. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. - Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + 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] @@ -144,10 +202,10 @@ class InterfaceDescription(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + 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 + 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] 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 020db5d8f74f916536b4b4c8d7e328ba619c4dfb..3014346fa88dc43513de02189977734f0fc0fcd2 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 new file mode 100644 index 0000000000000000000000000000000000000000..6fa0acf3a648c993cc37968a0925723c3406d460 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ip_addr_range.py @@ -0,0 +1,96 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +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, ue_ipv6_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[Ipv4AddressRange1] + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. # noqa: E501 + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange1] + """ + self.openapi_types = { + 'ue_ipv4_addr_ranges': List[Ipv4AddressRange1], + 'ue_ipv6_addr_ranges': List[Ipv6AddressRange1] + } + + self.attribute_map = { + 'ue_ipv4_addr_ranges': 'ueIpv4AddrRanges', + 'ue_ipv6_addr_ranges': 'ueIpv6AddrRanges' + } + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + self._ue_ipv6_addr_ranges = ue_ipv6_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[Ipv4AddressRange1]: + """Gets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv4_addr_ranges of this IpAddrRange. + :rtype: List[Ipv4AddressRange1] + """ + return self._ue_ipv4_addr_ranges + + @ue_ipv4_addr_ranges.setter + def ue_ipv4_addr_ranges(self, ue_ipv4_addr_ranges: List[Ipv4AddressRange1]): + """Sets the ue_ipv4_addr_ranges of this IpAddrRange. + + Represents the IPv4 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv4_addr_ranges: The ue_ipv4_addr_ranges of this IpAddrRange. + :type ue_ipv4_addr_ranges: List[Ipv4AddressRange1] + """ + if ue_ipv4_addr_ranges is not None and len(ue_ipv4_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv4_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv4_addr_ranges = ue_ipv4_addr_ranges + + @property + def ue_ipv6_addr_ranges(self) -> List[Ipv6AddressRange1]: + """Gets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :return: The ue_ipv6_addr_ranges of this IpAddrRange. + :rtype: List[Ipv6AddressRange1] + """ + return self._ue_ipv6_addr_ranges + + @ue_ipv6_addr_ranges.setter + def ue_ipv6_addr_ranges(self, ue_ipv6_addr_ranges: List[Ipv6AddressRange1]): + """Sets the ue_ipv6_addr_ranges of this IpAddrRange. + + Represents the Ipv6 Address ranges of the UE(s). # noqa: E501 + + :param ue_ipv6_addr_ranges: The ue_ipv6_addr_ranges of this IpAddrRange. + :type ue_ipv6_addr_ranges: List[Ipv6AddressRange1] + """ + if ue_ipv6_addr_ranges is not None and len(ue_ipv6_addr_ranges) < 1: + raise ValueError("Invalid value for `ue_ipv6_addr_ranges`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ue_ipv6_addr_ranges = ue_ipv6_addr_ranges 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 5f8e7c0745d8183a852e265bedb4a42dbe445f4e..a8025b6cb70da8555be363e1ac5ef1a59026ff85 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,15 +1,10 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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). @@ -50,10 +45,10 @@ class Ipv4AddressRange(Model): return util.deserialize_model(dikt, cls) @property - def start(self): + def start(self) -> str: """Gets the start of this Ipv4AddressRange. - String identifying a IPv4 address formatted in the \"dotted decimal\" notation as defined in RFC 1166. # noqa: E501 + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 :return: The start of this Ipv4AddressRange. :rtype: str @@ -61,24 +56,24 @@ class Ipv4AddressRange(Model): return self._start @start.setter - def start(self, start): + def start(self, start: str): """Sets the start of this Ipv4AddressRange. - String identifying a IPv4 address formatted in the \"dotted decimal\" notation as defined in RFC 1166. # noqa: E501 + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 :param start: The start of this Ipv4AddressRange. :type start: str """ if start is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', start): # noqa: E501 - raise ValueError("Invalid value for `start`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + raise ValueError("Invalid value for `start`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 self._start = start @property - def end(self): + def end(self) -> str: """Gets the end of this Ipv4AddressRange. - String identifying a IPv4 address formatted in the \"dotted decimal\" notation as defined in RFC 1166. # noqa: E501 + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 :return: The end of this Ipv4AddressRange. :rtype: str @@ -86,15 +81,15 @@ class Ipv4AddressRange(Model): return self._end @end.setter - def end(self, end): + def end(self, end: str): """Sets the end of this Ipv4AddressRange. - String identifying a IPv4 address formatted in the \"dotted decimal\" notation as defined in RFC 1166. # noqa: E501 + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 :param end: The end of this Ipv4AddressRange. :type end: str """ if end is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', end): # noqa: E501 - raise ValueError("Invalid value for `end`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + raise ValueError("Invalid value for `end`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 self._end = end 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 new file mode 100644 index 0000000000000000000000000000000000000000..ebb34a4abaf993a285dc769286c65b7f9db34367 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv4_address_range1.py @@ -0,0 +1,99 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model + + +class Ipv4AddressRange1(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 + """Ipv4AddressRange1 - a model defined in OpenAPI + + :param start: The start of this Ipv4AddressRange1. # noqa: E501 + :type start: str + :param end: The end of this Ipv4AddressRange1. # 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) -> 'Ipv4AddressRange1': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv4AddressRange_1 of this Ipv4AddressRange1. # noqa: E501 + :rtype: Ipv4AddressRange1 + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> str: + """Gets the start of this Ipv4AddressRange1. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The start of this Ipv4AddressRange1. + :rtype: str + """ + return self._start + + @start.setter + def start(self, start: str): + """Sets the start of this Ipv4AddressRange1. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param start: The start of this Ipv4AddressRange1. + :type start: str + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + if start is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', start): # noqa: E501 + raise ValueError("Invalid value for `start`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._start = start + + @property + def end(self) -> str: + """Gets the end of this Ipv4AddressRange1. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :return: The end of this Ipv4AddressRange1. + :rtype: str + """ + return self._end + + @end.setter + def end(self, end: str): + """Sets the end of this Ipv4AddressRange1. + + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. # noqa: E501 + + :param end: The end of this Ipv4AddressRange1. + :type end: str + """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 + if end is not None and not re.search(r'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$', end): # noqa: E501 + raise ValueError("Invalid value for `end`, must be a follow pattern or equal to `/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/`") # noqa: E501 + + self._end = end diff --git a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format_any_of.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py similarity index 58% rename from services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format_any_of.py rename to services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py index 97da8ffcf6a7d1ef3556aac9487522eef841e812..a08058027ebdc12cff398ed5b394e83bc9791fb0 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/data_format_any_of.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_addr1.py @@ -1,26 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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 DataFormatAnyOf(Model): +class Ipv6Addr1(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" def __init__(self): # noqa: E501 - """DataFormatAnyOf - a model defined in OpenAPI + """Ipv6Addr1 - a model defined in OpenAPI """ self.openapi_types = { @@ -30,12 +22,12 @@ class DataFormatAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'DataFormatAnyOf': + def from_dict(cls, dikt) -> 'Ipv6Addr1': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The DataFormat_anyOf of this DataFormatAnyOf. # noqa: E501 - :rtype: DataFormatAnyOf + :return: The Ipv6Addr_1 of this Ipv6Addr1. # noqa: E501 + :rtype: Ipv6Addr1 """ return util.deserialize_model(dikt, cls) 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 d2afb78af33989d71782f6db814bd24cd1a61c35..2067eb2d4600f322d0bce17c8676ce28733ede39 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -48,10 +44,10 @@ class Ipv6AddressRange(Model): return util.deserialize_model(dikt, cls) @property - def start(self): + def start(self) -> str: """Gets the start of this Ipv6AddressRange. - 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 + 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 start of this Ipv6AddressRange. :rtype: str @@ -59,10 +55,10 @@ class Ipv6AddressRange(Model): return self._start @start.setter - def start(self, start): + def start(self, start: str): """Sets the start of this Ipv6AddressRange. - 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 + 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 start: The start of this Ipv6AddressRange. :type start: str @@ -73,10 +69,10 @@ class Ipv6AddressRange(Model): self._start = start @property - def end(self): + def end(self) -> str: """Gets the end of this Ipv6AddressRange. - 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 + 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 end of this Ipv6AddressRange. :rtype: str @@ -84,10 +80,10 @@ class Ipv6AddressRange(Model): return self._end @end.setter - def end(self, end): + def end(self, end: str): """Sets the end of this Ipv6AddressRange. - 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 + 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 end: The end of this Ipv6AddressRange. :type end: str 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 new file mode 100644 index 0000000000000000000000000000000000000000..270b9ac93a0ccf3bc6f4586f262595b80880f9ff --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/ipv6_address_range1.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + Do not edit the class manually. + """ + + def __init__(self, start=None, end=None): # noqa: E501 + """Ipv6AddressRange1 - a model defined in OpenAPI + + :param start: The start of this Ipv6AddressRange1. # noqa: E501 + :type start: Ipv6Addr1 + :param end: The end of this Ipv6AddressRange1. # noqa: E501 + :type end: Ipv6Addr1 + """ + self.openapi_types = { + 'start': Ipv6Addr1, + 'end': Ipv6Addr1 + } + + self.attribute_map = { + 'start': 'start', + 'end': 'end' + } + + self._start = start + self._end = end + + @classmethod + def from_dict(cls, dikt) -> 'Ipv6AddressRange1': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Ipv6AddressRange_1 of this Ipv6AddressRange1. # noqa: E501 + :rtype: Ipv6AddressRange1 + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self) -> Ipv6Addr1: + """Gets the start of this Ipv6AddressRange1. + + + :return: The start of this Ipv6AddressRange1. + :rtype: Ipv6Addr1 + """ + return self._start + + @start.setter + def start(self, start: Ipv6Addr1): + """Sets the start of this Ipv6AddressRange1. + + + :param start: The start of this Ipv6AddressRange1. + :type start: Ipv6Addr1 + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + + self._start = start + + @property + def end(self) -> Ipv6Addr1: + """Gets the end of this Ipv6AddressRange1. + + + :return: The end of this Ipv6AddressRange1. + :rtype: Ipv6Addr1 + """ + return self._end + + @end.setter + def end(self, end: Ipv6Addr1): + """Sets the end of this Ipv6AddressRange1. + + + :param end: The end of this Ipv6AddressRange1. + :type end: Ipv6Addr1 + """ + if end is None: + raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 + + self._end = end 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 new file mode 100644 index 0000000000000000000000000000000000000000..c9b258b16c56b4118051ac79c9ddeb7d99cc4074 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/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 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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..2539de2ce701974bc68b9d0873ef30d0eb853fa0 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local3d_point_uncertainty_ellipsoid.py @@ -0,0 +1,191 @@ +from datetime import date, datetime # 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.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). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, local_origin=None, point=None, uncertainty_ellipsoid=None, 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 + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'local_origin': LocalOrigin, + 'point': RelativeCartesianLocation, + 'uncertainty_ellipsoid': UncertaintyEllipsoid, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'local_origin': 'localOrigin', + 'point': 'point', + 'uncertainty_ellipsoid': 'uncertaintyEllipsoid', + 'confidence': 'confidence' + } + + self._shape = shape + self._local_origin = local_origin + self._point = point + self._uncertainty_ellipsoid = uncertainty_ellipsoid + self._confidence = 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..8eb4a75aa3736a6a1c1c3ed99035c8ace4ed5441 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/local_origin.py @@ -0,0 +1,87 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model +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). + + Do not edit the class manually. + """ + + def __init__(self, coordinate_id=None, point=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 + """ + self.openapi_types = { + 'coordinate_id': str, + 'point': GeographicalCoordinates + } + + self.attribute_map = { + 'coordinate_id': 'coordinateId', + 'point': 'point' + } + + self._coordinate_id = coordinate_id + self._point = point + + @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 + """ + + 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 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 d54629b5b8bfc4728c5285d77fd169a8753fa7c7..3e0511a1860ec3f6d451cf77f5e7655c10d6fd75 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_routing_info.models.base_model_ import Model -from capif_routing_info.models.operation_any_of import OperationAnyOf from capif_routing_info import util +from capif_routing_info.models.base_model import Model -from capif_routing_info.models.operation_any_of import OperationAnyOf # noqa: E501 class Operation(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/operation_any_of.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation_any_of.py deleted file mode 100644 index d92e4952132d37ebf616b085e7b48d260078ec38..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/operation_any_of.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model_ import Model -from capif_routing_info import util - - -class OperationAnyOf(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 - """OperationAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'OperationAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Operation_anyOf of this OperationAnyOf. # noqa: E501 - :rtype: OperationAnyOf - """ - return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..471c405c488739b2ea9b8bed187d30e82391a532 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point.py @@ -0,0 +1,92 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model +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). + + 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_Routing_Info_API/capif_routing_info/models/point_altitude.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py new file mode 100644 index 0000000000000000000000000000000000000000..8524f90298135d054c687cc304afb06753a32624 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude.py @@ -0,0 +1,126 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model +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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..fdcea5e2713a88881a422e4fc1a2172b9aef963d --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_altitude_uncertainty.py @@ -0,0 +1,259 @@ +from datetime import date, datetime # 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.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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..80faac436162d573d9f9ace49bbeec0a11cc21ca --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_circle.py @@ -0,0 +1,129 @@ +from datetime import date, datetime # 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.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). + + 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_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 new file mode 100644 index 0000000000000000000000000000000000000000..03c55bf712de32ce6a2f6ac845c783e0d353b1ed --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/point_uncertainty_ellipse.py @@ -0,0 +1,161 @@ +from datetime import date, datetime # 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.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). + + 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_Routing_Info_API/capif_routing_info/models/polygon.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py new file mode 100644 index 0000000000000000000000000000000000000000..977b02264d6e0f1988660ce5423fd4f96b9ffaf8 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/polygon.py @@ -0,0 +1,98 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model +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). + + 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_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 b661b722e7f57dc11595b3df7fae6a0f0443f31a..e2a91365ae14fe297d8c12b6a2b54a31b07566c7 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,10 +239,10 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 + 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 @@ -256,10 +250,10 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 + 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 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 da612eca37af79f881b70a092faab9b0c7d41315..48cda2a8fbf79ffff6fde64dc11a85029db46d18 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_routing_info.models.base_model_ import Model -from capif_routing_info.models.protocol_any_of import ProtocolAnyOf from capif_routing_info import util +from capif_routing_info.models.base_model import Model -from capif_routing_info.models.protocol_any_of import ProtocolAnyOf # noqa: E501 class Protocol(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/relative_cartesian_location.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py new file mode 100644 index 0000000000000000000000000000000000000000..592f4bc6f6168af43830e8f6f7c19403e3d11d3b --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/relative_cartesian_location.py @@ -0,0 +1,123 @@ +from datetime import date, datetime # noqa: F401 + +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): + """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_Routing_Info_API/capif_routing_info/models/resource.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/resource.py index e4eb5b847d68b8997a8a0bc757c6d8bba46b2532..11872f4956b1bf735f272764f90a9c4bf52b2f8b 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,25 +1,20 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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.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). 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 + 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 @@ -30,6 +25,8 @@ class Resource(Model): :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 @@ -40,6 +37,7 @@ class Resource(Model): 'comm_type': CommunicationType, 'uri': str, 'cust_op_name': str, + 'cust_operations': List[CustomOperation], 'operations': List[Operation], 'description': str } @@ -49,6 +47,7 @@ class Resource(Model): 'comm_type': 'commType', 'uri': 'uri', 'cust_op_name': 'custOpName', + 'cust_operations': 'custOperations', 'operations': 'operations', 'description': 'description' } @@ -57,6 +56,7 @@ class Resource(Model): 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 @@ -72,7 +72,7 @@ class Resource(Model): return util.deserialize_model(dikt, cls) @property - def resource_name(self): + def resource_name(self) -> str: """Gets the resource_name of this Resource. Resource name # noqa: E501 @@ -83,7 +83,7 @@ class Resource(Model): return self._resource_name @resource_name.setter - def resource_name(self, resource_name): + def resource_name(self, resource_name: str): """Sets the resource_name of this Resource. Resource name # noqa: E501 @@ -97,7 +97,7 @@ class Resource(Model): self._resource_name = resource_name @property - def comm_type(self): + def comm_type(self) -> CommunicationType: """Gets the comm_type of this Resource. @@ -107,7 +107,7 @@ class Resource(Model): return self._comm_type @comm_type.setter - def comm_type(self, comm_type): + def comm_type(self, comm_type: CommunicationType): """Sets the comm_type of this Resource. @@ -120,10 +120,10 @@ class Resource(Model): self._comm_type = comm_type @property - def uri(self): + def uri(self) -> str: """Gets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -131,10 +131,10 @@ class Resource(Model): return self._uri @uri.setter - def uri(self, uri): + def uri(self, uri: str): """Sets the uri of this Resource. - Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -145,10 +145,10 @@ class Resource(Model): self._uri = uri @property - def cust_op_name(self): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -156,10 +156,10 @@ class Resource(Model): return self._cust_op_name @cust_op_name.setter - def cust_op_name(self, cust_op_name): + 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 subclause 4.4 of 3GPP TS 29.501. # noqa: E501 + 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 @@ -168,10 +168,35 @@ class Resource(Model): self._cust_op_name = cust_op_name @property - def operations(self): + 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 + 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] @@ -179,10 +204,10 @@ class Resource(Model): return self._operations @operations.setter - def operations(self, operations): + 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 + 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] @@ -193,7 +218,7 @@ class Resource(Model): self._operations = operations @property - def description(self): + def description(self) -> str: """Gets the description of this Resource. Text description of the API resource # noqa: E501 @@ -204,7 +229,7 @@ class Resource(Model): return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this Resource. Text description of the API resource # noqa: E501 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 34b5b73153f23fb850c0ee97e8023526049759c8..e81e9048a76c696da9a358140882987a246a76eb 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,16 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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). @@ -45,7 +40,7 @@ class RoutingInfo(Model): return util.deserialize_model(dikt, cls) @property - def routing_rules(self): + def routing_rules(self) -> List[RoutingRule]: """Gets the routing_rules of this RoutingInfo. @@ -55,7 +50,7 @@ class RoutingInfo(Model): return self._routing_rules @routing_rules.setter - def routing_rules(self, routing_rules): + def routing_rules(self, routing_rules: List[RoutingRule]): """Sets the routing_rules of this RoutingInfo. 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 29c0930b40676c276cdd8df190b8b5a31d410dd7..14216c31d50518bcb63cd014e1406b0257c35527 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,15 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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). @@ -55,7 +52,7 @@ class RoutingRule(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr_ranges(self): + def ipv4_addr_ranges(self) -> List[Ipv4AddressRange]: """Gets the ipv4_addr_ranges of this RoutingRule. @@ -65,7 +62,7 @@ class RoutingRule(Model): return self._ipv4_addr_ranges @ipv4_addr_ranges.setter - def ipv4_addr_ranges(self, ipv4_addr_ranges): + def ipv4_addr_ranges(self, ipv4_addr_ranges: List[Ipv4AddressRange]): """Sets the ipv4_addr_ranges of this RoutingRule. @@ -78,7 +75,7 @@ class RoutingRule(Model): self._ipv4_addr_ranges = ipv4_addr_ranges @property - def ipv6_addr_ranges(self): + def ipv6_addr_ranges(self) -> List[Ipv6AddressRange]: """Gets the ipv6_addr_ranges of this RoutingRule. @@ -88,7 +85,7 @@ class RoutingRule(Model): return self._ipv6_addr_ranges @ipv6_addr_ranges.setter - def ipv6_addr_ranges(self, ipv6_addr_ranges): + def ipv6_addr_ranges(self, ipv6_addr_ranges: List[Ipv6AddressRange]): """Sets the ipv6_addr_ranges of this RoutingRule. @@ -101,7 +98,7 @@ class RoutingRule(Model): self._ipv6_addr_ranges = ipv6_addr_ranges @property - def aef_profile(self): + def aef_profile(self) -> AefProfile: """Gets the aef_profile of this RoutingRule. @@ -111,7 +108,7 @@ class RoutingRule(Model): return self._aef_profile @aef_profile.setter - def aef_profile(self, aef_profile): + def aef_profile(self, aef_profile: AefProfile): """Sets the aef_profile of this RoutingRule. 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 7de25824778f068b8b9076b7b574b4dd830b1045..dc073f400e54197b4644303edcd593ddca912869 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_routing_info.models.base_model_ import Model -from capif_routing_info.models.security_method_any_of import SecurityMethodAnyOf from capif_routing_info import util +from capif_routing_info.models.base_model import Model -from capif_routing_info.models.security_method_any_of import SecurityMethodAnyOf # noqa: E501 class SecurityMethod(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_any_of.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method_any_of.py deleted file mode 100644 index 00fd8e292bde1877e4106afcbecf7ebfa71aa004..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/security_method_any_of.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from capif_routing_info.models.base_model_ import Model -from capif_routing_info import util - - -class SecurityMethodAnyOf(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 - """SecurityMethodAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'SecurityMethodAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The SecurityMethod_anyOf of this SecurityMethodAnyOf. # noqa: E501 - :rtype: SecurityMethodAnyOf - """ - return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..05926a00f7016ce60d930cfc065969673c500fda --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/service_kpis.py @@ -0,0 +1,275 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model + + +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("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("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("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("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_Routing_Info_API/capif_routing_info/models/protocol_any_of.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py similarity index 57% rename from services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol_any_of.py rename to services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py index add5527fdf33d42dc0b22c724eb6d8e57f1c0bdb..98407a0e203a26f5b3650c7f16429b97af3f4dfa 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/protocol_any_of.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/supported_gad_shapes.py @@ -1,27 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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 ProtocolAnyOf(Model): +class SupportedGADShapes(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - """ - allowed enum values - """ - _1_1 = "HTTP_1_1" - _2 = "HTTP_2" def __init__(self): # noqa: E501 - """ProtocolAnyOf - a model defined in OpenAPI + """SupportedGADShapes - a model defined in OpenAPI """ self.openapi_types = { @@ -31,12 +22,12 @@ class ProtocolAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'ProtocolAnyOf': + def from_dict(cls, dikt) -> 'SupportedGADShapes': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The Protocol_anyOf of this ProtocolAnyOf. # noqa: E501 - :rtype: ProtocolAnyOf + :return: The SupportedGADShapes of this SupportedGADShapes. # noqa: E501 + :rtype: SupportedGADShapes """ return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..9d802dd4c13e7dc4e6c47054f367119fe8edd1c1 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipse.py @@ -0,0 +1,132 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_routing_info import util +from capif_routing_info.models.base_model import Model + + +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_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py new file mode 100644 index 0000000000000000000000000000000000000000..45538ba797abdfca3825c1dc1f69f3458ab74f75 --- /dev/null +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/uncertainty_ellipsoid.py @@ -0,0 +1,165 @@ +from datetime import date, datetime # noqa: F401 + +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): + """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_Routing_Info_API/capif_routing_info/models/version.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/models/version.py index fa60f0295290c6e4a98492059a106acdafc01b2d..6e7df34151ca1fa86ec73bc191ffab1332456376 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,18 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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.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). @@ -62,7 +56,7 @@ class Version(Model): return util.deserialize_model(dikt, cls) @property - def api_version(self): + def api_version(self) -> str: """Gets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -73,7 +67,7 @@ class Version(Model): return self._api_version @api_version.setter - def api_version(self, api_version): + def api_version(self, api_version: str): """Sets the api_version of this Version. API major version in URI (e.g. v1) # noqa: E501 @@ -87,7 +81,7 @@ class Version(Model): self._api_version = api_version @property - def expiry(self): + def expiry(self) -> datetime: """Gets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -98,7 +92,7 @@ class Version(Model): return self._expiry @expiry.setter - def expiry(self, expiry): + def expiry(self, expiry: datetime): """Sets the expiry of this Version. string with format \"date-time\" as defined in OpenAPI. # noqa: E501 @@ -110,7 +104,7 @@ class Version(Model): self._expiry = expiry @property - def resources(self): + def resources(self) -> List[Resource]: """Gets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -121,7 +115,7 @@ class Version(Model): return self._resources @resources.setter - def resources(self, resources): + def resources(self, resources: List[Resource]): """Sets the resources of this Version. Resources supported by the API. # noqa: E501 @@ -135,7 +129,7 @@ class Version(Model): self._resources = resources @property - def cust_operations(self): + def cust_operations(self) -> List[CustomOperation]: """Gets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 @@ -146,7 +140,7 @@ class Version(Model): return self._cust_operations @cust_operations.setter - def cust_operations(self, cust_operations): + def cust_operations(self, cust_operations: List[CustomOperation]): """Sets the cust_operations of this Version. Custom operations without resource association. # noqa: E501 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 53446f2be3b9d165ff05cac7ec7dde41050c348f..5e93c85aac7ab73a113427949cca3bac11566a58 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 @@ -1,20 +1,18 @@ openapi: 3.0.0 info: - description: | - API for Routing information. - © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). - All rights reserved. + description: "API for Routing information. \n© 2022, 3GPP Organizational Partners\ + \ (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Routing_Info_API - version: 1.1.0-alpha.1 + version: 1.2.0-alpha.1 externalDocs: - description: 3GPP TS 29.222 V17.1.0 Common API Framework for 3GPP Northbound APIs - url: http://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ + description: 3GPP TS 29.222 V18.0.0 Common API Framework for 3GPP Northbound APIs + url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.222/ servers: -- url: '{apiRoot}/capif-routing-info/v1' +- url: "{apiRoot}/capif-routing-info/v1" variables: apiRoot: default: https://example.com - description: apiRoot as defined in subclause 7.5 of 3GPP TS 29.222 + description: apiRoot as defined in clause 7.5 of 3GPP TS 29.222 paths: /service-apis/{serviceApiId}: get: @@ -126,6 +124,79 @@ paths: description: Generic Error x-openapi-router-controller: capif_routing_info.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: RoutingInfo: description: Represents an API routing information. @@ -137,15 +208,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -153,19 +250,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -174,6 +287,20 @@ components: - 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 @@ -181,37 +308,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 @@ -223,15 +422,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -239,19 +464,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -260,6 +501,20 @@ components: - 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 @@ -267,37 +522,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 @@ -323,15 +650,41 @@ components: - start: start end: end aefProfile: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -339,19 +692,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -360,6 +729,20 @@ components: - 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 @@ -367,37 +750,109 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 ipv4AddrRanges: - start: 198.51.100.1 end: 198.51.100.1 @@ -429,15 +884,13 @@ components: end: end properties: start: - 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. + 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 end: - 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. + 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 required: @@ -446,19 +899,9 @@ components: title: Ipv6AddressRange 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]*$ + 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 ProblemDetails: @@ -469,8 +912,8 @@ components: 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. + 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: @@ -487,33 +930,22 @@ components: 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. + 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. + 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]*$ + 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 @@ -523,15 +955,16 @@ components: title: type type: string InvalidParam: - description: Represents the description of invalid parameters, for a request - rejected due to invalid parameters. + 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. + 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". + description: "A human-readable reason, e.g. \"must be a positive integer\"\ + ." title: reason type: string required: @@ -545,17 +978,17 @@ components: end: 198.51.100.1 properties: start: - description: String identifying a IPv4 address formatted in the "dotted - decimal" notation as defined in RFC 1166. + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. example: 198.51.100.1 - pattern: ^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$ + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" title: Ipv4Addr type: string end: - description: String identifying a IPv4 address formatted in the "dotted - decimal" notation as defined in RFC 1166. + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. example: 198.51.100.1 - pattern: ^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$ + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" title: Ipv4Addr type: string title: Ipv4AddressRange @@ -563,15 +996,41 @@ components: AefProfile: description: Represents the AEF profile data. example: + protocol: HTTP_1_1 + 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 + - PSK + - PSK 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 @@ -579,19 +1038,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -600,6 +1075,20 @@ components: - 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 @@ -607,37 +1096,110 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + 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 + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - ipv6Addr: ipv6Addr 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 + nullable: true oneOf: - required: - domainName @@ -677,6 +1239,12 @@ components: minItems: 1 title: interfaceDescriptions type: array + aefLocation: + $ref: '#/components/schemas/AefLocation' + serviceKpis: + $ref: '#/components/schemas/ServiceKpis' + ueIpRange: + $ref: '#/components/schemas/IpAddrRange' required: - aefId - versions @@ -690,6 +1258,20 @@ components: - 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 @@ -697,19 +1279,35 @@ components: - 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: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName - operations: - - null - - null + - GET + - GET + commType: null description: description custOpName: custOpName expiry: 2000-01-23T04:56:07.000+00:00 @@ -747,6 +1345,20 @@ components: 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 @@ -759,19 +1371,26 @@ components: commType: $ref: '#/components/schemas/CommunicationType' uri: - description: Relative URI of the API resource, it is set as {apiSpecificResourceUriPart} - part of the URI structure as defined in subclause 4.4 of 3GPP TS 29.501. + 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 subclause 4.4 of 3GPP - TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -789,42 +1408,38 @@ components: type: object CommunicationType: anyOf: - - $ref: '#/components/schemas/CommunicationType_anyOf' - - 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. + - enum: + - REQUEST_RESPONSE + - SUBSCRIBE_NOTIFY 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: - - $ref: '#/components/schemas/Operation_anyOf' - 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 + 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 CustomOperation: description: Represents the description of a custom operation. example: operations: - - null - - null + - 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 subclause 4.4 of - 3GPP TS 29.501. + 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. + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. items: $ref: '#/components/schemas/Operation' minItems: 1 @@ -839,32 +1454,68 @@ components: - 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 Protocol: anyOf: - - $ref: '#/components/schemas/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: | - Possible values are - HTTP_1_1: HTTP version 1.1 - HTTP_2: HTTP version 2 + 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: - - $ref: '#/components/schemas/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: | - Possible values are - JSON: JavaScript Object Notation + 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 SecurityMethod: anyOf: - - $ref: '#/components/schemas/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 + description: "Indicates the security method. \nPossible values are:\n- PSK:\ + \ Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122.\n- PKI:\ + \ 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 InterfaceDescription: description: Represents the description of an API's interface. @@ -873,34 +1524,51 @@ components: securityMethods: - null - null + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr + nullable: true oneOf: - required: - ipv4Addr - required: - ipv6Addr + - required: + - fqdn properties: ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted - decimal" notation as defined in IETF RFC 1166. + description: | + string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166. title: Ipv4Addr_1 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. + 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 + fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer + apiPrefix: + description: | + A string representing a sequence of path segments that starts with the slash character. + title: apiPrefix + type: string securityMethods: - description: Security methods supported by the interface, it take precedence - over the security methods provided in AefProfile, for this specific interface. + 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 @@ -908,17 +1576,167 @@ components: type: array title: InterfaceDescription type: object + 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: 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 + 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 + IpAddrRange: + anyOf: [] + description: Represents the list of public IP ranges + example: + 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 + nullable: true + properties: + ueIpv4AddrRanges: + description: Represents the IPv4 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv4AddressRange_1' + minItems: 1 + title: ueIpv4AddrRanges + type: array + ueIpv6AddrRanges: + description: Represents the Ipv6 Address ranges of the UE(s). + items: + $ref: '#/components/schemas/Ipv6AddressRange_1' + minItems: 1 + title: ueIpv6AddrRanges + type: array + title: IpAddrRange + type: object 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. + 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 Ipv4Addr: - description: String identifying a IPv4 address formatted in the "dotted decimal" - notation as defined in RFC 1166. + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. example: 198.51.100.1 - pattern: ^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$ + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" title: Ipv4Addr type: string DateTime: @@ -927,46 +1745,597 @@ components: title: DateTime type: string Ipv4Addr_1: - description: string identifying a Ipv4 address formatted in the "dotted decimal" - notation as defined in IETF RFC 1166. + description: | + string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166. title: Ipv4Addr_1 type: string + Fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string Port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer - CommunicationType_anyOf: - enum: - - REQUEST_RESPONSE - - SUBSCRIBE_NOTIFY - title: CommunicationType_anyOf - type: string - Operation_anyOf: - enum: - - GET - - POST - - PUT - - PATCH - - DELETE - title: Operation_anyOf - type: string - Protocol_anyOf: - enum: - - HTTP_1_1 - - HTTP_2 - title: Protocol_anyOf - type: string - DataFormat_anyOf: - enum: - - JSON - title: DataFormat_anyOf - type: string - SecurityMethod_anyOf: - enum: - - PSK - - PKI - - OAUTH - title: SecurityMethod_anyOf + 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 + 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: 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 + 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' + title: LocalOrigin + type: object + 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' + 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 + Ipv4AddressRange_1: + description: Range of IPv4 addresses + example: + start: 198.51.100.1 + end: 198.51.100.1 + properties: + start: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr + type: string + end: + description: | + String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166. + example: 198.51.100.1 + pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + title: Ipv4Addr + type: string + required: + - end + - start + title: Ipv4AddressRange_1 + type: object + Ipv6AddressRange_1: + description: Range of IPv6 addresses + example: + start: 2001:db8:85a3::8a2e:370:7334 + end: 2001:db8:85a3::8a2e:370:7334 + properties: + start: + $ref: '#/components/schemas/Ipv6Addr_1' + end: + $ref: '#/components/schemas/Ipv6Addr_1' + required: + - end + - start + title: Ipv6AddressRange_1 + type: object + Ipv6Addr_1: + allOf: + - pattern: "^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})):){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))$" + - pattern: "^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))$" + description: | + String identifying an IPv6 address formatted according to clause 4 of RFC5952. The mixed IPv4 IPv6 notation according to clause 5 of RFC5952 shall not be used. + example: 2001:db8:85a3::8a2e:370:7334 + title: Ipv6Addr_1 type: string + Float: + description: string with format 'float' as defined in OpenAPI. + format: float + title: Float + type: number 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 e95f59cf4b47c3789207ccf04683ef89e3a4ff3f..fe016ad6fbe0f457e2f40c5f049a797d1b5e0a24 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 e602d5dd04a7885146196c7a6b9872f0b7dc0a14..e90ce9235112e14d0517a5508215f5dae8c2c4c6 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,13 +1,5 @@ -# coding: utf-8 - -from __future__ import absolute_import import unittest -from flask import json -from six import BytesIO - -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/typing_utils.py b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..74e3c913a7db6246bc765f147ca872996112c6bb 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/typing_utils.py +++ b/services/TS29222_CAPIF_Routing_Info_API/capif_routing_info/typing_utils.py @@ -1,5 +1,3 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): 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 54a13013df3b7fde574d61407acd23d0223f0be3..6f369d510e55cbab6fb999fe743b26757c2e91c1 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,7 +1,7 @@ import datetime -import six -import typing_utils +import typing +from capif_routing_info import typing_utils def _deserialize(data, klass): @@ -15,7 +15,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -44,7 +44,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -109,7 +109,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -144,4 +144,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_Routing_Info_API/git_push.sh b/services/TS29222_CAPIF_Routing_Info_API/git_push.sh index 9405f72e950cdb8ca24c3cf4d15cee7eac62fde7..f53a75d4fabe760cce49eddfd62fcc702938ea90 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/git_push.sh +++ b/services/TS29222_CAPIF_Routing_Info_API/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/services/TS29222_CAPIF_Routing_Info_API/prepare_routing_info.sh b/services/TS29222_CAPIF_Routing_Info_API/prepare_routing_info.sh index 53eaa2b084e73d1fe7e710f1acf94b48771b668b..aa37163ff34156c5cfa585de5974390c09905ddf 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/prepare_routing_info.sh +++ b/services/TS29222_CAPIF_Routing_Info_API/prepare_routing_info.sh @@ -1,4 +1,4 @@ #!/bin/bash -gunicorn --bind 0.0.0.0:8080 \ +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/capif_routing_info wsgi:app diff --git a/services/TS29222_CAPIF_Routing_Info_API/requirements.txt b/services/TS29222_CAPIF_Routing_Info_API/requirements.txt index afaac687767e9f9669d7f6baadf40a77ceddedb8..0ecdd1f3b7931f42166a8e8cc214755a04462e6c 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/requirements.txt +++ b/services/TS29222_CAPIF_Routing_Info_API/requirements.txt @@ -1,8 +1,8 @@ -connexion[swagger-ui] == 2.14.2; python_version>="3.6" +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 -Werkzeug == 2.2.3 +setuptools == 74.0.0 +Flask == 3.0.3 +werkzeug == 3.0.4 gunicorn == 22.0.0 packaging == 24.0 diff --git a/services/TS29222_CAPIF_Routing_Info_API/setup.py b/services/TS29222_CAPIF_Routing_Info_API/setup.py index 58c68e21a1455e377e7f10142105a3486e84f178..6d66c72675bb2bd84baebd370e98e511f3312eba 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/setup.py +++ b/services/TS29222_CAPIF_Routing_Info_API/setup.py @@ -1,6 +1,3 @@ -# coding: utf-8 - -import sys from setuptools import setup, find_packages NAME = "capif_routing_info" @@ -33,7 +30,7 @@ setup( entry_points={ 'console_scripts': ['capif_routing_info=capif_routing_info.__main__:main']}, long_description="""\ - API for Routing information. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for Routing information. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) diff --git a/services/TS29222_CAPIF_Routing_Info_API/test-requirements.txt b/services/TS29222_CAPIF_Routing_Info_API/test-requirements.txt index 202a684feef71ff540d6aa528d348febf0b37d1e..58f51d6a00272d7515a20e3618f345b73c68afa0 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/test-requirements.txt +++ b/services/TS29222_CAPIF_Routing_Info_API/test-requirements.txt @@ -1,4 +1,4 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 +pytest~=7.1.0 pytest-cov>=2.8.1 -pytest-randomly == 1.2.3 # needed for python 2.7+3.4 -Flask-Testing == 0.8.0 +pytest-randomly>=1.2.3 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_Routing_Info_API/tox.ini b/services/TS29222_CAPIF_Routing_Info_API/tox.ini index 6e0e6e7cc22b04f3c663a65687adfd06f801dcca..cbb25232c6e05223026c2c7a67218a9134119b3d 100644 --- a/services/TS29222_CAPIF_Routing_Info_API/tox.ini +++ b/services/TS29222_CAPIF_Routing_Info_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= pytest --cov=capif_routing_info diff --git a/services/TS29222_CAPIF_Security_API/.openapi-generator/FILES b/services/TS29222_CAPIF_Security_API/.openapi-generator/FILES index 80c09cfea715e19922db62051c3460c62c22948a..1fd34c24a0763985d9f135288f82a424d7f4c66d 100644 --- a/services/TS29222_CAPIF_Security_API/.openapi-generator/FILES +++ b/services/TS29222_CAPIF_Security_API/.openapi-generator/FILES @@ -1,35 +1,49 @@ .dockerignore .gitignore +.openapi-generator-ignore .travis.yml Dockerfile README.md +git_push.sh capif_security/__init__.py capif_security/__main__.py capif_security/controllers/__init__.py capif_security/controllers/default_controller.py -capif_security/controllers/security_controller_.py +capif_security/controllers/security_controller.py capif_security/encoder.py capif_security/models/__init__.py capif_security/models/access_token_claims.py capif_security/models/access_token_err.py +capif_security/models/access_token_err1.py +capif_security/models/access_token_req1.py capif_security/models/access_token_rsp.py -capif_security/models/base_model_.py +capif_security/models/base_model.py capif_security/models/cause.py -capif_security/models/cause_any_of.py capif_security/models/interface_description.py capif_security/models/invalid_param.py +capif_security/models/invalid_param1.py +capif_security/models/nf_type.py +capif_security/models/no_profile_match_info.py +capif_security/models/no_profile_match_reason.py +capif_security/models/o_auth_grant_type.py +capif_security/models/plmn_id.py +capif_security/models/plmn_id_nid.py capif_security/models/problem_details.py +capif_security/models/problem_details1.py +capif_security/models/query_param_combination.py +capif_security/models/query_parameter.py +capif_security/models/res_owner_id.py capif_security/models/security_information.py capif_security/models/security_method.py -capif_security/models/security_method_any_of.py capif_security/models/security_notification.py capif_security/models/service_security.py +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 -git_push.sh requirements.txt setup.py test-requirements.txt diff --git a/services/TS29222_CAPIF_Security_API/.openapi-generator/VERSION b/services/TS29222_CAPIF_Security_API/.openapi-generator/VERSION index 4b448de535c7dd619da0df6d8221995dbd5d118a..18bb4182dd01428f1d4c3c2145501ee5d40455a3 100644 --- a/services/TS29222_CAPIF_Security_API/.openapi-generator/VERSION +++ b/services/TS29222_CAPIF_Security_API/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0-SNAPSHOT \ No newline at end of file +7.5.0 diff --git a/services/TS29222_CAPIF_Security_API/Dockerfile b/services/TS29222_CAPIF_Security_API/Dockerfile index 9f73be9b86061f4cd1055ed23a54261db97853fd..eef4705c082320893abe94ba90159b54187b47e1 100644 --- a/services/TS29222_CAPIF_Security_API/Dockerfile +++ b/services/TS29222_CAPIF_Security_API/Dockerfile @@ -1,14 +1,21 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/requirements.txt -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev -RUN apk add redis -RUN apk add jq -RUN apk add curl +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y --no-install-recommends jq curl redis + RUN pip3 install --no-cache-dir -r requirements.txt COPY . /usr/src/app diff --git a/services/TS29222_CAPIF_Security_API/README.md b/services/TS29222_CAPIF_Security_API/README.md index 66df10994ad85cbdf33b6eda4b8bfcf0d0ca940b..6534bceb3d41c0580fba545343824b1629f05bd8 100644 --- a/services/TS29222_CAPIF_Security_API/README.md +++ b/services/TS29222_CAPIF_Security_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_security +python3 -m openapi_server ``` and open your browser to here: diff --git a/services/TS29222_CAPIF_Security_API/capif_security/app.py b/services/TS29222_CAPIF_Security_API/capif_security/app.py index 43457008864cc00a84b515f3e210654e2bf82c4d..c61896eea8d8488eb0d5dbc1053df55238292c2d 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/app.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/app.py @@ -1,23 +1,27 @@ #!/usr/bin/env python3 -import connexion import logging -import encoder -from flask_jwt_extended import JWTManager -from config import Config -from core.consumer_messager import Subscriber -from logging.handlers import RotatingFileHandler import os -from fluent import sender +from datetime import datetime +from logging.handlers import RotatingFileHandler + +import connexion +from flask_apscheduler import APScheduler from flask_executor import Executor -from opentelemetry.instrumentation.flask import FlaskInstrumentor +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.trace.propagation.tracecontext import TraceContextTextMapPropagator +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.instrumentation.redis import RedisInstrumentor +from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator + +import encoder +from config import Config +from core.consumer_messager import Subscriber NAME = "Security-Service" @@ -113,8 +117,8 @@ def verbose_formatter(): with open("/usr/src/app/capif_security/server.key", "rb") as key_file: key_data = key_file.read() -app = connexion.App(__name__, specification_dir='./openapi/') -app.app.json_encoder = encoder.JSONEncoder +app = connexion.App(__name__, specification_dir='openapi/') +app.app.json_encoder = encoder.CustomJSONEncoder app.app.config['JWT_ALGORITHM'] = 'RS256' @@ -134,7 +138,11 @@ if monitoring_value == "true": configure_monitoring(app.app, config.get_config()) executor = Executor(app.app) +scheduler = APScheduler() +scheduler.init_app(app.app) +scheduler.start() -@app.app.before_first_request +@scheduler.task('date', id='listener', next_run_time=datetime.now()) def up_listener(): - executor.submit(subscriber.listen) + with scheduler.app.app_context(): + executor.submit(subscriber.listen()) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/config.py b/services/TS29222_CAPIF_Security_API/capif_security/config.py index 01f9914cc141eb3c49fd73506e9b1c5470edd781..abfa40820dc99bf2c64c7bf0a31994eedc414e03 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/config.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): 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 7e04d4df353bd4227d5b7bda72e3cb7236cf1dab..3609bd8f17bb6f3267fa72750280e82c61ef5d04 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,26 +1,23 @@ -import connexion - -from ..models.access_token_req import AccessTokenReq # noqa: E501 -from ..models.security_notification import SecurityNotification # noqa: E501 -from ..models.service_security import ServiceSecurity # noqa: E501 - -from ..core.servicesecurity import SecurityOperations - -from ..core.publisher import Publisher - -from flask import Response, request, current_app +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 cryptography import x509 from cryptography.hazmat.backends import default_backend -from ..core.validate_user import ControlAccess -from functools import wraps +from flask import request, current_app +from ..core.publisher import Publisher +from ..core.redis_internal_event import RedisInternalEvent +from ..core.servicesecurity import SecurityOperations +from ..core.validate_user import ControlAccess service_security_ops = SecurityOperations() publish_ops = Publisher() valid_user = ControlAccess() + def cert_validation(): def _cert_validation(f): @wraps(f) @@ -30,17 +27,21 @@ def cert_validation(): 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()) + 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() + cn = cert.subject.get_attributes_for_oid( + x509.OID_COMMON_NAME)[0].value.strip() current_app.logger.info(f"CN: {cn}") - if cn != "superadmin" and "AEF" not in cn : + if cn != "superadmin" and "AEF" not in cn: cert_signature = cert.signature.hex() if "securityId" in args: - result = valid_user.validate_user_cert(args["securityId"], cert_signature) + result = valid_user.validate_user_cert( + args["securityId"], cert_signature) else: - result = valid_user.validate_user_cert(args["apiInvokerId"], cert_signature) + result = valid_user.validate_user_cert( + args["apiInvokerId"], cert_signature) if result is not None: return result @@ -50,6 +51,7 @@ def cert_validation(): return __cert_validation return _cert_validation + @cert_validation() def securities_security_id_token_post(security_id, body): # noqa: E501 """securities_security_id_token_post @@ -58,26 +60,43 @@ def securities_security_id_token_post(security_id, body): # noqa: E501 :param security_id: Identifier of an individual API invoker :type security_id: str - :param grant_type: + :param grant_type: :type grant_type: str - :param client_id: + :param client_id: :type client_id: str - :param client_secret: + :param res_owner_id: + :type res_owner_id: dict | bytes + :param client_secret: :type client_secret: str - :param scope: + :param scope: :type scope: str + :param auth_code: + :type auth_code: str + :param redirect_uri: + :type redirect_uri: str - :rtype: AccessTokenRsp + :rtype: Union[AccessTokenRsp, Tuple[AccessTokenRsp, int], Tuple[AccessTokenRsp, int, Dict[str, str]] """ - current_app.logger.info("Creating security token") - if connexion.request.is_json: - body = AccessTokenReq.from_dict(connexion.request.get_json()) # noqa: E501 - res = service_security_ops.return_token(security_id, body) + if request.is_json: + res_owner_id = ResOwnerId.from_dict(request.get_json()) # noqa: E501 + + # body={"security_id": security_id, + # "grant_type": grant_type, + # "client_id": client_id, + # "res_owner_id": res_owner_id, + # "client_secret": client_secret, + # "scope": scope, + # "auth_code": auth_code, + # "redirect_uri": redirect_uri + # } + current_app.logger.debug(body) + res = service_security_ops.return_token(security_id, body) return res + @cert_validation() def trusted_invokers_api_invoker_id_delete(api_invoker_id): # noqa: E501 """trusted_invokers_api_invoker_id_delete @@ -87,11 +106,12 @@ def trusted_invokers_api_invoker_id_delete(api_invoker_id): # noqa: E501 :param api_invoker_id: Identifier of an individual API invoker :type api_invoker_id: str - :rtype: None + :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] """ 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 @@ -103,38 +123,40 @@ def trusted_invokers_api_invoker_id_delete_post(api_invoker_id, body): # noqa: :param security_notification: Revoke the authorization of the API invoker for APIs. :type security_notification: dict | bytes - :rtype: None + :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] """ - if connexion.request.is_json: - body = SecurityNotification.from_dict(connexion.request.get_json()) # noqa: E501 + if request.is_json: + body = SecurityNotification.from_dict(request.get_json()) # noqa: E501 current_app.logger.info("Revoking permissions") res = service_security_ops.revoke_api_authorization(api_invoker_id, body) - + return res + @cert_validation() -def trusted_invokers_api_invoker_id_get(api_invoker_id, authentication_info=False, authorization_info=False): # noqa: E501 +def trusted_invokers_api_invoker_id_get(api_invoker_id, authentication_info=None, authorization_info=None): # noqa: E501 """trusted_invokers_api_invoker_id_get # noqa: E501 :param api_invoker_id: Identifier of an individual API invoker :type api_invoker_id: str - :param authentication_info: When set to 'true', it indicates the CAPIF core function to send the authentication information of the API invoker. Set to false or omitted otherwise. + :param authentication_info: When set to 'true', it indicates the CAPIF core function to send the authentication information of the API invoker. Set to false or omitted otherwise. :type authentication_info: bool - :param authorization_info: When set to 'true', it indicates the CAPIF core function to send the authorization information of the API invoker. Set to false or omitted otherwise. + :param authorization_info: When set to 'true', it indicates the CAPIF core function to send the authorization information of the API invoker. Set to false or omitted otherwise. :type authorization_info: bool :rtype: Union[ServiceSecurity, Tuple[ServiceSecurity, int], Tuple[ServiceSecurity, int, Dict[str, str]] """ - current_app.logger.info("Obtaining security context") - res = service_security_ops.get_servicesecurity(api_invoker_id, authentication_info, authorization_info) + res = service_security_ops.get_servicesecurity( + api_invoker_id, authentication_info, authorization_info) return res + @cert_validation() def trusted_invokers_api_invoker_id_put(api_invoker_id, body): # noqa: E501 """trusted_invokers_api_invoker_id_put @@ -150,17 +172,23 @@ def trusted_invokers_api_invoker_id_put(api_invoker_id, body): # noqa: E501 """ current_app.logger.info("Creating security context") - if connexion.request.is_json: - body = ServiceSecurity.from_dict(connexion.request.get_json()) # noqa: E501 + if request.is_json: + body = ServiceSecurity.from_dict(request.get_json()) # noqa: E501 res = service_security_ops.create_servicesecurity(api_invoker_id, body) if res.status_code == 201: for service_instance in body.security_info: if service_instance.api_id is not None: - publish_ops.publish_message("internal-messages", "security-context-created:"+api_invoker_id+":"+service_instance.api_id ) + RedisInternalEvent("SECURITY-CONTEXT-CREATED", + "securityIds", + { + "api_invoker_id": api_invoker_id, + "api_id": service_instance.api_id + }).send_event() return res + @cert_validation() def trusted_invokers_api_invoker_id_update_post(api_invoker_id, body): # noqa: E501 """trusted_invokers_api_invoker_id_update_post @@ -172,11 +200,11 @@ def trusted_invokers_api_invoker_id_update_post(api_invoker_id, body): # noqa: :param service_security: Update the security context (e.g. re-negotiate the security methods). :type service_security: dict | bytes - :rtype: ServiceSecurity + :rtype: Union[ServiceSecurity, Tuple[ServiceSecurity, int], Tuple[ServiceSecurity, int, Dict[str, str]] """ current_app.logger.info("Updating security context") - if connexion.request.is_json: - body = ServiceSecurity.from_dict(connexion.request.get_json()) # noqa: E501 + if request.is_json: + body = ServiceSecurity.from_dict(request.get_json()) # noqa: E501 res = service_security_ops.update_servicesecurity(api_invoker_id, body) return res 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 new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller.py @@ -0,0 +1,2 @@ + + 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 deleted file mode 100644 index 6d294ffd6df1a26a469dbb4e72533b01503468dd..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Security_API/capif_security/controllers/security_controller_.py +++ /dev/null @@ -1,2 +0,0 @@ -from typing import List - diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/consumer_messager.py b/services/TS29222_CAPIF_Security_API/capif_security/core/consumer_messager.py index 43445583236a5743ea1475079a3c329bb0788787..a526bfbba70e5fddf38b9364bee30b9dcdaca93c 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/consumer_messager.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/consumer_messager.py @@ -1,8 +1,11 @@ # subscriber.py +import json + import redis -from .internal_security_ops import InternalSecurityOps from flask import current_app +from .internal_security_ops import InternalSecurityOps + class Subscriber(): @@ -16,8 +19,15 @@ class Subscriber(): current_app.logger.info("Listening security context messages") for raw_message in self.p.listen(): if raw_message["type"] == "message" and raw_message["channel"].decode('utf-8') == "internal-messages": - message, *ids = raw_message["data"].decode('utf-8').split(":") - if message == "invoker-removed" and len(ids) > 0: - self.security_ops.delete_intern_servicesecurity(ids[0]) - if message == "provider-removed" or message == "service-removed" and len(ids) > 0: - self.security_ops.update_intern_servicesecurity(ids[0]) + internal_redis_event = json.loads( + raw_message["data"].decode('utf-8')) + if internal_redis_event.get('event') == "INVOKER-REMOVED": + api_invoker_id = internal_redis_event.get( + 'information', {"api_invoker_id": None}).get('api_invoker_id') + if api_invoker_id is not None: + self.security_ops.delete_intern_servicesecurity(api_invoker_id) + elif internal_redis_event.get('event') == "PROVIDER-REMOVED": + aef_ids = internal_redis_event.get( + 'information', {"aef_ids": []}).get("aef_ids") + if len(aef_ids) > 0: + self.security_ops.update_intern_servicesecurity(aef_ids) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/internal_security_ops.py b/services/TS29222_CAPIF_Security_API/capif_security/core/internal_security_ops.py index d1b28d5938fa8f7c1d2c5d2bf9d4a3a9b3c68fda..1f0871017571b7967291e424822aee522192fb3e 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/internal_security_ops.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/internal_security_ops.py @@ -1,6 +1,7 @@ from .resources import Resource + class InternalSecurityOps(Resource): def delete_intern_servicesecurity(self, api_invoker_id): @@ -9,13 +10,16 @@ class InternalSecurityOps(Resource): my_query = {'api_invoker_id': api_invoker_id} mycol.delete_many(my_query) - def update_intern_servicesecurity(self, id): + def update_intern_servicesecurity(self, ids): security_col = self.db.get_col_by_name(self.db.security_info) - - security_contexts = security_col.find({"$or":[{"security_info.aef_id":id}, {"security_info.api_id":id}]}) - - for security_context in security_contexts: - new_security_info = [info for info in security_context["security_info"] if info["aef_id"]!=id and info["api_id"] != id] - security_context["security_info"] = new_security_info - security_col.update_one({'api_invoker_id':security_context["api_invoker_id"]}, {"$set":security_context}) + for id in ids: + security_contexts = security_col.find( + {"$or": [{"security_info.aef_id": id}, {"security_info.api_id": id}]}) + + for security_context in security_contexts: + new_security_info = [info for info in security_context["security_info"] + if info["aef_id"] != id and info["api_id"] != id] + security_context["security_info"] = new_security_info + security_col.update_one({'api_invoker_id': security_context["api_invoker_id"]}, { + "$set": security_context}) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/notification.py b/services/TS29222_CAPIF_Security_API/capif_security/core/notification.py index 2efad5f7f28459e561ddcf9d22612275e1435dea..607155924756f4b5088fa333e9e2a56b62befccd 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/notification.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/notification.py @@ -1,3 +1,5 @@ +import os + import requests @@ -9,4 +11,4 @@ class Notifications(): def request_post(self, url, data): headers = {'content-type': 'application/json'} - return requests.post(url, json={'text': str(data.to_str())}, headers=headers) \ No newline at end of file + return requests.post(url, json={'text': str(data.to_str())}, headers=headers, timeout=int(os.getenv("TIMEOUT", "30"))) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/redis_event.py b/services/TS29222_CAPIF_Security_API/capif_security/core/redis_event.py index aadbdbb6b3116cf288648de41effdb12b9ca9143..c65a6a20313002902b4660493d05be5c4cd20a24 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/redis_event.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/redis_event.py @@ -1,12 +1,20 @@ -from ..encoder import JSONEncoder -from .publisher import Publisher import json +from .publisher import Publisher +from ..encoder import CustomJSONEncoder + publisher_ops = Publisher() class RedisEvent(): - def __init__(self, event, event_detail_key=None, information=None) -> None: + def __init__(self, + event, + service_api_descriptions=None, + api_ids=None, + api_invoker_ids=None, + acc_ctrl_pol_list=None, + invocation_logs=None, + api_topo_hide=None) -> None: self.EVENTS_ENUM = [ 'SERVICE_API_AVAILABLE', 'SERVICE_API_UNAVAILABLE', @@ -27,12 +35,26 @@ class RedisEvent(): self.redis_event = { "event": event } - if event_detail_key != None and information != None: - self.redis_event['key'] = event_detail_key - self.redis_event['information'] = information + # Add event filter keys to an auxiliary object + event_detail = { + "serviceAPIDescriptions": service_api_descriptions, + "apiIds": api_ids, + "apiInvokerIds": api_invoker_ids, + "accCtrlPolList": acc_ctrl_pol_list, + "invocationLogs": invocation_logs, + "apiTopoHide": api_topo_hide + } + + # Filter keys with not None values + filtered_event_detail = {k: v for k, + v in event_detail.items() if v is not None} + + # If there are valid values then add to redis event. + if filtered_event_detail: + self.redis_event["event_detail"] = filtered_event_detail def to_string(self): - return json.dumps(self.redis_event, cls=JSONEncoder) + return json.dumps(self.redis_event, cls=CustomJSONEncoder) def send_event(self): publisher_ops.publish_message("events", self.to_string()) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/redis_internal_event.py b/services/TS29222_CAPIF_Security_API/capif_security/core/redis_internal_event.py new file mode 100644 index 0000000000000000000000000000000000000000..50e343424b8498d32078648978c719c923304353 --- /dev/null +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/redis_internal_event.py @@ -0,0 +1,36 @@ +import json + +from .publisher import Publisher +from ..encoder import JSONEncoder + +publisher_ops = Publisher() + + +class RedisInternalEvent(): + def __init__(self, event, event_detail_key=None, information=None) -> None: + self.INTERNAL_MESSAGES = [ + 'INVOKER-REMOVED', + 'PROVIDER-REMOVED', + 'SECURITY-CONTEXT-CREATED', + 'SECURITY-CONTEXT-REMOVED', + 'create-acl', + 'remove-acl', + ] + if event not in self.INTERNAL_MESSAGES: + raise Exception( + "Internal Message (" + event + ") is not on INTERNAL_MESSAGES enum (" + ','.join(self.INTERNAL_MESSAGES) + ")") + self.redis_event = { + "event": event + } + if event_detail_key is not None and information is not None: + self.redis_event['key'] = event_detail_key + self.redis_event['information'] = information + + def to_string(self): + return json.dumps(self.redis_event, cls=JSONEncoder) + + def send_event(self): + publisher_ops.publish_message("internal-messages", self.to_string()) + + def __call__(self): + return self.redis_event diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/resources.py b/services/TS29222_CAPIF_Security_API/capif_security/core/resources.py index 53a35e5d60f0fbe6fd7735e0c766bee233f84b47..e507c21c7a37ddc69ab55e2e3c467600aa6233f2 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/resources.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/resources.py @@ -1,5 +1,7 @@ from abc import ABC + from db.db import MongoDatabse + from .notification import Notifications 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 4e1eb35cbaf62e88311170d3afee308ab7aa5b64..849e7f8668ca60a2dac8c71e440b3447dba9b726 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/responses.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/responses.py @@ -1,14 +1,16 @@ -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder -from flask import Response import json + +from flask import Response + +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails from ..util import serialize_clean_camel_case mimetype = "application/json" def make_response(object, status): - res = Response(json.dumps(object, cls=JSONEncoder), status=status, mimetype=mimetype) + res = Response(json.dumps(object, cls=CustomJSONEncoder), status=status, mimetype=mimetype) return res @@ -17,32 +19,32 @@ def internal_server_error(detail, cause): prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=500, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=500, mimetype=mimetype) def forbidden_error(detail, cause): prob = ProblemDetails(title="Forbidden", status=403, detail=detail, cause=cause) prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=403, mimetype=mimetype) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=403, mimetype=mimetype) 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=JSONEncoder), status=400, mimetype=cause) + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=400, mimetype=cause) 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=JSONEncoder), status=404, mimetype=mimetype) + 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=JSONEncoder), status=401, mimetype=mimetype) \ No newline at end of file + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype=mimetype) \ No newline at end of file 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 c754a314e3a3af554d9ed90cac19d036ea88943c..916b2861a11a9f0e3fd55fa6f236e2cc9d448fb4 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/servicesecurity.py @@ -1,22 +1,22 @@ -from pymongo import ReturnDocument +import json +import os +from datetime import datetime, timedelta import rfc3987 -from flask import current_app, Flask, Response +from bson import json_util +from flask import current_app from flask_jwt_extended import create_access_token -from datetime import datetime, timedelta -import json +from pymongo import ReturnDocument -from bson import json_util +from .redis_event import RedisEvent +from .resources import Resource +from .responses import not_found_error, make_response, bad_request_error, internal_server_error, forbidden_error from ..core.publisher import Publisher +from ..models.access_token_claims import AccessTokenClaims from ..models.access_token_err import AccessTokenErr from ..models.access_token_rsp import AccessTokenRsp -from ..models.access_token_claims import AccessTokenClaims from ..util import dict_to_camel_case, clean_empty, serialize_clean_camel_case -from .responses import not_found_error, make_response, bad_request_error, internal_server_error, forbidden_error -from .resources import Resource -from .redis_event import RedisEvent -import os publish_ops = Publisher() @@ -197,8 +197,7 @@ class SecurityOperations(Resource): mycol.insert_one(rec) res = make_response(object=serialize_clean_camel_case(service_security), status=201) - res.headers['Location'] = "https://{}/capif-security/v1/trustedInvokers/{}".format( - os.getenv('CAPIF_HOSTNAME'), str(api_invoker_id)) + res.headers['Location'] = f"https://{os.getenv("CAPIF_HOSTNAME")}/capif-security/v1/trustedInvokers/{str(api_invoker_id)}" return res @@ -356,8 +355,8 @@ class SecurityOperations(Resource): current_app.logger.debug("Updated security context") res= make_response(object=dict_to_camel_case(clean_empty(result)), status=200) - res.headers['Location'] = "https://${CAPIF_HOSTNAME}/capif-security/v1/trustedInvokers/" + str( - api_invoker_id) + res.headers['Location'] = f"https://{os.getenv("CAPIF_HOSTNAME")}/capif-security/v1/trustedInvokers/{str(api_invoker_id)}" + return res except Exception as e: exception = "An exception occurred in update security info" diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/validate_user.py b/services/TS29222_CAPIF_Security_API/capif_security/core/validate_user.py index 04d893edc45aa4b477a123755a4aeb1d36c05868..c3f70049a8f7cfc869839bed8563fe1e82304f7d 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/validate_user.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/validate_user.py @@ -1,9 +1,12 @@ -from flask import current_app, Response import json -from ..models.problem_details import ProblemDetails -from ..encoder import JSONEncoder + +from flask import current_app, Response + from .resources import Resource -from .responses import internal_server_error,serialize_clean_camel_case +from .responses import internal_server_error, serialize_clean_camel_case +from ..encoder import CustomJSONEncoder +from ..models.problem_details import ProblemDetails + class ControlAccess(Resource): @@ -19,7 +22,7 @@ class ControlAccess(Resource): if cert_entry["cert_signature"] != cert_signature: prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") prob = serialize_clean_camel_case(prob) - return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") + return Response(json.dumps(prob, cls=CustomJSONEncoder), status=401, mimetype="application/json") except Exception as e: exception = "An exception occurred in validate invoker" diff --git a/services/TS29222_CAPIF_Security_API/capif_security/db/db.py b/services/TS29222_CAPIF_Security_API/capif_security/db/db.py index 47a9538c9c70be0cb96fee4119eb024db27b79cc..b2521d6744ed6263cf6f60c92ec42936dded73f7 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/db/db.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/db/db.py @@ -1,11 +1,11 @@ -import atexit +import os import time -from pymongo import MongoClient -from pymongo.errors import AutoReconnect -from config import Config + from bson.codec_options import CodecOptions -import os +from config import Config from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from pymongo import MongoClient +from pymongo.errors import AutoReconnect monitoring_value = os.environ.get("MONITORING", "").lower() if monitoring_value == "true": diff --git a/services/TS29222_CAPIF_Security_API/capif_security/encoder.py b/services/TS29222_CAPIF_Security_API/capif_security/encoder.py index 80bad8fa9220ab873e044b7adc0a849746088ad5..099bd1f8ac4b7a81e94ef6f777a8bd8f6109221e 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/encoder.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/encoder.py @@ -1,20 +1,18 @@ -from connexion.apps.flask_app import FlaskJSONEncoder -import six +from capif_security.models.base_model import Model +from connexion.jsonifier import JSONEncoder -from models.base_model_ import Model - -class JSONEncoder(FlaskJSONEncoder): +class CustomJSONEncoder(JSONEncoder): include_nulls = False def default(self, o): if isinstance(o, Model): dikt = {} - for attr, _ in six.iteritems(o.openapi_types): + 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) + return JSONEncoder.default(self, o) 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 b6f04f81d8734f7d201c616cec329be0a4f775e5..d036df693ea41dfaa3debffffad0462c1fcd8e4a 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/__init__.py @@ -1,28 +1,2 @@ -# coding: utf-8 - # flake8: noqa -from __future__ import absolute_import # 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.cause_any_of import CauseAnyOf -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.nf_type import NFType -from capif_security.models.nf_type_any_of import NFTypeAnyOf -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.security_information import SecurityInformation -from capif_security.models.security_method import SecurityMethod -from capif_security.models.security_method_any_of import SecurityMethodAnyOf -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 fc19f939827f68ed25c3bab7430346c56595944f..71d49c28b2f01a003dc9bdda6cd25a43f8bc2899 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,12 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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 +from capif_security.models.res_owner_id import ResOwnerId # noqa: E501 class AccessTokenClaims(Model): @@ -15,7 +12,7 @@ class AccessTokenClaims(Model): Do not edit the class manually. """ - def __init__(self, iss=None, scope=None, exp=None): # noqa: E501 + def __init__(self, iss=None, scope=None, exp=None, res_owner_id=None): # noqa: E501 """AccessTokenClaims - a model defined in OpenAPI :param iss: The iss of this AccessTokenClaims. # noqa: E501 @@ -24,22 +21,27 @@ class AccessTokenClaims(Model): :type scope: str :param exp: The exp of this AccessTokenClaims. # noqa: E501 :type exp: int + :param res_owner_id: The res_owner_id of this AccessTokenClaims. # noqa: E501 + :type res_owner_id: ResOwnerId """ self.openapi_types = { 'iss': str, 'scope': str, - 'exp': int + 'exp': int, + 'res_owner_id': ResOwnerId } self.attribute_map = { 'iss': 'iss', 'scope': 'scope', - 'exp': 'exp' + 'exp': 'exp', + 'res_owner_id': 'resOwnerId' } self._iss = iss self._scope = scope self._exp = exp + self._res_owner_id = res_owner_id @classmethod def from_dict(cls, dikt) -> 'AccessTokenClaims': @@ -53,7 +55,7 @@ class AccessTokenClaims(Model): return util.deserialize_model(dikt, cls) @property - def iss(self): + def iss(self) -> str: """Gets the iss of this AccessTokenClaims. @@ -63,7 +65,7 @@ class AccessTokenClaims(Model): return self._iss @iss.setter - def iss(self, iss): + def iss(self, iss: str): """Sets the iss of this AccessTokenClaims. @@ -76,7 +78,7 @@ class AccessTokenClaims(Model): self._iss = iss @property - def scope(self): + def scope(self) -> str: """Gets the scope of this AccessTokenClaims. @@ -86,7 +88,7 @@ class AccessTokenClaims(Model): return self._scope @scope.setter - def scope(self, scope): + def scope(self, scope: str): """Sets the scope of this AccessTokenClaims. @@ -99,7 +101,7 @@ class AccessTokenClaims(Model): self._scope = scope @property - def exp(self): + def exp(self) -> int: """Gets the exp of this AccessTokenClaims. Unsigned integer identifying a period of time in units of seconds. # noqa: E501 @@ -110,7 +112,7 @@ class AccessTokenClaims(Model): return self._exp @exp.setter - def exp(self, exp): + def exp(self, exp: int): """Sets the exp of this AccessTokenClaims. Unsigned integer identifying a period of time in units of seconds. # noqa: E501 @@ -124,3 +126,24 @@ class AccessTokenClaims(Model): raise ValueError("Invalid value for `exp`, must be a value greater than or equal to `0`") # noqa: E501 self._exp = exp + + @property + def res_owner_id(self) -> ResOwnerId: + """Gets the res_owner_id of this AccessTokenClaims. + + + :return: The res_owner_id of this AccessTokenClaims. + :rtype: ResOwnerId + """ + return self._res_owner_id + + @res_owner_id.setter + def res_owner_id(self, res_owner_id: ResOwnerId): + """Sets the res_owner_id of this AccessTokenClaims. + + + :param res_owner_id: The res_owner_id of this AccessTokenClaims. + :type res_owner_id: ResOwnerId + """ + + self._res_owner_id = res_owner_id 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 4423dcc7589123ad1064c573e97466ff5ab07103..b5d7f6f8e415d419bd42e9a819f7c73952adc860 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -53,7 +49,7 @@ class AccessTokenErr(Model): return util.deserialize_model(dikt, cls) @property - def error(self): + def error(self) -> str: """Gets the error of this AccessTokenErr. @@ -63,7 +59,7 @@ class AccessTokenErr(Model): return self._error @error.setter - def error(self, error): + def error(self, error: str): """Sets the error of this AccessTokenErr. @@ -80,7 +76,7 @@ class AccessTokenErr(Model): self._error = error @property - def error_description(self): + def error_description(self) -> str: """Gets the error_description of this AccessTokenErr. @@ -90,7 +86,7 @@ class AccessTokenErr(Model): return self._error_description @error_description.setter - def error_description(self, error_description): + def error_description(self, error_description: str): """Sets the error_description of this AccessTokenErr. @@ -101,7 +97,7 @@ class AccessTokenErr(Model): self._error_description = error_description @property - def error_uri(self): + def error_uri(self) -> str: """Gets the error_uri of this AccessTokenErr. @@ -111,7 +107,7 @@ class AccessTokenErr(Model): return self._error_uri @error_uri.setter - def error_uri(self, error_uri): + def error_uri(self, error_uri: str): """Sets the error_uri of this AccessTokenErr. 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 8d2253f8f01efc4ac4e01c25877b79ca40e6583d..325b219770cb2e32fdaff49e727994030b09b5d8 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -53,7 +49,7 @@ class AccessTokenErr1(Model): return util.deserialize_model(dikt, cls) @property - def error(self): + def error(self) -> str: """Gets the error of this AccessTokenErr1. @@ -63,7 +59,7 @@ class AccessTokenErr1(Model): return self._error @error.setter - def error(self, error): + def error(self, error: str): """Sets the error of this AccessTokenErr1. @@ -80,7 +76,7 @@ class AccessTokenErr1(Model): self._error = error @property - def error_description(self): + def error_description(self) -> str: """Gets the error_description of this AccessTokenErr1. @@ -90,7 +86,7 @@ class AccessTokenErr1(Model): return self._error_description @error_description.setter - def error_description(self, error_description): + def error_description(self, error_description: str): """Sets the error_description of this AccessTokenErr1. @@ -101,7 +97,7 @@ class AccessTokenErr1(Model): self._error_description = error_description @property - def error_uri(self): + def error_uri(self) -> str: """Gets the error_uri of this AccessTokenErr1. @@ -111,7 +107,7 @@ class AccessTokenErr1(Model): return self._error_uri @error_uri.setter - def error_uri(self, error_uri): + def error_uri(self, error_uri: str): """Sets the error_uri of this AccessTokenErr1. diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req.py b/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req.py deleted file mode 100644 index 5a8ec226809a1e5b63f8785413ed0966f78fe018..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/access_token_req.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model_ import Model -from capif_security.models.access_token_err import AccessTokenErr -from capif_security import util - - -class AccessTokenReq(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - def __init__(self, grant_type=None, client_id=None, client_secret=None, scope=None): # noqa: E501 - """AccessTokenReq - a model defined in OpenAPI - - :param grant_type: The grant_type of this AccessTokenReq. # noqa: E501 - :type grant_type: str - :param client_id: The client_id of this AccessTokenReq. # noqa: E501 - :type client_id: str - :param client_secret: The client_secret of this AccessTokenReq. # noqa: E501 - :type client_secret: str - :param scope: The scope of this AccessTokenReq. # noqa: E501 - :type scope: str - """ - self.openapi_types = { - 'grant_type': str, - 'client_id': str, - 'client_secret': str, - 'scope': str - } - - self.attribute_map = { - 'grant_type': 'grant_type', - 'client_id': 'client_id', - 'client_secret': 'client_secret', - 'scope': 'scope' - } - - self._grant_type = grant_type - self._client_id = client_id - self._client_secret = client_secret - self._scope = scope - - @classmethod - def from_dict(cls, dikt) -> 'AccessTokenReq': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The AccessTokenReq of this AccessTokenReq. # noqa: E501 - :rtype: AccessTokenReq - """ - return util.deserialize_model(dikt, cls) - - @property - def grant_type(self): - """Gets the grant_type of this AccessTokenReq. - - - :return: The grant_type of this AccessTokenReq. - :rtype: str - """ - return self._grant_type - - @grant_type.setter - def grant_type(self, grant_type): - """Sets the grant_type of this AccessTokenReq. - - - :param grant_type: The grant_type of this AccessTokenReq. - :type grant_type: str - """ - allowed_values = ["client_credentials"] # noqa: E501 - if grant_type not in allowed_values: - raise ValueError( - "Invalid value for `grant_type` ({0}), must be one of {1}" - .format(grant_type, allowed_values) - ) - - self._grant_type = grant_type - - @property - def client_id(self): - """Gets the client_id of this AccessTokenReq. - - - :return: The client_id of this AccessTokenReq. - :rtype: str - """ - return self._client_id - - @client_id.setter - def client_id(self, client_id): - """Sets the client_id of this AccessTokenReq. - - - :param client_id: The client_id of this AccessTokenReq. - :type client_id: str - """ - if client_id is None: - raise ValueError("Invalid value for `client_id`, must not be `None`") # noqa: E501 - - self._client_id = client_id - - @property - def client_secret(self): - """Gets the client_secret of this AccessTokenReq. - - - :return: The client_secret of this AccessTokenReq. - :rtype: str - """ - return self._client_secret - - @client_secret.setter - def client_secret(self, client_secret): - """Sets the client_secret of this AccessTokenReq. - - - :param client_secret: The client_secret of this AccessTokenReq. - :type client_secret: str - """ - - self._client_secret = client_secret - - @property - def scope(self): - """Gets the scope of this AccessTokenReq. - - - :return: The scope of this AccessTokenReq. - :rtype: str - """ - return self._scope - - @scope.setter - def scope(self, scope): - """Sets the scope of this AccessTokenReq. - - - :param scope: The scope of this AccessTokenReq. - :type scope: str - """ - - self._scope = scope 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 b119e9c138d87e776a3dd8210fda8751fb35c43c..b9e4ff408db15c09cd03ecf79f6a76e8b03a67a2 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,14 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_security.models.base_model_ import Model -from capif_security.models.nf_type import NFType -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.base_model import Model from capif_security.models.nf_type import NFType # noqa: E501 -from capif_security.models.access_token_err import AccessTokenErr 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). @@ -26,7 +16,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_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): # 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): # noqa: E501 """AccessTokenReq1 - a model defined in OpenAPI :param grant_type: The grant_type of this AccessTokenReq1. # noqa: E501 @@ -53,6 +43,8 @@ class AccessTokenReq1(Model): :type requester_snpn_list: List[PlmnIdNid] :param target_plmn: The target_plmn of this AccessTokenReq1. # noqa: E501 :type target_plmn: PlmnId + :param target_snpn: The target_snpn of this AccessTokenReq1. # noqa: E501 + :type target_snpn: PlmnIdNid :param target_snssai_list: The target_snssai_list of this AccessTokenReq1. # noqa: E501 :type target_snssai_list: List[Snssai] :param target_nsi_list: The target_nsi_list of this AccessTokenReq1. # noqa: E501 @@ -79,6 +71,7 @@ class AccessTokenReq1(Model): 'requester_fqdn': str, 'requester_snpn_list': List[PlmnIdNid], 'target_plmn': PlmnId, + 'target_snpn': PlmnIdNid, 'target_snssai_list': List[Snssai], 'target_nsi_list': List[str], 'target_nf_set_id': str, @@ -100,6 +93,7 @@ class AccessTokenReq1(Model): 'requester_fqdn': 'requesterFqdn', 'requester_snpn_list': 'requesterSnpnList', 'target_plmn': 'targetPlmn', + 'target_snpn': 'targetSnpn', 'target_snssai_list': 'targetSnssaiList', 'target_nsi_list': 'targetNsiList', 'target_nf_set_id': 'targetNfSetId', @@ -120,6 +114,7 @@ class AccessTokenReq1(Model): self._requester_fqdn = requester_fqdn self._requester_snpn_list = requester_snpn_list self._target_plmn = target_plmn + self._target_snpn = target_snpn self._target_snssai_list = target_snssai_list self._target_nsi_list = target_nsi_list self._target_nf_set_id = target_nf_set_id @@ -139,7 +134,7 @@ class AccessTokenReq1(Model): return util.deserialize_model(dikt, cls) @property - def grant_type(self): + def grant_type(self) -> str: """Gets the grant_type of this AccessTokenReq1. @@ -149,7 +144,7 @@ class AccessTokenReq1(Model): return self._grant_type @grant_type.setter - def grant_type(self, grant_type): + def grant_type(self, grant_type: str): """Sets the grant_type of this AccessTokenReq1. @@ -166,7 +161,7 @@ class AccessTokenReq1(Model): self._grant_type = grant_type @property - def nf_instance_id(self): + 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 @@ -177,7 +172,7 @@ class AccessTokenReq1(Model): return self._nf_instance_id @nf_instance_id.setter - def nf_instance_id(self, nf_instance_id): + 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 @@ -191,7 +186,7 @@ class AccessTokenReq1(Model): self._nf_instance_id = nf_instance_id @property - def nf_type(self): + def nf_type(self) -> NFType: """Gets the nf_type of this AccessTokenReq1. @@ -201,7 +196,7 @@ class AccessTokenReq1(Model): return self._nf_type @nf_type.setter - def nf_type(self, nf_type): + def nf_type(self, nf_type: NFType): """Sets the nf_type of this AccessTokenReq1. @@ -212,7 +207,7 @@ class AccessTokenReq1(Model): self._nf_type = nf_type @property - def target_nf_type(self): + def target_nf_type(self) -> NFType: """Gets the target_nf_type of this AccessTokenReq1. @@ -222,7 +217,7 @@ class AccessTokenReq1(Model): return self._target_nf_type @target_nf_type.setter - def target_nf_type(self, target_nf_type): + def target_nf_type(self, target_nf_type: NFType): """Sets the target_nf_type of this AccessTokenReq1. @@ -233,7 +228,7 @@ class AccessTokenReq1(Model): self._target_nf_type = target_nf_type @property - def scope(self): + def scope(self) -> str: """Gets the scope of this AccessTokenReq1. @@ -243,7 +238,7 @@ class AccessTokenReq1(Model): return self._scope @scope.setter - def scope(self, scope): + def scope(self, scope: str): """Sets the scope of this AccessTokenReq1. @@ -258,7 +253,7 @@ class AccessTokenReq1(Model): self._scope = scope @property - def target_nf_instance_id(self): + 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 @@ -269,7 +264,7 @@ class AccessTokenReq1(Model): return self._target_nf_instance_id @target_nf_instance_id.setter - def target_nf_instance_id(self, target_nf_instance_id): + 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 @@ -281,7 +276,7 @@ class AccessTokenReq1(Model): self._target_nf_instance_id = target_nf_instance_id @property - def requester_plmn(self): + def requester_plmn(self) -> PlmnId: """Gets the requester_plmn of this AccessTokenReq1. @@ -291,7 +286,7 @@ class AccessTokenReq1(Model): return self._requester_plmn @requester_plmn.setter - def requester_plmn(self, requester_plmn): + def requester_plmn(self, requester_plmn: PlmnId): """Sets the requester_plmn of this AccessTokenReq1. @@ -302,7 +297,7 @@ class AccessTokenReq1(Model): self._requester_plmn = requester_plmn @property - def requester_plmn_list(self): + def requester_plmn_list(self) -> List[PlmnId]: """Gets the requester_plmn_list of this AccessTokenReq1. @@ -312,7 +307,7 @@ class AccessTokenReq1(Model): return self._requester_plmn_list @requester_plmn_list.setter - def requester_plmn_list(self, requester_plmn_list): + def requester_plmn_list(self, requester_plmn_list: List[PlmnId]): """Sets the requester_plmn_list of this AccessTokenReq1. @@ -325,7 +320,7 @@ class AccessTokenReq1(Model): self._requester_plmn_list = requester_plmn_list @property - def requester_snssai_list(self): + def requester_snssai_list(self) -> List[Snssai]: """Gets the requester_snssai_list of this AccessTokenReq1. @@ -335,7 +330,7 @@ class AccessTokenReq1(Model): return self._requester_snssai_list @requester_snssai_list.setter - def requester_snssai_list(self, requester_snssai_list): + def requester_snssai_list(self, requester_snssai_list: List[Snssai]): """Sets the requester_snssai_list of this AccessTokenReq1. @@ -348,7 +343,7 @@ class AccessTokenReq1(Model): self._requester_snssai_list = requester_snssai_list @property - def requester_fqdn(self): + def requester_fqdn(self) -> str: """Gets the requester_fqdn of this AccessTokenReq1. Fully Qualified Domain Name # noqa: E501 @@ -359,7 +354,7 @@ class AccessTokenReq1(Model): return self._requester_fqdn @requester_fqdn.setter - def requester_fqdn(self, requester_fqdn): + def requester_fqdn(self, requester_fqdn: str): """Sets the requester_fqdn of this AccessTokenReq1. Fully Qualified Domain Name # noqa: E501 @@ -377,7 +372,7 @@ class AccessTokenReq1(Model): self._requester_fqdn = requester_fqdn @property - def requester_snpn_list(self): + def requester_snpn_list(self) -> List[PlmnIdNid]: """Gets the requester_snpn_list of this AccessTokenReq1. @@ -387,7 +382,7 @@ class AccessTokenReq1(Model): return self._requester_snpn_list @requester_snpn_list.setter - def requester_snpn_list(self, requester_snpn_list): + def requester_snpn_list(self, requester_snpn_list: List[PlmnIdNid]): """Sets the requester_snpn_list of this AccessTokenReq1. @@ -400,7 +395,7 @@ class AccessTokenReq1(Model): self._requester_snpn_list = requester_snpn_list @property - def target_plmn(self): + def target_plmn(self) -> PlmnId: """Gets the target_plmn of this AccessTokenReq1. @@ -410,7 +405,7 @@ class AccessTokenReq1(Model): return self._target_plmn @target_plmn.setter - def target_plmn(self, target_plmn): + def target_plmn(self, target_plmn: PlmnId): """Sets the target_plmn of this AccessTokenReq1. @@ -421,7 +416,28 @@ class AccessTokenReq1(Model): self._target_plmn = target_plmn @property - def target_snssai_list(self): + def target_snpn(self) -> PlmnIdNid: + """Gets the target_snpn of this AccessTokenReq1. + + + :return: The target_snpn of this AccessTokenReq1. + :rtype: PlmnIdNid + """ + return self._target_snpn + + @target_snpn.setter + def target_snpn(self, target_snpn: PlmnIdNid): + """Sets the target_snpn of this AccessTokenReq1. + + + :param target_snpn: The target_snpn of this AccessTokenReq1. + :type target_snpn: PlmnIdNid + """ + + self._target_snpn = target_snpn + + @property + def target_snssai_list(self) -> List[Snssai]: """Gets the target_snssai_list of this AccessTokenReq1. @@ -431,7 +447,7 @@ class AccessTokenReq1(Model): return self._target_snssai_list @target_snssai_list.setter - def target_snssai_list(self, target_snssai_list): + def target_snssai_list(self, target_snssai_list: List[Snssai]): """Sets the target_snssai_list of this AccessTokenReq1. @@ -444,7 +460,7 @@ class AccessTokenReq1(Model): self._target_snssai_list = target_snssai_list @property - def target_nsi_list(self): + def target_nsi_list(self) -> List[str]: """Gets the target_nsi_list of this AccessTokenReq1. @@ -454,7 +470,7 @@ class AccessTokenReq1(Model): return self._target_nsi_list @target_nsi_list.setter - def target_nsi_list(self, target_nsi_list): + def target_nsi_list(self, target_nsi_list: List[str]): """Sets the target_nsi_list of this AccessTokenReq1. @@ -467,7 +483,7 @@ class AccessTokenReq1(Model): self._target_nsi_list = target_nsi_list @property - def target_nf_set_id(self): + def target_nf_set_id(self) -> str: """Gets the target_nf_set_id of this AccessTokenReq1. NF Set Identifier (see clause 28.12 of 3GPP TS 23.003), formatted as the following string \"set.set.5gc.mnc.mcc\", or \"set.set.5gc.nid.mnc.mcc\" with encoded as defined in clause 5.4.2 (\"Mcc\" data type definition) encoding the Mobile Network Code part of the PLMN, comprising 3 digits. If there are only 2 significant digits in the MNC, one \"0\" digit shall be inserted at the left side to fill the 3 digits coding of MNC. Pattern: '^[0-9]{3}$' encoded as a value defined in Table 6.1.6.3.3-1 of 3GPP TS 29.510 but with lower case characters encoded as a string of characters consisting of alphabetic characters (A-Z and a-z), digits (0-9) and/or the hyphen (-) and that shall end with either an alphabetic character or a digit. # noqa: E501 @@ -478,7 +494,7 @@ class AccessTokenReq1(Model): return self._target_nf_set_id @target_nf_set_id.setter - def target_nf_set_id(self, target_nf_set_id): + def target_nf_set_id(self, target_nf_set_id: str): """Sets the target_nf_set_id of this AccessTokenReq1. NF Set Identifier (see clause 28.12 of 3GPP TS 23.003), formatted as the following string \"set.set.5gc.mnc.mcc\", or \"set.set.5gc.nid.mnc.mcc\" with encoded as defined in clause 5.4.2 (\"Mcc\" data type definition) encoding the Mobile Network Code part of the PLMN, comprising 3 digits. If there are only 2 significant digits in the MNC, one \"0\" digit shall be inserted at the left side to fill the 3 digits coding of MNC. Pattern: '^[0-9]{3}$' encoded as a value defined in Table 6.1.6.3.3-1 of 3GPP TS 29.510 but with lower case characters encoded as a string of characters consisting of alphabetic characters (A-Z and a-z), digits (0-9) and/or the hyphen (-) and that shall end with either an alphabetic character or a digit. # noqa: E501 @@ -490,7 +506,7 @@ class AccessTokenReq1(Model): self._target_nf_set_id = target_nf_set_id @property - def target_nf_service_set_id(self): + def target_nf_service_set_id(self) -> str: """Gets the target_nf_service_set_id of this AccessTokenReq1. NF Service Set Identifier (see clause 28.12 of 3GPP TS 23.003) formatted as the following string \"set.sn.nfi.5gc.mnc.mcc\", or \"set.sn.nfi.5gc.nid.mnc.mcc\" with encoded as defined in clause 5.4.2 (\"Mcc\" data type definition) encoding the Mobile Network Code part of the PLMN, comprising 3 digits. If there are only 2 significant digits in the MNC, one \"0\" digit shall be inserted at the left side to fill the 3 digits coding of MNC. Pattern: '^[0-9]{3}$' encoded as defined in clause 5.4.2 (\"Nid\" data type definition) encoded as defined in clause 5.3.2 encoded as defined in 3GPP TS 29.510 encoded as a string of characters consisting of alphabetic characters (A-Z and a-z), digits (0-9) and/or the hyphen (-) and that shall end with either an alphabetic character or a digit. # noqa: E501 @@ -501,7 +517,7 @@ class AccessTokenReq1(Model): return self._target_nf_service_set_id @target_nf_service_set_id.setter - def target_nf_service_set_id(self, target_nf_service_set_id): + def target_nf_service_set_id(self, target_nf_service_set_id: str): """Sets the target_nf_service_set_id of this AccessTokenReq1. NF Service Set Identifier (see clause 28.12 of 3GPP TS 23.003) formatted as the following string \"set.sn.nfi.5gc.mnc.mcc\", or \"set.sn.nfi.5gc.nid.mnc.mcc\" with encoded as defined in clause 5.4.2 (\"Mcc\" data type definition) encoding the Mobile Network Code part of the PLMN, comprising 3 digits. If there are only 2 significant digits in the MNC, one \"0\" digit shall be inserted at the left side to fill the 3 digits coding of MNC. Pattern: '^[0-9]{3}$' encoded as defined in clause 5.4.2 (\"Nid\" data type definition) encoded as defined in clause 5.3.2 encoded as defined in 3GPP TS 29.510 encoded as a string of characters consisting of alphabetic characters (A-Z and a-z), digits (0-9) and/or the hyphen (-) and that shall end with either an alphabetic character or a digit. # noqa: E501 @@ -513,7 +529,7 @@ class AccessTokenReq1(Model): self._target_nf_service_set_id = target_nf_service_set_id @property - def hnrf_access_token_uri(self): + def hnrf_access_token_uri(self) -> str: """Gets the hnrf_access_token_uri of this AccessTokenReq1. String providing an URI formatted according to RFC 3986. # noqa: E501 @@ -524,7 +540,7 @@ class AccessTokenReq1(Model): return self._hnrf_access_token_uri @hnrf_access_token_uri.setter - def hnrf_access_token_uri(self, hnrf_access_token_uri): + def hnrf_access_token_uri(self, hnrf_access_token_uri: str): """Sets the hnrf_access_token_uri of this AccessTokenReq1. String providing an URI formatted according to RFC 3986. # noqa: E501 @@ -536,7 +552,7 @@ class AccessTokenReq1(Model): self._hnrf_access_token_uri = hnrf_access_token_uri @property - def source_nf_instance_id(self): + 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 @@ -547,7 +563,7 @@ class AccessTokenReq1(Model): return self._source_nf_instance_id @source_nf_instance_id.setter - def source_nf_instance_id(self, source_nf_instance_id): + 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 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 57f672091915f03934c60f215bf8e1120c277f92..deaf22ecf4b0582fa2ae0e8139f9d581c5c2b963 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -58,7 +54,7 @@ class AccessTokenRsp(Model): return util.deserialize_model(dikt, cls) @property - def access_token(self): + def access_token(self) -> str: """Gets the access_token of this AccessTokenRsp. JWS Compact Serialized representation of JWS signed JSON object (AccessTokenClaims) # noqa: E501 @@ -69,7 +65,7 @@ class AccessTokenRsp(Model): return self._access_token @access_token.setter - def access_token(self, access_token): + def access_token(self, access_token: str): """Sets the access_token of this AccessTokenRsp. JWS Compact Serialized representation of JWS signed JSON object (AccessTokenClaims) # noqa: E501 @@ -83,7 +79,7 @@ class AccessTokenRsp(Model): self._access_token = access_token @property - def token_type(self): + def token_type(self) -> str: """Gets the token_type of this AccessTokenRsp. @@ -93,7 +89,7 @@ class AccessTokenRsp(Model): return self._token_type @token_type.setter - def token_type(self, token_type): + def token_type(self, token_type: str): """Sets the token_type of this AccessTokenRsp. @@ -110,7 +106,7 @@ class AccessTokenRsp(Model): self._token_type = token_type @property - def expires_in(self): + def expires_in(self) -> int: """Gets the expires_in of this AccessTokenRsp. Unsigned integer identifying a period of time in units of seconds. # noqa: E501 @@ -121,7 +117,7 @@ class AccessTokenRsp(Model): return self._expires_in @expires_in.setter - def expires_in(self, expires_in): + def expires_in(self, expires_in: int): """Sets the expires_in of this AccessTokenRsp. Unsigned integer identifying a period of time in units of seconds. # noqa: E501 @@ -137,7 +133,7 @@ class AccessTokenRsp(Model): self._expires_in = expires_in @property - def scope(self): + def scope(self) -> str: """Gets the scope of this AccessTokenRsp. @@ -147,7 +143,7 @@ class AccessTokenRsp(Model): return self._scope @scope.setter - def scope(self, scope): + def scope(self, scope: str): """Sets the scope of this AccessTokenRsp. 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 similarity index 95% rename from services/TS29222_CAPIF_Security_API/capif_security/models/base_model_.py rename to services/TS29222_CAPIF_Security_API/capif_security/models/base_model.py index e8f6832a8fcd634cbce20f587f531f2abf9b9680..32a1219f8ac147ba8f4c8501d11a6eb8debd9124 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,6 +1,4 @@ import pprint - -import six import typing from capif_security import util @@ -8,7 +6,7 @@ from capif_security import util T = typing.TypeVar('T') -class Model(): +class Model: # openapiTypes: The key is attribute name and the # value is attribute type. openapi_types: typing.Dict[str, type] = {} @@ -29,7 +27,7 @@ class Model(): """ result = {} - for attr, _ in six.iteritems(self.openapi_types): + for attr in self.openapi_types: value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 a93f5a859ae9ddcb4416418b68404342336319a1..1b57bf4d57b05f9341e1b65c78a1adbc776e3222 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/cause.py @@ -1,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_security.models.base_model_ import Model -from capif_security.models.cause_any_of import CauseAnyOf from capif_security import util +from capif_security.models.base_model import Model -from capif_security.models.cause_any_of import CauseAnyOf # noqa: E501 class Cause(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/interface_description.py b/services/TS29222_CAPIF_Security_API/capif_security/models/interface_description.py index 546ef7f13324cbc6a815a89b38ce0eac4b3fe728..47458b7bbdf994962f8c666b802e57a440ce8f37 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,51 +1,57 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_security.models.base_model_ import Model -from capif_security.models.security_method import SecurityMethod from capif_security import util - +from capif_security.models.base_model import Model from capif_security.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 + def __init__(self, ipv4_addr=None, ipv6_addr=None, fqdn=None, port=None, api_prefix=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 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] """ self.openapi_types = { 'ipv4_addr': str, 'ipv6_addr': str, + 'fqdn': str, 'port': int, + 'api_prefix': str, 'security_methods': List[SecurityMethod] } self.attribute_map = { 'ipv4_addr': 'ipv4Addr', 'ipv6_addr': 'ipv6Addr', + 'fqdn': 'fqdn', 'port': 'port', + 'api_prefix': 'apiPrefix', 'security_methods': 'securityMethods' } 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 @classmethod @@ -60,10 +66,10 @@ class InterfaceDescription(Model): return util.deserialize_model(dikt, cls) @property - def ipv4_addr(self): + 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 + 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 @@ -71,10 +77,10 @@ class InterfaceDescription(Model): return self._ipv4_addr @ipv4_addr.setter - def ipv4_addr(self, ipv4_addr): + 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 + 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 @@ -83,10 +89,10 @@ class InterfaceDescription(Model): self._ipv4_addr = ipv4_addr @property - def ipv6_addr(self): + 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 + 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 @@ -94,10 +100,10 @@ class InterfaceDescription(Model): return self._ipv6_addr @ipv6_addr.setter - def ipv6_addr(self, ipv6_addr): + 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 + 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 @@ -106,7 +112,36 @@ class InterfaceDescription(Model): self._ipv6_addr = ipv6_addr @property - def port(self): + def fqdn(self) -> str: + """Gets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :return: The fqdn of this InterfaceDescription. + :rtype: str + """ + return self._fqdn + + @fqdn.setter + def fqdn(self, fqdn: str): + """Sets the fqdn of this InterfaceDescription. + + Fully Qualified Domain Name # noqa: E501 + + :param fqdn: The fqdn of this InterfaceDescription. + :type fqdn: str + """ + if fqdn is not None and len(fqdn) > 253: + raise ValueError("Invalid value for `fqdn`, length must be less than or equal to `253`") # noqa: E501 + if fqdn is not None and len(fqdn) < 4: + raise ValueError("Invalid value for `fqdn`, length must be greater than or equal to `4`") # noqa: E501 + if fqdn is not None and not re.search(r'^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$', fqdn): # noqa: E501 + raise ValueError("Invalid value for `fqdn`, must be a follow pattern or equal to `/^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$/`") # noqa: E501 + + self._fqdn = fqdn + + @property + def port(self) -> int: """Gets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -117,7 +152,7 @@ class InterfaceDescription(Model): return self._port @port.setter - def port(self, port): + def port(self, port: int): """Sets the port of this InterfaceDescription. Unsigned integer with valid values between 0 and 65535. # noqa: E501 @@ -133,7 +168,30 @@ class InterfaceDescription(Model): self._port = port @property - def security_methods(self): + def api_prefix(self) -> str: + """Gets the api_prefix of this InterfaceDescription. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. + + A string representing a sequence of path segments that starts with the slash character. # noqa: E501 + + :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. Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 @@ -144,7 +202,7 @@ class InterfaceDescription(Model): return self._security_methods @security_methods.setter - def security_methods(self, security_methods): + 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 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 3cf97a3174d311760870065c071bce2fb8b4d373..ca4a094e20c698002c86403d02fe7f7a42f337d5 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -48,7 +44,7 @@ class InvalidParam(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam. Attribute's name encoded as a JSON Pointer, or header's name. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam(Model): return self._param @param.setter - def param(self, param): + 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 @@ -73,7 +69,7 @@ class InvalidParam(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam. A human-readable reason, e.g. \"must be a positive integer\". # noqa: E501 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 93fbd3a8f68884c1927e63632224ea122166101d..3546df8df11b34d800c60a77027a211d4a1e2bb6 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -48,7 +44,7 @@ class InvalidParam1(Model): return util.deserialize_model(dikt, cls) @property - def param(self): + def param(self) -> str: """Gets the param of this InvalidParam1. If the invalid parameter is an attribute in a JSON body, this IE shall contain the attribute's name and shall be encoded as a JSON Pointer. If the invalid parameter is an HTTP header, this IE shall be formatted as the concatenation of the string \"header \" plus the name of such header. If the invalid parameter is a query parameter, this IE shall be formatted as the concatenation of the string \"query \" plus the name of such query parameter. If the invalid parameter is a variable part in the path of a resource URI, this IE shall contain the name of the variable, including the symbols \"{\" and \"}\" used in OpenAPI specification as the notation to represent variable path segments. # noqa: E501 @@ -59,7 +55,7 @@ class InvalidParam1(Model): return self._param @param.setter - def param(self, param): + def param(self, param: str): """Sets the param of this InvalidParam1. If the invalid parameter is an attribute in a JSON body, this IE shall contain the attribute's name and shall be encoded as a JSON Pointer. If the invalid parameter is an HTTP header, this IE shall be formatted as the concatenation of the string \"header \" plus the name of such header. If the invalid parameter is a query parameter, this IE shall be formatted as the concatenation of the string \"query \" plus the name of such query parameter. If the invalid parameter is a variable part in the path of a resource URI, this IE shall contain the name of the variable, including the symbols \"{\" and \"}\" used in OpenAPI specification as the notation to represent variable path segments. # noqa: E501 @@ -73,7 +69,7 @@ class InvalidParam1(Model): self._param = param @property - def reason(self): + def reason(self) -> str: """Gets the reason of this InvalidParam1. A human-readable reason, e.g. \"must be a positive integer\". In cases involving failed operations in a PATCH request, the reason string should identify the operation that failed using the operation's array index to assist in correlation of the invalid parameter with the failed operation, e.g.\" Replacement value invalid for attribute (failed operation index= 4)\" # noqa: E501 @@ -84,7 +80,7 @@ class InvalidParam1(Model): return self._reason @reason.setter - def reason(self, reason): + def reason(self, reason: str): """Sets the reason of this InvalidParam1. A human-readable reason, e.g. \"must be a positive integer\". In cases involving failed operations in a PATCH request, the reason string should identify the operation that failed using the operation's array index to assist in correlation of the invalid parameter with the failed operation, e.g.\" Replacement value invalid for attribute (failed operation index= 4)\" # noqa: E501 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 78c0598ebad4c74121a61b70b64882299f106777..0f2e09b2e0bab651339f2cd65f494f889375bced 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,15 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_security.models.base_model_ import Model -from capif_security.models.nf_type_any_of import NFTypeAnyOf from capif_security import util +from capif_security.models.base_model import Model -from capif_security.models.nf_type_any_of import NFTypeAnyOf # noqa: E501 class NFType(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_any_of.py b/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type_any_of.py deleted file mode 100644 index 5638ef9e24b3775e51cac83331dbb00f471688c7..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/nf_type_any_of.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model_ import Model -from capif_security import util - - -class NFTypeAnyOf(Model): - """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - NRF = "NRF" - UDM = "UDM" - AMF = "AMF" - SMF = "SMF" - AUSF = "AUSF" - NEF = "NEF" - PCF = "PCF" - SMSF = "SMSF" - NSSF = "NSSF" - UDR = "UDR" - LMF = "LMF" - GMLC = "GMLC" - _5G_EIR = "5G_EIR" - SEPP = "SEPP" - UPF = "UPF" - N3IWF = "N3IWF" - AF = "AF" - UDSF = "UDSF" - BSF = "BSF" - CHF = "CHF" - NWDAF = "NWDAF" - PCSCF = "PCSCF" - CBCF = "CBCF" - HSS = "HSS" - UCMF = "UCMF" - SOR_AF = "SOR_AF" - SPAF = "SPAF" - MME = "MME" - SCSAS = "SCSAS" - SCEF = "SCEF" - SCP = "SCP" - NSSAAF = "NSSAAF" - ICSCF = "ICSCF" - SCSCF = "SCSCF" - DRA = "DRA" - IMS_AS = "IMS_AS" - AANF = "AANF" - _5G_DDNMF = "5G_DDNMF" - NSACF = "NSACF" - MFAF = "MFAF" - EASDF = "EASDF" - DCCF = "DCCF" - MB_SMF = "MB_SMF" - TSCTSF = "TSCTSF" - ADRF = "ADRF" - GBA_BSF = "GBA_BSF" - CEF = "CEF" - MB_UPF = "MB_UPF" - NSWOF = "NSWOF" - PKMF = "PKMF" - MNPF = "MNPF" - SMS_GMSC = "SMS_GMSC" - SMS_IWMSC = "SMS_IWMSC" - MBSF = "MBSF" - MBSTF = "MBSTF" - def __init__(self): # noqa: E501 - """NFTypeAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'NFTypeAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The NFType_anyOf of this NFTypeAnyOf. # noqa: E501 - :rtype: NFTypeAnyOf - """ - return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..c374ddeb15a33b92ff8c90e3f0127b1ccc5b7b8d --- /dev/null +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_info.py @@ -0,0 +1,92 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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 + + +class NoProfileMatchInfo(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, reason=None, query_param_combination_list=None): # noqa: E501 + """NoProfileMatchInfo - a model defined in OpenAPI + + :param reason: The reason of this NoProfileMatchInfo. # noqa: E501 + :type reason: NoProfileMatchReason + :param query_param_combination_list: The query_param_combination_list of this NoProfileMatchInfo. # noqa: E501 + :type query_param_combination_list: List[QueryParamCombination] + """ + self.openapi_types = { + 'reason': NoProfileMatchReason, + 'query_param_combination_list': List[QueryParamCombination] + } + + self.attribute_map = { + 'reason': 'reason', + 'query_param_combination_list': 'queryParamCombinationList' + } + + self._reason = reason + self._query_param_combination_list = query_param_combination_list + + @classmethod + def from_dict(cls, dikt) -> 'NoProfileMatchInfo': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NoProfileMatchInfo of this NoProfileMatchInfo. # noqa: E501 + :rtype: NoProfileMatchInfo + """ + return util.deserialize_model(dikt, cls) + + @property + def reason(self) -> NoProfileMatchReason: + """Gets the reason of this NoProfileMatchInfo. + + + :return: The reason of this NoProfileMatchInfo. + :rtype: NoProfileMatchReason + """ + return self._reason + + @reason.setter + def reason(self, reason: NoProfileMatchReason): + """Sets the reason of this NoProfileMatchInfo. + + + :param reason: The reason of this NoProfileMatchInfo. + :type reason: NoProfileMatchReason + """ + if reason is None: + raise ValueError("Invalid value for `reason`, must not be `None`") # noqa: E501 + + self._reason = reason + + @property + def query_param_combination_list(self) -> List[QueryParamCombination]: + """Gets the query_param_combination_list of this NoProfileMatchInfo. + + + :return: The query_param_combination_list of this NoProfileMatchInfo. + :rtype: List[QueryParamCombination] + """ + return self._query_param_combination_list + + @query_param_combination_list.setter + def query_param_combination_list(self, query_param_combination_list: List[QueryParamCombination]): + """Sets the query_param_combination_list of this NoProfileMatchInfo. + + + :param query_param_combination_list: The query_param_combination_list of this NoProfileMatchInfo. + :type query_param_combination_list: List[QueryParamCombination] + """ + if query_param_combination_list is not None and len(query_param_combination_list) < 1: + raise ValueError("Invalid value for `query_param_combination_list`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._query_param_combination_list = query_param_combination_list diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/cause_any_of.py b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py similarity index 56% rename from services/TS29222_CAPIF_Security_API/capif_security/models/cause_any_of.py rename to services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py index 64b601ca5e26e34c65b36f65e9178be1965cd49c..511afb65c55e3578646cb99d2cd2a1cc29a952ed 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/cause_any_of.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/no_profile_match_reason.py @@ -1,27 +1,18 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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 CauseAnyOf(Model): +class NoProfileMatchReason(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ - """ - allowed enum values - """ - OVERLIMIT_USAGE = "OVERLIMIT_USAGE" - UNEXPECTED_REASON = "UNEXPECTED_REASON" def __init__(self): # noqa: E501 - """CauseAnyOf - a model defined in OpenAPI + """NoProfileMatchReason - a model defined in OpenAPI """ self.openapi_types = { @@ -31,12 +22,12 @@ class CauseAnyOf(Model): } @classmethod - def from_dict(cls, dikt) -> 'CauseAnyOf': + def from_dict(cls, dikt) -> 'NoProfileMatchReason': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The Cause_anyOf of this CauseAnyOf. # noqa: E501 - :rtype: CauseAnyOf + :return: The NoProfileMatchReason of this NoProfileMatchReason. # noqa: E501 + :rtype: NoProfileMatchReason """ return util.deserialize_model(dikt, cls) 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 new file mode 100644 index 0000000000000000000000000000000000000000..9420cc5b79b8d444095b0f61c03bce8cff7d2c38 --- /dev/null +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/o_auth_grant_type.py @@ -0,0 +1,33 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_security import util +from capif_security.models.base_model import Model + + +class OAuthGrantType(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 + """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/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py b/services/TS29222_CAPIF_Security_API/capif_security/models/plmn_id.py index 1a0dfce4c808720e2fbc1dc6f701294045876941..82696e45abb6eb48a4294cb3aae537561027c1e5 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,15 +1,10 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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). @@ -50,7 +45,7 @@ class PlmnId(Model): return util.deserialize_model(dikt, cls) @property - def mcc(self): + def mcc(self) -> str: """Gets the mcc of this PlmnId. Mobile Country Code part of the PLMN, comprising 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 @@ -61,7 +56,7 @@ class PlmnId(Model): return self._mcc @mcc.setter - def mcc(self, mcc): + def mcc(self, mcc: str): """Sets the mcc of this PlmnId. Mobile Country Code part of the PLMN, comprising 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 @@ -77,10 +72,10 @@ class PlmnId(Model): self._mcc = mcc @property - def mnc(self): + def mnc(self) -> str: """Gets the mnc of this PlmnId. - Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 + Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 :return: The mnc of this PlmnId. :rtype: str @@ -88,10 +83,10 @@ class PlmnId(Model): return self._mnc @mnc.setter - def mnc(self, mnc): + def mnc(self, mnc: str): """Sets the mnc of this PlmnId. - Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 + Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 :param mnc: The mnc of this PlmnId. :type mnc: str 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 bf2a0a424a21c3d174d0381251c70d97f5fc7c65..eb9d1e25fb1ad0aae8e7b3d20b62633b6b77e2d7 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,15 +1,10 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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). @@ -55,7 +50,7 @@ class PlmnIdNid(Model): return util.deserialize_model(dikt, cls) @property - def mcc(self): + def mcc(self) -> str: """Gets the mcc of this PlmnIdNid. Mobile Country Code part of the PLMN, comprising 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 @@ -66,7 +61,7 @@ class PlmnIdNid(Model): return self._mcc @mcc.setter - def mcc(self, mcc): + def mcc(self, mcc: str): """Sets the mcc of this PlmnIdNid. Mobile Country Code part of the PLMN, comprising 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 @@ -82,10 +77,10 @@ class PlmnIdNid(Model): self._mcc = mcc @property - def mnc(self): + def mnc(self) -> str: """Gets the mnc of this PlmnIdNid. - Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 + Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 :return: The mnc of this PlmnIdNid. :rtype: str @@ -93,10 +88,10 @@ class PlmnIdNid(Model): return self._mnc @mnc.setter - def mnc(self, mnc): + def mnc(self, mnc: str): """Sets the mnc of this PlmnIdNid. - Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 + Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in clause 9.3.3.5 of 3GPP TS 38.413. # noqa: E501 :param mnc: The mnc of this PlmnIdNid. :type mnc: str @@ -109,7 +104,7 @@ class PlmnIdNid(Model): self._mnc = mnc @property - def nid(self): + def nid(self) -> str: """Gets the nid of this PlmnIdNid. This represents the Network Identifier, which together with a PLMN ID is used to identify an SNPN (see 3GPP TS 23.003 and 3GPP TS 23.501 clause 5.30.2.1). # noqa: E501 @@ -120,7 +115,7 @@ class PlmnIdNid(Model): return self._nid @nid.setter - def nid(self, nid): + def nid(self, nid: str): """Sets the nid of this PlmnIdNid. This represents the Network Identifier, which together with a PLMN ID is used to identify an SNPN (see 3GPP TS 23.003 and 3GPP TS 23.501 clause 5.30.2.1). # noqa: E501 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 e0708a28cc39caf494608faba1ef65bc507ead43..50003d8edc6738e6cc4f2869ed5ee81bb135dd02 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,17 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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). @@ -82,7 +76,7 @@ class ProblemDetails(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -93,7 +87,7 @@ class ProblemDetails(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -105,10 +99,10 @@ class ProblemDetails(Model): self._type = type @property - def title(self): + 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 + 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 @@ -116,10 +110,10 @@ class ProblemDetails(Model): return self._title @title.setter - def title(self, title): + 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 + 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 @@ -128,7 +122,7 @@ class ProblemDetails(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -139,7 +133,7 @@ class ProblemDetails(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails. The HTTP status code for this occurrence of the problem. # noqa: E501 @@ -151,7 +145,7 @@ class ProblemDetails(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -162,7 +156,7 @@ class ProblemDetails(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -174,7 +168,7 @@ class ProblemDetails(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -185,7 +179,7 @@ class ProblemDetails(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -197,10 +191,10 @@ class ProblemDetails(Model): self._instance = instance @property - def cause(self): + 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 + 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 @@ -208,10 +202,10 @@ class ProblemDetails(Model): return self._cause @cause.setter - def cause(self, cause): + 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 + 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 @@ -220,10 +214,10 @@ class ProblemDetails(Model): self._cause = cause @property - def invalid_params(self): + 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 + Description of invalid parameters, for a request rejected due to invalid parameters. # noqa: E501 :return: The invalid_params of this ProblemDetails. :rtype: List[InvalidParam] @@ -231,10 +225,10 @@ class ProblemDetails(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + 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 + 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] @@ -245,7 +239,7 @@ class ProblemDetails(Model): self._invalid_params = invalid_params @property - def supported_features(self): + 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 @@ -256,7 +250,7 @@ class ProblemDetails(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 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 584e1a80d8e848abcb37c4a677be2ed084031049..777afe0d157acb199a51f88eb6e4c214e06af679 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,21 +1,14 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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 -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 -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). @@ -23,7 +16,7 @@ class ProblemDetails1(Model): 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, access_token_error=None, access_token_request=None, nrf_id=None): # noqa: E501 + def __init__(self, type=None, title=None, status=None, detail=None, instance=None, cause=None, invalid_params=None, supported_features=None, access_token_error=None, access_token_request=None, nrf_id=None, supported_api_versions=None, no_profile_match_info=None): # noqa: E501 """ProblemDetails1 - a model defined in OpenAPI :param type: The type of this ProblemDetails1. # noqa: E501 @@ -48,6 +41,10 @@ class ProblemDetails1(Model): :type access_token_request: AccessTokenReq1 :param nrf_id: The nrf_id of this ProblemDetails1. # noqa: E501 :type nrf_id: str + :param supported_api_versions: The supported_api_versions of this ProblemDetails1. # noqa: E501 + :type supported_api_versions: List[str] + :param no_profile_match_info: The no_profile_match_info of this ProblemDetails1. # noqa: E501 + :type no_profile_match_info: NoProfileMatchInfo """ self.openapi_types = { 'type': str, @@ -60,7 +57,9 @@ class ProblemDetails1(Model): 'supported_features': str, 'access_token_error': AccessTokenErr1, 'access_token_request': AccessTokenReq1, - 'nrf_id': str + 'nrf_id': str, + 'supported_api_versions': List[str], + 'no_profile_match_info': NoProfileMatchInfo } self.attribute_map = { @@ -74,7 +73,9 @@ class ProblemDetails1(Model): 'supported_features': 'supportedFeatures', 'access_token_error': 'accessTokenError', 'access_token_request': 'accessTokenRequest', - 'nrf_id': 'nrfId' + 'nrf_id': 'nrfId', + 'supported_api_versions': 'supportedApiVersions', + 'no_profile_match_info': 'noProfileMatchInfo' } self._type = type @@ -88,6 +89,8 @@ class ProblemDetails1(Model): self._access_token_error = access_token_error self._access_token_request = access_token_request self._nrf_id = nrf_id + self._supported_api_versions = supported_api_versions + self._no_profile_match_info = no_profile_match_info @classmethod def from_dict(cls, dikt) -> 'ProblemDetails1': @@ -101,7 +104,7 @@ class ProblemDetails1(Model): return util.deserialize_model(dikt, cls) @property - def type(self): + def type(self) -> str: """Gets the type of this ProblemDetails1. String providing an URI formatted according to RFC 3986. # noqa: E501 @@ -112,7 +115,7 @@ class ProblemDetails1(Model): return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this ProblemDetails1. String providing an URI formatted according to RFC 3986. # noqa: E501 @@ -124,7 +127,7 @@ class ProblemDetails1(Model): self._type = type @property - def title(self): + def title(self) -> str: """Gets the title of this ProblemDetails1. @@ -134,7 +137,7 @@ class ProblemDetails1(Model): return self._title @title.setter - def title(self, title): + def title(self, title: str): """Sets the title of this ProblemDetails1. @@ -145,7 +148,7 @@ class ProblemDetails1(Model): self._title = title @property - def status(self): + def status(self) -> int: """Gets the status of this ProblemDetails1. @@ -155,7 +158,7 @@ class ProblemDetails1(Model): return self._status @status.setter - def status(self, status): + def status(self, status: int): """Sets the status of this ProblemDetails1. @@ -166,7 +169,7 @@ class ProblemDetails1(Model): self._status = status @property - def detail(self): + def detail(self) -> str: """Gets the detail of this ProblemDetails1. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -177,7 +180,7 @@ class ProblemDetails1(Model): return self._detail @detail.setter - def detail(self, detail): + def detail(self, detail: str): """Sets the detail of this ProblemDetails1. A human-readable explanation specific to this occurrence of the problem. # noqa: E501 @@ -189,7 +192,7 @@ class ProblemDetails1(Model): self._detail = detail @property - def instance(self): + def instance(self) -> str: """Gets the instance of this ProblemDetails1. String providing an URI formatted according to RFC 3986. # noqa: E501 @@ -200,7 +203,7 @@ class ProblemDetails1(Model): return self._instance @instance.setter - def instance(self, instance): + def instance(self, instance: str): """Sets the instance of this ProblemDetails1. String providing an URI formatted according to RFC 3986. # noqa: E501 @@ -212,7 +215,7 @@ class ProblemDetails1(Model): self._instance = instance @property - def cause(self): + def cause(self) -> str: """Gets the cause of this ProblemDetails1. 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 @@ -223,7 +226,7 @@ class ProblemDetails1(Model): return self._cause @cause.setter - def cause(self, cause): + def cause(self, cause: str): """Sets the cause of this ProblemDetails1. 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 @@ -235,7 +238,7 @@ class ProblemDetails1(Model): self._cause = cause @property - def invalid_params(self): + def invalid_params(self) -> List[InvalidParam1]: """Gets the invalid_params of this ProblemDetails1. @@ -245,7 +248,7 @@ class ProblemDetails1(Model): return self._invalid_params @invalid_params.setter - def invalid_params(self, invalid_params): + def invalid_params(self, invalid_params: List[InvalidParam1]): """Sets the invalid_params of this ProblemDetails1. @@ -258,7 +261,7 @@ class ProblemDetails1(Model): self._invalid_params = invalid_params @property - def supported_features(self): + def supported_features(self) -> str: """Gets the supported_features of this ProblemDetails1. 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 @@ -269,7 +272,7 @@ class ProblemDetails1(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + def supported_features(self, supported_features: str): """Sets the supported_features of this ProblemDetails1. 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 @@ -283,7 +286,7 @@ class ProblemDetails1(Model): self._supported_features = supported_features @property - def access_token_error(self): + def access_token_error(self) -> AccessTokenErr1: """Gets the access_token_error of this ProblemDetails1. @@ -293,7 +296,7 @@ class ProblemDetails1(Model): return self._access_token_error @access_token_error.setter - def access_token_error(self, access_token_error): + def access_token_error(self, access_token_error: AccessTokenErr1): """Sets the access_token_error of this ProblemDetails1. @@ -304,7 +307,7 @@ class ProblemDetails1(Model): self._access_token_error = access_token_error @property - def access_token_request(self): + def access_token_request(self) -> AccessTokenReq1: """Gets the access_token_request of this ProblemDetails1. @@ -314,7 +317,7 @@ class ProblemDetails1(Model): return self._access_token_request @access_token_request.setter - def access_token_request(self, access_token_request): + def access_token_request(self, access_token_request: AccessTokenReq1): """Sets the access_token_request of this ProblemDetails1. @@ -325,7 +328,7 @@ class ProblemDetails1(Model): self._access_token_request = access_token_request @property - def nrf_id(self): + def nrf_id(self) -> str: """Gets the nrf_id of this ProblemDetails1. Fully Qualified Domain Name # noqa: E501 @@ -336,7 +339,7 @@ class ProblemDetails1(Model): return self._nrf_id @nrf_id.setter - def nrf_id(self, nrf_id): + def nrf_id(self, nrf_id: str): """Sets the nrf_id of this ProblemDetails1. Fully Qualified Domain Name # noqa: E501 @@ -352,3 +355,47 @@ class ProblemDetails1(Model): raise ValueError("Invalid value for `nrf_id`, must be a follow pattern or equal to `/^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\.)+[A-Za-z]{2,63}\.?$/`") # noqa: E501 self._nrf_id = nrf_id + + @property + def supported_api_versions(self) -> List[str]: + """Gets the supported_api_versions of this ProblemDetails1. + + + :return: The supported_api_versions of this ProblemDetails1. + :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 ProblemDetails1. + + + :param supported_api_versions: The supported_api_versions of this ProblemDetails1. + :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 + + @property + def no_profile_match_info(self) -> NoProfileMatchInfo: + """Gets the no_profile_match_info of this ProblemDetails1. + + + :return: The no_profile_match_info of this ProblemDetails1. + :rtype: NoProfileMatchInfo + """ + return self._no_profile_match_info + + @no_profile_match_info.setter + def no_profile_match_info(self, no_profile_match_info: NoProfileMatchInfo): + """Sets the no_profile_match_info of this ProblemDetails1. + + + :param no_profile_match_info: The no_profile_match_info of this ProblemDetails1. + :type no_profile_match_info: NoProfileMatchInfo + """ + + self._no_profile_match_info = no_profile_match_info 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 new file mode 100644 index 0000000000000000000000000000000000000000..962b251cb3f11966fca13593ed83108837b6c405 --- /dev/null +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/query_param_combination.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +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). + + Do not edit the class manually. + """ + + def __init__(self, _query_params=None): # noqa: E501 + """QueryParamCombination - a model defined in OpenAPI + + :param _query_params: The _query_params of this QueryParamCombination. # noqa: E501 + :type _query_params: List[QueryParameter] + """ + self.openapi_types = { + '_query_params': List[QueryParameter] + } + + self.attribute_map = { + '_query_params': 'queryParams' + } + + self.__query_params = _query_params + + @classmethod + def from_dict(cls, dikt) -> 'QueryParamCombination': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The QueryParamCombination of this QueryParamCombination. # noqa: E501 + :rtype: QueryParamCombination + """ + return util.deserialize_model(dikt, cls) + + @property + def _query_params(self) -> List[QueryParameter]: + """Gets the _query_params of this QueryParamCombination. + + + :return: The _query_params of this QueryParamCombination. + :rtype: List[QueryParameter] + """ + return self.__query_params + + @_query_params.setter + def _query_params(self, _query_params: List[QueryParameter]): + """Sets the _query_params of this QueryParamCombination. + + + :param _query_params: The _query_params of this QueryParamCombination. + :type _query_params: List[QueryParameter] + """ + if _query_params is None: + raise ValueError("Invalid value for `_query_params`, must not be `None`") # noqa: E501 + if _query_params is not None and len(_query_params) < 1: + raise ValueError("Invalid value for `_query_params`, number of items must be greater than or equal to `1`") # noqa: E501 + + self.__query_params = _query_params 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 new file mode 100644 index 0000000000000000000000000000000000000000..b5d0a01d55a408f7c0d03c0c63f7d9c35e1b7c83 --- /dev/null +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/query_parameter.py @@ -0,0 +1,90 @@ +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_security import util +from capif_security.models.base_model import Model + + +class QueryParameter(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, name=None, value=None): # noqa: E501 + """QueryParameter - a model defined in OpenAPI + + :param name: The name of this QueryParameter. # noqa: E501 + :type name: str + :param value: The value of this QueryParameter. # noqa: E501 + :type value: str + """ + self.openapi_types = { + 'name': str, + 'value': str + } + + self.attribute_map = { + 'name': 'name', + 'value': 'value' + } + + self._name = name + self._value = value + + @classmethod + def from_dict(cls, dikt) -> 'QueryParameter': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The QueryParameter of this QueryParameter. # noqa: E501 + :rtype: QueryParameter + """ + return util.deserialize_model(dikt, cls) + + @property + def name(self) -> str: + """Gets the name of this QueryParameter. + + + :return: The name of this QueryParameter. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name: str): + """Sets the name of this QueryParameter. + + + :param name: The name of this QueryParameter. + :type name: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def value(self) -> str: + """Gets the value of this QueryParameter. + + + :return: The value of this QueryParameter. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value: str): + """Sets the value of this QueryParameter. + + + :param value: The value of this QueryParameter. + :type value: str + """ + if value is None: + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value 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 new file mode 100644 index 0000000000000000000000000000000000000000..d59b5a482b015d29981607583c6dd281adc22ba9 --- /dev/null +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/res_owner_id.py @@ -0,0 +1,65 @@ +import re # noqa: E501 +from datetime import date, datetime # noqa: F401 +from typing import List, Dict # noqa: F401 + +from capif_security import util +from capif_security.models.base_model import Model + + +class ResOwnerId(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, gpsi=None): # noqa: E501 + """ResOwnerId - a model defined in OpenAPI + + :param gpsi: The gpsi of this ResOwnerId. # noqa: E501 + :type gpsi: str + """ + self.openapi_types = { + 'gpsi': str + } + + self.attribute_map = { + 'gpsi': 'gpsi' + } + + self._gpsi = gpsi + + @classmethod + def from_dict(cls, dikt) -> 'ResOwnerId': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ResOwnerId of this ResOwnerId. # noqa: E501 + :rtype: ResOwnerId + """ + return util.deserialize_model(dikt, cls) + + @property + def gpsi(self) -> str: + """Gets the gpsi of this ResOwnerId. + + String identifying a Gpsi shall contain either an External Id or an MSISDN. It shall be formatted as follows -External Identifier= \"extid-'extid', where 'extid' shall be formatted according to clause 19.7.2 of 3GPP TS 23.003 that describes an External Identifier. # noqa: E501 + + :return: The gpsi of this ResOwnerId. + :rtype: str + """ + return self._gpsi + + @gpsi.setter + def gpsi(self, gpsi: str): + """Sets the gpsi of this ResOwnerId. + + String identifying a Gpsi shall contain either an External Id or an MSISDN. It shall be formatted as follows -External Identifier= \"extid-'extid', where 'extid' shall be formatted according to clause 19.7.2 of 3GPP TS 23.003 that describes an External Identifier. # noqa: E501 + + :param gpsi: The gpsi of this ResOwnerId. + :type gpsi: str + """ + if gpsi is not None and not re.search(r'^(msisdn-[0-9]{5,15}|extid-[^@]+@[^@]+|.+)$', gpsi): # noqa: E501 + raise ValueError("Invalid value for `gpsi`, must be a follow pattern or equal to `/^(msisdn-[0-9]{5,15}|extid-[^@]+@[^@]+|.+)$/`") # noqa: E501 + + self._gpsi = gpsi 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 07368ef2843564adba1a98cda7dd843fb6228b44..e678a36274780d48ed837600b989c242a24ed646 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,25 +1,20 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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.security_method import SecurityMethod from capif_security import util - +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). 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 + 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, grant_type=None): # noqa: E501 """SecurityInformation - a model defined in OpenAPI :param interface_details: The interface_details of this SecurityInformation. # noqa: E501 @@ -36,6 +31,8 @@ class SecurityInformation(Model): :type authentication_info: str :param authorization_info: The authorization_info of this SecurityInformation. # noqa: E501 :type authorization_info: str + :param grant_type: The grant_type of this SecurityInformation. # noqa: E501 + :type grant_type: List[OAuthGrantType] """ self.openapi_types = { 'interface_details': InterfaceDescription, @@ -44,7 +41,8 @@ class SecurityInformation(Model): 'pref_security_methods': List[SecurityMethod], 'sel_security_method': SecurityMethod, 'authentication_info': str, - 'authorization_info': str + 'authorization_info': str, + 'grant_type': List[OAuthGrantType] } self.attribute_map = { @@ -54,7 +52,8 @@ class SecurityInformation(Model): 'pref_security_methods': 'prefSecurityMethods', 'sel_security_method': 'selSecurityMethod', 'authentication_info': 'authenticationInfo', - 'authorization_info': 'authorizationInfo' + 'authorization_info': 'authorizationInfo', + 'grant_type': 'grantType' } self._interface_details = interface_details @@ -64,6 +63,7 @@ class SecurityInformation(Model): self._sel_security_method = sel_security_method self._authentication_info = authentication_info self._authorization_info = authorization_info + self._grant_type = grant_type @classmethod def from_dict(cls, dikt) -> 'SecurityInformation': @@ -74,11 +74,10 @@ class SecurityInformation(Model): :return: The SecurityInformation of this SecurityInformation. # noqa: E501 :rtype: SecurityInformation """ - print(dikt) return util.deserialize_model(dikt, cls) @property - def interface_details(self): + def interface_details(self) -> InterfaceDescription: """Gets the interface_details of this SecurityInformation. @@ -88,7 +87,7 @@ class SecurityInformation(Model): return self._interface_details @interface_details.setter - def interface_details(self, interface_details): + def interface_details(self, interface_details: InterfaceDescription): """Sets the interface_details of this SecurityInformation. @@ -99,7 +98,7 @@ class SecurityInformation(Model): self._interface_details = interface_details @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this SecurityInformation. Identifier of the API exposing function # noqa: E501 @@ -110,7 +109,7 @@ class SecurityInformation(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this SecurityInformation. Identifier of the API exposing function # noqa: E501 @@ -122,7 +121,7 @@ class SecurityInformation(Model): self._aef_id = aef_id @property - def api_id(self): + def api_id(self) -> str: """Gets the api_id of this SecurityInformation. API identifier # noqa: E501 @@ -133,7 +132,7 @@ class SecurityInformation(Model): return self._api_id @api_id.setter - def api_id(self, api_id): + def api_id(self, api_id: str): """Sets the api_id of this SecurityInformation. API identifier # noqa: E501 @@ -145,7 +144,7 @@ class SecurityInformation(Model): self._api_id = api_id @property - def pref_security_methods(self): + 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 @@ -156,7 +155,7 @@ class SecurityInformation(Model): return self._pref_security_methods @pref_security_methods.setter - def pref_security_methods(self, pref_security_methods): + 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 @@ -172,7 +171,7 @@ class SecurityInformation(Model): self._pref_security_methods = pref_security_methods @property - def sel_security_method(self): + def sel_security_method(self) -> SecurityMethod: """Gets the sel_security_method of this SecurityInformation. @@ -182,7 +181,7 @@ class SecurityInformation(Model): return self._sel_security_method @sel_security_method.setter - def sel_security_method(self, sel_security_method): + def sel_security_method(self, sel_security_method: SecurityMethod): """Sets the sel_security_method of this SecurityInformation. @@ -193,7 +192,7 @@ class SecurityInformation(Model): self._sel_security_method = sel_security_method @property - def authentication_info(self): + def authentication_info(self) -> str: """Gets the authentication_info of this SecurityInformation. Authentication related information # noqa: E501 @@ -204,7 +203,7 @@ class SecurityInformation(Model): return self._authentication_info @authentication_info.setter - def authentication_info(self, authentication_info): + def authentication_info(self, authentication_info: str): """Sets the authentication_info of this SecurityInformation. Authentication related information # noqa: E501 @@ -216,7 +215,7 @@ class SecurityInformation(Model): self._authentication_info = authentication_info @property - def authorization_info(self): + def authorization_info(self) -> str: """Gets the authorization_info of this SecurityInformation. Authorization related information # noqa: E501 @@ -227,7 +226,7 @@ class SecurityInformation(Model): return self._authorization_info @authorization_info.setter - def authorization_info(self, authorization_info): + def authorization_info(self, authorization_info: str): """Sets the authorization_info of this SecurityInformation. Authorization related information # noqa: E501 @@ -237,3 +236,26 @@ class SecurityInformation(Model): """ self._authorization_info = authorization_info + + @property + def grant_type(self) -> List[OAuthGrantType]: + """Gets the grant_type of this SecurityInformation. + + + :return: The grant_type of this SecurityInformation. + :rtype: List[OAuthGrantType] + """ + return self._grant_type + + @grant_type.setter + def grant_type(self, grant_type: List[OAuthGrantType]): + """Sets the grant_type of this SecurityInformation. + + + :param grant_type: The grant_type of this SecurityInformation. + :type grant_type: List[OAuthGrantType] + """ + if grant_type is not None and len(grant_type) < 1: + raise ValueError("Invalid value for `grant_type`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._grant_type = grant_type 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 966fcb4f78c95a0784c98f04b059cc00d0152708..1d5bfae95a2a73e568e4eeb368352c08c3eeed13 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,16 +1,9 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # noqa: F401 - from typing import List, Dict # noqa: F401 -from capif_security.models.base_model_ import Model -from capif_security.models.security_method_any_of import SecurityMethodAnyOf from capif_security import util +from capif_security.models.base_model import Model -from capif_security.models.security_method_any_of import SecurityMethodAnyOf # noqa: E501 -import sys class SecurityMethod(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,5 +30,4 @@ class SecurityMethod(Model): :return: The SecurityMethod of this SecurityMethod. # noqa: E501 :rtype: SecurityMethod """ - print(dikt, file=sys.stderr) return util.deserialize_model(dikt, cls) diff --git a/services/TS29222_CAPIF_Security_API/capif_security/models/security_method_any_of.py b/services/TS29222_CAPIF_Security_API/capif_security/models/security_method_any_of.py deleted file mode 100644 index 0b5c3bf40a3ac447059212c34d7d84a82137750b..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/security_method_any_of.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from capif_security.models.base_model_ import Model -from capif_security import util - - -class SecurityMethodAnyOf(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 - """SecurityMethodAnyOf - a model defined in OpenAPI - - """ - self.openapi_types = { - } - - self.attribute_map = { - } - - @classmethod - def from_dict(cls, dikt) -> 'SecurityMethodAnyOf': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The SecurityMethod_anyOf of this SecurityMethodAnyOf. # noqa: E501 - :rtype: SecurityMethodAnyOf - """ - print(dikt) - return util.deserialize_model(dikt, cls) 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 4437f655f14c6fa745447accdf6553a0642efbf2..90e4e803465c61955773367a6849cfff1cc73ea4 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,16 +1,11 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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). @@ -60,7 +55,7 @@ class SecurityNotification(Model): return util.deserialize_model(dikt, cls) @property - def api_invoker_id(self): + def api_invoker_id(self) -> str: """Gets the api_invoker_id of this SecurityNotification. String identifying the API invoker assigned by the CAPIF core function. # noqa: E501 @@ -71,7 +66,7 @@ class SecurityNotification(Model): return self._api_invoker_id @api_invoker_id.setter - def api_invoker_id(self, api_invoker_id): + def api_invoker_id(self, api_invoker_id: str): """Sets the api_invoker_id of this SecurityNotification. String identifying the API invoker assigned by the CAPIF core function. # noqa: E501 @@ -85,7 +80,7 @@ class SecurityNotification(Model): self._api_invoker_id = api_invoker_id @property - def aef_id(self): + def aef_id(self) -> str: """Gets the aef_id of this SecurityNotification. String identifying the AEF. # noqa: E501 @@ -96,7 +91,7 @@ class SecurityNotification(Model): return self._aef_id @aef_id.setter - def aef_id(self, aef_id): + def aef_id(self, aef_id: str): """Sets the aef_id of this SecurityNotification. String identifying the AEF. # noqa: E501 @@ -108,7 +103,7 @@ class SecurityNotification(Model): self._aef_id = aef_id @property - def api_ids(self): + def api_ids(self) -> List[str]: """Gets the api_ids of this SecurityNotification. Identifier of the service API # noqa: E501 @@ -119,7 +114,7 @@ class SecurityNotification(Model): return self._api_ids @api_ids.setter - def api_ids(self, api_ids): + def api_ids(self, api_ids: List[str]): """Sets the api_ids of this SecurityNotification. Identifier of the service API # noqa: E501 @@ -135,7 +130,7 @@ class SecurityNotification(Model): self._api_ids = api_ids @property - def cause(self): + def cause(self) -> Cause: """Gets the cause of this SecurityNotification. @@ -145,7 +140,7 @@ class SecurityNotification(Model): return self._cause @cause.setter - def cause(self, cause): + def cause(self, cause: Cause): """Sets 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 47014d37fb02244b9ee9e1dd432a1a908c1334e5..7556c8e730f0eace96c78c784bb89ff36f9012c4 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,19 +1,12 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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 -import re # noqa: E501 + class ServiceSecurity(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -69,7 +62,7 @@ class ServiceSecurity(Model): return util.deserialize_model(dikt, cls) @property - def security_info(self): + def security_info(self) -> List[SecurityInformation]: """Gets the security_info of this ServiceSecurity. @@ -79,7 +72,7 @@ class ServiceSecurity(Model): return self._security_info @security_info.setter - def security_info(self, security_info): + def security_info(self, security_info: List[SecurityInformation]): """Sets the security_info of this ServiceSecurity. @@ -92,7 +85,7 @@ class ServiceSecurity(Model): self._security_info = security_info @property - def notification_destination(self): + def notification_destination(self) -> str: """Gets the notification_destination of this ServiceSecurity. string providing an URI formatted according to IETF RFC 3986. # noqa: E501 @@ -103,7 +96,7 @@ class ServiceSecurity(Model): return self._notification_destination @notification_destination.setter - def notification_destination(self, notification_destination): + 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 @@ -117,7 +110,7 @@ class ServiceSecurity(Model): self._notification_destination = notification_destination @property - def request_test_notification(self): + 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 @@ -128,7 +121,7 @@ class ServiceSecurity(Model): return self._request_test_notification @request_test_notification.setter - def request_test_notification(self, request_test_notification): + 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 @@ -140,7 +133,7 @@ class ServiceSecurity(Model): self._request_test_notification = request_test_notification @property - def websock_notif_config(self): + def websock_notif_config(self) -> WebsockNotifConfig: """Gets the websock_notif_config of this ServiceSecurity. @@ -150,7 +143,7 @@ class ServiceSecurity(Model): return self._websock_notif_config @websock_notif_config.setter - def websock_notif_config(self, websock_notif_config): + def websock_notif_config(self, websock_notif_config: WebsockNotifConfig): """Sets the websock_notif_config of this ServiceSecurity. @@ -161,7 +154,7 @@ class ServiceSecurity(Model): self._websock_notif_config = websock_notif_config @property - def supported_features(self): + 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 @@ -172,7 +165,7 @@ class ServiceSecurity(Model): return self._supported_features @supported_features.setter - def supported_features(self, supported_features): + 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 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 89e4257f85efe103707b87d1cb4ef167e9a69835..557c4bdefee53cd918a12740970fffc2f7b89542 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/models/snssai.py @@ -1,15 +1,10 @@ -# coding: utf-8 - -from __future__ import absolute_import +import re # noqa: E501 from datetime import date, datetime # 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). @@ -50,7 +45,7 @@ class Snssai(Model): return util.deserialize_model(dikt, cls) @property - def sst(self): + 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 @@ -61,7 +56,7 @@ class Snssai(Model): return self._sst @sst.setter - def sst(self, sst): + 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 @@ -79,7 +74,7 @@ class Snssai(Model): self._sst = sst @property - def sd(self): + 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 @@ -90,7 +85,7 @@ class Snssai(Model): return self._sd @sd.setter - def sd(self, sd): + 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 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 434d37190c4dbeb105aaf65bc20bd01fd02239d1..b72b264f4c1411234828bd2a2af341459d59609a 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,12 +1,8 @@ -# coding: utf-8 - -from __future__ import absolute_import from datetime import date, datetime # 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): @@ -48,7 +44,7 @@ class WebsockNotifConfig(Model): return util.deserialize_model(dikt, cls) @property - def websocket_uri(self): + 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 @@ -59,7 +55,7 @@ class WebsockNotifConfig(Model): return self._websocket_uri @websocket_uri.setter - def websocket_uri(self, websocket_uri): + 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 @@ -71,7 +67,7 @@ class WebsockNotifConfig(Model): self._websocket_uri = websocket_uri @property - def request_websocket_uri(self): + 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 @@ -82,7 +78,7 @@ class WebsockNotifConfig(Model): return self._request_websocket_uri @request_websocket_uri.setter - def request_websocket_uri(self, request_websocket_uri): + 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 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 321eb2ffc1862911f6c29ed3a89e7add8538c29c..fe88c19931162b07c8de7a6f7a956eb55f96951b 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© 2022, 3GPP Organizational\ + description: "API for CAPIF security management. \n© 2024, 3GPP Organizational\ \ Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). \nAll rights reserved.\n" title: CAPIF_Security_API - version: 1.2.0 + version: 1.3.0-alpha.4 externalDocs: - description: 3GPP TS 29.222 V17.5.0 Common API Framework for 3GPP Northbound APIs + description: 3GPP TS 29.222 V18.5.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" @@ -90,7 +90,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -117,7 +117,7 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_security.controllers.default_controller + x-openapi-router-controller: capif_security.controllers.default_controller /trustedInvokers/{apiInvokerId}: delete: operationId: trusted_invokers_api_invoker_id_delete @@ -193,7 +193,7 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_security.controllers.default_controller + x-openapi-router-controller: capif_security.controllers.default_controller get: operationId: trusted_invokers_api_invoker_id_get parameters: @@ -205,9 +205,8 @@ paths: schema: type: string style: simple - - description: "When set to 'true', it indicates the CAPIF core function to\ - \ send the authentication information of the API invoker. Set to false or\ - \ omitted otherwise.\n" + - description: | + When set to 'true', it indicates the CAPIF core function to send the authentication information of the API invoker. Set to false or omitted otherwise. explode: true in: query name: authenticationInfo @@ -215,9 +214,8 @@ paths: schema: type: boolean style: form - - description: "When set to 'true', it indicates the CAPIF core function to\ - \ send the authorization information of the API invoker. Set to false or\ - \ omitted otherwise.\n" + - description: | + When set to 'true', it indicates the CAPIF core function to send the authorization information of the API invoker. Set to false or omitted otherwise. explode: true in: query name: authorizationInfo @@ -305,7 +303,7 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_security.controllers.default_controller + x-openapi-router-controller: capif_security.controllers.default_controller put: callbacks: notificationDestination: @@ -372,7 +370,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -426,8 +424,8 @@ paths: description: Successful created. headers: Location: - description: "Contains the URI of the newly created resource, according\ - \ to the structure {apiRoot}/capif-security/v1/trustedInvokers/{apiInvokerId}\n" + description: | + Contains the URI of the newly created resource, according to the structure {apiRoot}/capif-security/v1/trustedInvokers/{apiInvokerId} explode: false required: true schema: @@ -462,7 +460,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "414": content: application/problem+json: @@ -495,7 +493,7 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_security.controllers.default_controller + x-openapi-router-controller: capif_security.controllers.default_controller /trustedInvokers/{apiInvokerId}/delete: post: operationId: trusted_invokers_api_invoker_id_delete_post @@ -569,7 +567,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -596,7 +594,7 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_security.controllers.default_controller + x-openapi-router-controller: capif_security.controllers.default_controller /trustedInvokers/{apiInvokerId}/update: post: operationId: trusted_invokers_api_invoker_id_update_post @@ -674,7 +672,7 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -701,7 +699,7 @@ paths: description: Service Unavailable default: description: Generic Error - x-openapi-router-controller: capif_security.controllers.default_controller + x-openapi-router-controller: capif_security.controllers.default_controller components: responses: "307": @@ -787,7 +785,7 @@ components: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - description: Payload Too Large + description: Content Too Large "415": content: application/problem+json: @@ -796,10 +794,8 @@ components: description: Unsupported Media Type schemas: 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.\n" + 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 supportedFeatures: supportedFeatures @@ -810,14 +806,19 @@ components: interfaceDetails: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr prefSecurityMethods: - null - null aefId: aefId + grantType: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS apiId: apiId - selSecurityMethod: null authenticationInfo: authenticationInfo @@ -825,14 +826,19 @@ components: interfaceDetails: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr prefSecurityMethods: - null - null aefId: aefId + grantType: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS apiId: apiId websockNotifConfig: requestWebsocketUri: true @@ -857,19 +863,8 @@ components: 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.\n" + 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 @@ -887,20 +882,26 @@ components: interfaceDetails: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr prefSecurityMethods: - null - null aefId: aefId + grantType: + - CLIENT_CREDENTIALS + - CLIENT_CREDENTIALS apiId: apiId + nullable: true oneOf: - - required: - - interfaceDetails - - required: - - aefId + - required: + - aefId + - required: + - interfaceDetails properties: interfaceDetails: $ref: '#/components/schemas/InterfaceDescription' @@ -929,15 +930,21 @@ components: description: Authorization related information title: authorizationInfo type: string + grantType: + items: + $ref: '#/components/schemas/OAuthGrantType' + minItems: 1 + title: grantType + type: array required: - prefSecurityMethods title: SecurityInformation type: object SecurityNotification: - description: Represents revoked authorization notification details. + description: Represents the revoked authorization notification details. example: apiInvokerId: apiInvokerId - cause: null + cause: OVERLIMIT_USAGE aefId: aefId apiIds: - apiIds @@ -968,24 +975,29 @@ components: title: SecurityNotification type: object AccessTokenReq: - type: object description: Represents the access token request information. - format: x-www-form-urlencoded properties: grant_type: - # enum: - # - client_credentials + enum: + - client_credentials + - authorization_code type: string client_id: type: string + resOwnerId: + $ref: '#/components/schemas/ResOwnerId' client_secret: type: string scope: type: string + authCode: + type: string + redirect_uri: + type: string required: - client_id - grant_type - - scope + type: object AccessTokenRsp: description: Represents the access token response information. example: @@ -1030,13 +1042,35 @@ components: minimum: 0 title: expires_in type: integer + resOwnerId: + $ref: '#/components/schemas/ResOwnerId' required: - exp - iss - scope type: object + ResOwnerId: + anyOf: [] + description: | + Represents the identifier of the resource owner. + nullable: true + properties: + gpsi: + description: "String identifying a Gpsi shall contain either an External\ + \ Id or an MSISDN. It shall be formatted as follows -External Identifier=\ + \ \"extid-'extid', where 'extid' shall be formatted according to clause\ + \ 19.7.2 of 3GPP TS 23.003 that describes an External Identifier. \n" + pattern: "^(msisdn-[0-9]{5,15}|extid-[^@]+@[^@]+|.+)$" + title: Gpsi + type: string + title: ResOwnerId + type: object AccessTokenErr: description: Represents an error in the access token request. + example: + error_description: error_description + error: invalid_request + error_uri: error_uri properties: error: enum: @@ -1060,15 +1094,36 @@ components: type: object Cause: anyOf: - - $ref: '#/components/schemas/Cause_anyOf' + - enum: + - OVERLIMIT_USAGE + - UNEXPECTED_REASON + 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:\n- OVERLIMIT_USAGE: The revocation of the\ - \ authorization of the API invoker is due to the overlimit usage of the service\ - \ API\n- UNEXPECTED_REASON: The revocation of the authorization of the API\ - \ invoker is due to unexpected reason.\n" + description: "Indicates the cause for revoking the API invoker's authorization\ + \ to the service API. \nPossible values are:\n- OVERLIMIT_USAGE:\n The\ + \ revocation of the authorization of the API invoker is due to the overlimit\n\ + \ usage of the service API\n- UNEXPECTED_REASON:\n The revocation\ + \ of the authorization of the API invoker is due to unexpected reason.\n" title: Cause + OAuthGrantType: + anyOf: + - enum: + - CLIENT_CREDENTIALS + - AUTHORIZATION_CODE + - AUTHORIZATION_CODE_WITH_PKCE + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration and is not used to encode content defined in the present version of this API. + type: string + description: "Indicates the supported authorization flow (e.g. client credentials\ + \ flow, authorization code flow, etc.) to the API invoker. \nPossible\ + \ values are:\n- CLIENT_CREDENTIALS: Indicate that the grant type is is client\ + \ credentials flow.\n- AUTHORIZATION_CODE: Indicate that the grant type is\ + \ authorization code.\n- AUTHORIZATION_CODE_WITH_PKCE: Indicate that the grant\ + \ type is authorization code with PKCE.\n" + title: OAuthGrantType ProblemDetails: description: Represents additional information and details on an error response. properties: @@ -1078,7 +1133,7 @@ components: type: string title: description: "A short, human-readable summary of the problem type. It should\ - \ not change from occurrence to occurrence of the problem." + \ not change from occurrence to occurrence of the problem. \n" title: title type: string status: @@ -1095,33 +1150,21 @@ components: 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." + 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." + 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.\n" + 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 @@ -1132,8 +1175,8 @@ components: title: type type: string InvalidParam: - description: "Represents the description of invalid parameters, for a request\ - \ rejected due to invalid parameters." + 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." @@ -1168,9 +1211,8 @@ components: title: Uri_1 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.\n" + 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. type: string invalidParams: items: @@ -1178,19 +1220,8 @@ components: minItems: 1 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.\n" + 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 @@ -1206,6 +1237,13 @@ components: .?$" title: Fqdn type: string + supportedApiVersions: + items: + type: string + minItems: 1 + type: array + noProfileMatchInfo: + $ref: '#/components/schemas/NoProfileMatchInfo' type: object Uri_1: description: String providing an URI formatted according to RFC 3986. @@ -1215,26 +1253,13 @@ components: description: It contains an invalid parameter and a related description. properties: param: - description: "If the invalid parameter is an attribute in a JSON body, this\ - \ IE shall contain the attribute's name and shall be encoded as a JSON\ - \ Pointer. If the invalid parameter is an HTTP header, this IE shall\ - \ be formatted as the concatenation of the string \"header \" plus the\ - \ name of such header. If the invalid parameter is a query parameter,\ - \ this IE shall be formatted as the concatenation of the string \"query\ - \ \" plus the name of such query parameter. If the invalid parameter\ - \ is a variable part in the path of a resource URI, this IE shall contain\ - \ the name of the variable, including the symbols \"{\" and \"}\" used\ - \ in OpenAPI specification as the notation to represent variable path\ - \ segments.\n" + description: | + If the invalid parameter is an attribute in a JSON body, this IE shall contain the attribute's name and shall be encoded as a JSON Pointer. If the invalid parameter is an HTTP header, this IE shall be formatted as the concatenation of the string "header " plus the name of such header. If the invalid parameter is a query parameter, this IE shall be formatted as the concatenation of the string "query " plus the name of such query parameter. If the invalid parameter is a variable part in the path of a resource URI, this IE shall contain the name of the variable, including the symbols "{" and "}" used in OpenAPI specification as the notation to represent variable path segments. title: param type: string reason: - description: "A human-readable reason, e.g. \"must be a positive integer\"\ - . In cases involving failed operations in a PATCH request, the reason\ - \ string should identify the operation that failed using the operation's\ - \ array index to assist in correlation of the invalid parameter with\ - \ the failed operation, e.g.\" Replacement value invalid for attribute\ - \ (failed operation index= 4)\"\n" + description: | + A human-readable reason, e.g. "must be a positive integer". In cases involving failed operations in a PATCH request, the reason string should identify the operation that failed using the operation's array index to assist in correlation of the invalid parameter with the failed operation, e.g." Replacement value invalid for attribute (failed operation index= 4)" title: reason type: string required: @@ -1242,18 +1267,8 @@ components: title: InvalidParam_1 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.\n" + 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 @@ -1266,8 +1281,8 @@ components: title: Fqdn type: string WebsockNotifConfig: - description: Represents the configuration information for the delivery of notifications - over Websockets. + description: | + Represents the configuration information for the delivery of notifications over Websockets. example: requestWebsocketUri: true websocketUri: websocketUri @@ -1294,37 +1309,53 @@ components: example: ipv6Addr: ipv6Addr securityMethods: - - null - - null + - PSK + - PSK + fqdn: fqdn port: 5248 + apiPrefix: apiPrefix ipv4Addr: ipv4Addr - # oneOf: - # - required: - # - ipv4Addr - # - required: - # - ipv6Addr + nullable: true + oneOf: + - required: + - ipv4Addr + - required: + - ipv6Addr + - required: + - fqdn properties: ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted - decimal" notation as defined in IETF RFC 1166. + 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. + 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 + fqdn: + description: Fully Qualified Domain Name + maxLength: 253 + minLength: 4 + pattern: "^([0-9A-Za-z]([-0-9A-Za-z]{0,61}[0-9A-Za-z])?\\.)+[A-Za-z]{2,63}\\\ + .?$" + title: Fqdn + type: string port: description: Unsigned integer with valid values between 0 and 65535. maximum: 65535 minimum: 0 title: Port type: integer + apiPrefix: + description: | + A string representing a sequence of path segments that starts with the slash character. + title: apiPrefix + type: string securityMethods: - description: "Security methods supported by the interface, it take precedence\ - \ over the security methods provided in AefProfile, for this specific\ - \ interface.\n" + 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 @@ -1334,20 +1365,32 @@ components: type: object SecurityMethod: anyOf: - - $ref: '#/components/schemas/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:\n- PSK: Security method 1 (Using TLS-PSK)\ - \ as described in 3GPP TS 33.122\n- PKI: 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" + description: "Indicates the security method. \nPossible values are:\n- PSK:\ + \ Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122.\n- PKI:\ + \ 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 DurationSec: description: Unsigned integer identifying a period of time in units of seconds. minimum: 0 title: expires_in type: integer + Gpsi: + description: "String identifying a Gpsi shall contain either an External Id\ + \ or an MSISDN. It shall be formatted as follows -External Identifier= \"\ + extid-'extid', where 'extid' shall be formatted according to clause 19.7.2\ + \ of 3GPP TS 23.003 that describes an External Identifier. \n" + pattern: "^(msisdn-[0-9]{5,15}|extid-[^@]+@[^@]+|.+)$" + title: Gpsi + type: string AccessTokenErr_1: description: Error returned in the access token response message properties: @@ -1375,8 +1418,8 @@ components: description: Contains information related to the access token request properties: grant_type: - # enum: - # - client_credentials + enum: + - client_credentials title: grant_type type: string nfInstanceId: @@ -1431,6 +1474,8 @@ components: type: array targetPlmn: $ref: '#/components/schemas/PlmnId' + targetSnpn: + $ref: '#/components/schemas/PlmnIdNid' targetSnssaiList: items: $ref: '#/components/schemas/Snssai' @@ -1491,15 +1536,69 @@ components: - scope title: AccessTokenReq_1 type: object + NoProfileMatchInfo: + description: Provides the reason for not finding NF matching the search criteria + properties: + reason: + $ref: '#/components/schemas/NoProfileMatchReason' + queryParamCombinationList: + items: + $ref: '#/components/schemas/QueryParamCombination' + minItems: 1 + title: queryParamCombinationList + type: array + required: + - reason + title: NoProfileMatchInfo + type: object + NoProfileMatchReason: + anyOf: + - enum: + - REQUESTER_PLMN_NOT_ALLOWED + - TARGET_NF_SUSPENDED + - TARGET_NF_UNDISCOVERABLE + - QUERY_PARAMS_COMBINATION_NO_MATCH + - TARGET_NF_TYPE_NOT_SUPPORTED + - UNSPECIFIED + type: string + - type: string + description: No Profile Match Reason + title: NoProfileMatchReason + QueryParamCombination: + description: Contains a list of Query Parameters + properties: + queryParams: + items: + $ref: '#/components/schemas/QueryParameter' + minItems: 1 + title: queryParams + type: array + required: + - queryParams + title: QueryParamCombination + type: object + QueryParameter: + description: Contains the name and value of a query parameter + properties: + name: + title: name + type: string + value: + title: value + type: string + required: + - name + - value + title: QueryParameter + type: object Ipv4Addr: - description: string identifying a Ipv4 address formatted in the "dotted decimal" - notation as defined in IETF RFC 1166. + 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. + 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: @@ -1517,14 +1616,78 @@ components: type: string NFType: anyOf: - - $ref: '#/components/schemas/NFType_anyOf' + - enum: + - NRF + - UDM + - AMF + - SMF + - AUSF + - NEF + - PCF + - SMSF + - NSSF + - UDR + - LMF + - GMLC + - 5G_EIR + - SEPP + - UPF + - N3IWF + - AF + - UDSF + - BSF + - CHF + - NWDAF + - PCSCF + - CBCF + - HSS + - UCMF + - SOR_AF + - SPAF + - MME + - SCSAS + - SCEF + - SCP + - NSSAAF + - ICSCF + - SCSCF + - DRA + - IMS_AS + - AANF + - 5G_DDNMF + - NSACF + - MFAF + - EASDF + - DCCF + - MB_SMF + - TSCTSF + - ADRF + - GBA_BSF + - CEF + - MB_UPF + - NSWOF + - PKMF + - MNPF + - SMS_GMSC + - SMS_IWMSC + - MBSF + - MBSTF + - PANF + - IP_SM_GW + - SMS_ROUTER + - DCSF + - MRF + - MRFP + - MF + - SLPKMF + - RH + type: string - type: string description: NF types known to NRF title: NFType PlmnId: - description: "When PlmnId needs to be converted to string (e.g. when used in\ - \ maps as key), the string shall be composed of three digits \"mcc\" followed\ - \ by \"-\" and two or three digits \"mnc\".\n" + description: | + When PlmnId needs to be converted to string (e.g. when used in maps as key), the string shall be composed of three digits "mcc" followed by "-" and two or three digits "mnc". properties: mcc: description: "Mobile Country Code part of the PLMN, comprising 3 digits,\ @@ -1534,7 +1697,7 @@ components: type: string mnc: description: "Mobile Network Code part of the PLMN, comprising 2 or 3 digits,\ - \ as defined in clause 9.3.3.5 of 3GPP TS 38.413." + \ as defined in clause 9.3.3.5 of 3GPP TS 38.413. \n" pattern: "^\\d{2,3}$" title: Mnc type: string @@ -1551,14 +1714,13 @@ components: type: string Mnc: description: "Mobile Network Code part of the PLMN, comprising 2 or 3 digits,\ - \ as defined in clause 9.3.3.5 of 3GPP TS 38.413." + \ as defined in clause 9.3.3.5 of 3GPP TS 38.413. \n" pattern: "^\\d{2,3}$" title: Mnc 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\".\n" + 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". properties: sst: description: "Unsigned integer, within the range 0 to 255, representing\ @@ -1572,16 +1734,8 @@ components: 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.\n" + 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 @@ -1590,8 +1744,8 @@ components: title: Snssai type: object PlmnIdNid: - description: "Contains the serving core network operator PLMN ID and, for an\ - \ SNPN, the NID that together with the PLMN ID identifies the SNPN.\n" + description: | + Contains the serving core network operator PLMN ID and, for an SNPN, the NID that together with the PLMN ID identifies the SNPN. properties: mcc: description: "Mobile Country Code part of the PLMN, comprising 3 digits,\ @@ -1601,7 +1755,7 @@ components: type: string mnc: description: "Mobile Network Code part of the PLMN, comprising 2 or 3 digits,\ - \ as defined in clause 9.3.3.5 of 3GPP TS 38.413." + \ as defined in clause 9.3.3.5 of 3GPP TS 38.413. \n" pattern: "^\\d{2,3}$" title: Mnc type: string @@ -1655,75 +1809,3 @@ components: \ an alphabetic character or a digit.\n" title: NfServiceSetId type: string - Cause_anyOf: - enum: - - OVERLIMIT_USAGE - - UNEXPECTED_REASON - title: Cause_anyOf - type: string - SecurityMethod_anyOf: - enum: - - PSK - - PKI - - OAUTH - title: SecurityMethod_anyOf - type: string - NFType_anyOf: - enum: - - NRF - - UDM - - AMF - - SMF - - AUSF - - NEF - - PCF - - SMSF - - NSSF - - UDR - - LMF - - GMLC - - 5G_EIR - - SEPP - - UPF - - N3IWF - - AF - - UDSF - - BSF - - CHF - - NWDAF - - PCSCF - - CBCF - - HSS - - UCMF - - SOR_AF - - SPAF - - MME - - SCSAS - - SCEF - - SCP - - NSSAAF - - ICSCF - - SCSCF - - DRA - - IMS_AS - - AANF - - 5G_DDNMF - - NSACF - - MFAF - - EASDF - - DCCF - - MB_SMF - - TSCTSF - - ADRF - - GBA_BSF - - CEF - - MB_UPF - - NSWOF - - PKMF - - MNPF - - SMS_GMSC - - SMS_IWMSC - - MBSF - - MBSTF - title: NFType_anyOf - type: string diff --git a/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py b/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aa37efef619673b5e4713f602e7b9b157f1d6f76 --- /dev/null +++ b/services/TS29222_CAPIF_Security_API/capif_security/test/__init__.py @@ -0,0 +1,15 @@ +import logging + +import connexion +from capif_security.encoder import JSONEncoder +from flask_testing import TestCase + + +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_Security_API/capif_security/test/test_default_controller.py b/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..0fbd10e62626ed8f593c420322c65483c246f5ff --- /dev/null +++ b/services/TS29222_CAPIF_Security_API/capif_security/test/test_default_controller.py @@ -0,0 +1,128 @@ +import unittest + +from capif_security.test import BaseTestCase +from flask import json + + +class TestDefaultController(BaseTestCase): + """DefaultController integration test stubs""" + + @unittest.skip("application/x-www-form-urlencoded not supported by Connexion") + def test_securities_security_id_token_post(self): + """Test case for securities_security_id_token_post + + + """ + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/x-www-form-urlencoded', + } + data = dict(grant_type='grant_type_example', + client_id='client_id_example', + res_owner_id=openapi_server.ResOwnerId(), + client_secret='client_secret_example', + scope='scope_example', + auth_code='auth_code_example', + redirect_uri='redirect_uri_example') + response = self.client.open( + '/capif-security/v1/securities/{security_id}/token'.format(security_id='security_id_example'), + method='POST', + headers=headers, + data=data, + content_type='application/x-www-form-urlencoded') + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_trusted_invokers_api_invoker_id_delete(self): + """Test case for trusted_invokers_api_invoker_id_delete + + + """ + headers = { + 'Accept': 'application/problem+json', + } + response = self.client.open( + '/capif-security/v1/trustedInvokers/{api_invoker_id}'.format(api_invoker_id='api_invoker_id_example'), + method='DELETE', + headers=headers) + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_trusted_invokers_api_invoker_id_delete_post(self): + """Test case for trusted_invokers_api_invoker_id_delete_post + + + """ + security_notification = {"apiInvokerId":"apiInvokerId","cause":"OVERLIMIT_USAGE","aefId":"aefId","apiIds":["apiIds","apiIds"]} + headers = { + 'Accept': 'application/problem+json', + 'Content-Type': 'application/json', + } + response = self.client.open( + '/capif-security/v1/trustedInvokers/{api_invoker_id}/delete'.format(api_invoker_id='api_invoker_id_example'), + method='POST', + headers=headers, + data=json.dumps(security_notification), + content_type='application/json') + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_trusted_invokers_api_invoker_id_get(self): + """Test case for trusted_invokers_api_invoker_id_get + + + """ + query_string = [('authenticationInfo', True), + ('authorizationInfo', True)] + headers = { + 'Accept': 'application/json', + } + response = self.client.open( + '/capif-security/v1/trustedInvokers/{api_invoker_id}'.format(api_invoker_id='api_invoker_id_example'), + method='GET', + headers=headers, + query_string=query_string) + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_trusted_invokers_api_invoker_id_put(self): + """Test case for trusted_invokers_api_invoker_id_put + + + """ + service_security = {"notificationDestination":"notificationDestination","supportedFeatures":"supportedFeatures","securityInfo":[{"authenticationInfo":"authenticationInfo","authorizationInfo":"authorizationInfo","interfaceDetails":{"ipv6Addr":"ipv6Addr","securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"prefSecurityMethods":[null,null],"aefId":"aefId","grantType":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"apiId":"apiId"},{"authenticationInfo":"authenticationInfo","authorizationInfo":"authorizationInfo","interfaceDetails":{"ipv6Addr":"ipv6Addr","securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"prefSecurityMethods":[null,null],"aefId":"aefId","grantType":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"apiId":"apiId"}],"websockNotifConfig":{"requestWebsocketUri":True,"websocketUri":"websocketUri"},"requestTestNotification":True} + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + response = self.client.open( + '/capif-security/v1/trustedInvokers/{api_invoker_id}'.format(api_invoker_id='api_invoker_id_example'), + method='PUT', + headers=headers, + data=json.dumps(service_security), + content_type='application/json') + self.assert200(response, + 'Response body is : ' + response.data.decode('utf-8')) + + def test_trusted_invokers_api_invoker_id_update_post(self): + """Test case for trusted_invokers_api_invoker_id_update_post + + + """ + service_security = {"notificationDestination":"notificationDestination","supportedFeatures":"supportedFeatures","securityInfo":[{"authenticationInfo":"authenticationInfo","authorizationInfo":"authorizationInfo","interfaceDetails":{"ipv6Addr":"ipv6Addr","securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"prefSecurityMethods":[null,null],"aefId":"aefId","grantType":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"apiId":"apiId"},{"authenticationInfo":"authenticationInfo","authorizationInfo":"authorizationInfo","interfaceDetails":{"ipv6Addr":"ipv6Addr","securityMethods":["PSK","PSK"],"fqdn":"fqdn","port":5248,"apiPrefix":"apiPrefix","ipv4Addr":"ipv4Addr"},"prefSecurityMethods":[null,null],"aefId":"aefId","grantType":["CLIENT_CREDENTIALS","CLIENT_CREDENTIALS"],"apiId":"apiId"}],"websockNotifConfig":{"requestWebsocketUri":True,"websocketUri":"websocketUri"},"requestTestNotification":True} + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + response = self.client.open( + '/capif-security/v1/trustedInvokers/{api_invoker_id}/update'.format(api_invoker_id='api_invoker_id_example'), + method='POST', + headers=headers, + data=json.dumps(service_security), + 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_Security_API/capif_security/typing_utils.py b/services/TS29222_CAPIF_Security_API/capif_security/typing_utils.py index 0563f81fd5345282a33705038dfa77fdcaa15872..d21c4f633653a0eae75d04b2f6eff684ff9d200d 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/typing_utils.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/typing_utils.py @@ -1,9 +1,6 @@ -# coding: utf-8 - import sys if sys.version_info < (3, 7): - import typing def is_generic(klass): """ Determine whether klass is a generic class """ diff --git a/services/TS29222_CAPIF_Security_API/capif_security/util.py b/services/TS29222_CAPIF_Security_API/capif_security/util.py index 72d18d9b7df0bfd24490b24c4b9d9bcd683ad9ef..8c4d60681399f9a3be7fe35b0e668bbbb38aaac5 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/util.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/util.py @@ -1,7 +1,6 @@ import datetime -import six -import typing_utils +from capif_security import typing_utils def serialize_clean_camel_case(obj): @@ -17,10 +16,10 @@ def clean_empty(d): return { k: v for k, v in ((k, clean_empty(v)) for k, v in d.items()) - if v + if v is not None or (isinstance(v, list) and len(v) == 0) } if isinstance(d, list): - return [v for v in map(clean_empty, d) if v] + return [v for v in map(clean_empty, d) if v is not None] return d @@ -64,7 +63,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool, bytearray): + if klass in (int, float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) @@ -93,7 +92,7 @@ def _deserialize_primitive(data, klass): try: value = klass(data) except UnicodeEncodeError: - value = six.u(data) + value = data except TypeError: value = data return value @@ -158,7 +157,7 @@ def deserialize_model(data, klass): if not instance.openapi_types: return data - for attr, attr_type in six.iteritems(instance.openapi_types): + 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)): @@ -193,4 +192,4 @@ def _deserialize_dict(data, boxed_type): :rtype: dict """ return {k: _deserialize(v, boxed_type) - for k, v in six.iteritems(data)} + for k, v in data.items() } diff --git a/services/TS29222_CAPIF_Security_API/git_push.sh b/services/TS29222_CAPIF_Security_API/git_push.sh index 9405f72e950cdb8ca24c3cf4d15cee7eac62fde7..f53a75d4fabe760cce49eddfd62fcc702938ea90 100644 --- a/services/TS29222_CAPIF_Security_API/git_push.sh +++ b/services/TS29222_CAPIF_Security_API/git_push.sh @@ -1,7 +1,7 @@ #!/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-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git 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 + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/services/TS29222_CAPIF_Security_API/main.py b/services/TS29222_CAPIF_Security_API/main.py deleted file mode 100644 index d7709377257fb38fb098b63e18f5f19c0d0793e4..0000000000000000000000000000000000000000 --- a/services/TS29222_CAPIF_Security_API/main.py +++ /dev/null @@ -1,61 +0,0 @@ - -from capif_security.models import ServiceSecurity - - -json_data = { - "securityInfo": [ - { - "interfaceDetails": { - "ipv4Addr": "string", - "ipv6Addr": "string", - "port": 65535, - "securityMethods": [ - "PSK", - "PKI" - ] - }, - "aefId": "string", - "apiId": "string", - "prefSecurityMethods": [ - "PSK", - "PKI" - ], - "selSecurityMethod": "PSK", - "authenticationInfo": "string", - "authorizationInfo": "string" - }, - { - "interfaceDetails": { - "ipv4Addr": "string", - "ipv6Addr": "string", - "port": 65535, - "securityMethods": [ - "PSK", - "string" - ] - }, - "aefId": "string", - "apiId": "string", - "prefSecurityMethods": [ - "PSK", - "string" - ], - "selSecurityMethod": "PSK", - "authenticationInfo": "string", - "authorizationInfo": "string" - } - ], - "notificationDestination": "string", - "requestTestNotification": True, - "websockNotifConfig": { - "websocketUri": "string", - "requestWebsocketUri": True - }, - "supportedFeatures": "fff" - } - -#print(json_data) - -my_ser = ServiceSecurity.from_dict(json_data) - -print(my_ser) \ No newline at end of file diff --git a/services/TS29222_CAPIF_Security_API/prepare_security.sh b/services/TS29222_CAPIF_Security_API/prepare_security.sh index 94bece0582e614c49d6fbab23307984a2ad9875d..86f10f24716dafa0d0f873cc40953f037fcdf9d7 100644 --- a/services/TS29222_CAPIF_Security_API/prepare_security.sh +++ b/services/TS29222_CAPIF_Security_API/prepare_security.sh @@ -15,5 +15,5 @@ curl -k -retry 30 \ --request GET "$VAULT_ADDR/v1/secret/data/server_cert/private" 2>/dev/null | jq -r '.data.data.key' -j > /usr/src/app/capif_security/server.key -gunicorn --bind 0.0.0.0:8080 \ +gunicorn -k uvicorn.workers.UvicornH11Worker --bind 0.0.0.0:8080 \ --chdir /usr/src/app/capif_security wsgi:app \ No newline at end of file diff --git a/services/TS29222_CAPIF_Security_API/requirements.txt b/services/TS29222_CAPIF_Security_API/requirements.txt index b92f321e856892a89171bb517ae90e604445af75..b3fd4f79e3b770f780fc9feba3d110657f189e87 100644 --- a/services/TS29222_CAPIF_Security_API/requirements.txt +++ b/services/TS29222_CAPIF_Security_API/requirements.txt @@ -1,25 +1,25 @@ -connexion[swagger-ui] == 2.14.2; python_version>="3.6" +connexion[flask, swagger-ui, uvicorn] == 3.1.0; python_version>="3.6" swagger-ui-bundle >= 0.0.2 python_dateutil >= 2.6.0 -setuptools == 68.2.2 -Flask == 2.0.3 +setuptools == 74.0.0 +Flask == 3.0.3 pymongo == 4.7.3 -flask_jwt_extended == 4.4.4 +redis == 4.5.4 +flask_jwt_extended == 4.6.0 cryptography == 42.0.8 rfc3987 == 1.3.8 -redis == 4.5.4 -flask_executor == 1.0.0 -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.17.0 +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 fluent == 0.10.0 fluent-logger == 0.10.0 -opentelemetry-api == 1.17.0 -opentelemetry-sdk == 1.17.0 +opentelemetry-api == 1.19.0 +opentelemetry-sdk == 1.19.0 +Flask-APScheduler == 1.13.1 flask_executor == 1.0.0 -Werkzeug == 2.2.3 +werkzeug == 3.0.4 gunicorn == 22.0.0 -packaging == 24.0 +packaging == 24.0 \ No newline at end of file diff --git a/services/TS29222_CAPIF_Security_API/setup.py b/services/TS29222_CAPIF_Security_API/setup.py index d763e2edd452fb04c1a21f6fa2c721ad10fd6455..fc9b23b7d53422ce54abd698b7c191c2396b4fd2 100644 --- a/services/TS29222_CAPIF_Security_API/setup.py +++ b/services/TS29222_CAPIF_Security_API/setup.py @@ -1,6 +1,3 @@ -# coding: utf-8 - -import sys from setuptools import setup, find_packages NAME = "capif_security" @@ -33,7 +30,7 @@ setup( entry_points={ 'console_scripts': ['capif_security=capif_security.__main__:main']}, long_description="""\ - API for CAPIF security management. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + API for CAPIF security management. © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. """ ) diff --git a/services/TS29222_CAPIF_Security_API/test-requirements.txt b/services/TS29222_CAPIF_Security_API/test-requirements.txt index 202a684feef71ff540d6aa528d348febf0b37d1e..58f51d6a00272d7515a20e3618f345b73c68afa0 100644 --- a/services/TS29222_CAPIF_Security_API/test-requirements.txt +++ b/services/TS29222_CAPIF_Security_API/test-requirements.txt @@ -1,4 +1,4 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 +pytest~=7.1.0 pytest-cov>=2.8.1 -pytest-randomly == 1.2.3 # needed for python 2.7+3.4 -Flask-Testing == 0.8.0 +pytest-randomly>=1.2.3 +Flask-Testing==0.8.1 diff --git a/services/TS29222_CAPIF_Security_API/tox.ini b/services/TS29222_CAPIF_Security_API/tox.ini index f9b3b3b91b81585dbad03fb76c1e36be0a3dfa20..17b99b723a8a4ade60a8231af7cca78c40338771 100644 --- a/services/TS29222_CAPIF_Security_API/tox.ini +++ b/services/TS29222_CAPIF_Security_API/tox.ini @@ -5,7 +5,7 @@ skipsdist=True [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - {toxinidir} + {toxinidir} commands= pytest --cov=capif_security diff --git a/services/check_services_are_running.sh b/services/check_services_are_running.sh index 16de7046452f3faa4ab94b04e340def03d89d9d4..b7e7a7a18a21ea2803bd84687a6026801fd73ba7 100755 --- a/services/check_services_are_running.sh +++ b/services/check_services_are_running.sh @@ -2,9 +2,10 @@ export CAPIF_PRIV_KEY= export CAPIF_PRIV_KEY_BASE_64= export MONITORING= +export LOG_LEVEL=DEBUG -running="$(docker compose -f docker-compose-vault.yml ps --services --all --filter "status=running")" -services="$(docker compose -f docker-compose-vault.yml ps --services --all)" +running="$(LOG_LEVEL=$LOG_LEVEL docker compose -f docker-compose-vault.yml ps --services --all --filter "status=running")" +services="$(LOG_LEVEL=$LOG_LEVEL docker compose -f docker-compose-vault.yml ps --services --all)" if [ "$running" != "$services" ]; then echo "Following Vault services are not running:" # Bash specific @@ -14,8 +15,8 @@ else echo "All Vault services are running" fi -running="$(docker compose -f docker-compose-capif.yml ps --services --all --filter "status=running")" -services="$(docker compose -f docker-compose-capif.yml ps --services --all)" +running="$(LOG_LEVEL=$LOG_LEVEL docker compose -f docker-compose-capif.yml ps --services --all --filter "status=running")" +services="$(LOG_LEVEL=$LOG_LEVEL docker compose -f docker-compose-capif.yml ps --services --all)" if [ "$running" != "$services" ]; then echo "Following CCF services are not running:" # Bash specific @@ -25,8 +26,8 @@ else echo "All CCF services are running" fi -running="$(docker compose -f docker-compose-register.yml ps --services --all --filter "status=running")" -services="$(docker compose -f docker-compose-register.yml ps --services --all)" +running="$(LOG_LEVEL=$LOG_LEVEL docker compose -f docker-compose-register.yml ps --services --all --filter "status=running")" +services="$(LOG_LEVEL=$LOG_LEVEL docker compose -f docker-compose-register.yml ps --services --all)" if [ "$running" != "$services" ]; then echo "Following Register services are not running:" # Bash specific diff --git a/services/clean_capif_docker_services.sh b/services/clean_capif_docker_services.sh index bd6ef111f010c8d5ed962a7c575fe2adfa32bbc1..dec71b8276795f5e87f3465723389f21442c717c 100755 --- a/services/clean_capif_docker_services.sh +++ b/services/clean_capif_docker_services.sh @@ -1,5 +1,9 @@ #!/bin/bash +# Directories variables setup (no modification needed) +export SERVICES_DIR=$(dirname "$(readlink -f "$0")") +export CAPIF_BASE_DIR=$(dirname "$SERVICES_DIR") + help() { echo "Usage: $1 " echo " -c : Clean capif services" @@ -26,27 +30,27 @@ while getopts "cvrahms" opt; do case $opt in c) echo "Remove Capif services" - FILES+=("docker-compose-capif.yml") + FILES+=("$SERVICES_DIR/docker-compose-capif.yml") ;; v) echo "Remove vault service" - FILES+=("docker-compose-vault.yml") + FILES+=("$SERVICES_DIR/docker-compose-vault.yml") ;; r) echo "Remove register service" - FILES+=("docker-compose-register.yml") + FILES+=("$SERVICES_DIR/docker-compose-register.yml") ;; m) echo "Remove monitoring service" - FILES+=("../monitoring/docker-compose.yml") + FILES+=("$SERVICES_DIR/monitoring/docker-compose.yml") ;; s) echo "Robot Mock Server" - FILES+=("docker-compose-mock-server.yml") + FILES+=("$SERVICES_DIR/docker-compose-mock-server.yml") ;; a) echo "Remove all services" - FILES=("docker-compose-capif.yml" "docker-compose-vault.yml" "docker-compose-register.yml" "docker-compose-mock-server.yml" "../monitoring/docker-compose.yml") + FILES=("$SERVICES_DIR/docker-compose-capif.yml" "$SERVICES_DIR/docker-compose-vault.yml" "$SERVICES_DIR/docker-compose-register.yml" "$SERVICES_DIR/docker-compose-mock-server.yml" "$SERVICES_DIR//monitoring/docker-compose.yml") ;; h) help diff --git a/services/clean_mock_server.sh b/services/clean_mock_server.sh index 5ea886cdee5476d39a20440d1f2a27f3e49a0857..157e39afdcc45888244966b137ab6b8eace842d7 100755 --- a/services/clean_mock_server.sh +++ b/services/clean_mock_server.sh @@ -1,6 +1,9 @@ #!/bin/bash -FILE="docker-compose-mock-server.yml" +# Directories variables setup (no modification needed) +export SERVICES_DIR=$(dirname "$(readlink -f "$0")") + +FILE="$SERVICES_DIR/docker-compose-mock-server.yml" echo "Executing 'docker compose down' for file $FILE" docker compose -f "$FILE" down --rmi all diff --git a/services/create_users.sh b/services/create_users.sh new file mode 100755 index 0000000000000000000000000000000000000000..d285bd1e1c3b5f7013ea9f835e0c433b4f6cc048 --- /dev/null +++ b/services/create_users.sh @@ -0,0 +1,154 @@ +#!/bin/bash + +# User to create +TOTAL_USERS=1 +USERNAME_PREFIX= +USER_PASSWORD= + +help() { + echo "Usage: $1 " + echo " -u : User prefix to use" + echo " -p : Password to set for user" + echo " -l : Local usage of script (default true)" + echo " -t : Total user to create (default 1)" + echo " -h : show this help" + exit 1 +} + +# Read params +while getopts ":u:p:l:t:h" opt; do + case $opt in + u) + USERNAME_PREFIX="$OPTARG" + ;; + p) + USER_PASSWORD=$OPTARG + ;; + l) + LOCAL=$OPTARG + ;; + t) + TOTAL_USERS=$OPTARG + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [[ "$USERNAME_PREFIX" == "" ]] +then + echo "USERNAME_PREFIX must be set with option -u" + help + exit -1 +fi + +if [[ "$USER_PASSWORD" == "" ]] +then + echo "USER_PASSWORD must be set with option -p" + help + exit -1 +fi + +# Other Stuff +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 +cd .. +REPOSITORY_BASE_FOLDER=${PWD} +TEST_FOLDER=$REPOSITORY_BASE_FOLDER/tests +RESULT_FOLDER=$REPOSITORY_BASE_FOLDER/results +ROBOT_DOCKER_FILE_FOLDER=$REPOSITORY_BASE_FOLDER/tools/robot + +# nginx Hostname and http port (80 by default) to reach for tests +CAPIF_REGISTER=capifcore +CAPIF_REGISTER_PORT=8084 +CAPIF_HOSTNAME=capifcore +CAPIF_HTTP_PORT=8080 +CAPIF_HTTPS_PORT=443 + +# VAULT access configuration +CAPIF_VAULT=vault +CAPIF_VAULT_PORT=8200 +CAPIF_VAULT_TOKEN=read-ca-token + +# Mock Server +MOCK_SERVER_URL=http://mock-server:9100 +NOTIFICATION_DESTINATION_URL=$MOCK_SERVER_URL + +PLATFORM=$(uname -m) +if [ "x86_64" == "$PLATFORM" ]; then + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-amd64 +else + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-arm64 +fi + +# Show variables +echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" +echo "CAPIF_REGISTER = $CAPIF_REGISTER" +echo "CAPIF_HTTP_PORT = $CAPIF_HTTP_PORT" +echo "CAPIF_HTTPS_PORT = $CAPIF_HTTPS_PORT" +echo "CAPIF_VAULT = $CAPIF_VAULT" +echo "CAPIF_VAULT_PORT = $CAPIF_VAULT_PORT" +echo "CAPIF_VAULT_TOKEN = $CAPIF_VAULT_TOKEN" +echo "TOTAL_USERS=$TOTAL_USERS" +echo "USERNAME_PREFIX=$USERNAME_PREFIX" +echo "USER_PASSWORD=$USER_PASSWORD" +echo "MOCK_SERVER_URL=$MOCK_SERVER_URL" +echo "NOTIFICATION_DESTINATION_URL=$NOTIFICATION_DESTINATION_URL" +echo "DOCKER_ROBOT_IMAGE = $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION" + +docker >/dev/null 2>/dev/null +if [[ $? -ne 0 ]] +then + echo "Docker maybe is not installed. Please check if docker CLI is present." + exit -1 +fi + +docker pull $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION || echo "Docker image ($DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION) not present on repository" +docker images|grep -Eq '^'$DOCKER_ROBOT_IMAGE'[ ]+[ ]'$DOCKER_ROBOT_IMAGE_VERSION'' +if [[ $? -ne 0 ]] +then + read -p "Robot image is not present. To continue, Do you want to build it? (y/n)" build_robot_image + if [[ $build_robot_image == "y" ]] + then + echo "Building Robot docker image." + cd $ROBOT_DOCKER_FILE_FOLDER + docker build --no-cache -t $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION . + cd $REPOSITORY_BASE_FOLDER + else + exit -2 + fi +fi + +mkdir -p $RESULT_FOLDER + + +docker run -ti --rm --network="host" \ + --add-host host.docker.internal:host-gateway \ + --add-host vault:host-gateway \ + --add-host register:host-gateway \ + --add-host mock-server:host-gateway \ + -v $TEST_FOLDER:/opt/robot-tests/tests \ + -v $RESULT_FOLDER:/opt/robot-tests/results ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ + --variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \ + --variable CAPIF_HTTP_PORT:$CAPIF_HTTP_PORT \ + --variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \ + --variable CAPIF_REGISTER:$CAPIF_REGISTER \ + --variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \ + --variable CAPIF_VAULT:$CAPIF_VAULT \ + --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 \ + --variable TOTAL_USERS:$TOTAL_USERS \ + --variable USERNAME_PREFIX:$USERNAME_PREFIX \ + --variable USER_PASSWORD:$USER_PASSWORD \ + --include create-users diff --git a/services/docker-compose-capif.yml b/services/docker-compose-capif.yml index 44ed625fcc13b5d64606b5316272bb989713ba4b..037d5f3524b28a9f14a66211096ed63a03027efa 100644 --- a/services/docker-compose-capif.yml +++ b/services/docker-compose-capif.yml @@ -12,7 +12,7 @@ services: helper: - build: + build: context: ./helper expose: - "8080" @@ -32,11 +32,13 @@ services: - VAULT_ACCESS_TOKEN=dev-only-token - VAULT_PORT=8200 - LOG_LEVEL=${LOG_LEVEL} + image: labs.etsi.org:5050/ocf/capif/helper:v2.x.x-release depends_on: - nginx access-control-policy: - build: TS29222_CAPIF_Access_Control_Policy_API + build: + context: ./TS29222_CAPIF_Access_Control_Policy_API expose: - "8080" volumes: @@ -46,11 +48,12 @@ services: - fluent-bit:host-gateway - otel-collector:host-gateway environment: + - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - CONTAINER_NAME=access-control-policy - MONITORING=${MONITORING} - LOG_LEVEL=${LOG_LEVEL} restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/access-control-policy:3.1.3 + image: labs.etsi.org:5050/ocf/capif/access-control-policy:v2.x.x-release depends_on: - redis - nginx @@ -68,6 +71,7 @@ services: - otel-collector:host-gateway - vault:host-gateway environment: + - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - CONTAINER_NAME=api-invoker-management - MONITORING=${MONITORING} - VAULT_HOSTNAME=vault @@ -75,13 +79,14 @@ services: - VAULT_PORT=8200 - LOG_LEVEL=${LOG_LEVEL} restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/api-invoker-management-api:3.1.3 + image: labs.etsi.org:5050/ocf/capif/api-invoker-management-api:v2.x.x-release depends_on: - redis - nginx api-provider-management: - build: TS29222_CAPIF_API_Provider_Management_API/. + build: + context: ./TS29222_CAPIF_API_Provider_Management_API expose: - "8080" volumes: @@ -91,8 +96,9 @@ services: - fluent-bit:host-gateway - otel-collector:host-gateway - vault:host-gateway - image: public.ecr.aws/o2v4a8t6/opencapif/api-provider-management-api:3.1.3 + image: labs.etsi.org:5050/ocf/capif/api-provider-management-api:v2.x.x-release environment: + - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - CONTAINER_NAME=api-provider-management - MONITORING=${MONITORING} - VAULT_HOSTNAME=vault @@ -115,8 +121,9 @@ services: - fluent-bit:host-gateway - otel-collector:host-gateway restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/auditing-api:3.1.3 + image: labs.etsi.org:5050/ocf/capif/auditing-api:v2.x.x-release environment: + - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - CONTAINER_NAME=api-auditing - MONITORING=${MONITORING} - LOG_LEVEL=${LOG_LEVEL} @@ -135,8 +142,9 @@ services: - host.docker.internal:host-gateway - fluent-bit:host-gateway - otel-collector:host-gateway - image: public.ecr.aws/o2v4a8t6/opencapif/discover-service-api:3.1.3 + image: labs.etsi.org:5050/ocf/capif/discover-service-api:v2.x.x-release environment: + - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - CONTAINER_NAME=services-apis - MONITORING=${MONITORING} - LOG_LEVEL=${LOG_LEVEL} @@ -144,16 +152,19 @@ services: - mongo capif-events: - build: TS29222_CAPIF_Events_API/. + build: + context: ./TS29222_CAPIF_Events_API expose: - "8080" volumes: - ./TS29222_CAPIF_Events_API:/usr/src/app - image: public.ecr.aws/o2v4a8t6/opencapif/events-api:3.1.3 + image: labs.etsi.org:5050/ocf/capif/events-api:v2.x.x-release environment: + - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - CONTAINER_NAME=api-events - MONITORING=${MONITORING} - LOG_LEVEL=${LOG_LEVEL} + - TIMEOUT=10 extra_hosts: - host.docker.internal:host-gateway - fluent-bit:host-gateway @@ -170,7 +181,7 @@ services: volumes: - ./TS29222_CAPIF_Logging_API_Invocation_API:/usr/src/app restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/api-invocation-logs-api:3.1.3 + image: labs.etsi.org:5050/ocf/capif/api-invocation-logs-api:v2.x.x-release extra_hosts: - host.docker.internal:host-gateway - fluent-bit:host-gateway @@ -184,18 +195,20 @@ services: - mongo published-apis: - build: TS29222_CAPIF_Publish_Service_API/. + build: + context: ./TS29222_CAPIF_Publish_Service_API expose: - "8080" volumes: - ./TS29222_CAPIF_Publish_Service_API:/usr/src/app restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/publish-service-api:3.1.3 + image: labs.etsi.org:5050/ocf/capif/publish-service-api:v2.x.x-release extra_hosts: - host.docker.internal:host-gateway - fluent-bit:host-gateway - otel-collector:host-gateway environment: + - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - CONTAINER_NAME=api-publish-apis - MONITORING=${MONITORING} - LOG_LEVEL=${LOG_LEVEL} @@ -204,19 +217,21 @@ services: - mongo capif-routing-info: - build: TS29222_CAPIF_Routing_Info_API/. + build: + context: ./TS29222_CAPIF_Routing_Info_API expose: - "8080" - image: public.ecr.aws/o2v4a8t6/opencapif/routing-info-api:3.1.3 + image: labs.etsi.org:5050/ocf/capif/routing-info-api:v2.x.x-release capif-security: - build: TS29222_CAPIF_Security_API/. + build: + context: ./TS29222_CAPIF_Security_API expose: - "8080" volumes: - ./TS29222_CAPIF_Security_API:/usr/src/app restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/security-api:3.1.3 + image: labs.etsi.org:5050/ocf/capif/security-api:v2.x.x-release environment: - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - CONTAINER_NAME=api-security @@ -225,6 +240,7 @@ services: - VAULT_ACCESS_TOKEN=dev-only-token - VAULT_PORT=8200 - LOG_LEVEL=${LOG_LEVEL} + - TIMEOUT=10 extra_hosts: - host.docker.internal:host-gateway - fluent-bit:host-gateway @@ -266,7 +282,7 @@ services: ports: - "8080:8080" - "443:443" - image: public.ecr.aws/o2v4a8t6/opencapif/nginx:3.1.3 + image: labs.etsi.org:5050/ocf/capif/nginx:v2.x.x-release environment: - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - VAULT_HOSTNAME=vault diff --git a/services/docker-compose-mock-server.yml b/services/docker-compose-mock-server.yml index 1415b439bb1eec214b6adbd5af74812432544bf1..d769505c6b202843691aa29d2fe432a7dc9300b7 100644 --- a/services/docker-compose-mock-server.yml +++ b/services/docker-compose-mock-server.yml @@ -3,13 +3,15 @@ services: build: context: ./mock_server ports: - - 9090:9090 + - 9100:9100 volumes: - ./mock_server:/usr/src/app extra_hosts: - host.docker.internal:host-gateway + environment: + - DEBUG_MODE=True restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/mock_server:latest + image: labs.etsi.org:5050/ocf/capif/mock_server:latest networks: default: diff --git a/services/docker-compose-register.yml b/services/docker-compose-register.yml index 53ed1017428ae03d3ab074c7378884ce9d871ba3..011e906367ad3f3491a1bdaeb15986f41ef2966f 100644 --- a/services/docker-compose-register.yml +++ b/services/docker-compose-register.yml @@ -12,11 +12,12 @@ services: - VAULT_ACCESS_TOKEN=dev-only-token - VAULT_PORT=8200 - LOG_LEVEL=${LOG_LEVEL} + - TIMEOUT=10 extra_hosts: - host.docker.internal:host-gateway - vault:host-gateway restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/jwtauth:3.1.3 + image: labs.etsi.org:5050/ocf/capif/register:v2.x.x-release depends_on: - mongo_register diff --git a/services/docker-compose/docker-compose-capif.yml b/services/docker-compose/docker-compose-capif.yml deleted file mode 100644 index 0095d9a1794b1f86a319c0819359f340b731fabe..0000000000000000000000000000000000000000 --- a/services/docker-compose/docker-compose-capif.yml +++ /dev/null @@ -1,246 +0,0 @@ -version: '3.7' - -services: - redis: - image: "redis:alpine" - command: redis-server - ports: - - "6379:6379" - volumes: - - $PWD/redis-data:/var/lib/redis - - $PWD/redis.conf:/usr/local/etc/redis/redis.conf - environment: - - REDIS_REPLICATION_MODE=master - - access-control-policy: - expose: - - "8080" - volumes: - - ../TS29222_CAPIF_Access_Control_Policy_API:/usr/src/app - extra_hosts: - - host.docker.internal:host-gateway - - fluent-bit:host-gateway - - otel-collector:host-gateway - environment: - - CONTAINER_NAME=access-control-policy - - MONITORING=${MONITORING} - restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/access-control-policy:v3.1.4 - depends_on: - - redis - - nginx - - - api-invoker-management: - expose: - - "8080" - volumes: - - ../TS29222_CAPIF_API_Invoker_Management_API:/usr/src/app - extra_hosts: - - host.docker.internal:host-gateway - - fluent-bit:host-gateway - - otel-collector:host-gateway - - vault:host-gateway - environment: - - CONTAINER_NAME=api-invoker-management - - MONITORING=${MONITORING} - - VAULT_HOSTNAME=vault - - VAULT_ACCESS_TOKEN=dev-only-token - - VAULT_PORT=8200 - restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/api-invoker-management-api:v3.1.4 - depends_on: - - redis - - nginx - - api-provider-management: - expose: - - "8080" - volumes: - - ../TS29222_CAPIF_API_Provider_Management_API:/usr/src/app - extra_hosts: - - host.docker.internal:host-gateway - - fluent-bit:host-gateway - - otel-collector:host-gateway - - vault:host-gateway - image: public.ecr.aws/o2v4a8t6/opencapif/api-provider-management-api:v3.1.4 - environment: - - CONTAINER_NAME=api-provider-management - - MONITORING=${MONITORING} - - VAULT_HOSTNAME=vault - - VAULT_ACCESS_TOKEN=dev-only-token - - VAULT_PORT=8200 - depends_on: - - redis - - nginx - - logs: - expose: - - "8080" - volumes: - - ../TS29222_CAPIF_Auditing_API:/usr/src/app - extra_hosts: - - host.docker.internal:host-gateway - - fluent-bit:host-gateway - - otel-collector:host-gateway - restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/auditing-api:v3.1.4 - environment: - - CONTAINER_NAME=api-auditing - - MONITORING=${MONITORING} - depends_on: - - mongo - - service-apis: - expose: - - "8080" - volumes: - - ../TS29222_CAPIF_Discover_Service_API:/usr/src/app - restart: unless-stopped - extra_hosts: - - host.docker.internal:host-gateway - - fluent-bit:host-gateway - - otel-collector:host-gateway - image: public.ecr.aws/o2v4a8t6/opencapif/discover-service-api:v3.1.4 - environment: - - CONTAINER_NAME=services-apis - - MONITORING=${MONITORING} - depends_on: - - mongo - - capif-events: - expose: - - "8080" - volumes: - - ../TS29222_CAPIF_Events_API:/usr/src/app - image: public.ecr.aws/o2v4a8t6/opencapif/events-api:v3.1.4 - environment: - - CONTAINER_NAME=api-events - - MONITORING=${MONITORING} - extra_hosts: - - host.docker.internal:host-gateway - - fluent-bit:host-gateway - - otel-collector:host-gateway - depends_on: - - redis - - mongo - - api-invocation-logs: - expose: - - "8080" - volumes: - - ../TS29222_CAPIF_Logging_API_Invocation_API:/usr/src/app - restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/api-invocation-logs-api:v3.1.4 - extra_hosts: - - host.docker.internal:host-gateway - - fluent-bit:host-gateway - - otel-collector:host-gateway - environment: - - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - - CONTAINER_NAME=api-invocation-logs - - MONITORING=${MONITORING} - depends_on: - - mongo - - published-apis: - expose: - - "8080" - volumes: - - ../TS29222_CAPIF_Publish_Service_API:/usr/src/app - restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/publish-service-api:v3.1.4 - extra_hosts: - - host.docker.internal:host-gateway - - fluent-bit:host-gateway - - otel-collector:host-gateway - environment: - - CONTAINER_NAME=api-publish-apis - - MONITORING=${MONITORING} - depends_on: - - redis - - mongo - - capif-routing-info: - expose: - - "8080" - image: public.ecr.aws/o2v4a8t6/opencapif/routing-info-api:v3.1.4 - - capif-security: - build: ../TS29222_CAPIF_Security_API/. - expose: - - "8080" - volumes: - - ../TS29222_CAPIF_Security_API:/usr/src/app - restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/security-api:v3.1.4 - environment: - - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - - CONTAINER_NAME=api-security - - MONITORING=${MONITORING} - - VAULT_HOSTNAME=vault - - VAULT_ACCESS_TOKEN=dev-only-token - - VAULT_PORT=8200 - extra_hosts: - - host.docker.internal:host-gateway - - fluent-bit:host-gateway - - otel-collector:host-gateway - - vault:host-gateway - depends_on: - - redis - - nginx - - mongo: - image: mongo:6.0.2 - logging: - driver: 'none' - restart: unless-stopped - ports: - - 27017:27017 - environment: - MONGO_INITDB_ROOT_USERNAME: root - MONGO_INITDB_ROOT_PASSWORD: example - - mongo-express: - image: mongo-express:1.0.0-alpha.4 - logging: - driver: 'none' - restart: unless-stopped - ports: - - 8082:8081 - environment: - ME_CONFIG_MONGODB_ADMINUSERNAME: root - ME_CONFIG_MONGODB_ADMINPASSWORD: example - ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/ - depends_on: - - mongo - - nginx: - ports: - - "8080:8080" - - "443:443" - image: public.ecr.aws/o2v4a8t6/opencapif/nginx:v3.1.4 - environment: - - CAPIF_HOSTNAME=${CAPIF_HOSTNAME} - - VAULT_HOSTNAME=vault - - VAULT_ACCESS_TOKEN=dev-only-token - - VAULT_PORT=8200 - hostname: ${CAPIF_HOSTNAME} - volumes: - - ./nginx/certs:/etc/nginx/certs - extra_hosts: - - host.docker.internal:host-gateway - - vault:host-gateway - restart: unless-stopped - depends_on: - - redis - - service-apis - - api-invocation-logs - - published-apis - - capif-events - - logs - -networks: - default: - name: capif-network - external: true diff --git a/services/docker-compose/docker-compose-montoring.yml b/services/docker-compose/docker-compose-montoring.yml deleted file mode 100644 index 01dc06bcd929e1c696132d40c13b7488d8edbb7e..0000000000000000000000000000000000000000 --- a/services/docker-compose/docker-compose-montoring.yml +++ /dev/null @@ -1,110 +0,0 @@ -version: '3' -services: - prometheus: - image: prom/prometheus:latest - container_name: prometheus - user: "${DUID}:${DGID}" - volumes: - - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml - - ./prometheus/prometheus_db:/var/lib/prometheus - - ./prometheus/prometheus_db:/prometheus - - ./prometheus/prometheus_db:/etc/prometheus - - ./prometheus/alert.rules:/etc/prometheus/alert.rules - command: - - '--config.file=/etc/prometheus/prometheus.yml' - - '--web.route-prefix=/' - - '--storage.tsdb.retention.time=200h' - - '--web.enable-lifecycle' - restart: unless-stopped - ports: - - '9090:9090' - - # cadvisor collects metrics about running containers - cadvisor: - image: gcr.io/cadvisor/cadvisor:v0.47.2 - container_name: cadvisor - ports: - - 8090:8080 - volumes: - - /:/rootfs:ro - - /var/run:/var/run:rw - - /sys:/sys:ro - - /var/lib/docker/:/var/lib/docker:ro - - /var/run/docker.sock:/var/run/docker.sock:rw - - grafana: - image: grafana/grafana - user: "${DUID}:${DGID}" - environment: - - GF_SECURITY_ADMIN_PASSWORD=secure_pass - - GF_PATHS_PROVISIONING=/etc/grafana/provisioning - - GF_AUTH_ANONYMOUS_ENABLED=true - - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin - volumes: - - ./grafana/grafana_config/grafana.ini:/etc/grafana/grafana.ini - - ./grafana/grafana_db:/var/lib/grafana - - ./grafana/grafana_provisioning/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml - - ./grafana/grafana_provisioning/grafana-default-provisioning.yaml:/etc/grafana/provisioning/dashboards/default.yaml - - ./grafana/grafana_dashboards/Docker-monitoring.json:/var/lib/grafana/dashboards/Docker-monitoring.json - - ./grafana/grafana_dashboards/Loki-Logs.json:/var/lib/grafana/dashboards/Loki-Logs.json - - depends_on: - - prometheus - ports: - - '3000:3000' - - # loki save and analyze logs - loki: - image: grafana/loki:2.8.0 - ports: - - "3100:3100" - command: -config.file=/etc/loki/local-config.yaml - - # promtail send docker logs to loki - promtail: - image: grafana/promtail:2.8.0 - volumes: - - /var/log:/var/log - command: -config.file=/etc/promtail/config.yml - - # grafana image renderer - renderer: - image: grafana/grafana-image-renderer:latest - container_name: grafana-image-renderer - expose: - - "8081" - environment: - ENABLE_METRICS: "true" - - # fluent-bit send logs to loki - fluent-bit: - image: grafana/fluent-bit-plugin-loki:main - container_name: fluent-bit - environment: - - LOKI_URL=http://loki:3100/loki/api/v1/push - volumes: - - ./fluent_bit/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf - ports: - - "24224:24224" - - "24224:24224/udp" - - # opentelemetry collector - otel-collector: - image: otel/opentelemetry-collector:latest - ports: - - 55680:55680 - - 4317:4317 - volumes: - - ./otlp_collector/otel-config.yaml:/etc/otel-collector-config.yaml - command: ["--config", "/etc/otel-collector-config.yaml"] - - # tempo is a distributed tracing backend - tempo: - image: grafana/tempo:latest - command: [ "-config.file=/etc/tempo.yaml" ] - volumes: - - ./tempo/tempo.yaml:/etc/tempo.yaml - - ./tempo/tempo-data:/tmp/tempo - ports: - - 3102:3100 - diff --git a/services/docker-compose/docker-compose-register.yml b/services/docker-compose/docker-compose-register.yml deleted file mode 100644 index acd06cad84bc638b050ee8a3be0ba49b7324cd46..0000000000000000000000000000000000000000 --- a/services/docker-compose/docker-compose-register.yml +++ /dev/null @@ -1,37 +0,0 @@ -version: '3.7' - -services: - register: - ports: - - 8084:8080 - volumes: - - ../register:/usr/src/app - environment: - - CAPIF_PRIV_KEY=${CAPIF_PRIV_KEY} - - VAULT_HOSTNAME=vault - - VAULT_ACCESS_TOKEN=dev-only-token - - VAULT_PORT=8200 - extra_hosts: - - host.docker.internal:host-gateway - - vault:host-gateway - restart: unless-stopped - image: public.ecr.aws/o2v4a8t6/opencapif/register:v3.1.4 - depends_on: - - mongo_register - - mongo_register: - image: mongo:6.0.2 - restart: unless-stopped - ports: - - 28017:27017 - environment: - MONGO_INITDB_ROOT_USERNAME: root - MONGO_INITDB_ROOT_PASSWORD: example - -networks: - default: - name: capif-network - external: true - - - diff --git a/services/docker-compose/docker-compose-vault.yml b/services/docker-compose/docker-compose-vault.yml deleted file mode 100644 index cd11e0aebd25a52089335fb3ef0430faf1b61ef4..0000000000000000000000000000000000000000 --- a/services/docker-compose/docker-compose-vault.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3.7' -services: - vault: - build: - context: ../vault - restart: unless-stopped - ports: - - 8200:8200 - cap_add: - - IPC_LOCK - environment: - - VAULT_DEV_ROOT_TOKEN_ID=dev-only-token - - VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200 - volumes: - - ./vault/data:/vault/data - - ./vault/config:/vault/config diff --git a/services/docker-compose/run.sh b/services/docker-compose/run.sh deleted file mode 100755 index 0bde6dbbec26c95ae11ec05079fdc9e821ebc812..0000000000000000000000000000000000000000 --- a/services/docker-compose/run.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -HOSTNAME=capifcore -MONITORING_STATE=false -DEPLOY=all - -#Needed to avoid write permissions on bind volumes with prometheus and grafana -DUID=$(id -u) -DGID=$(id -g) - -# Get docker compose version -docker_version=$(docker compose version --short | cut -d',' -f1) -IFS='.' read -ra version_components <<< "$docker_version" - -if [ "${version_components[0]}" -ge 2 ] && [ "${version_components[1]}" -ge 10 ]; then - echo "Docker compose version it greater than 2.10" -else - echo "Docker compose version is not valid. Should be greater than 2.10" - exit 1 -fi - -# Read params -while getopts ":h:m:" opt; do - case $opt in - h) - HOSTNAME="$OPTARG" - ;; - m) - MONITORING_STATE="$OPTARG" - ;; - \?) - echo "Opción no válida: -$OPTARG" >&2 - exit 1 - ;; - :) - echo "La opción -$OPTARG requiere un argumento." >&2 - exit 1 - ;; - esac -done - -echo Nginx hostname will be $HOSTNAME, deploy $DEPLOY, monitoring $MONITORING_STATE - -if [ "$MONITORING_STATE" == "true" ] ; then - echo '***Monitoring set as true***' - echo '***Creating Monitoging stack***' - - DUID=$DUID DGID=$DGID docker compose -f "./docker-compose-monitoring.yml" up --detach - status=$? - if [ $status -eq 0 ]; then - echo "*** Monitoring Stack Runing ***" - else - echo "*** Monitoring Stack failed to start ***" - exit $status - fi -fi - -docker network create capif-network - -docker compose -f "./docker-compose-vault.yml" up --detach --build - -status=$? -if [ $status -eq 0 ]; then - echo "*** Vault Service Runing ***" -else - echo "*** Vault failed to start ***" - exit $status -fi - -CAPIF_HOSTNAME=$HOSTNAME MONITORING=$MONITORING_STATE docker compose -f "./docker-compose-capif.yml" up --detach --build - -status=$? -if [ $status -eq 0 ]; then - echo "*** All Capif services are running ***" -else - echo "*** Some Capif services failed to start ***" - exit $status -fi - - -CAPIF_PRIV_KEY_BASE_64=$(echo "$(cat nginx/certs/server.key)") -CAPIF_PRIV_KEY=$CAPIF_PRIV_KEY_BASE_64 docker compose -f "./docker-compose-register.yml" up --detach --build - -status=$? -if [ $status -eq 0 ]; then - echo "*** Register Service are running ***" -else - echo "*** Register Service failed to start ***" -fi - -exit $status diff --git a/services/docker-compose/stop.sh b/services/docker-compose/stop.sh deleted file mode 100755 index 4a6435482890009601e749f897e965fd956f291c..0000000000000000000000000000000000000000 --- a/services/docker-compose/stop.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash - -HOSTNAME=capifcore -MONITORING_STATE=false -DEPLOY=all -DEPLOY_BACKOFFICE=${DEPLOY_BACKOFFICE:-false} - -# Get docker compose version -docker_version=$(docker compose version --short | cut -d',' -f1) -IFS='.' read -ra version_components <<< "$docker_version" - -if [ "${version_components[0]}" -ge 2 ] && [ "${version_components[1]}" -ge 10 ]; then - echo "Docker compose version it greater than 2.10" -else - echo "Docker compose version is not valid. Should be greater than 2.10" - exit 1 -fi - -# Read params -while getopts ":h:m:" opt; do - case $opt in - h) - HOSTNAME="$OPTARG" - ;; - m) - MONITORING_STATE="$OPTARG" - ;; - \?) - echo "Opción no válida: -$OPTARG" >&2 - exit 1 - ;; - :) - echo "La opción -$OPTARG requiere un argumento." >&2 - exit 1 - ;; - esac -done - -if [ "$MONITORING_STATE" = true ] ; then - docker compose -f "./docker-compose-monitoring.yml" down - status=$? - if [ $status -eq 0 ]; then - echo "*** Monitoring Stack Stopped ***" - else - echo "*** Monitoring Stack failed to stopt ***" - exit $status - fi -fi - -docker compose -f "./docker-compose-vault.yml" down - -status=$? -if [ $status -eq 0 ]; then - echo "*** Vault Service Stopped ***" -else - echo "*** Vault failed to stop ***" - exit $status -fi - - - -CAPIF_HOSTNAME=$HOSTNAME MONITORING=$MONITORING_STATE docker compose -f "./docker-compose-capif.yml" down - -status=$? -if [ $status -eq 0 ]; then - echo "*** All Capif services are stopped ***" -else - echo "*** Some Capif services failed to stop ***" - exit $status -fi - - -CAPIF_PRIV_KEY_BASE_64=$(echo "$(cat nginx/certs/server.key)") -CAPIF_PRIV_KEY=$CAPIF_PRIV_KEY_BASE_64 docker compose -f "./docker-compose-register.yml" down - -status=$? -if [ $status -eq 0 ]; then - echo "*** Register Service are stopped ***" -else - echo "*** Register Service failed to stop ***" -fi - - -if [ $DEPLOY_BACKOFFICE = "false" ]; then - exit $status -fi - - -docker compose -f "./docker-compose-backoffice.yml" down - -status=$? -if [ $status -eq 0 ]; then - echo "*** Backoffice Service are stopped ***" -else - echo "*** Backoffice Service failed to stop ***" -fi - -exit $status diff --git a/services/helper/Dockerfile b/services/helper/Dockerfile index 36439567b9077997dac2b88cb1f362d3affd77e2..78c9a2e0bd3f1de4d6d1052bb9de694e00569408 100644 --- a/services/helper/Dockerfile +++ b/services/helper/Dockerfile @@ -1,13 +1,22 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/requirements.txt -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* + RUN pip3 install --no-cache-dir -r requirements.txt -RUN apk add openssl curl redis +RUN apt-get update && apt-get install -y --no-install-recommends openssl curl redis COPY . /usr/src/app diff --git a/services/helper/helper_service/app.py b/services/helper/helper_service/app.py index e7a65ec22d813f5530e4af8e6bac5da96e81f372..3f9ae5c189c93467365eee63d6b393973c31d5ee 100644 --- a/services/helper/helper_service/app.py +++ b/services/helper/helper_service/app.py @@ -1,11 +1,13 @@ -from flask import Flask +import json import logging -from controllers.helper_controller import helper_routes +import os + +import requests from OpenSSL.crypto import PKey, TYPE_RSA, X509Req, dump_certificate_request, FILETYPE_PEM, dump_privatekey +from flask import Flask + from config import Config -import json -import requests -import os +from controllers.helper_controller import helper_routes app = Flask(__name__) config = Config().get_config() diff --git a/services/helper/helper_service/config.py b/services/helper/helper_service/config.py index f9574a678498483f4e138d4890fc1fa079cebce4..d9f4ad1c1342cf15c3742577c234da6f40b6db77 100644 --- a/services/helper/helper_service/config.py +++ b/services/helper/helper_service/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): diff --git a/services/helper/helper_service/controllers/helper_controller.py b/services/helper/helper_service/controllers/helper_controller.py index f645a564ca88eb238ced5784cdc5ff2450910075..03d276b78dc4744a35b60022e7c931a6a6d264dc 100644 --- a/services/helper/helper_service/controllers/helper_controller.py +++ b/services/helper/helper_service/controllers/helper_controller.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 -from flask import Blueprint, request, current_app, jsonify -from core.helper_operations import HelperOperations from config import Config +from core.helper_operations import HelperOperations +from flask import Blueprint, request, current_app, jsonify config = Config().get_config() diff --git a/services/helper/helper_service/core/helper_operations.py b/services/helper/helper_service/core/helper_operations.py index 9e6354675ae348efbd5b9f47c940f6145f371103..d8a49c01a48b05255347f767ace16732ef3dd053 100644 --- a/services/helper/helper_service/core/helper_operations.py +++ b/services/helper/helper_service/core/helper_operations.py @@ -1,9 +1,11 @@ -from flask import jsonify, current_app +import os + import pymongo -from db.db import MongoDatabse -from config import Config import requests -import os +from config import Config +from db.db import MongoDatabse +from flask import jsonify, current_app + class HelperOperations: diff --git a/services/helper/helper_service/db/db.py b/services/helper/helper_service/db/db.py index bb2853ef6638b8d2294edbd8d7d1c2c225c8a061..57b9b72e1563dddfa31c34dbc2a8f3a5adce00ab 100644 --- a/services/helper/helper_service/db/db.py +++ b/services/helper/helper_service/db/db.py @@ -1,8 +1,10 @@ import time + +from bson.codec_options import CodecOptions +from config import Config from pymongo import MongoClient from pymongo.errors import AutoReconnect -from config import Config -from bson.codec_options import CodecOptions + class MongoDatabse(): diff --git a/services/helper/requirements.txt b/services/helper/requirements.txt index 23c2931293b753eb0580dae37dab345cd1335869..48b0fba6161e185929637b7288143660257aa8b0 100644 --- a/services/helper/requirements.txt +++ b/services/helper/requirements.txt @@ -1,5 +1,5 @@ python_dateutil == 2.9.0.post0 -setuptools == 68.2.2 +setuptools == 74.0.0 Flask == 3.0.3 pymongo == 4.7.3 flask_jwt_extended == 4.6.0 diff --git a/services/mock_server/Dockerfile b/services/mock_server/Dockerfile index 6d72bf569899e6512254be59539231c0fb49b338..da6840802135931e41c0ec66c0db2341f4416d76 100644 --- a/services/mock_server/Dockerfile +++ b/services/mock_server/Dockerfile @@ -1,5 +1,5 @@ # start by pulling the python image -FROM python:3.10.0-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye # copy the requirements file into the image COPY ./requirements.txt /app/requirements.txt @@ -13,7 +13,7 @@ RUN pip install -r requirements.txt # copy every content from the local file to the image COPY . /app -EXPOSE 9090 +EXPOSE 9100 # configure the container to run in an executed manner ENTRYPOINT [ "python" ] diff --git a/services/mock_server/mock_server.py b/services/mock_server/mock_server.py index 41ba65066d81a1857f53a69eb752995c6bd14210..5e15d4da427205f030af88890c6198e17ffcfc47 100644 --- a/services/mock_server/mock_server.py +++ b/services/mock_server/mock_server.py @@ -1,7 +1,8 @@ -from flask import Flask, request import logging -from logging.handlers import RotatingFileHandler import os +from logging.handlers import RotatingFileHandler + +from flask import Flask, request app = Flask(__name__) @@ -56,5 +57,7 @@ def requests_list(): configure_logging(app) +debug_mode = os.getenv('DEBUG_MODE', 'False').lower() in ['true', '1'] + if __name__ == '__main__': - app.run(host=os.environ.get("IP",'0.0.0.0'),port=os.environ.get("PORT",9090),debug=True) + app.run(host=os.environ.get("IP",'0.0.0.0'),port=os.environ.get("PORT",9100), debug=debug_mode) diff --git a/monitoring/docker-compose.yml b/services/monitoring/docker-compose.yml similarity index 99% rename from monitoring/docker-compose.yml rename to services/monitoring/docker-compose.yml index 41f647f0fd0371f207903d72ff41b5fcac598592..e71dff523f44176692e339f8b88d1ca1a9495c27 100644 --- a/monitoring/docker-compose.yml +++ b/services/monitoring/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3' services: prometheus: image: prom/prometheus:latest diff --git a/monitoring/fluent_bit/fluent-bit.conf b/services/monitoring/fluent_bit/fluent-bit.conf similarity index 100% rename from monitoring/fluent_bit/fluent-bit.conf rename to services/monitoring/fluent_bit/fluent-bit.conf diff --git a/monitoring/grafana/grafana_config/grafana.ini b/services/monitoring/grafana/grafana_config/grafana.ini similarity index 100% rename from monitoring/grafana/grafana_config/grafana.ini rename to services/monitoring/grafana/grafana_config/grafana.ini diff --git a/monitoring/grafana/grafana_dashboards/Docker-monitoring.json b/services/monitoring/grafana/grafana_dashboards/Docker-monitoring.json similarity index 100% rename from monitoring/grafana/grafana_dashboards/Docker-monitoring.json rename to services/monitoring/grafana/grafana_dashboards/Docker-monitoring.json diff --git a/monitoring/grafana/grafana_dashboards/Loki-Logs.json b/services/monitoring/grafana/grafana_dashboards/Loki-Logs.json similarity index 100% rename from monitoring/grafana/grafana_dashboards/Loki-Logs.json rename to services/monitoring/grafana/grafana_dashboards/Loki-Logs.json diff --git a/monitoring/grafana/grafana_db/.keep b/services/monitoring/grafana/grafana_db/.keep similarity index 100% rename from monitoring/grafana/grafana_db/.keep rename to services/monitoring/grafana/grafana_db/.keep diff --git a/services/monitoring/grafana/grafana_db/alerting/1/__default__.tmpl b/services/monitoring/grafana/grafana_db/alerting/1/__default__.tmpl new file mode 100644 index 0000000000000000000000000000000000000000..b8633d1689b2d3ceb6607e914b0a2c4d77192175 --- /dev/null +++ b/services/monitoring/grafana/grafana_db/alerting/1/__default__.tmpl @@ -0,0 +1,53 @@ + +{{ define "__subject" }}[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ if gt (.Alerts.Resolved | len) 0 }}, RESOLVED:{{ .Alerts.Resolved | len }}{{ end }}{{ end }}] {{ .GroupLabels.SortedPairs.Values | join " " }} {{ if gt (len .CommonLabels) (len .GroupLabels) }}({{ with .CommonLabels.Remove .GroupLabels.Names }}{{ .Values | join " " }}{{ end }}){{ end }}{{ end }} + +{{ define "__text_values_list" }}{{ if len .Values }}{{ $first := true }}{{ range $refID, $value := .Values -}} +{{ if $first }}{{ $first = false }}{{ else }}, {{ end }}{{ $refID }}={{ $value }}{{ end -}} +{{ else }}[no value]{{ end }}{{ end }} + +{{ define "__text_alert_list" }}{{ range . }} +Value: {{ template "__text_values_list" . }} +Labels: +{{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }} +{{ end }}Annotations: +{{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }} +{{ end }}{{ if gt (len .GeneratorURL) 0 }}Source: {{ .GeneratorURL }} +{{ end }}{{ if gt (len .SilenceURL) 0 }}Silence: {{ .SilenceURL }} +{{ end }}{{ if gt (len .DashboardURL) 0 }}Dashboard: {{ .DashboardURL }} +{{ end }}{{ if gt (len .PanelURL) 0 }}Panel: {{ .PanelURL }} +{{ end }}{{ end }}{{ end }} + +{{ define "default.title" }}{{ template "__subject" . }}{{ end }} + +{{ define "default.message" }}{{ if gt (len .Alerts.Firing) 0 }}**Firing** +{{ template "__text_alert_list" .Alerts.Firing }}{{ if gt (len .Alerts.Resolved) 0 }} + +{{ end }}{{ end }}{{ if gt (len .Alerts.Resolved) 0 }}**Resolved** +{{ template "__text_alert_list" .Alerts.Resolved }}{{ end }}{{ end }} + + +{{ define "__teams_text_alert_list" }}{{ range . }} +Value: {{ template "__text_values_list" . }} +Labels: +{{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }} +{{ end }} +Annotations: +{{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }} +{{ end }} +{{ if gt (len .GeneratorURL) 0 }}Source: [{{ .GeneratorURL }}]({{ .GeneratorURL }}) + +{{ end }}{{ if gt (len .SilenceURL) 0 }}Silence: [{{ .SilenceURL }}]({{ .SilenceURL }}) + +{{ end }}{{ if gt (len .DashboardURL) 0 }}Dashboard: [{{ .DashboardURL }}]({{ .DashboardURL }}) + +{{ end }}{{ if gt (len .PanelURL) 0 }}Panel: [{{ .PanelURL }}]({{ .PanelURL }}) + +{{ end }} +{{ end }}{{ end }} + + +{{ define "teams.default.message" }}{{ if gt (len .Alerts.Firing) 0 }}**Firing** +{{ template "__teams_text_alert_list" .Alerts.Firing }}{{ if gt (len .Alerts.Resolved) 0 }} + +{{ end }}{{ end }}{{ if gt (len .Alerts.Resolved) 0 }}**Resolved** +{{ template "__teams_text_alert_list" .Alerts.Resolved }}{{ end }}{{ end }} diff --git a/monitoring/grafana_config/provisioning/dashboards/default.yaml b/services/monitoring/grafana/grafana_db/dashboards/Docker-monitoring.json similarity index 100% rename from monitoring/grafana_config/provisioning/dashboards/default.yaml rename to services/monitoring/grafana/grafana_db/dashboards/Docker-monitoring.json diff --git a/monitoring/grafana_config/provisioning/datasources/datasources.yaml b/services/monitoring/grafana/grafana_db/dashboards/Loki-Logs.json similarity index 100% rename from monitoring/grafana_config/provisioning/datasources/datasources.yaml rename to services/monitoring/grafana/grafana_db/dashboards/Loki-Logs.json diff --git a/monitoring/grafana/grafana_provisioning/grafana-datasources.yaml b/services/monitoring/grafana/grafana_provisioning/grafana-datasources.yaml similarity index 100% rename from monitoring/grafana/grafana_provisioning/grafana-datasources.yaml rename to services/monitoring/grafana/grafana_provisioning/grafana-datasources.yaml diff --git a/monitoring/grafana/grafana_provisioning/grafana-default-provisioning.yaml b/services/monitoring/grafana/grafana_provisioning/grafana-default-provisioning.yaml similarity index 100% rename from monitoring/grafana/grafana_provisioning/grafana-default-provisioning.yaml rename to services/monitoring/grafana/grafana_provisioning/grafana-default-provisioning.yaml diff --git a/monitoring/prometheus/alert.rules/.keep b/services/monitoring/grafana_config/provisioning/dashboards/default.yaml old mode 100644 new mode 100755 similarity index 100% rename from monitoring/prometheus/alert.rules/.keep rename to services/monitoring/grafana_config/provisioning/dashboards/default.yaml diff --git a/monitoring/prometheus/prometheus_db/.keep b/services/monitoring/grafana_config/provisioning/datasources/datasources.yaml old mode 100644 new mode 100755 similarity index 100% rename from monitoring/prometheus/prometheus_db/.keep rename to services/monitoring/grafana_config/provisioning/datasources/datasources.yaml diff --git a/monitoring/otlp_collector/otel-config.yaml b/services/monitoring/otlp_collector/otel-config.yaml similarity index 100% rename from monitoring/otlp_collector/otel-config.yaml rename to services/monitoring/otlp_collector/otel-config.yaml diff --git a/monitoring/tempo/tempo-data/.keep b/services/monitoring/prometheus/alert.rules/.keep similarity index 100% rename from monitoring/tempo/tempo-data/.keep rename to services/monitoring/prometheus/alert.rules/.keep diff --git a/monitoring/prometheus/prometheus.yml b/services/monitoring/prometheus/prometheus.yml similarity index 100% rename from monitoring/prometheus/prometheus.yml rename to services/monitoring/prometheus/prometheus.yml diff --git a/services/monitoring/prometheus/prometheus_db/.keep b/services/monitoring/prometheus/prometheus_db/.keep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/services/monitoring/prometheus/prometheus_db/prometheus.yml b/services/monitoring/prometheus/prometheus_db/prometheus.yml new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/services/monitoring/tempo/tempo-data/.keep b/services/monitoring/tempo/tempo-data/.keep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/services/monitoring/tempo/tempo-data/blocks/tempo_cluster_seed.json b/services/monitoring/tempo/tempo-data/blocks/tempo_cluster_seed.json new file mode 100644 index 0000000000000000000000000000000000000000..75666366a5a1eef4adb5d313d06d1433a74cf92b --- /dev/null +++ b/services/monitoring/tempo/tempo-data/blocks/tempo_cluster_seed.json @@ -0,0 +1 @@ +{"UID":"35359dcb-8d3d-444c-a217-4c200ae8ffd2","created_at":"2023-11-27T10:46:24.207602042Z","version":{"version":"r124-c00e7ef","revision":"c00e7ef11","branch":"r124","buildUser":"","buildDate":"","goVersion":"go1.21.3"}} \ No newline at end of file diff --git a/monitoring/tempo/tempo.yaml b/services/monitoring/tempo/tempo.yaml similarity index 100% rename from monitoring/tempo/tempo.yaml rename to services/monitoring/tempo/tempo.yaml diff --git a/services/nginx/Dockerfile b/services/nginx/Dockerfile index 7a10574a4758f008fc99fc9a751868eee05f47fe..c87732c5ba562af7dac31974b62bc560a47faef1 100644 --- a/services/nginx/Dockerfile +++ b/services/nginx/Dockerfile @@ -1,7 +1,7 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/nginx:base_1.23.1 +FROM labs.etsi.org:5050/ocf/capif/nginx:1.27.1 RUN apt-get update && apt-get install -y jq && apt-get clean RUN apt-get install -y openssl -RUN apt-get install -y curl=7.74.0-1.3+deb11u3 +RUN apt-get install -y curl RUN apt-get -y install redis diff --git a/services/register/Dockerfile b/services/register/Dockerfile index 75357cd0d15fcaf10e62f1bec6610afbab208e03..bb03b219822ebcd8641e50013b0e6b84d72ece6e 100644 --- a/services/register/Dockerfile +++ b/services/register/Dockerfile @@ -1,13 +1,21 @@ -FROM public.ecr.aws/o2v4a8t6/opencapif/python:3-alpine +FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY requirements.txt /usr/src/app/requirements.txt -RUN apk add -U --no-cache gcc build-base linux-headers ca-certificates libffi-dev libressl-dev libxslt-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + build-essential \ + linux-headers-generic \ + ca-certificates \ + libffi-dev \ + libssl-dev \ + libxslt1-dev && \ + rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir -r requirements.txt -RUN apk add openssl jq curl redis +RUN apt-get update && apt-get install -y --no-install-recommends openssl curl redis #ENV CAPIF_PRIV_KEY = $CAPIF_PRIV_KEY diff --git a/services/register/register_service/app.py b/services/register/register_service/app.py index 53d4b0507b62499e100407043f44a952994442c8..5e9c9a450b8b5a574030eb2de3ef41e626e68923 100644 --- a/services/register/register_service/app.py +++ b/services/register/register_service/app.py @@ -1,14 +1,16 @@ +import json +import logging +import os + +import requests +from OpenSSL.crypto import PKey, TYPE_RSA, X509Req, dump_certificate_request, FILETYPE_PEM, dump_privatekey from flask import Flask -from controllers.register_controller import register_routes from flask_jwt_extended import JWTManager -from OpenSSL.crypto import PKey, TYPE_RSA, X509Req, dump_certificate_request, FILETYPE_PEM, dump_privatekey -import requests -import json + from config import Config +from controllers.register_controller import register_routes from db.db import MongoDatabse -import logging -import os app = Flask(__name__) diff --git a/services/register/register_service/config.py b/services/register/register_service/config.py index 97ab831fc7a69163163f7182f1f8c61bd9e3ffc4..2ac31772c592bd967935a873ae08d3ba2c0791fc 100644 --- a/services/register/register_service/config.py +++ b/services/register/register_service/config.py @@ -1,6 +1,8 @@ -import yaml import os +import yaml + + #Config class to get config class Config: def __init__(self): diff --git a/services/register/register_service/controllers/register_controller.py b/services/register/register_service/controllers/register_controller.py index a82998fb7166e9847f81afea9d9377a4f046ab37..ff3a5618349f3cb20a1172403b41aeb9e6a90797 100644 --- a/services/register/register_service/controllers/register_controller.py +++ b/services/register/register_service/controllers/register_controller.py @@ -1,16 +1,14 @@ #!/usr/bin/env python3 -from flask import current_app, Flask, jsonify, request, Blueprint +from datetime import datetime, timedelta +from functools import wraps -from core.register_operations import RegisterOperations +import jwt from config import Config - -from functools import wraps -from datetime import datetime, timedelta +from core.register_operations import RegisterOperations from db.db import MongoDatabse - +from flask import current_app, jsonify, request, Blueprint from flask_httpauth import HTTPBasicAuth -import jwt auth = HTTPBasicAuth() diff --git a/services/register/register_service/core/register_operations.py b/services/register/register_service/core/register_operations.py index 42627fd304b30322ee27a112405a5a5a2bc1da3d..937ce0bd068af2e4281d4aab5835510668c8267b 100644 --- a/services/register/register_service/core/register_operations.py +++ b/services/register/register_service/core/register_operations.py @@ -1,10 +1,12 @@ -from flask import jsonify, current_app -from flask_jwt_extended import create_access_token -from db.db import MongoDatabse +import os +import uuid from datetime import datetime -from config import Config + import requests -import uuid +from config import Config +from db.db import MongoDatabse +from flask import jsonify, current_app +from flask_jwt_extended import create_access_token class RegisterOperations: @@ -71,10 +73,12 @@ class RegisterOperations: mycol = self.db.get_col_by_name(self.db.capif_users) try: - + 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}" - requests.delete(url, cert=("certs/superadmin.crt", "certs/superadmin.key"), verify="certs/ca_root.crt") + 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"))) + 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") return jsonify(message="User removed successfully"), 204 diff --git a/services/register/register_service/db/db.py b/services/register/register_service/db/db.py index fdf448e5be3b675d585bccf141b8e2a6ffe67754..e1db51bd979abfdc185e9abb492cde05ddac410f 100644 --- a/services/register/register_service/db/db.py +++ b/services/register/register_service/db/db.py @@ -1,7 +1,8 @@ import time + +from config import Config from pymongo import MongoClient from pymongo.errors import AutoReconnect -from config import Config class MongoDatabse(): diff --git a/services/register/requirements.txt b/services/register/requirements.txt index bf3e52ccc89c836571bf47bda630499347c54259..1c1cb217ddd6a995353a26853f7df53bd2148e6b 100644 --- a/services/register/requirements.txt +++ b/services/register/requirements.txt @@ -1,5 +1,5 @@ python_dateutil >= 2.6.0 -setuptools == 68.2.2 +setuptools == 74.0.0 Flask == 3.0.3 pymongo == 4.7.3 flask_jwt_extended == 4.6.0 diff --git a/services/remove_users.sh b/services/remove_users.sh new file mode 100755 index 0000000000000000000000000000000000000000..7221981410fb101f4f5ec779142731d0b2d3db2a --- /dev/null +++ b/services/remove_users.sh @@ -0,0 +1,130 @@ +#!/bin/bash + +# User to remove +USERNAME_PREFIX= + +help() { + echo "Usage: $1 " + echo " -u : User prefix to use" + echo " -h : show this help" + exit 1 +} + +# Read params +while getopts ":u:h" opt; do + case $opt in + u) + USERNAME_PREFIX="$OPTARG" + ;; + h) + help + ;; + \?) + echo "Not valid option: -$OPTARG" >&2 + help + ;; + :) + echo "The -$OPTARG option requires an argument." >&2 + help + ;; + esac +done + +if [[ "$USERNAME_PREFIX" == "" ]] +then + echo "USERNAME_PREFIX must be set with option -u" + help + exit -1 +fi + +# Other Stuff +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 +cd .. +REPOSITORY_BASE_FOLDER=${PWD} +TEST_FOLDER=$REPOSITORY_BASE_FOLDER/tests +RESULT_FOLDER=$REPOSITORY_BASE_FOLDER/results +ROBOT_DOCKER_FILE_FOLDER=$REPOSITORY_BASE_FOLDER/tools/robot + +# nginx Hostname and http port (80 by default) to reach for tests +CAPIF_REGISTER=capifcore +CAPIF_REGISTER_PORT=8084 +CAPIF_HOSTNAME=capifcore +CAPIF_HTTP_PORT=8080 +CAPIF_HTTPS_PORT=443 + +# VAULT access configuration +CAPIF_VAULT=vault +CAPIF_VAULT_PORT=8200 +CAPIF_VAULT_TOKEN=read-ca-token + +# Mock Server +MOCK_SERVER_URL=http://mock-server:9100 +NOTIFICATION_DESTINATION_URL=$MOCK_SERVER_URL + +PLATFORM=$(uname -m) +if [ "x86_64" == "$PLATFORM" ]; then + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-amd64 +else + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-arm64 +fi + +# Show variables +echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" +echo "CAPIF_REGISTER = $CAPIF_REGISTER" +echo "CAPIF_HTTP_PORT = $CAPIF_HTTP_PORT" +echo "CAPIF_HTTPS_PORT = $CAPIF_HTTPS_PORT" +echo "CAPIF_VAULT = $CAPIF_VAULT" +echo "CAPIF_VAULT_PORT = $CAPIF_VAULT_PORT" +echo "CAPIF_VAULT_TOKEN = $CAPIF_VAULT_TOKEN" +echo "TOTAL_USERS=$TOTAL_USERS" +echo "USERNAME_PREFIX=$USERNAME_PREFIX" +echo "USER_PASSWORD=$USER_PASSWORD" +echo "MOCK_SERVER_URL=$MOCK_SERVER_URL" +echo "NOTIFICATION_DESTINATION_URL=$NOTIFICATION_DESTINATION_URL" +echo "DOCKER_ROBOT_IMAGE = $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION" + +docker >/dev/null 2>/dev/null +if [[ $? -ne 0 ]] +then + echo "Docker maybe is not installed. Please check if docker CLI is present." + exit -1 +fi + +docker pull $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION || echo "Docker image ($DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION) not present on repository" +docker images|grep -Eq '^'$DOCKER_ROBOT_IMAGE'[ ]+[ ]'$DOCKER_ROBOT_IMAGE_VERSION'' +if [[ $? -ne 0 ]] +then + read -p "Robot image is not present. To continue, Do you want to build it? (y/n)" build_robot_image + if [[ $build_robot_image == "y" ]] + then + echo "Building Robot docker image." + cd $ROBOT_DOCKER_FILE_FOLDER + docker build --no-cache -t $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION . + cd $REPOSITORY_BASE_FOLDER + else + exit -2 + fi +fi + +mkdir -p $RESULT_FOLDER + +docker run -ti --rm --network="host" \ + --add-host host.docker.internal:host-gateway \ + --add-host vault:host-gateway \ + --add-host register:host-gateway \ + --add-host mock-server:host-gateway \ + -v $TEST_FOLDER:/opt/robot-tests/tests \ + -v $RESULT_FOLDER:/opt/robot-tests/results ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ + --variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \ + --variable CAPIF_HTTP_PORT:$CAPIF_HTTP_PORT \ + --variable CAPIF_HTTPS_PORT:$CAPIF_HTTPS_PORT \ + --variable CAPIF_REGISTER:$CAPIF_REGISTER \ + --variable CAPIF_REGISTER_PORT:$CAPIF_REGISTER_PORT \ + --variable CAPIF_VAULT:$CAPIF_VAULT \ + --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 \ + --variable USERNAME_PREFIX:$USERNAME_PREFIX \ + --include remove-users diff --git a/services/run.sh b/services/run.sh index cf500a936202a281b3232992257e44fc582c9bb5..8a0094e6febdb0fa8ba3b3fbb8abfa959d3b4116 100755 --- a/services/run.sh +++ b/services/run.sh @@ -1,11 +1,16 @@ #!/bin/bash +# Directories variables setup (no modification needed) +export SERVICES_DIR=$(dirname "$(readlink -f "$0")") +export CAPIF_BASE_DIR=$(dirname "$SERVICES_DIR") + help() { echo "Usage: $1 " echo " -c : Setup different hostname for capif" echo " -s : Run Mock server" - echo " -m : Clean monitoring service" + echo " -m : Run monitoring service" echo " -l : Set Log Level (default DEBUG). Select one of: [CRITICAL, FATAL, ERROR, WARNING, WARN, INFO, DEBUG, NOTSET]" + echo " -r : Remove cached information on build" echo " -h : show this help" exit 1 } @@ -14,6 +19,7 @@ HOSTNAME=capifcore MONITORING_STATE=false DEPLOY=all LOG_LEVEL=DEBUG +CACHED_INFO="" # Needed to avoid write permissions on bind volumes with prometheus and grafana DUID=$(id -u) @@ -21,7 +27,7 @@ DGID=$(id -g) # Mock Server configuration IP=0.0.0.0 -PORT=9090 +PORT=9100 # Get docker compose version docker_version=$(docker compose version --short | cut -d',' -f1) @@ -35,7 +41,7 @@ else fi # Read params -while getopts ":c:l:msh" opt; do +while getopts ":c:l:mshr" opt; do case $opt in c) HOSTNAME="$OPTARG" @@ -52,6 +58,9 @@ while getopts ":c:l:msh" opt; do l) LOG_LEVEL="$OPTARG" ;; + r) + CACHED_INFO="--no-cache" + ;; \?) echo "Not valid option: -$OPTARG" >&2 help @@ -68,8 +77,8 @@ echo Nginx hostname will be $HOSTNAME, deploy $DEPLOY, monitoring $MONITORING_ST if [ "$MONITORING_STATE" == "true" ] ; then echo '***Monitoring set as true***' echo '***Creating Monitoring stack***' + DUID=$DUID DGID=$DGID docker compose -f "$SERVICES_DIR/monitoring/docker-compose.yml" up --detach --build $CACHED_INFO - DUID=$DUID DGID=$DGID docker compose -f "../monitoring/docker-compose.yml" up --detach status=$? if [ $status -eq 0 ]; then echo "*** Monitoring Stack Runing ***" @@ -81,7 +90,7 @@ fi docker network create capif-network -docker compose -f "docker-compose-vault.yml" up --detach --build +docker compose -f "$SERVICES_DIR/docker-compose-vault.yml" up --detach --build $CACHED_INFO status=$? if [ $status -eq 0 ]; then @@ -91,7 +100,7 @@ else exit $status fi -CAPIF_HOSTNAME=$HOSTNAME MONITORING=$MONITORING_STATE LOG_LEVEL=$LOG_LEVEL docker compose -f "docker-compose-capif.yml" up --detach --build +CAPIF_HOSTNAME=$HOSTNAME MONITORING=$MONITORING_STATE LOG_LEVEL=$LOG_LEVEL docker compose -f "$SERVICES_DIR/docker-compose-capif.yml" up --detach --build $CACHED_INFO status=$? if [ $status -eq 0 ]; then @@ -101,9 +110,8 @@ else exit $status fi - CAPIF_PRIV_KEY_BASE_64=$(echo "$(cat nginx/certs/server.key)") -CAPIF_PRIV_KEY=$CAPIF_PRIV_KEY_BASE_64 LOG_LEVEL=$LOG_LEVEL docker compose -f "docker-compose-register.yml" up --detach --build +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 status=$? if [ $status -eq 0 ]; then @@ -117,7 +125,7 @@ if [ "$ROBOT_MOCK_SERVER" == "true" ] ; then echo '***Robot Mock Server set as true***' echo '***Creating Robot Mock Server stack***' - IP=$IP PORT=$PORT docker compose -f "docker-compose-mock-server.yml" up --detach + IP=$IP PORT=$PORT docker compose -f "$SERVICES_DIR/docker-compose-mock-server.yml" up --detach --build $CACHED_INFO status=$? if [ $status -eq 0 ]; then echo "*** Monitoring Stack Runing ***" diff --git a/services/run_capif_tests.sh b/services/run_capif_tests.sh index f0a3f07abeab4f238a8c720c0d6524fe285b0ca9..65749bf3f9514fae2ead580962777a1292a0cf76 100755 --- a/services/run_capif_tests.sh +++ b/services/run_capif_tests.sh @@ -1,34 +1,34 @@ #!/bin/bash -timestamp=$(date +"%Y%m%d_%H%M%S") -DOCKER_ROBOT_IMAGE=dockerhub.hi.inet/5ghacking/5gnow-robot-test-image -DOCKER_ROBOT_IMAGE_VERSION=4.0 +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 cd .. REPOSITORY_BASE_FOLDER=${PWD} TEST_FOLDER=$REPOSITORY_BASE_FOLDER/tests -RESULT_FOLDER=$REPOSITORY_BASE_FOLDER/results/$timestamp +RESULT_FOLDER=$REPOSITORY_BASE_FOLDER/results ROBOT_DOCKER_FILE_FOLDER=$REPOSITORY_BASE_FOLDER/tools/robot # nginx Hostname and http port (80 by default) to reach for tests -# CAPIF_REGISTER=registercapif.mobilesandbox.cloud CAPIF_REGISTER=capifcore -# CAPIF_REGISTER_PORT=37211 CAPIF_REGISTER_PORT=8084 -# CAPIF_HOSTNAME=capif.mobilesandbox.cloud CAPIF_HOSTNAME=capifcore CAPIF_HTTP_PORT=8080 CAPIF_HTTPS_PORT=443 # VAULT access configuration -# CAPIF_VAULT=vault.5gnacar.int CAPIF_VAULT=vault CAPIF_VAULT_PORT=8200 -# CAPIF_VAULT_TOKEN=dev-only-token -CAPIF_VAULT_TOKEN=read-ca-token +CAPIF_VAULT_TOKEN=dev-only-token +MOCK_SERVER_URL=http://mock-server:9100 +NOTIFICATION_DESTINATION_URL=http://mock-server:9100 -MOCK_SERVER_URL=http://mock-server:9090 - +PLATFORM=$(uname -m) +if [ "x86_64" == "$PLATFORM" ]; then + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-amd64 +else + DOCKER_ROBOT_IMAGE_VERSION=$DOCKER_ROBOT_IMAGE_VERSION-arm64 +fi echo "CAPIF_HOSTNAME = $CAPIF_HOSTNAME" echo "CAPIF_REGISTER = $CAPIF_REGISTER" @@ -38,6 +38,14 @@ echo "CAPIF_VAULT = $CAPIF_VAULT" echo "CAPIF_VAULT_PORT = $CAPIF_VAULT_PORT" echo "CAPIF_VAULT_TOKEN = $CAPIF_VAULT_TOKEN" echo "MOCK_SERVER_URL = $MOCK_SERVER_URL" +echo "DOCKER_ROBOT_IMAGE = $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION" + +INPUT_OPTIONS=$@ +# Check if input is provided +if [ -z "$1" ]; then + # Set default value if no input is provided + INPUT_OPTIONS="--include all" +fi docker >/dev/null 2>/dev/null if [[ $? -ne 0 ]] @@ -46,6 +54,7 @@ then exit -1 fi +docker pull $DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION || echo "Docker image ($DOCKER_ROBOT_IMAGE:$DOCKER_ROBOT_IMAGE_VERSION) not present on repository" docker images|grep -Eq '^'$DOCKER_ROBOT_IMAGE'[ ]+[ ]'$DOCKER_ROBOT_IMAGE_VERSION'' if [[ $? -ne 0 ]] then @@ -68,6 +77,8 @@ docker run -ti --rm --network="host" \ --add-host vault:host-gateway \ --add-host register:host-gateway \ --add-host mock-server:host-gateway \ + --add-host $CAPIF_HOSTNAME:host-gateway \ + --add-host $CAPIF_REGISTER:host-gateway \ -v $TEST_FOLDER:/opt/robot-tests/tests \ -v $RESULT_FOLDER:/opt/robot-tests/results ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ --variable CAPIF_HOSTNAME:$CAPIF_HOSTNAME \ @@ -78,4 +89,5 @@ docker run -ti --rm --network="host" \ --variable CAPIF_VAULT:$CAPIF_VAULT \ --variable CAPIF_VAULT_PORT:$CAPIF_VAULT_PORT \ --variable CAPIF_VAULT_TOKEN:$CAPIF_VAULT_TOKEN \ - --variable MOCK_SERVER_URL:$MOCK_SERVER_URL $@ + --variable NOTIFICATION_DESTINATION_URL:$NOTIFICATION_DESTINATION_URL \ + --variable MOCK_SERVER_URL:$MOCK_SERVER_URL $INPUT_OPTIONS diff --git a/services/run_mock_server.sh b/services/run_mock_server.sh index 5a194c469371de592d4f63ec5e8bbfc59598489c..c7393861a7b7e3e96cc10d2e80a5b7a196c5b767 100755 --- a/services/run_mock_server.sh +++ b/services/run_mock_server.sh @@ -1,15 +1,19 @@ #!/bin/bash +# Directories variables setup (no modification needed) +export SERVICES_DIR=$(dirname "$(readlink -f "$0")") +export CAPIF_BASE_DIR=$(dirname "$SERVICES_DIR") + help() { echo "Usage: $1 " echo " -i : Setup different host ip for mock server (default 0.0.0.0)" - echo " -p : Setup different port for mock server (default 9090)" + echo " -p : Setup different port for mock server (default 9100)" echo " -h : show this help" exit 1 } IP=0.0.0.0 -PORT=9090 +PORT=9100 # Read params while getopts ":i:p:h" opt; do @@ -36,7 +40,9 @@ done echo Robot Framework Mock Server will listen on $IP:$PORT -IP=$IP PORT=$PORT docker compose -f "docker-compose-mock-server.yml" up --detach --build +docker network create capif-network || echo "capif-network previously created on docker networks" + +IP=$IP PORT=$PORT docker compose -f "$SERVICES_DIR/docker-compose-mock-server.yml" up --detach --build status=$? if [ $status -eq 0 ]; then diff --git a/services/show_logs.sh b/services/show_logs.sh index c2bcf52d90607d3da9364c11c44c99d4bf209071..7a4c807b20638893efa3089f1cc3cd3455067ce2 100755 --- a/services/show_logs.sh +++ b/services/show_logs.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Directories variables setup (no modification needed) +export SERVICES_DIR=$(dirname "$(readlink -f "$0")") + help() { echo "Usage: $0 " echo " -c : Show capif services" @@ -13,6 +16,10 @@ help() { exit 1 } +MONITORING_STATE=false +LOG_LEVEL=DEBUG +CAPIF_PRIV_KEY_BASE_64=$(echo "$(cat nginx/certs/server.key)") + if [[ $# -lt 1 ]] then echo "You must specify an option before run script." @@ -23,32 +30,36 @@ FILES=() echo "${FILES[@]}" FOLLOW="" +# Needed to avoid write permissions on bind volumes with prometheus and grafana +DUID=$(id -u) +DGID=$(id -g) + # Read params while getopts "cvrahmfs" opt; do case $opt in c) echo "Show Capif services" - FILES+=("-f docker-compose-capif.yml") + FILES+=("-f $SERVICES_DIR/docker-compose-capif.yml") ;; v) echo "Show vault service" - FILES+=("-f docker-compose-vault.yml") + FILES+=("-f $SERVICES_DIR/docker-compose-vault.yml") ;; r) echo "Show register service" - FILES+=("-f docker-compose-register.yml") + FILES+=("-f $SERVICES_DIR/docker-compose-register.yml") ;; s) echo "Show Mock Server service" - FILES+=("-f docker-compose-mock-server.yml") + FILES+=("-f $SERVICES_DIR/docker-compose-mock-server.yml") ;; m) echo "Show monitoring service" - FILES+=("-f ../monitoring/docker-compose.yml") + FILES+=("-f $SERVICES_DIR/monitoring/docker-compose.yml") ;; a) echo "Show all services" - FILES=("-f docker-compose-capif.yml" -f "docker-compose-vault.yml" -f "docker-compose-register.yml" -f "docker-compose-mock-server.yml" -f "../monitoring/docker-compose.yml") + FILES=("-f $SERVICES_DIR/docker-compose-capif.yml" -f "$SERVICES_DIR/docker-compose-vault.yml" -f "$SERVICES_DIR/docker-compose-register.yml" -f "$SERVICES_DIR/docker-compose-mock-server.yml" -f "$SERVICES_DIR/monitoring/docker-compose.yml") ;; f) echo "Setup follow logs" @@ -82,5 +93,5 @@ else help fi -docker compose ${FILES[@]} logs ${FOLLOW} +MONITORING=$MONITORING_STATE LOG_LEVEL=$LOG_LEVEL CAPIF_PRIV_KEY=$CAPIF_PRIV_KEY_BASE_64 DUID=$DUID DGID=$DGID docker compose ${FILES[@]} logs ${FOLLOW} diff --git a/services/vault/Dockerfile b/services/vault/Dockerfile index 0eced912f088adee63778217b87ab3a7d1a846b1..ebf61f5dffc5cc0ae8f8178adac90d889c4b49d4 100644 --- a/services/vault/Dockerfile +++ b/services/vault/Dockerfile @@ -1,4 +1,4 @@ -FROM vault:1.13.2 +FROM labs.etsi.org:5050/ocf/capif/vault:1.13.2 # Instalar paquetes adicionales RUN apk add --no-cache jq openssl diff --git a/tests/features/Api Status/__init__.robot b/tests/features/Api Status/__init__.robot new file mode 100644 index 0000000000000000000000000000000000000000..9ac8f7a0a2ad301e48cae91c396ca768db4b5548 --- /dev/null +++ b/tests/features/Api Status/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Force Tags api_status \ No newline at end of file diff --git a/tests/features/Api Status/api_status.robot b/tests/features/Api Status/api_status.robot new file mode 100644 index 0000000000000000000000000000000000000000..9e9f92f9a7cccaa4010502e9e13810b177670a20 --- /dev/null +++ b/tests/features/Api Status/api_status.robot @@ -0,0 +1,1797 @@ +*** 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 *** +Publish without apiStatus feature receive eventDetails with serviceAPIDescription + [Tags] api_status-1 mockserver smoke + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Not Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish without apiStatus feature receive eventDetails without serviceAPIDescription + [Tags] api_status-2 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=4 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Not Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${FALSE} + ... service_api_description=${service_api_description_published} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish without apiStatus feature receive eventDetails without eventDetails (apiMonitoringStatus active) + [Tags] api_status-3 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=8 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Not Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${FALSE} + ... service_api_description_expected=${FALSE} + ... service_api_description=${service_api_description_published} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish without apiStatus feature receive eventDetails without eventDetails + [Tags] api_status-4 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=0 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Not Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${FALSE} + ... service_api_description_expected=${FALSE} + ... service_api_description=${service_api_description_published} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish with apiStatus present but apiStatusMonitoring inactive receive bad Request + [Tags] api_status-5 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${resp} ${request_body}= Publish Service Api Request + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=000 + + Check Response Variable Type And Values + ... ${resp} + ... 400 + ... ProblemDetails + ... title=Bad Request + ... status=400 + ... detail=Set apiStatus with apiStatusMonitoring feature inactive at supportedFeatures if not allowed + ... cause=apiStatus can't be set if apiStatusMonitoring is inactive + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values + ... ${resp} + ... 404 + ... ProblemDetails + ... title=Not Found + ... status=404 + ... detail=API Invoker ${register_user_info_invoker['api_invoker_id']} has no API Published that accomplish filter conditions + ... cause=No API Published accomplish filter conditions + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${events_expected}= Create List + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish with apiStatus feature active receive eventDetails with serviceAPIDescription + [Tags] api_status-6 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish with apiStatus active feature receive eventDetails without serviceAPIDescription + [Tags] api_status-7 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=4 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${FALSE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish with apiStatus active feature receive eventDetails without eventDetails with apiStatus (apiMonitoringStatus active) + [Tags] api_status-8 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=8 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${FALSE} + ... service_api_description_expected=${FALSE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish with apiStatus active feature receive eventDetails without eventDetails + [Tags] api_status-9 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=0 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${FALSE} + ... service_api_description_expected=${FALSE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish with apiStatus feature active no aefId active receive eventDetails with serviceAPIDescription with apiStatus empty array + [Tags] api_status-10 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + ${aef_ids_empty_array}= Create List + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_ids_empty_array} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Publish with apiStatus not present but apiStatusMonitoring feature active receive eventDetails with serviceAPIDescription without apiStatus + [Tags] api_status-11 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${NONE} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Not Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Update published API without apiStatus and apiStatusMonitoring inactive + [Tags] api_status-12 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE SERVICE_API_UPDATE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + + # Update Request to published API + ${service_api_description_modified}= Create Service Api Description + ... service_1 + ... aef_id=${aef_ids} + ... supported_features=000 + ... api_status=${NONE} + ${resp}= Put Request Capif + ... ${resource_url.path} + ... json=${service_api_description_modified} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + ... apiName=service_1 + Dictionary Should Not Contain Key ${resp.json()} apiStatus + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ${events_expected}= Create Expected Service Update Event + ... subscription_id=${subscription_id} + ... service_api_resource=${resource_url} + ... service_api_descriptions=${service_api_description_modified} + ... events_expected=${events_expected} + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Update published API with apiStatus empty and apiStatusMonitoring inactive + [Tags] api_status-13 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE SERVICE_API_UPDATE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + + # Update Request to published API + ${aef_empty_list}= Create List + ${service_api_description_modified}= Create Service Api Description + ... service_1 + ... aef_id=${aef_ids} + ... supported_features=000 + ... api_status=${aef_empty_list} + ${resp}= Put Request Capif + ... ${resource_url.path} + ... json=${service_api_description_modified} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Check Response Variable Type And Values + ... ${resp} + ... 400 + ... ProblemDetails + ... title=Bad Request + ... status=400 + ... detail=Set apiStatus with apiStatusMonitoring feature inactive at supportedFeatures if not allowed + ... cause=apiStatus can't be set if apiStatusMonitoring is inactive + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Update published API with apiStatus empty and apiStatusMonitoring active + [Tags] api_status-14 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + ${aef_empty_list}= Create List + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE SERVICE_API_UPDATE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + + # Update Request to published API + ${service_api_description_modified}= Create Service Api Description + ... service_1 + ... aef_id=${aef_ids} + ... supported_features=20 + ... api_status=${aef_empty_list} + ${resp}= Put Request Capif + ... ${resource_url.path} + ... json=${service_api_description_modified} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + ... apiName=service_1 + Dictionary Should Contain Key ${resp.json()} apiStatus + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + Log List ${events_expected} + + ${events_expected}= Create Expected Service Update Event + ... subscription_id=${subscription_id} + ... service_api_resource=${resource_url} + ... service_api_descriptions=${service_api_description_modified} + ... events_expected=${events_expected} + Log List ${events_expected} + + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_modified} + ... events_expected=${events_expected} + Log List ${events_expected} + + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Update published API with apiStatus only aef2 and apiStatusMonitoring active + [Tags] api_status-15 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE SERVICE_API_UPDATE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + + # Update Request to published API + ${service_api_description_modified}= Create Service Api Description + ... service_1 + ... aef_id=${aef_ids} + ... supported_features=20 + ... api_status=${aef_id_2} + ${resp}= Put Request Capif + ... ${resource_url.path} + ... json=${service_api_description_modified} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + ... apiName=service_1 + Dictionary Should Contain Key ${resp.json()} apiStatus + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + Log List ${events_expected} + + ${events_expected}= Create Expected Service Update Event + ... subscription_id=${subscription_id} + ... service_api_resource=${resource_url} + ... service_api_descriptions=${service_api_description_modified} + ... events_expected=${events_expected} + Log List ${events_expected} + + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Published API without aefs available updated to one aef available + [Tags] api_status-16 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + ${aef_empty_list}= Create List + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE SERVICE_API_UPDATE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_empty_list} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Contain Key ${resp.json()['serviceAPIDescriptions'][0]} apiStatus + + # Update Request to published API + ${service_api_description_modified}= Create Service Api Description + ... service_1 + ... aef_id=${aef_ids} + ... supported_features=20 + ... api_status=${aef_id_2} + ${resp}= Put Request Capif + ... ${resource_url.path} + ... json=${service_api_description_modified} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + ... apiName=service_1 + Dictionary Should Contain Key ${resp.json()} apiStatus + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + Log List ${events_expected} + + ${events_expected}= Create Expected Service Update Event + ... subscription_id=${subscription_id} + ... service_api_resource=${resource_url} + ... service_api_descriptions=${service_api_description_modified} + ... events_expected=${events_expected} + Log List ${events_expected} + + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_modified} + ... events_expected=${events_expected} + Log List ${events_expected} + + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Patch published (apiStatusMonitoring active) API with apiStatus only aefId2 + [Tags] api_status-17 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE SERVICE_API_UPDATE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + + # Update Request to published API + ${aef_empty_list}= Create List + ${service_api_description_patch}= Create Service Api Description Patch + ... api_status=${aef_id_2} + Check Variable ${service_api_description_patch} ServiceAPIDescriptionPatch + ${resp}= Patch Request Capif + ... ${resource_url.path} + ... json=${service_api_description_patch} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + ${service_api_to_check}= Copy Dictionary ${service_api_description_published} deepcopy=${True} + ${aef_ids_expected}= Create List ${aef_id_2} + ${api_status_expected}= Create dictionary aefIds=${aef_ids_expected} + Set To Dictionary ${service_api_to_check} apiStatus=${api_status_expected} + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + ... apiName=service_1 + + Dictionary Should Contain Key ${resp.json()} apiStatus + + Dictionaries Should Be Equal ${resp.json()['apiStatus']} ${service_api_description_patch['apiStatus']} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ${events_expected}= Create Expected Service Update Event + ... subscription_id=${subscription_id} + ... service_api_resource=${resource_url} + ... service_api_descriptions=${service_api_to_check} + ... events_expected=${events_expected} + + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Patch published (apiStatusMonitoring active) API with apiStatus aef1 and aef2 + [Tags] api_status-18 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE SERVICE_API_UPDATE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + + # Update Request to published API + ${aef_empty_list}= Create List + ${service_api_description_patch}= Create Service Api Description Patch + ... api_status=${aef_ids} + ${resp}= Patch Request Capif + ... ${resource_url.path} + ... json=${service_api_description_patch} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + ${service_api_to_check}= Copy Dictionary ${service_api_description_published} deepcopy=${True} + ${api_status_expected}= Create dictionary aefIds=${aef_ids} + Set To Dictionary ${service_api_to_check} apiStatus=${api_status_expected} + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + ... apiName=service_1 + + Dictionary Should Contain Key ${resp.json()} apiStatus + + Dictionaries Should Be Equal ${resp.json()['apiStatus']} ${service_api_description_patch['apiStatus']} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + + Log List ${events_expected} + ${events_expected}= Create Expected Service Update Event + ... subscription_id=${subscription_id} + ... service_api_resource=${resource_url} + ... service_api_descriptions=${service_api_to_check} + ... events_expected=${events_expected} + + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Patch published (apiStatusMonitoring inactive) API with apiStatus aefId1 and aefId2 + [Tags] api_status-19 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE SERVICE_API_UPDATE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${resp} ${request_body}= Publish Service Api Request + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_id_1} + ... supported_features=000 + + Check Response Variable Type And Values + ... ${resp} + ... 400 + ... ProblemDetails + ... title=Bad Request + ... status=400 + ... detail=Set apiStatus with apiStatusMonitoring feature inactive at supportedFeatures if not allowed + ... cause=apiStatus can't be set if apiStatusMonitoring is inactive + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values + ... ${resp} + ... 404 + ... ProblemDetails + ... title=Not Found + ... status=404 + ... detail=API Invoker ${register_user_info_invoker['api_invoker_id']} has no API Published that accomplish filter conditions + ... cause=No API Published accomplish filter conditions + + # Check Event Notifications + ${events_expected}= Create List + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Patch published without aefs available API with apiStatus only aef2 + [Tags] api_status-20 mockserver + + # Initialize Mock server + Init Mock Server + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Register APF + ${register_user_info_provider}= Provider Default Registration total_aef_roles=2 + + ${aef_id_1}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}']['aef_id']} + ${aef_id_2}= Set Variable ${register_user_info_provider['aef_roles']['${AEF_PROVIDER_USERNAME}_1']['aef_id']} + ${aef_ids}= Create List ${aef_id_1} ${aef_id_2} + ${aef_ids_empty_array}= Create List + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE SERVICE_API_UPDATE + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=C + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Publish api with 2 aefIds + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_1 + ... aef_id=${aef_ids} + ... api_status=${aef_ids_empty_array} + ... supported_features=020 + + # Discover APIs by invoker + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${aef_id_1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + Dictionary Should Not Contain Key ${resp.json()} apiStatus + + # Update Request to published API + ${service_api_description_patch}= Create Service Api Description Patch + ... api_status=${aef_ids} + ${resp}= Patch Request Capif + ... ${resource_url.path} + ... json=${service_api_description_patch} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + ${service_api_to_check}= Copy Dictionary ${service_api_description_published} deepcopy=${True} + ${api_status_expected}= Create dictionary aefIds=${aef_ids} + Set To Dictionary ${service_api_to_check} apiStatus=${api_status_expected} + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + ... apiName=service_1 + + Dictionary Should Contain Key ${resp.json()} apiStatus + + Dictionaries Should Be Equal ${resp.json()['apiStatus']} ${service_api_description_patch['apiStatus']} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url} + ${service_api_unavailable_resources}= Create List ${resource_url} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_description_published} + Log List ${events_expected} + + ${events_expected}= Create Expected Service Update Event + ... subscription_id=${subscription_id} + ... service_api_resource=${resource_url} + ... service_api_descriptions=${service_api_to_check} + ... events_expected=${events_expected} + Log List ${events_expected} + + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... event_detail_expected=${TRUE} + ... service_api_description_expected=${TRUE} + ... service_api_description=${service_api_to_check} + ... events_expected=${events_expected} + Log List ${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} diff --git a/tests/features/CAPIF Api Access Control Policy/capif_api_access_control_policy.robot b/tests/features/CAPIF Api Access Control Policy/capif_api_access_control_policy.robot index cd497841ec3a381ef7ec390aebab4a6f8eb691a0..05716c20a5c3c846ccc649300183597f7f3d36f8 100644 --- a/tests/features/CAPIF Api Access Control Policy/capif_api_access_control_policy.robot +++ b/tests/features/CAPIF Api Access Control Policy/capif_api_access_control_policy.robot @@ -14,13 +14,12 @@ Test Teardown Reset Testing Environment ${APF_ID_NOT_VALID} apf-example ${SERVICE_API_ID_NOT_VALID} not-valid ${API_INVOKER_NOT_VALID} not-valid -${NOTIFICATION_DESTINATION} http://robot.testing:1080 ${AEF_ID_NOT_VALID} not-valid *** Test Cases *** Retrieve ACL - [Tags] capif_api_acl-1 + [Tags] capif_api_acl-1 smoke # Register APF ${register_user_info_provider}= Provider Default Registration @@ -75,7 +74,7 @@ Retrieve ACL ... username=${AEF_PROVIDER_USERNAME} Check Response Variable Type And Values ${resp} 200 AccessControlPolicyList - + Sleep 30s # Check returned values Should Not Be Empty ${resp.json()['apiInvokerPolicies']} Length Should Be ${resp.json()['apiInvokerPolicies']} 1 @@ -259,7 +258,7 @@ Retrieve ACL with security context created by two different Invokers Should Be True ${API_INVOKER_2_PRESENT}==${True} Retrieve ACL filtered by api-invoker-id - [Tags] capif_api_acl-4 + [Tags] capif_api_acl-4 smoke # Register APF ${register_user_info_provider}= Provider Default Registration @@ -527,7 +526,7 @@ Retrieve ACL with AMF Certificate ... cause=Certificate not authorized Retrieve ACL with Invoker Certificate - [Tags] capif_api_acl-13 + [Tags] capif_api_acl-13 smoke ${register_user_info_invoker} ... ${register_user_info_provider} ... ${service_api_description_published}= diff --git a/tests/features/CAPIF Api Auditing Service/capif_auditing_api.robot b/tests/features/CAPIF Api Auditing Service/capif_auditing_api.robot index d850a5793a5b99f9bf96dfd7dd6a9d1f10ea994a..41669f90a53dd5ad5ef1c8799168b4dc68ec6888 100644 --- a/tests/features/CAPIF Api Auditing Service/capif_auditing_api.robot +++ b/tests/features/CAPIF Api Auditing Service/capif_auditing_api.robot @@ -14,7 +14,6 @@ Test Teardown Reset Testing Environment ${AEF_ID_NOT_VALID} aef-example ${SERVICE_API_ID_NOT_VALID} not-valid ${API_INVOKER_NOT_VALID} not-valid -${NOTIFICATION_DESTINATION} http://robot.testing:1080 ${API_VERSION_VALID} v1 ${API_VERSION_NOT_VALID} v58 @@ -131,7 +130,7 @@ Get a log entry withut aefid and apiInvokerId ... cause=Mandatory parameters missing Get Log Entry with apiVersion filter - [Tags] capif_api_auditing_service-4 + [Tags] capif_api_auditing_service-4 smoke # Register APF ${register_user_info}= Provider Default Registration diff --git a/tests/features/CAPIF Api Discover Service/capif_api_service_discover.robot b/tests/features/CAPIF Api Discover Service/capif_api_service_discover.robot index e780526ce82217446018c8d06aa5fd545eae34d1..bbfcffdf8a6469f3ed5ea2b9b5a32ade94e1fd86 100644 --- a/tests/features/CAPIF Api Discover Service/capif_api_service_discover.robot +++ b/tests/features/CAPIF Api Discover Service/capif_api_service_discover.robot @@ -90,7 +90,7 @@ Discover Published service APIs by not registered API Invoker ... cause=API Invoker id not found Discover Published service APIs by registered API Invoker with 1 result filtered - [Tags] capif_api_discover_service-4 + [Tags] capif_api_discover_service-4 smoke # Register APF ${register_user_info}= Provider Default Registration @@ -138,7 +138,7 @@ Discover Published service APIs by registered API Invoker with 1 result filtered List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published_1} Discover Published service APIs by registered API Invoker filtered with no match - [Tags] capif_api_discover_service-5 + [Tags] capif_api_discover_service-5 smoke # Register APF ${register_user_info}= Provider Default Registration diff --git a/tests/features/CAPIF Api Events/capif_events_api.robot b/tests/features/CAPIF Api Events/capif_events_api.robot index fdec6a935ef0baf5386597f91a655d1a57f79e31..9f8b4e23a00c272fa4b8cfdc80d77b3e71e24177 100644 --- a/tests/features/CAPIF Api Events/capif_events_api.robot +++ b/tests/features/CAPIF Api Events/capif_events_api.robot @@ -19,7 +19,7 @@ ${SUBSCRIPTION_ID_NOT_VALID} not-valid *** Test Cases *** Creates a new individual CAPIF Event Subscription - [Tags] capif_api_events-1 + [Tags] capif_api_events-1 smoke # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding @@ -141,7 +141,7 @@ Deletes an individual CAPIF Event Subscription with invalid SubscriptionId ... cause=You are not the owner of this resource Invoker receives Service API Invocation events - [Tags] capif_api_events-6 mockserver + [Tags] capif_api_events-6 mockserver smoke # Initialize Mock server Init Mock Server @@ -171,8 +171,9 @@ Invoker receives Service API Invocation events ${request_body}= Create Events Subscription ... events=@{events_list} - ... notificationDestination=${MOCK_SERVER_URL}/testing - ... eventFilters=${event_filters} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... event_filters=${event_filters} + ... supported_features=4 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} @@ -209,7 +210,7 @@ Invoker receives Service API Invocation events ... ${subscription_id} ... ${request_body} ## Check Events Expected towards received notifications at mock server - Check Mock Server Notification Events ${events_expected} + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} Invoker subscribe to Service API Available and Unavailable events [Tags] capif_api_events-7 mockserver @@ -243,8 +244,9 @@ Invoker subscribe to Service API Available and Unavailable events ${request_body}= Create Events Subscription ... events=@{events_list} - ... notificationDestination=${MOCK_SERVER_URL}/testing - ... eventFilters=${event_filters} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... event_filters=${event_filters} + ... supported_features=4 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} @@ -278,8 +280,9 @@ Invoker subscribe to Service API Available and Unavailable events ... subscription_id=${subscription_id} ... service_api_available_resources=${service_api_available_resources} ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${TRUE} ## Check Events Expected towards received notifications at mock server - Check Mock Server Notification Events ${events_expected} + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} Invoker subscribe to Service API Update [Tags] capif_api_events-8 mockserver @@ -313,8 +316,9 @@ Invoker subscribe to Service API Update ${request_body}= Create Events Subscription ... events=@{events_list} - ... notificationDestination=${MOCK_SERVER_URL}/testing - ... eventFilters=${event_filters} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... event_filters=${event_filters} + ... supported_features=4 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} @@ -340,9 +344,12 @@ Invoker subscribe to Service API Update # Check Event Notifications ## Create check Events to ensure all notifications were received - ${events_expected}= Create Expected Service Update Event ${subscription_id} ${resource_url} ${service_api_description_modified} + ${events_expected}= Create Expected Service Update Event + ... ${subscription_id} + ... ${resource_url} + ... ${service_api_description_modified} ## Check Events Expected towards received notifications at mock server - Check Mock Server Notification Events ${events_expected} + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} Provider subscribe to API Invoker events [Tags] capif_api_events-9 mockserver @@ -357,7 +364,8 @@ Provider subscribe to API Invoker events ${events_list}= Create List API_INVOKER_ONBOARDED API_INVOKER_UPDATED API_INVOKER_OFFBOARDED ${request_body}= Create Events Subscription ... events=@{events_list} - ... notificationDestination=${MOCK_SERVER_URL}/testing + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=4 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} @@ -407,10 +415,10 @@ Provider subscribe to API Invoker events ... ${subscription_id} ... ${register_user_info_invoker['api_invoker_id']} ## Check Events Expected towards received notifications at mock server - Check Mock Server Notification Events ${events_expected} + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} Invoker subscribed to ACL update event - [Tags] capif_api_events-10 mockserver + [Tags] capif_api_events-10 mockserver smoke # Initialize Mock server Init Mock Server @@ -432,7 +440,8 @@ Invoker subscribed to ACL update event ${events_list}= Create List ACCESS_CONTROL_POLICY_UPDATE ${request_body}= Create Events Subscription ... events=@{events_list} - ... notificationDestination=${MOCK_SERVER_URL}/testing + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=4 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} @@ -491,7 +500,7 @@ Invoker subscribed to ACL update event ... ${service_api_id} ... ${api_invoker_policies} ## Check Events Expected towards received notifications at mock server - Check Mock Server Notification Events ${events_expected} + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} Provider receives an ACL unavailable event when invoker remove Security Context. [Tags] capif_api_events-11 mockserver @@ -516,7 +525,8 @@ Provider receives an ACL unavailable event when invoker remove Security Context. ${events_list}= Create List ACCESS_CONTROL_POLICY_UNAVAILABLE ${request_body}= Create Events Subscription ... events=@{events_list} - ... notificationDestination=${MOCK_SERVER_URL}/testing + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=4 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} @@ -565,10 +575,10 @@ Provider receives an ACL unavailable event when invoker remove Security Context. ## Create check Events to ensure all notifications were received ${events_expected}= Create Expected Access Control Policy Unavailable ${subscription_id} ## Check Events Expected towards received notifications at mock server - Check Mock Server Notification Events ${events_expected} + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} Invoker receives an Invoker Authorization Revoked and ACL unavailable event when Provider revoke Invoker Authorization. - [Tags] capif_api_events-12 mockserver + [Tags] capif_api_events-12 mockserver smoke # Initialize Mock server Init Mock Server @@ -590,7 +600,8 @@ Invoker receives an Invoker Authorization Revoked and ACL unavailable event when ${events_list}= Create List ACCESS_CONTROL_POLICY_UNAVAILABLE API_INVOKER_AUTHORIZATION_REVOKED ${request_body}= Create Events Subscription ... events=@{events_list} - ... notificationDestination=${MOCK_SERVER_URL}/testing + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=4 ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} @@ -649,155 +660,554 @@ Invoker receives an Invoker Authorization Revoked and ACL unavailable event when ... ${subscription_id} ... events_expected=${events_expected} ## Check Events Expected towards received notifications at mock server - Check Mock Server Notification Events ${events_expected} - - -*** Keywords *** -Create Events From InvocationLogs - [Arguments] ${subscription_id} ${invocation_log} ${events_expected}=${NONE} - IF ${events_expected} == ${NONE} - ${events_expected}= Create List - END - - # Now we create the expected events received at notification server according to logs sent to loggin service in order to check if all are present. - ${invocation_log_base}= Copy Dictionary ${invocation_log} deepcopy=True - # Store log array because each log will be notified in one Event Notification - ${invocation_log_logs}= Copy List ${invocation_log_base['logs']} - # Remove logs array from invocationLog data - Remove From Dictionary ${invocation_log_base} logs - - FOR ${log} IN @{invocation_log_logs} - Log Dictionary ${log} - ${invocation_logs}= Copy Dictionary ${invocation_log_base} deepcopy=True - - # Get Event Enum for this result - ${event_enum}= Set Variable - IF ${log['result']} >= 200 and ${log['result']} < 300 - ${event_enum}= Set Variable SERVICE_API_INVOCATION_SUCCESS - ELSE - ${event_enum}= Set Variable SERVICE_API_INVOCATION_FAILURE - END - # Create a log array with only one component - ${log_list}= Create List ${log} - # Setup logs array with previously created list - Set To Dictionary ${invocation_logs} logs=${log_list} - ${event_expected}= Create Notification Event ${subscription_id} ${event_enum} invocationLogs=${invocation_logs} - Append To List ${events_expected} ${event_expected} - END - - RETURN ${events_expected} -Create Expected Events For Service API Notifications - [Arguments] - ... ${subscription_id} - ... ${service_api_available_resources}=${NONE} - ... ${service_api_unavailable_resources}=${NONE} - ... ${events_expected}=${NONE} - - IF ${events_expected} == ${NONE} - ${events_expected}= Create List - END - - FOR ${service_api_available_resource} IN @{service_api_available_resources} - Log ${service_api_available_resource} - ${api_id}= Fetch From Right ${service_api_available_resource.path} / - ${event_expected}= Create Notification Event - ... ${subscription_id} - ... SERVICE_API_AVAILABLE - ... apiIds=${api_id} - Append To List ${events_expected} ${event_expected} - END - - FOR ${service_api_unavailable_resource} IN @{service_api_unavailable_resources} - Log ${service_api_unavailable_resource} - ${api_id}= Fetch From Right ${service_api_unavailable_resource.path} / - ${event_expected}= Create Notification Event - ... ${subscription_id} - ... SERVICE_API_UNAVAILABLE - ... apiIds=${api_id} - Append To List ${events_expected} ${event_expected} - END - - RETURN ${events_expected} - -Create Expected Api Invoker Events - [Arguments] ${subscription_id} ${api_invoker_id} ${events_expected}=${NONE} - IF ${events_expected} == ${NONE} - ${events_expected}= Create List - END - ## Create events expected - # Create Notification Events expected to be received for Onboard event - ${event_expected}= Create Notification Event - ... ${subscription_id} - ... API_INVOKER_ONBOARDED - ... apiInvokerIds=${api_invoker_id} - Append To List ${events_expected} ${event_expected} + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Creates a new individual CAPIF Event Subscription without supported features attribute + [Tags] capif_api_events-13 smoke + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + ${request_body}= Create Events Subscription supported_features=${NONE} + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values + ... ${resp} + ... 400 + ... ProblemDetails + ... title=Bad Request + ... status=400 + ... detail=supportedFeatures not present in request + ... cause=supportedFeatures not present + +Invoker receives Service API Invocation events without Enhanced Event Report + [Tags] capif_api_events-14 mockserver smoke - # Create Notification Events expected to be received for Updated event - ${event_expected}= Create Notification Event + # Initialize Mock server + Init Mock Server + + # Register APF + ${register_user_info}= Provider Default Registration + + # Publish one api + Publish Service Api ${register_user_info} + + # Register INVOKER + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + ${discover_response}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + ${api_ids} ${api_names}= Get Api Ids And Names From Discover Response ${discover_response} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_INVOCATION_SUCCESS SERVICE_API_INVOCATION_FAILURE + ${aef_ids}= Create List ${register_user_info['aef_id']} + ${event_filter}= Create Capif Event Filter aefIds=${aef_ids} + ${event_filters}= Create List ${event_filter} + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... event_filters=${event_filters} + ... supported_features=0 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Create Log Entry, emulate success and failure api invocation + ${results}= Create List 200 400 + ${request_body}= Create Log Entry + ... ${register_user_info['aef_id']} + ... ${register_user_info_invoker['api_invoker_id']} + ... ${api_ids} + ... ${api_names} + ... results=${results} + ${resp}= Post Request Capif + ... /api-invocation-logs/v1/${register_user_info['aef_id']}/logs + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AEF_PROVIDER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 InvocationLog + ${resource_url}= Check Location Header ${resp} ${LOCATION_LOGGING_RESOURCE_REGEX} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${events_expected}= Create Events From InvocationLogs ... ${subscription_id} - ... API_INVOKER_UPDATED - ... apiInvokerIds=${api_invoker_id} - Append To List ${events_expected} ${event_expected} + ... ${request_body} + ... event_detail_expected=${FALSE} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Invoker subscribe to Service API Available and Unavailable events without Enhanced Event Report + [Tags] capif_api_events-15 mockserver + + # Initialize Mock server + Init Mock Server + + # Register APF + ${register_user_info_provider}= Provider Default Registration + + # Publish one api + ${service_api_description_published_1} ${resource_url_1} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + + # Register INVOKER + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + ${discover_response}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + ${api_ids} ${api_names}= Get Api Ids And Names From Discover Response ${discover_response} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_AVAILABLE SERVICE_API_UNAVAILABLE + ${aef_ids}= Create List ${register_user_info_provider['aef_id']} + ${event_filter}= Create Capif Event Filter aefIds=${aef_ids} + ${event_filters}= Create List ${event_filter} - # Create Notification Events expected to be received for Offboard event - ${event_expected}= Create Notification Event + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... event_filters=${event_filters} + ... supported_features=0 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Provider publish new API + ${service_api_description_published_2} ${resource_url_2} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + ... service_2 + + # Provider Remove service_1 published API + ${resp}= Delete Request Capif + ... ${resource_url_1.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${service_api_available_resources}= Create List ${resource_url_2} + ${service_api_unavailable_resources}= Create List ${resource_url_1} + ${events_expected}= Create Expected Events For Service API Notifications + ... subscription_id=${subscription_id} + ... service_api_available_resources=${service_api_available_resources} + ... service_api_unavailable_resources=${service_api_unavailable_resources} + ... event_detail_expected=${FALSE} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Invoker subscribe to Service API Update without Enhanced Event Report + [Tags] capif_api_events-16 mockserver + + # Initialize Mock server + Init Mock Server + + # Register APF + ${register_user_info_provider}= Provider Default Registration + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + + # Register INVOKER + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + ${discover_response}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + ${api_ids} ${api_names}= Get Api Ids And Names From Discover Response ${discover_response} + + # Subscribe to events + ${events_list}= Create List SERVICE_API_UPDATE + ${aef_ids}= Create List ${register_user_info_provider['aef_id']} + ${event_filter}= Create Capif Event Filter aefIds=${aef_ids} + ${event_filters}= Create List ${event_filter} + + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... event_filters=${event_filters} + ... supported_features=0 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Update Service API + ${service_api_description_modified}= Create Service Api Description service_1_modified + ${resp}= Put Request Capif + ... ${resource_url.path} + ... json=${service_api_description_modified} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + ... apiName=service_1_modified + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${events_expected}= Create Expected Service Update Event ... ${subscription_id} - ... API_INVOKER_OFFBOARDED - ... apiInvokerIds=${api_invoker_id} - Append To List ${events_expected} ${event_expected} + ... ${resource_url} + ... ${service_api_description_modified} + ... event_detail_expected=${FALSE} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Provider subscribe to API Invoker events without Enhanced Event Report + [Tags] capif_api_events-17 mockserver + + # Initialize Mock server + Init Mock Server + + # Register APF + ${register_user_info_provider}= Provider Default Registration + + # Subscribe to events + ${events_list}= Create List API_INVOKER_ONBOARDED API_INVOKER_UPDATED API_INVOKER_OFFBOARDED + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=0 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} - RETURN ${events_expected} + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Register INVOKER + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Update Invoker onboarded information + ${new_notification_destination}= Set Variable + ... http://${CAPIF_CALLBACK_IP}:${CAPIF_CALLBACK_PORT}/netapp_new_callback + Set To Dictionary + ... ${request_body} + ... notificationDestination=${new_notification_destination} + ${resp}= Put Request Capif + ... ${url.path} + ... ${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} -Create Expected Access Control Policy Update Event - [Arguments] ${subscription_id} ${service_api_id} ${api_invoker_policies} ${events_expected}=${NONE} - IF ${events_expected} == ${NONE} - ${events_expected}= Create List - END - ${acc_ctrl_pol_list}= Create Dictionary apiId=${service_api_id} apiInvokerPolicies=${api_invoker_policies} - Check Variable ${acc_ctrl_pol_list} AccessControlPolicyListExt + # Check Update + Check Response Variable Type And Values ${resp} 200 APIInvokerEnrolmentDetails + ... notificationDestination=${new_notification_destination} - ${event_expected}= Create Notification Event + # Remove Invoker from CCF + ${resp}= Delete Request Capif + ... ${url.path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Call Method ${CAPIF_USERS} remove_capif_users_entry ${url.path} + + # Check Remove + Should Be Equal As Strings ${resp.status_code} 204 + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${events_expected}= Create Expected Api Invoker Events ... ${subscription_id} - ... ACCESS_CONTROL_POLICY_UPDATE - ... accCtrlPolList=${acc_ctrl_pol_list} - Append To List ${events_expected} ${event_expected} - - RETURN ${events_expected} - -Create Expected Access Control Policy Unavailable - [Arguments] ${subscription_id} ${events_expected}=${NONE} - IF ${events_expected} == ${NONE} - ${events_expected}= Create List - END - ${event_expected}= Create Notification Event + ... ${register_user_info_invoker['api_invoker_id']} + ... event_detail_expected=${FALSE} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Invoker subscribed to ACL update event without Enhanced Event Report + [Tags] capif_api_events-18 mockserver + + # Initialize Mock server + Init Mock Server + + # Register APF + ${register_user_info_provider}= Provider Default Registration + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + + # Store apiId1 + ${service_api_id}= Set Variable ${service_api_description_published['apiId']} + + # Register INVOKER + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Subscribe to events + ${events_list}= Create List ACCESS_CONTROL_POLICY_UPDATE + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=0 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Test + ${discover_response}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info_provider['aef_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${discover_response} 200 DiscoveredAPIs + + # create Security Context + ${request_service_security_body}= Create Service Security From Discover Response + ... http://${CAPIF_HOSTNAME}:${CAPIF_HTTP_PORT}/test + ... ${discover_response} + ${resp}= Put Request Capif + ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} + ... json=${request_service_security_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Service Security + Check Response Variable Type And Values ${resp} 201 ServiceSecurity + ${resource_url}= Check Location Header ${resp} ${LOCATION_SECURITY_RESOURCE_REGEX} + + ${resp}= Get Request Capif + ... /access-control-policy/v1/accessControlPolicyList/${service_api_id}?aef-id=${register_user_info_provider['aef_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AEF_PROVIDER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 AccessControlPolicyList + # Check returned values + Should Not Be Empty ${resp.json()['apiInvokerPolicies']} + Length Should Be ${resp.json()['apiInvokerPolicies']} 1 + Should Be Equal As Strings + ... ${resp.json()['apiInvokerPolicies'][0]['apiInvokerId']} + ... ${register_user_info_invoker['api_invoker_id']} + + ${api_invoker_policies}= Set Variable ${resp.json()['apiInvokerPolicies']} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${events_expected}= Create Expected Access Control Policy Update Event ... ${subscription_id} - ... ACCESS_CONTROL_POLICY_UNAVAILABLE - Append To List ${events_expected} ${event_expected} + ... ${service_api_id} + ... ${api_invoker_policies} + ... event_detail_expected=${FALSE} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Provider receives an ACL unavailable event when invoker remove Security Context without Enhanced Event Report + [Tags] capif_api_events-19 mockserver + + # Initialize Mock server + Init Mock Server + + # Register APF + ${register_user_info_provider}= Provider Default Registration + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + + # Store apiId1 + ${serviceApiId}= Set Variable ${service_api_description_published['apiId']} + + # Register INVOKER + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Subscribe to events + ${events_list}= Create List ACCESS_CONTROL_POLICY_UNAVAILABLE + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=0 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Test + ${discover_response}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info_provider['aef_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${discover_response} 200 DiscoveredAPIs + + # create Security Context + ${request_service_security_body}= Create Service Security From Discover Response + ... http://${CAPIF_HOSTNAME}:${CAPIF_HTTP_PORT}/test + ... ${discover_response} + ${resp}= Put Request Capif + ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} + ... json=${request_service_security_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Service Security + Check Response Variable Type And Values ${resp} 201 ServiceSecurity + ${resource_url}= Check Location Header ${resp} ${LOCATION_SECURITY_RESOURCE_REGEX} - RETURN ${events_expected} + # Remove Security Context by Provider + ${resp}= Delete Request Capif + ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AEF_PROVIDER_USERNAME} + + Status Should Be 204 ${resp} -Create Expected Api Invoker Authorization Revoked - [Arguments] ${subscription_id} ${events_expected}=${NONE} - IF ${events_expected} == ${NONE} - ${events_expected}= Create List - END - ${event_expected}= Create Notification Event + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${events_expected}= Create Expected Access Control Policy Unavailable ... ${subscription_id} - ... API_INVOKER_AUTHORIZATION_REVOKED - Append To List ${events_expected} ${event_expected} - RETURN ${events_expected} - -Create Expected Service Update Event - [Arguments] ${subscription_id} ${service_api_resource} ${service_api_descriptions} ${events_expected}=${NONE} - IF ${events_expected} == ${NONE} - ${events_expected}= Create List - END - ${api_id}= Fetch From Right ${service_api_resource.path} / - Set To Dictionary ${service_api_descriptions} apiId=${api_id} - ${events_expected}= Create List - ${event_expected}= Create Notification Event + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} + +Invoker receives an Invoker Authorization Revoked and ACL unavailable event when Provider revoke Invoker Authorization without Enhanced Event Report + [Tags] capif_api_events-20 mockserver + + # Initialize Mock server + Init Mock Server + + # Register APF + ${register_user_info_provider}= Provider Default Registration + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info_provider} + + # Store apiId1 + ${serviceApiId}= Set Variable ${service_api_description_published['apiId']} + + # Register INVOKER + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Subscribe to events + ${events_list}= Create List ACCESS_CONTROL_POLICY_UNAVAILABLE API_INVOKER_AUTHORIZATION_REVOKED + ${request_body}= Create Events Subscription + ... events=@{events_list} + ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing + ... supported_features=0 + ${resp}= Post Request Capif + ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Results + Check Response Variable Type And Values ${resp} 201 EventSubscription + ${subscriber_id} ${subscription_id}= Check Event Location Header ${resp} + + # Test + ${discover_response}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info_provider['aef_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${discover_response} 200 DiscoveredAPIs + + ${api_ids}= Get Api Ids From Discover Response ${discover_response} + + # create Security Context + ${request_service_security_body}= Create Service Security From Discover Response + ... http://${CAPIF_HOSTNAME}:${CAPIF_HTTP_PORT}/test + ... ${discover_response} + ${resp}= Put Request Capif + ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} + ... json=${request_service_security_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + # Check Service Security + Check Response Variable Type And Values ${resp} 201 ServiceSecurity + ${resource_url}= Check Location Header ${resp} ${LOCATION_SECURITY_RESOURCE_REGEX} + + # Revoke Security Context by Provider + ${request_body}= Create Security Notification Body + ... ${register_user_info_invoker['api_invoker_id']} + ... ${api_ids} + ${resp}= Post Request Capif + ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']}/delete + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AEF_PROVIDER_USERNAME} + + # Check Results + Status Should Be 204 ${resp} + + # Check Event Notifications + ## Create check Events to ensure all notifications were received + ${events_expected}= Create Expected Access Control Policy Unavailable ${subscription_id} + ${events_expected}= Create Expected Api Invoker Authorization Revoked ... ${subscription_id} - ... SERVICE_API_UPDATE - ... serviceAPIDescriptions=${service_api_descriptions} - Append To List ${events_expected} ${event_expected} - RETURN ${events_expected} \ No newline at end of file + ... events_expected=${events_expected} + ## Check Events Expected towards received notifications at mock server + Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} 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 6ab8ba5d01336f44a27edf13f83da7539ed1e53f..57005b56f14de5b2ea84665106f3142c7b07c3d9 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 @@ -120,7 +120,7 @@ Offboard Network App Should Be Equal As Strings ${resp.status_code} 204 Offboard Not Previously Onboarded Network App - [Tags] capif_api_invoker_management-6 + [Tags] capif_api_invoker_management-6 smoke # Default Invoker Registration and Onboarding ${register_user_info} ${url} ${request_body}= Invoker Default Onboarding diff --git a/tests/features/CAPIF Api Logging Service/capif_logging_api.robot b/tests/features/CAPIF Api Logging Service/capif_logging_api.robot index 4db54b2c821ca4e25835fb72b7c8095441e43157..5f41d2c7c946f8502b94200b929368156c998201 100644 --- a/tests/features/CAPIF Api Logging Service/capif_logging_api.robot +++ b/tests/features/CAPIF Api Logging Service/capif_logging_api.robot @@ -14,12 +14,11 @@ Test Teardown Reset Testing Environment ${AEF_ID_NOT_VALID} aef-example ${SERVICE_API_ID_NOT_VALID} not-valid ${API_INVOKER_NOT_VALID} not-valid -${NOTIFICATION_DESTINATION} http://robot.testing:1080 *** Test Cases *** Create a log entry - [Tags] capif_api_logging_service-1 + [Tags] capif_api_logging_service-1 smoke # Register APF ${register_user_info}= Provider Default Registration 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 31aa55e8b6415c40fbff2ab56a3a7e6972a6505f..bda73735c2bd023f1abc3bbfba4c73e40eff31c4 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 @@ -19,7 +19,7 @@ Register Api Provider [Tags] capif_api_provider_management-1 # Register Provider User An create Certificates for each function ${register_user_info}= Register User At Jwt Auth Provider - ... username=${PROVIDER_USERNAME} role=${PROVIDER_ROLE} + ... username=${PROVIDER_USERNAME} # Create provider Registration Body ${apf_func_details}= Create Api Provider Function Details @@ -80,7 +80,7 @@ Register Api Provider Already registered ... cause=Identical provider reg sec Update Registered Api Provider - [Tags] capif_api_provider_management-3 + [Tags] capif_api_provider_management-3 smoke ${register_user_info}= Provider Default Registration ${request_body}= Set Variable ${register_user_info['provider_enrollment_details']} @@ -146,14 +146,14 @@ Update Not Registered Api Provider # ... username=${AMF_PROVIDER_USERNAME} # Call Method ${CAPIF_USERS} update_capif_users_dicts ${register_user_info['resource_url'].path} ${register_user_info['amf_username']} -# + # # Check Results # Check Response Variable Type And Values ${resp} 200 APIProviderEnrolmentDetails # ... apiProvDomInfo=ROBOT_TESTING_MOD Partially Update Not Registered Api Provider - [Tags] capif_api_provider_management-6 + [Tags] capif_api_provider_management-6 smoke ${register_user_info}= Provider Default Registration ${request_body}= Create Api Provider Enrolment Details Patch Body diff --git a/tests/features/CAPIF Api Publish Service/capif_api_publish_service.robot b/tests/features/CAPIF Api Publish Service/capif_api_publish_service.robot index f3556a4b5517385791622a476f988c6ae01dc343..adc7f57461d1b19ef6d636cfdbd49705c0f91a90 100644 --- a/tests/features/CAPIF Api Publish Service/capif_api_publish_service.robot +++ b/tests/features/CAPIF Api Publish Service/capif_api_publish_service.robot @@ -16,7 +16,7 @@ ${SERVICE_API_ID_NOT_VALID} not-valid *** Test Cases *** Publish API by Authorised API Publisher - [Tags] capif_api_publish_service-1 + [Tags] capif_api_publish_service-1 smoke # Register APF ${register_user_info}= Provider Default Registration @@ -54,7 +54,7 @@ Publish API by NON Authorised API Publisher ... cause=Publisher id not found Retrieve all APIs Published by Authorised apfId - [Tags] capif_api_publish_service-3 + [Tags] capif_api_publish_service-3 smoke # Register APF ${register_user_info}= Provider Default Registration @@ -262,7 +262,7 @@ Update APIs Published by NON Authorised apfId ... apiName=service_1 Delete API Published by Authorised apfId with valid serviceApiId - [Tags] capif_api_publish_service-11 + [Tags] capif_api_publish_service-11 smoke # Register APF ${register_user_info}= Provider Default Registration @@ -284,10 +284,10 @@ Delete API Published by Authorised apfId with valid serviceApiId ... verify=ca.crt ... username=${APF_PROVIDER_USERNAME} - Check Response Variable Type And Values ${resp} 401 ProblemDetails - ... title=Unauthorized - ... detail=User not authorized - ... cause=You are not the owner of this resource + Check Response Variable Type And Values ${resp} 404 ProblemDetails + ... title=Not Found + ... detail=Service API not found + ... cause=No Service with specific credentials exists Delete APIs Published by Authorised apfId with invalid serviceApiId [Tags] capif_api_publish_service-12 @@ -324,3 +324,72 @@ Delete APIs Published by NON Authorised apfId ... status=401 ... detail=User not authorized ... cause=Certificate not authorized + +Check Two Published APIs with different APFs are removed when Provider is deleted + [Tags] capif_api_publish_service-14 + # Register APF with 2 APF roles + ${register_user_info}= Provider Default Registration total_apf_roles=2 + + # Publish APIs with both APFs + ${service_api_description_published_1} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info} + ... service_1 + ${service_api_description_published_2} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info} + ... service_2 + ... apf_username=${APF_PROVIDER_USERNAME}_1 + + # Store apiId1 + ${serviceApiId1}= Set Variable ${service_api_description_published_1['apiId']} + ${serviceApiId2}= Set Variable ${service_api_description_published_2['apiId']} + + # Retrieve Service1 + ${resp}= Get Request Capif + ... /published-apis/v1/${register_user_info['apf_id']}/service-apis/${serviceApiId1} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + Dictionaries Should Be Equal ${resp.json()} ${service_api_description_published_1} + + # Retrieve Service2 + ${resp}= Get Request Capif + ... /published-apis/v1/${register_user_info['apf_roles']['${APF_PROVIDER_USERNAME}_1']['apf_id']}/service-apis/${serviceApiId2} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${APF_PROVIDER_USERNAME}_1 + + Check Response Variable Type And Values ${resp} 200 ServiceAPIDescription + Dictionaries Should Be Equal ${resp.json()} ${service_api_description_published_2} + + # Get all services present at CCF + ${services_present_on_ccf_after_publish}= Get Number Of Services + + # Delete Provider using AMF cert + ${resp}= Delete Request Capif + ... ${register_user_info['resource_url'].path} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${AMF_PROVIDER_USERNAME} + + Call Method ${CAPIF_USERS} remove_capif_users_entry ${register_user_info['resource_url'].path} + + ${services_present_on_ccf_after_delete_provider}= Get Number Of Services + + ${services_removed}= Evaluate ${services_present_on_ccf_after_publish} - ${services_present_on_ccf_after_delete_provider} + + Run Keyword And Continue On Failure Should Be Equal "${services_removed}" "2" msg=Not all services removed after delete provider (removed) vs (expected) + + # # Remove service API by superadmin + # ${resp}= Delete Request Capif + # ... /published-apis/v1/${register_user_info['apf_roles']['${APF_PROVIDER_USERNAME}_1']['apf_id']}/service-apis/${serviceApiId2} + # ... server=${CAPIF_HTTPS_URL} + # ... verify=ca.crt + # ... username=${SUPERADMIN_USERNAME} + + # ${services_present_on_ccf_after_provider_deletion_superadmin}= Get Number Of Services + + # ${services_removed}= Evaluate ${services_present_on_ccf_after_publish} - ${services_present_on_ccf_after_provider_deletion_superadmin} + + # Run Keyword And Continue On Failure Should Be Equal "${services_removed}" "2" msg=Not all services removed after delete provider (removed) vs (expected) diff --git a/tests/features/CAPIF Security Api/capif_security_api.robot b/tests/features/CAPIF Security Api/capif_security_api.robot index f6448390a251e66755e21df6c5fa09ef58b81ac6..85b26ee335bc29def3b8054701dfc42dfaf121f5 100644 --- a/tests/features/CAPIF Security Api/capif_security_api.robot +++ b/tests/features/CAPIF Security Api/capif_security_api.robot @@ -14,7 +14,6 @@ Test Teardown Reset Testing Environment ${APF_ID_NOT_VALID} apf-example ${SERVICE_API_ID_NOT_VALID} not-valid ${API_INVOKER_NOT_VALID} not-valid -${NOTIFICATION_DESTINATION} http://robot.testing:1080 *** Test Cases *** @@ -24,7 +23,7 @@ Create a security context for an API invoker ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding # Create Security Context - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -45,7 +44,7 @@ Create a security context for an API invoker with Provider role ${register_user_info_publisher}= Provider Default Registration # Create Security Context - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -66,7 +65,7 @@ Create a security context for an API invoker with Provider entity role and inval ${register_user_info_publisher}= Provider Default Registration # Create Security Context - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${API_INVOKER_NOT_VALID} ... json=${request_body} @@ -86,7 +85,7 @@ Create a security context for an API invoker with Invalid apiInvokerID # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${API_INVOKER_NOT_VALID} ... json=${request_body} @@ -102,11 +101,11 @@ Create a security context for an API invoker with Invalid apiInvokerID ... cause=API Invoker not exists or invalid ID Retrieve the Security Context of an API Invoker - [Tags] capif_security_api-5 + [Tags] capif_security_api-5 smoke # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -162,7 +161,7 @@ Retrieve the Security Context of an API Invoker with invalid apfId # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -187,11 +186,11 @@ Retrieve the Security Context of an API Invoker with invalid apfId ... cause=User role must be aef Delete the Security Context of an API Invoker - [Tags] capif_security_api-8 + [Tags] capif_security_api-8 smoke # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -231,7 +230,7 @@ Delete the Security Context of an API Invoker with Invoker entity role # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -291,14 +290,14 @@ Delete the Security Context of an API Invoker with invalid apiInvokerID ... cause=API Invoker not exists or invalid ID Update the Security Context of an API Invoker - [Tags] capif_security_api-12 + [Tags] capif_security_api-12 smoke # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding # Register Provider ${register_user_info_publisher}= Provider Default Registration - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -342,7 +341,7 @@ Update the Security Context of an API Invoker with Provider entity role # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -374,7 +373,7 @@ Update the Security Context of an API Invoker with AEF entity role and invalid a # Register Provider ${register_user_info_publisher}= Provider Default Registration - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Post Request Capif ... /capif-security/v1/trustedInvokers/${API_INVOKER_NOT_VALID}/update ... json=${request_body} @@ -393,7 +392,7 @@ Update the Security Context of an API Invoker with invalid apiInvokerID # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Post Request Capif ... /capif-security/v1/trustedInvokers/${API_INVOKER_NOT_VALID}/update ... json=${request_body} @@ -409,7 +408,7 @@ Update the Security Context of an API Invoker with invalid apiInvokerID ... cause=API Invoker not exists or invalid ID Revoke the authorization of the API invoker for APIs - [Tags] capif_security_api-16 + [Tags] capif_security_api-16 smoke # Register APF ${register_user_info_provider}= Provider Default Registration @@ -479,7 +478,7 @@ Revoke the authorization of the API invoker for APIs without valid apfID. # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -529,7 +528,7 @@ Revoke the authorization of the API invoker for APIs with invalid apiInvokerId # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding - ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION} + ${request_body}= Create Service Security Body ${NOTIFICATION_DESTINATION_URL} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} ... json=${request_body} @@ -570,7 +569,7 @@ Revoke the authorization of the API invoker for APIs with invalid apiInvokerId Dictionaries Should Be Equal ${resp.json()} ${security_context} Retrieve access token - [Tags] capif_security_api-19 + [Tags] capif_security_api-19 smoke # Register APF ${register_user_info_provider}= Provider Default Registration @@ -595,7 +594,7 @@ Retrieve access token # create Security Context ${request_body}= Create Service Security From Discover Response - ... ${NOTIFICATION_DESTINATION} + ... ${NOTIFICATION_DESTINATION_URL} ... ${discover_response} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} @@ -648,7 +647,7 @@ Retrieve access token by Provider # create Security Context ${request_body}= Create Service Security From Discover Response - ... ${NOTIFICATION_DESTINATION} + ... ${NOTIFICATION_DESTINATION_URL} ... ${discover_response} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} @@ -700,7 +699,7 @@ Retrieve access token by Provider with invalid apiInvokerId # create Security Context ${request_body}= Create Service Security From Discover Response - ... ${NOTIFICATION_DESTINATION} + ... ${NOTIFICATION_DESTINATION_URL} ... ${discover_response} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} @@ -753,7 +752,7 @@ Retrieve access token with invalid apiInvokerId # create Security Context ${request_body}= Create Service Security From Discover Response - ... ${NOTIFICATION_DESTINATION} + ... ${NOTIFICATION_DESTINATION_URL} ... ${discover_response} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} @@ -808,7 +807,7 @@ Retrieve access token with invalid client_id # create Security Context ${request_body}= Create Service Security From Discover Response - ... ${NOTIFICATION_DESTINATION} + ... ${NOTIFICATION_DESTINATION_URL} ... ${discover_response} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} @@ -861,7 +860,7 @@ Retrieve access token with unsupported grant_type # create Security Context ${request_body}= Create Service Security From Discover Response - ... ${NOTIFICATION_DESTINATION} + ... ${NOTIFICATION_DESTINATION_URL} ... ${discover_response} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} @@ -890,9 +889,10 @@ Retrieve access token with unsupported grant_type Check Response Variable Type And Values ... ${resp} ... 400 - ... AccessTokenErr - ... error=unsupported_grant_type - ... error_description=Invalid value for `grant_type` \\(${grant_type}\\), must be one of \\['client_credentials'\\] - 'grant_type' + ... ProblemDetails + ... title=Bad Request + ... detail='not_valid' is not one of \\['client_credentials', 'authorization_code'\\] - 'grant_type' + ... status=400 Retrieve access token with invalid scope [Tags] capif_security_api-25 @@ -921,7 +921,7 @@ Retrieve access token with invalid scope # create Security Context ${request_body}= Create Service Security From Discover Response - ... ${NOTIFICATION_DESTINATION} + ... ${NOTIFICATION_DESTINATION_URL} ... ${discover_response} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} @@ -976,7 +976,7 @@ Retrieve access token with invalid aefid at scope # create Security Context ${request_body}= Create Service Security From Discover Response - ... ${NOTIFICATION_DESTINATION} + ... ${NOTIFICATION_DESTINATION_URL} ... ${discover_response} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} @@ -1031,7 +1031,7 @@ Retrieve access token with invalid apiName at scope # create Security Context ${request_body}= Create Service Security From Discover Response - ... ${NOTIFICATION_DESTINATION} + ... ${NOTIFICATION_DESTINATION_URL} ... ${discover_response} ${resp}= Put Request Capif ... /capif-security/v1/trustedInvokers/${register_user_info_invoker['api_invoker_id']} diff --git a/tests/features/Vendor Extensibility/__init__.robot b/tests/features/Vendor Extensibility/__init__.robot new file mode 100644 index 0000000000000000000000000000000000000000..cdcb8538db7a9a7f41f8d6021cbd1d6b0198a222 --- /dev/null +++ b/tests/features/Vendor Extensibility/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Force Tags vendor_extensibility \ No newline at end of file diff --git a/tests/features/Vendor Extensibility/vendor_extensibility.robot b/tests/features/Vendor Extensibility/vendor_extensibility.robot new file mode 100644 index 0000000000000000000000000000000000000000..80aceedbcee22392f3e757d674e2027131984439 --- /dev/null +++ b/tests/features/Vendor Extensibility/vendor_extensibility.robot @@ -0,0 +1,335 @@ +*** Settings *** +Resource /opt/robot-tests/tests/resources/common.resource +Resource /opt/robot-tests/tests/resources/api_invoker_management_requests/apiInvokerManagementRequests.robot +Resource ../../resources/common.resource +Library /opt/robot-tests/tests/libraries/bodyRequests.py + +Suite Teardown Reset Testing Environment +Test Setup Reset Testing Environment +Test Teardown Reset Testing Environment + + +*** Variables *** +${API_INVOKER_NOT_REGISTERED} not-valid + + +*** Test Cases *** +Published API with vendor extensibility + [Tags] vendor_extensibility-1 smoke + ${vendor_specific_service_api_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:service-info + ${vendor_specific_aef_profile_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:transport-info + # Register APF + ${register_user_info}= Provider Default Registration + + # Create Vendor Specific information + ${vendor_specific_service_api_description}= Create Vendor Specific Service Api Description + ... ${vendor_specific_service_api_key} + ${vendor_specific_aef_profile}= Create Vendor Specific Aef Profile + ... ${vendor_specific_aef_profile_key} + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info} + ... supported_features=100 + ... vendor_specific_service_api_description=${vendor_specific_service_api_description} + ... vendor_specific_aef_profile=${vendor_specific_aef_profile} + + Dictionary Should Contain Key ${service_api_description_published} ${vendor_specific_service_api_key} + Dictionary Should Contain Key + ... ${service_api_description_published['aefProfiles'][0]} + ... ${vendor_specific_aef_profile_key} + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Test + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}&supported-features=2 + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + +Published API with vendor extensibility and discover with VendSpecQueryParams disabled + [Tags] vendor_extensibility-2 + ${vendor_specific_service_api_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:service-info + ${vendor_specific_aef_profile_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:transport-info + # Register APF + ${register_user_info}= Provider Default Registration + + # Create Vendor Specific information + ${vendor_specific_service_api_description}= Create Vendor Specific Service Api Description + ... ${vendor_specific_service_api_key} + ${vendor_specific_aef_profile}= Create Vendor Specific Aef Profile + ... ${vendor_specific_aef_profile_key} + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info} + ... supported_features=100 + ... vendor_specific_service_api_description=${vendor_specific_service_api_description} + ... vendor_specific_aef_profile=${vendor_specific_aef_profile} + + Dictionary Should Contain Key ${service_api_description_published} ${vendor_specific_service_api_key} + Dictionary Should Contain Key + ... ${service_api_description_published['aefProfiles'][0]} + ... ${vendor_specific_aef_profile_key} + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Test + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}&supported-features=0 + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values + ... ${resp} + ... 404 + ... ProblemDetails + ... title=Not Found + ... status=404 + ... detail=API Invoker ${register_user_info_invoker['api_invoker_id']} has no API Published that accomplish filter conditions + ... cause=No API Published accomplish filter conditions + +Publish API with vendorExt active and discover without supported features filter + [Tags] vendor_extensibility-3 + ${vendor_specific_service_api_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:service-info + ${vendor_specific_aef_profile_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:transport-info + # Register APF + ${register_user_info}= Provider Default Registration + + # Create Vendor Specific information + ${vendor_specific_service_api_description}= Create Vendor Specific Service Api Description + ... ${vendor_specific_service_api_key} + ${vendor_specific_aef_profile}= Create Vendor Specific Aef Profile + ... ${vendor_specific_aef_profile_key} + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info} + ... supported_features=100 + ... vendor_specific_service_api_description=${vendor_specific_service_api_description} + ... vendor_specific_aef_profile=${vendor_specific_aef_profile} + + Dictionary Should Contain Key ${service_api_description_published} ${vendor_specific_service_api_key} + Dictionary Should Contain Key + ... ${service_api_description_published['aefProfiles'][0]} + ... ${vendor_specific_aef_profile_key} + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Test + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + Dictionary Should Not Contain Key + ... ${resp.json()['serviceAPIDescriptions'][0]} + ... ${vendor_specific_service_api_key} + Dictionary Should Not Contain Key + ... ${resp.json()['serviceAPIDescriptions'][0]['aefProfiles'][0]} + ... ${vendor_specific_aef_profile_key} + + ${service_api_description_published_to_check}= Copy Dictionary + ... ${service_api_description_published} + ... deepcopy=True + Remove From Dictionary ${service_api_description_published_to_check} ${vendor_specific_service_api_key} + Remove From Dictionary + ... ${service_api_description_published_to_check['aefProfiles'][0]} + ... ${vendor_specific_aef_profile_key} + + List Should Contain Value + ... ${resp.json()['serviceAPIDescriptions']} + ... ${service_api_description_published_to_check} + +Publish API with vendorExt active but without vendorSpecifics + [Tags] vendor_extensibility-4 smoke + # Register APF + ${register_user_info}= Provider Default Registration + + # Publish API with supported features + ${request_body}= Create Service Api Description + ... api_name=service_1 + ... aef_id=${register_user_info['aef_id']} + ... supported_features=100 + ${resp}= Post Request Capif + ... /published-apis/v1/${register_user_info['apf_id']}/service-apis + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${register_user_info['apf_username']} + + Check Response Variable Type And Values + ... ${resp} + ... 400 + ... ProblemDetails + ... title=Bad Request + ... status=400 + ... detail=If and only if VendorExt feature is enabled, then vendor-specific fields should be defined + ... cause=Vendor extensibility misconfiguration + +Publish API with vendorExt inactive but with vendorSpecifics + [Tags] vendor_extensibility-5 + ${vendor_specific_service_api_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:service-info + ${vendor_specific_aef_profile_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:transport-info + # Register APF + ${register_user_info}= Provider Default Registration + + # Create Vendor Specific information + ${vendor_specific_service_api_description}= Create Vendor Specific Service Api Description + ... ${vendor_specific_service_api_key} + ${vendor_specific_aef_profile}= Create Vendor Specific Aef Profile + ... ${vendor_specific_aef_profile_key} + + # Publish API with supported features + ${request_body}= Create Service Api Description + ... api_name=service_1 + ... aef_id=${register_user_info['aef_id']} + ... supported_features=000 + ... vendor_specific_service_api_description=${vendor_specific_service_api_description} + ... vendor_specific_aef_profile=${vendor_specific_aef_profile} + ${resp}= Post Request Capif + ... /published-apis/v1/${register_user_info['apf_id']}/service-apis + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${register_user_info['apf_username']} + + Check Response Variable Type And Values + ... ${resp} + ... 400 + ... ProblemDetails + ... title=Bad Request + ... status=400 + ... detail=If and only if VendorExt feature is enabled, then vendor-specific fields should be defined + ... cause=Vendor extensibility misconfiguration + +Published API without vendor extensibility discover with VendSpecQueryParams enabled + [Tags] vendor_extensibility-6 + # Register APF + ${register_user_info}= Provider Default Registration + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info} + ... supported_features=00 + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Test + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}&supported-features=2 + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values + ... ${resp} + ... 404 + ... ProblemDetails + ... title=Not Found + ... status=404 + ... detail=API Invoker ${register_user_info_invoker['api_invoker_id']} has no API Published that accomplish filter conditions + ... cause=No API Published accomplish filter conditions + +Published API without vendor extensibility and discover with vendSpecQueryParams disabled + [Tags] vendor_extensibility-7 + # Register APF + ${register_user_info}= Provider Default Registration + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info} + ... supported_features=0 + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Test + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}&supported-features=0 + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + +Published API without vendor extensibility and discover without supported-features query parameter + [Tags] vendor_extensibility-8 + # Register APF + ${register_user_info}= Provider Default Registration + + # Publish one api + ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api + ... ${register_user_info} + ... supported_features=000 + + # Default Invoker Registration and Onboarding + ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding + + # Test + ${resp}= Get Request Capif + ... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${INVOKER_USERNAME} + + Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs + + # Check Results + Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions + Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} + Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 + List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published} + +Publish API without supportedFeatures + [Tags] vendor_extensibility-9 + # Register APF + ${register_user_info}= Provider Default Registration + + # Publish API without supported features + ${request_body}= Create Service Api Description + ... api_name=service_1 + ... aef_id=${register_user_info['aef_id']} + ... supported_features=${NONE} + ${resp}= Post Request Capif + ... /published-apis/v1/${register_user_info['apf_id']}/service-apis + ... json=${request_body} + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${register_user_info['apf_username']} + + Check Response Variable Type And Values + ... ${resp} + ... 400 + ... ProblemDetails + ... title=Bad Request + ... status=400 + ... detail=supportedFeatures not present in request + ... cause=supportedFeatures not present diff --git a/tests/features/__init__.robot b/tests/features/__init__.robot index 19e0fdb7e68b094801d11ec7f563450fa5029a0b..3ac73ab8898640e7a1040fe8d9603d55b30fa3c6 100644 --- a/tests/features/__init__.robot +++ b/tests/features/__init__.robot @@ -45,6 +45,8 @@ Prepare environment END # Obtain ca root certificate Retrieve Ca Root + + Retrieve Superadmin Cert Reset Testing Environment @@ -54,3 +56,12 @@ Retrieve Ca Root Status Should Be 200 ${resp} 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 + ${resp}= Obtain Superadmin Cert From Vault /v1/pki_int/sign/my-ca ${CAPIF_HTTP_VAULT_URL} + Status Should Be 200 ${resp} + Log Dictionary ${resp.json()} + Log ${resp.json()['data']['certificate']} + Store In File ${SUPERADMIN_USERNAME}.crt ${resp.json()['data']['certificate']} + diff --git a/tests/libraries/api_events/bodyRequests.py b/tests/libraries/api_events/bodyRequests.py index 17fd1b57f743adeecd6da459a8d0a3179b11af90..20d82a40a551f51a6ae0d8b1a29bac1d88676897 100644 --- a/tests/libraries/api_events/bodyRequests.py +++ b/tests/libraries/api_events/bodyRequests.py @@ -1,18 +1,18 @@ -def create_events_subscription(events=["SERVICE_API_AVAILABLE", "API_INVOKER_ONBOARDED"], notificationDestination="http://robot.testing", eventFilters=None, eventReq=None, requestTestNotification=None, supportedFeatures=None, websockNotifConfig=None): +def create_events_subscription(events=["SERVICE_API_AVAILABLE", "API_INVOKER_ONBOARDED"], notification_destination="http://robot.testing", event_filters=None, event_req=None, request_test_notification=None, supported_features="0", websock_notif_config=None): event_subscription = { "events": events, - "notificationDestination": notificationDestination, + "notificationDestination": notification_destination, } - if eventFilters != None: - event_subscription['eventFilters'] = eventFilters - if eventReq != None: - event_subscription['eventReq'] = eventReq - if requestTestNotification != None: - event_subscription['requestTestNotification'] = requestTestNotification - if supportedFeatures != None: - event_subscription['supportedFeatures'] = supportedFeatures - if websockNotifConfig != None: - event_subscription['websockNotifConfig'] = websockNotifConfig + if event_filters != None: + event_subscription['eventFilters'] = event_filters + if event_req != None: + event_subscription['eventReq'] = event_req + if request_test_notification != None: + event_subscription['requestTestNotification'] = request_test_notification + if supported_features != None: + event_subscription['supportedFeatures'] = supported_features + if websock_notif_config != None: + event_subscription['websockNotifConfig'] = websock_notif_config return event_subscription diff --git a/tests/libraries/api_publish_service/bodyRequests.py b/tests/libraries/api_publish_service/bodyRequests.py index 69e7bb117f01b4c53ee7d1db74b7da09e20bf3a1..f76fe9d219660c8ed697bf652dcc63a0c89b94dc 100644 --- a/tests/libraries/api_publish_service/bodyRequests.py +++ b/tests/libraries/api_publish_service/bodyRequests.py @@ -1,41 +1,23 @@ -def create_service_api_description(api_name="service_1",aef_id="aef_id"): - return { +def create_service_api_description(api_name="service_1", + aef_id="aef_id", + supported_features="0", + vendor_specific_service_api_description=None, + vendor_specific_aef_profile=None, + api_status=None): + aef_ids = list() + if isinstance(aef_id, list): + aef_ids = aef_id + print("aef_id parameter is a list") + elif isinstance(aef_id, str): + print("aef_id parameter is a string") + aef_ids.append(aef_id) + + profiles = create_aef_profiles(aef_ids) + + body = { "apiName": api_name, - "aefProfiles": [ - { - "aefId": aef_id, - "versions": [ - { - "apiVersion": "v1", - "expiry": "2021-11-30T10:32:02.004000+00:00", - "resources": [ - { - "resourceName": "string", - "commType": "REQUEST_RESPONSE", - "uri": "string", - "custOpName": "string", - "operations": [ - "GET" - ], - "description": "string" - } - ], - } - ], - "protocol": "HTTP_1_1", - "dataFormat": "JSON", - "securityMethods": ["PSK"], - "interfaceDescriptions": [ - { - "ipv4Addr": "string", - "port": 65535, - "securityMethods": ["PSK"] - } - ] - } - ], + "aefProfiles": profiles, "description": "ROBOT_TESTING", - "supportedFeatures": "fffff", "shareableInfo": { "isShareable": True, "capifProvDoms": [ @@ -51,3 +33,133 @@ def create_service_api_description(api_name="service_1",aef_id="aef_id"): }, "ccfId": "string" } + + if vendor_specific_service_api_description is not None: + if isinstance(vendor_specific_service_api_description, dict): + for key, value in vendor_specific_service_api_description.items(): + body[key] = value + if vendor_specific_aef_profile is not None: + if isinstance(vendor_specific_aef_profile, dict): + for key, value in vendor_specific_aef_profile.items(): + body["aefProfiles"][0][key] = value + if supported_features is not None: + body['supportedFeatures'] = supported_features + if api_status is not None: + aef_ids_active = list() + if isinstance(api_status, list): + aef_ids_active = api_status + print("api_status parameter is a list") + elif isinstance(api_status, str): + print("api_status parameter is a string") + aef_ids_active.append(api_status) + body['apiStatus'] = dict() + body['apiStatus']['aefIds'] = aef_ids_active + + return body + + +def create_aef_profiles(aef_ids): + profiles = list() + index = 1 + for aef_id in aef_ids: + profiles.append(create_aef_profile(aef_id, "resource_" + str(index))) + index = index+1 + return profiles + + +def create_aef_profile(aef_id, resource_name): + data = { + "aefId": aef_id, + "versions": [ + { + "apiVersion": "v1", + "expiry": "2021-11-30T10:32:02.004000+00:00", + "resources": [ + { + "resourceName": resource_name, + "commType": "REQUEST_RESPONSE", + "uri": "string", + "custOpName": "string", + "operations": [ + "GET" + ], + "description": "string" + } + ], + } + ], + "protocol": "HTTP_1_1", + "dataFormat": "JSON", + "securityMethods": ["PSK"], + "interfaceDescriptions": [ + { + "ipv4Addr": "string", + "port": 65535, + "securityMethods": ["PSK"] + } + ] + } + return data + + +def create_service_api_description_patch(aef_id=None, + description=None, + shareable_info=None, + api_status=None, + service_api_category=None, + api_supp_feats=None, + pub_api_path=None, + ccf_id=None): + body = dict() + + # aef profiles + aef_ids = list() + if aef_id is None: + aef_ids = None + elif isinstance(aef_id, list): + aef_ids = aef_id + print("aef_id parameter is a list") + elif isinstance(aef_id, str): + print("aef_id parameter is a string") + aef_ids.append(aef_id) + if aef_ids is not None: + profiles = create_aef_profiles(aef_ids) + body['aefProfiles'] = profiles + + # description + if description is not None: + body['description'] = description + + # shareable info + if shareable_info is not None: + body['shareableInfo'] = shareable_info + + # service API Category + if service_api_category is not None: + body['serviceAPICategory'] = service_api_category + + # api Supp Feats + if api_supp_feats is not None: + body['apiSuppFeats'] = api_supp_feats + + # pub Api Path + if pub_api_path is not None: + body['pubApiPath'] = pub_api_path + + # ccf id + if ccf_id is not None: + body['ccfId'] = ccf_id + + # api Status + if api_status is not None: + aef_ids_active = list() + if isinstance(api_status, list): + aef_ids_active = api_status + print("api_status parameter is a list") + elif isinstance(api_status, str): + print("api_status parameter is a string") + aef_ids_active.append(api_status) + body['apiStatus'] = dict() + body['apiStatus']['aefIds'] = aef_ids_active + + return body diff --git a/tests/libraries/bodyRequests.py b/tests/libraries/bodyRequests.py index 5e451242c693f385bccea597db898a5f7c16f725..450ca5ae2a24503e07a8fe436bf79c46e2796be5 100644 --- a/tests/libraries/bodyRequests.py +++ b/tests/libraries/bodyRequests.py @@ -5,4 +5,5 @@ from api_publish_service.bodyRequests import * from api_events.bodyRequests import * from security_api.bodyRequests import * from api_provider_management.bodyRequests import * - +from vendor_extensibility.bodyRequests import * +from vault_requests.bodyRequests import * diff --git a/tests/libraries/common/bodyRequests.py b/tests/libraries/common/bodyRequests.py index 1d4ec14f60759bfb221b686ba84df23b1386fa6c..87228cfaf19c587b49cd25b8d8bca7ba991a08d9 100644 --- a/tests/libraries/common/bodyRequests.py +++ b/tests/libraries/common/bodyRequests.py @@ -1,4 +1,3 @@ -from operator import contains import re import json from xmlrpc.client import boolean @@ -32,7 +31,7 @@ def check_variable(input, data_type): else: raise Exception("variable is not integer type") elif data_type == "URI": - check_uri(input,data_type) + check_uri(input, data_type) return True elif data_type == "URI_reference": check_uri(input, data_type) @@ -70,13 +69,29 @@ def check_variable(input, data_type): def check_attributes_dict(body, data_type): mandatory_attributes = capif_types[data_type]["mandatory_attributes"] optional_parameters = capif_types[data_type]["optional_attributes"] + regex_attributes = capif_types[data_type].get("regex_attributes", {}) + all_attributes = mandatory_attributes | optional_parameters # Check if body has not allowed attributes for body_key in body.keys(): + print(body_key) if body_key not in all_attributes.keys(): - raise Exception('Attribute "' + body_key + - '" is not present as a mandatory or optional key (' + ','.join(all_attributes.keys()) + ')') + print(body_key + " NOT IN ALL ATTRIBUTES") + present = False + if regex_attributes is not None: + print("REGEX ATTRIBUTES PRESENT") + print(regex_attributes) + for regex_key, regex_data_type in regex_attributes.items(): + print(regex_key + ":" + regex_data_type) + if check_regex(body_key, regex_key): + print("MATCH with " + body_key) + present = True + all_attributes[body_key] = regex_data_type + break + if not present: + raise Exception('Attribute "' + body_key + + '" is not present as a mandatory or optional key (' + ','.join(all_attributes.keys()) + ')') if mandatory_attributes: for mandatory_key in mandatory_attributes.keys(): @@ -101,25 +116,18 @@ def check_attributes_dict(body, data_type): return all_attributes -def sign_csr_body(username, public_key): - data = { - "csr": public_key.decode("utf-8"), - "mode": "client", - "filename": username - } - return data - - -def check_uri(input,rule): +def check_uri(input, rule): if rfc3987.match(input, rule=rule) is not None: return input else: raise Exception(rule + " is not accomplish rfc3986 rule ("+input+")") + def check_regex(input, regex): matched = re.match(regex, input) is_match = bool(matched) if is_match: print("Regex match") + return True else: raise Exception("Input(" + input + ") not match regex (" + regex + ")") diff --git a/tests/libraries/common/types.json b/tests/libraries/common/types.json index 220dd0f5710796fd875ddda8d05dfb3e39a272cd..5d67162ccac720901bed11748ad558ff5a17f26f 100644 --- a/tests/libraries/common/types.json +++ b/tests/libraries/common/types.json @@ -82,9 +82,35 @@ "serviceAPICategory": "string", "apiSuppFeats": "SupportedFeatures", "pubApiPath": "PublishedApiPath", + "ccfId": "string", + "apiStatus": "ApiStatus" + }, + "regex_attributes": { + "^vendorSpecific-(.*)": "VendorSpecificObject" + } + }, + "ServiceAPIDescriptionPatch": { + "mandatory_attributes": {}, + "optional_attributes": { + "apiStatus": "ApiStatus", + "aefProfiles": "AefProfile", + "description": "string", + "shareableInfo": "ShareableInformation", + "serviceAPICategory": "string", + "apiSuppFeats": "SupportedFeatures", + "pubApiPath": "PublishedApiPath", "ccfId": "string" } }, + "ApiStatus": { + "mandatory_attributes": { + "aefIds": "string" + }, + "optional_attributes": {} + }, + "VendorSpecificObject": { + "Check": false + }, "AefProfile": { "mandatory_attributes": { "aefId": "string", @@ -98,6 +124,9 @@ "interfaceDescriptions": "InterfaceDescription", "aefLocation": "AefLocation" }, + "regex_attributes": { + "^vendorSpecific-(.*)": "VendorSpecificObject" + }, "oneOf": ["interfaceDescriptions", "domainName"] }, "Version": { diff --git a/tests/libraries/environment.py b/tests/libraries/environment.py index 8b7a504e8e138b8ade707caf07a786d2f96aa1b6..0cb833e8d4c6c16d836579bc5843a2adb6c5f22f 100644 --- a/tests/libraries/environment.py +++ b/tests/libraries/environment.py @@ -29,5 +29,6 @@ class CapifUserManager(): for uuid, stored_user in self.register_users.items(): if stored_user == username: return uuid + return None CAPIF_USERS = CapifUserManager() \ No newline at end of file diff --git a/tests/libraries/helpers.py b/tests/libraries/helpers.py index 94c850fbe537b37d449ec355dd7779ea52ba3bf5..ae6337342a455dbf5155e76bd446528a686fc796 100644 --- a/tests/libraries/helpers.py +++ b/tests/libraries/helpers.py @@ -1,13 +1,10 @@ -import requests import re -import pandas as pd from urllib.parse import urlparse from OpenSSL.crypto import (dump_certificate_request, dump_privatekey, PKey, TYPE_RSA, X509Req) from OpenSSL.SSL import FILETYPE_PEM import socket import copy -import json import pickle @@ -142,13 +139,26 @@ def create_scope(aef_id, api_name): return data + def read_dictionary(file_path): with open(file_path, 'rb') as fp: data = pickle.load(fp) print('Dictionary loaded') return data + def write_dictionary(file_path, data): with open(file_path, 'wb') as fp: pickle.dump(data, fp) print('dictionary saved successfully to file ' + file_path) + + +def filter_users_by_prefix_username(users, prefix): + if prefix.strip() == "": + raise Exception('prefix value must contain some value') + + filtered_users = list() + for user in users: + if user['username'].startswith(prefix): + filtered_users.append(user['username']) + return filtered_users diff --git a/tests/libraries/interrupt_listener.py b/tests/libraries/interrupt_listener.py index ec2f5d43e117c5aba1a197a3f8e1fcf9f1d1d407..0a86a58b25636c025f2ed77460bb8de87bf4706e 100644 --- a/tests/libraries/interrupt_listener.py +++ b/tests/libraries/interrupt_listener.py @@ -21,4 +21,7 @@ class InterruptListener: print(f"Starting suite: {name}") def end_suite(self, name, attrs): - print(f"Ending suite: {name}") \ No newline at end of file + print(f"Ending suite: {name}") + + +INTERRUPT_LISTENER=InterruptListener() \ No newline at end of file diff --git a/tests/libraries/security_api/bodyRequests.py b/tests/libraries/security_api/bodyRequests.py index 6adcc4cfbc77c2ac614ab2cbcc67e40d1399eeb2..dabee876cd9aaf379f3438080399bbe84d8b6d2e 100644 --- a/tests/libraries/security_api/bodyRequests.py +++ b/tests/libraries/security_api/bodyRequests.py @@ -76,10 +76,10 @@ def create_security_notification_body(api_invoker_id, api_ids, cause="OVERLIMIT_ return data -def create_access_token_req_body(client_id, scope, client_secret=None,grant_type="client_credentials"): +def create_access_token_req_body(client_id, scope, client_secret=None, grant_type="client_credentials"): data = { - "client_id": client_id, "grant_type": grant_type, + "client_id": client_id, "scope": scope } diff --git a/tests/libraries/vault_requests/bodyRequests.py b/tests/libraries/vault_requests/bodyRequests.py new file mode 100644 index 0000000000000000000000000000000000000000..3bade1ab11ba20d3faa4b30bcc4600814dd8fb90 --- /dev/null +++ b/tests/libraries/vault_requests/bodyRequests.py @@ -0,0 +1,17 @@ +def sign_csr_body(username, public_key): + data = { + "csr": public_key.decode("utf-8"), + "mode": "client", + "filename": username + } + return data + + +def vault_sign_superadmin_certificate_body(csr_request): + data = { + "format": "pem_bundle", + "ttl": "43000h", + "csr": csr_request.decode("utf-8"), + "common_name": "superadmin" + } + return data diff --git a/tests/libraries/vendor_extensibility/bodyRequests.py b/tests/libraries/vendor_extensibility/bodyRequests.py new file mode 100644 index 0000000000000000000000000000000000000000..0e4e5bc6983e8b6c5dbf9968559d135f13ec3a3a --- /dev/null +++ b/tests/libraries/vendor_extensibility/bodyRequests.py @@ -0,0 +1,34 @@ +def create_vendor_specific_service_api_description(vendor_specific_key): + vendor_dict = { + vendor_specific_key: { + "serializer": "JSON", + "state": "ACTIVE", + "scopeOfLocality": "MEC_SYSTEM", + "consumedLocalOnly": "True", + "isLocal": "True", + "category": { + "href": "https://www.location.com", + "id": "location_1", + "name": "Location", + "version": "1.0" + } + } + } + return vendor_dict + + +def create_vendor_specific_aef_profile(vendor_specific_key): + vendor_dict = { + vendor_specific_key: { + "name": "trasport1", + "description": "Transport Info 1", + "type": "REST_HTTP", + "protocol": "HTTP", + "version": "2", + "security": { + "grantTypes": "OAUTH2_CLIENT_CREDENTIALS", + "tokenEndpoint": "https://token-endpoint/" + } + } + } + return vendor_dict diff --git a/tests/resources/common.resource b/tests/resources/common.resource index fcd9a97efb354180ba2b639f23787641b3a84038..bf596b33c0f5f3747e160ccdcee9a77ef751f09a 100644 --- a/tests/resources/common.resource +++ b/tests/resources/common.resource @@ -5,9 +5,11 @@ Library Process Library Collections Variables /opt/robot-tests/tests/libraries/environment.py Resource /opt/robot-tests/tests/resources/common/basicRequests.robot +Resource /opt/robot-tests/tests/resources/common/expectedMessages.robot *** Variables *** +${SUPERADMIN_USERNAME} ROBOT_TESTING_SUPERADMIN ${INVOKER_USERNAME} ROBOT_TESTING_INVOKER ${PROVIDER_USERNAME} ROBOT_TESTING_PROVIDER ${APF_PROVIDER_USERNAME} APF_${PROVIDER_USERNAME} @@ -36,6 +38,7 @@ ${REGISTER_ADMIN_PASSWORD} password123 ${REQUESTS_TIMEOUT} 120s ${MOCK_SERVER_URL} +${NOTIFICATION_DESTINATION_URL} ${MOCK_SERVER_URL} ${DISCOVER_URL} /service-apis/v1/allServiceAPIs?api-invoker-id= @@ -55,6 +58,7 @@ Check Location Header ${event_url}= Parse Url ${resp.headers['Location']} Should Match Regexp ${event_url.path} ${regular_expression} + Should Match Regexp ${event_url.netloc} ^${CAPIF_HOSTNAME}(:[0-9]+)?$ RETURN ${event_url} Check Event Location Header @@ -167,4 +171,6 @@ Check Mock Server Notification Events FOR ${event_expected} IN @{events_expected} Log ${event_expected} List Should Contain Value ${notification_events_on_mock_server} ${event_expected} - END \ No newline at end of file + END + + RETURN ${notification_events_on_mock_server} \ No newline at end of file diff --git a/tests/resources/common/basicRequests.robot b/tests/resources/common/basicRequests.robot index 6d4f4569592e1685ec9b72554b9849f368db0082..149535597324c9ac22ae16c4d56877cdafcad0e8 100644 --- a/tests/resources/common/basicRequests.robot +++ b/tests/resources/common/basicRequests.robot @@ -6,6 +6,7 @@ Library Collections Library OperatingSystem Library XML Library Telnet +Library String *** Variables *** @@ -84,7 +85,7 @@ Create Register Admin Session ## NEW REQUESTS TO REGISTER Post Request Admin Register - [Timeout] ${REQUESTS_TIMEOUT} + [Timeout] ${REQUESTS_TIMEOUT} [Arguments] ... ${endpoint} ... ${json}=${NONE} @@ -114,7 +115,7 @@ Post Request Admin Register RETURN ${resp} Get Request Admin Register - [Timeout] ${REQUESTS_TIMEOUT} + [Timeout] ${REQUESTS_TIMEOUT} [Arguments] ... ${endpoint} ... ${server}=${NONE} @@ -139,10 +140,16 @@ Get Request Admin Register ... cert=${cert} RETURN ${resp} +Delete User Admin Register Request + [Arguments] ${user_uuid} + ${headers}= Create Register Admin Session ${CAPIF_HTTPS_REGISTER_URL} verify=False + ${resp}= DELETE On Session register_session /deleteUser/${user_uuid} headers=${headers} + RETURN ${resp} + # NEW REQUESTS END Post Request Capif - [Timeout] ${REQUESTS_TIMEOUT} + [Timeout] ${REQUESTS_TIMEOUT} [Arguments] ... ${endpoint} ... ${json}=${NONE} @@ -172,7 +179,7 @@ Post Request Capif RETURN ${resp} Get Request Capif - [Timeout] ${REQUESTS_TIMEOUT} + [Timeout] ${REQUESTS_TIMEOUT} [Arguments] ... ${endpoint} ... ${server}=${NONE} @@ -198,7 +205,7 @@ Get Request Capif RETURN ${resp} Get CA Vault - [Timeout] ${REQUESTS_TIMEOUT} + [Timeout] ${REQUESTS_TIMEOUT} [Arguments] ... ${endpoint} ... ${server}=${NONE} @@ -222,10 +229,39 @@ Get CA Vault ... verify=${verify} ... cert=${cert} RETURN ${resp} - RETURN ${response} + +Obtain Superadmin Cert From Vault + [Timeout] ${REQUESTS_TIMEOUT} + [Arguments] + ... ${endpoint} + ... ${server}=${NONE} + ... ${access_token}=${NONE} + ... ${auth}=${NONE} + ... ${verify}=${FALSE} + ... ${cert}=${NONE} + ... ${username}=${NONE} + + ${headers}= Create CAPIF Session ${server} ${access_token} vault_token=${CAPIF_VAULT_TOKEN} + + IF '${username}' != '${NONE}' + ${cert}= Set variable ${{ ('${username}.crt','${username}.key') }} + END + + ${csr_request}= Create User Csr ${SUPERADMIN_USERNAME} cn=superadmin + ${json}= Vault Sign Superadmin Certificate Body ${csr_request} + + ${resp}= Post On Session + ... apisession + ... ${endpoint} + ... json=${json} + ... headers=${headers} + ... expected_status=any + ... verify=${verify} + ... cert=${cert} + RETURN ${resp} Put Request Capif - [Timeout] ${REQUESTS_TIMEOUT} + [Timeout] ${REQUESTS_TIMEOUT} [Arguments] ... ${endpoint} ... ${json}=${NONE} @@ -254,7 +290,7 @@ Put Request Capif RETURN ${resp} Patch Request Capif - [Timeout] ${REQUESTS_TIMEOUT} + [Timeout] ${REQUESTS_TIMEOUT} [Arguments] ... ${endpoint} ... ${json}=${NONE} @@ -267,6 +303,8 @@ Patch Request Capif ${headers}= Create CAPIF Session ${server} ${access_token} + Set To Dictionary ${headers} Content-Type application/merge-patch+json + IF '${username}' != '${NONE}' ${cert}= Set variable ${{ ('${username}.crt','${username}.key') }} END @@ -283,7 +321,7 @@ Patch Request Capif RETURN ${resp} Delete Request Capif - [Timeout] ${REQUESTS_TIMEOUT} + [Timeout] ${REQUESTS_TIMEOUT} [Arguments] ... ${endpoint} ... ${server}=${NONE} @@ -358,19 +396,65 @@ Register User At Jwt Auth RETURN ${register_user_info} Register User At Jwt Auth Provider - [Arguments] ${username} ${role} ${password}=password ${description}=Testing + [Arguments] + ... ${username} + ... ${password}=password + ... ${description}=Testing + ... ${total_apf_roles}=1 + ... ${total_aef_roles}=1 + ... ${total_amf_roles}=1 + + ${apf_roles}= Create Dictionary + ${default_apf_username}= Set Variable APF_${username} + FOR ${index} IN RANGE ${total_apf_roles} + ${apf_username}= Set Variable ${default_apf_username}_${index} + IF ${index} == 0 + ${apf_username}= Set Variable ${default_apf_username} + END + ${apf_csr_request}= Create User Csr ${apf_username} apf + ${apf_role}= + ... Create Dictionary + ... username=${apf_username} + ... csr_request=${apf_csr_request} + ... role=APF + Set To Dictionary ${apf_roles} ${apf_username}=${apf_role} + END + + ${aef_roles}= Create Dictionary + ${default_aef_username}= Set Variable AEF_${username} + FOR ${index} IN RANGE ${total_aef_roles} + ${aef_username}= Set Variable ${default_aef_username}_${index} + IF ${index} == 0 + ${aef_username}= Set Variable ${default_aef_username} + END + ${aef_csr_request}= Create User Csr ${aef_username} aef + ${aef_role}= + ... Create Dictionary + ... username=${aef_username} + ... csr_request=${aef_csr_request} + ... role=AEF + Set To Dictionary ${aef_roles} ${aef_username}=${aef_role} + END - ${apf_username}= Set Variable APF_${username} - ${aef_username}= Set Variable AEF_${username} - ${amf_username}= Set Variable AMF_${username} + ${amf_roles}= Create Dictionary + ${default_amf_username}= Set Variable AMF_${username} + FOR ${index} IN RANGE ${total_amf_roles} + ${amf_username}= Set Variable ${default_amf_username}_${index} + IF ${index} == 0 + ${amf_username}= Set Variable ${default_amf_username} + END + ${amf_csr_request}= Create User Csr ${amf_username} amf + ${amf_role}= + ... Create Dictionary + ... username=${amf_username} + ... csr_request=${amf_csr_request} + ... role=AMF + Set To Dictionary ${amf_roles} ${amf_username}=${amf_role} + END # Create a certificate for each kind of role under provider ${csr_request}= Create User Csr ${username} provider - ${apf_csr_request}= Create User Csr ${apf_username} apf - ${aef_csr_request}= Create User Csr ${aef_username} aef - ${amf_csr_request}= Create User Csr ${amf_username} amf - # Register provider ${resp}= Create User At Register ... ${username} @@ -385,12 +469,15 @@ Register User At Jwt Auth Provider ${register_user_info}= Create Dictionary ... netappID=${resp.json()['uuid']} ... csr_request=${csr_request} - ... apf_csr_request=${apf_csr_request} - ... aef_csr_request=${aef_csr_request} - ... amf_csr_request=${amf_csr_request} - ... apf_username=${apf_username} - ... aef_username=${aef_username} - ... amf_username=${amf_username} + ... apf_username=${default_apf_username} + ... aef_username=${default_aef_username} + ... amf_username=${default_amf_username} + ... apf_csr_request=${apf_roles['${default_apf_username}']['csr_request']} + ... aef_csr_request=${aef_roles['${default_aef_username}']['csr_request']} + ... amf_csr_request=${amf_roles['${default_amf_username}']['csr_request']} + ... apf_roles=${apf_roles} + ... aef_roles=${aef_roles} + ... amf_roles=${amf_roles} ... &{resp.json()} ... &{get_auth_response} @@ -430,31 +517,57 @@ Delete User At Register [Documentation] (Administrator) This Keyword delete a user from register. [Arguments] ${username}=${NONE} ${uuid}=${NONE} ${user_uuid}= Set Variable ${uuid} + ${environment_users}= Set Variable ${TRUE} IF "${username}" != "${NONE}" ${user_uuid}= Call Method ${CAPIF_USERS} get_user_uuid ${username} END - ${headers}= Create Register Admin Session ${CAPIF_HTTPS_REGISTER_URL} verify=False + IF "${user_uuid}" == "${NONE}" + ${user_uuid}= Get User Uuid At Register ${username} + ${environment_users}= Set Variable ${FALSE} + END - ${resp}= DELETE On Session register_session /deleteUser/${user_uuid} headers=${headers} + ${resp}= Delete User Admin Register Request ${user_uuid} Should Be Equal As Strings ${resp.status_code} 204 - Call Method ${CAPIF_USERS} remove_register_users_entry ${user_uuid} + IF ${environment_users} + Call Method ${CAPIF_USERS} remove_register_users_entry ${user_uuid} + END RETURN ${resp} -Get List of User At Register +Get List of Users At Register [Documentation] (Administrator) This Keyword retrieve a list of users from register. ${headers}= Create Register Admin Session ${CAPIF_HTTPS_REGISTER_URL} verify=False - ${resp}= DELETE On Session register_session /getUsers headers=${headers} + ${resp}= GET On Session register_session /getUsers headers=${headers} Should Be Equal As Strings ${resp.status_code} 200 RETURN ${resp.json()['users']} +Get User Uuid At Register + [Documentation] (Administrator) This Keyword retrieve a list of users and search uuid of user passed by parameters + [Arguments] ${username} + ${users}= Get List of Users At Register + + # Find the first user with username indicated + ${user_uuid}= Set Variable &{EMPTY} + FOR ${user} IN @{users} + IF "${user['username']}" == "${username}" + ${user_uuid}= Set Variable ${user['uuid']} + BREAK + END + END + + IF "${user_uuid}" == "${EMPTY}" + Log ${username} not found in Register + END + + RETURN ${user_uuid} + Get Auth For User [Documentation] (User) This Keyword retrieve token to be used by user towards first interaction with CCF. [Arguments] ${username} ${password} @@ -531,15 +644,9 @@ Remove Resource ... verify=ca.crt ... username=${management_cert} - Status Should Be 204 ${resp} + Run Keyword and Continue On Failure Status Should Be 204 ${resp} - &{body}= Create Dictionary - ... password=password - ... username=${username} - - Create Session jwtsession ${CAPIF_HTTPS_REGISTER_URL} verify=False disable_warnings=1 - - ${resp}= DELETE On Session jwtsession /remove json=${body} + Delete User At Register username=${username} Should Be Equal As Strings ${resp.status_code} 204 @@ -581,20 +688,16 @@ Invoker Default Onboarding Provider Registration [Arguments] ${register_user_info} + ${api_prov_funcs}= Create List + # 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} + FOR ${key} ${value} IN &{register_user_info['apf_roles']} &{register_user_info['aef_roles']} &{register_user_info['amf_roles']} + ${func_details}= Create Api Provider Function Details + ... ${key} + ... ${value['csr_request']} + ... ${value['role']} + Append To List ${api_prov_funcs} ${func_details} + END ${request_body}= Create Api Provider Enrolment Details Body ... ${register_user_info['access_token']} @@ -617,12 +720,29 @@ Provider Registration FOR ${prov} IN @{resp.json()['apiProvFuncs']} Log Dictionary ${prov} Store In File ${prov['apiProvFuncInfo']}.crt ${prov['regInfo']['apiProvCert']} + Log Dictionary ${register_user_info} + Log ${register_user_info['apf_username']} IF "${prov['apiProvFuncRole']}" == "APF" - Set To Dictionary ${register_user_info} apf_id=${prov['apiProvFuncId']} + IF "${prov['apiProvFuncInfo']}" == "${register_user_info['apf_username']}" + Set To Dictionary ${register_user_info} apf_id=${prov['apiProvFuncId']} + END + Set To Dictionary + ... ${register_user_info['apf_roles']['${prov['apiProvFuncInfo']}']} + ... apf_id=${prov['apiProvFuncId']} ELSE IF "${prov['apiProvFuncRole']}" == "AEF" - Set To Dictionary ${register_user_info} aef_id=${prov['apiProvFuncId']} + IF "${prov['apiProvFuncInfo']}" == "${register_user_info['aef_username']}" + Set To Dictionary ${register_user_info} aef_id=${prov['apiProvFuncId']} + END + Set To Dictionary + ... ${register_user_info['aef_roles']['${prov['apiProvFuncInfo']}']} + ... aef_id=${prov['apiProvFuncId']} ELSE IF "${prov['apiProvFuncRole']}" == "AMF" - Set To Dictionary ${register_user_info} amf_id=${prov['apiProvFuncId']} + IF "${prov['apiProvFuncInfo']}" == "${register_user_info['amf_username']}" + Set To Dictionary ${register_user_info} amf_id=${prov['apiProvFuncId']} + END + Set To Dictionary + ... ${register_user_info['amf_roles']['${prov['apiProvFuncInfo']}']} + ... amf_id=${prov['apiProvFuncId']} ELSE Fail "${prov['apiProvFuncRole']} is not valid role" END @@ -644,10 +764,20 @@ Provider Registration RETURN ${register_user_info} Provider Default Registration - [Arguments] ${provider_username}=${PROVIDER_USERNAME} + [Arguments] + ... ${provider_username}=${PROVIDER_USERNAME} + ... ${total_apf_roles}=1 + ... ${total_aef_roles}=1 + ... ${total_amf_roles}=1 + ... ${apf_id}=${NONE} + ... ${apf_username}=${NONE} + # Register Provider ${register_user_info}= Register User At Jwt Auth Provider - ... username=${provider_username} role=${PROVIDER_ROLE} + ... username=${provider_username} + ... total_apf_roles=${total_apf_roles} + ... total_aef_roles=${total_aef_roles} + ... total_amf_roles=${total_amf_roles} ${register_user_info}= Provider Registration ${register_user_info} @@ -655,16 +785,78 @@ Provider Default Registration RETURN ${register_user_info} -Publish Service Api - [Arguments] ${register_user_info_provider} ${service_name}=service_1 +Publish Service Api Request + [Arguments] + ... ${register_user_info_provider} + ... ${service_name}=service_1 + ... ${apf_id}=${NONE} + ... ${apf_username}=${NONE} + ... ${supported_features}=0 + ... ${vendor_specific_service_api_description}=${None} + ... ${vendor_specific_aef_profile}=${None} + ... ${aef_id}=${NONE} + ... ${api_status}=${NONE} + + ${aef_ids}= Create List + IF "${aef_id}" == "${NONE}" + Append To List ${aef_ids} ${register_user_info_provider['aef_id']} + ELSE + ${aef_ids}= Set Variable ${aef_id} + END - ${request_body}= Create Service Api Description ${service_name} ${register_user_info_provider['aef_id']} + ${apf_id_to_use}= Set Variable ${register_user_info_provider['apf_id']} + ${apf_username_to_use}= Set Variable ${register_user_info_provider['apf_username']} + IF "${apf_id}" != "${NONE}" and "${apf_id}" != "${register_user_info_provider['apf_id']}" + FOR ${apf_username} ${apf_role} IN &{register_user_info_provider['apf_roles']} + IF "${apf_role['apf_id']}" == "${apf_id}" + ${apf_id_to_use}= Set Variable ${apf_id} + ${apf_username_to_use}= Set Variable ${apf_username} + BREAK + END + END + ELSE IF "${apf_username}" != "${NONE}" and "${apf_username}" != "${register_user_info_provider['apf_username']}" + ${apf_id_to_use}= Set Variable ${register_user_info_provider['apf_roles']['${apf_username}']['apf_id']} + ${apf_username_to_use}= Set Variable ${apf_username} + END + + ${request_body}= Create Service Api Description + ... ${service_name} + ... ${aef_ids} + ... ${supported_features} + ... ${vendor_specific_service_api_description} + ... ${vendor_specific_aef_profile} + ... ${api_status} ${resp}= Post Request Capif - ... /published-apis/v1/${register_user_info_provider['apf_id']}/service-apis + ... /published-apis/v1/${apf_id_to_use}/service-apis ... json=${request_body} ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt - ... username=${register_user_info_provider['apf_username']} + ... username=${apf_username_to_use} + + RETURN ${resp} ${request_body} + +Publish Service Api + [Arguments] + ... ${register_user_info_provider} + ... ${service_name}=service_1 + ... ${apf_id}=${NONE} + ... ${apf_username}=${NONE} + ... ${supported_features}=0 + ... ${vendor_specific_service_api_description}=${None} + ... ${vendor_specific_aef_profile}=${None} + ... ${aef_id}=${NONE} + ... ${api_status}=${NONE} + + ${resp} ${request_body}= Publish Service Api Request + ... ${register_user_info_provider} + ... ${service_name} + ... ${apf_id} + ... ${apf_username} + ... ${supported_features} + ... ${vendor_specific_service_api_description} + ... ${vendor_specific_aef_profile} + ... ${aef_id} + ... ${api_status} Check Response Variable Type And Values ${resp} 201 ServiceAPIDescription Dictionary Should Contain Key ${resp.json()} apiId @@ -751,3 +943,14 @@ Create Security Context Between invoker and provider Check Response Variable Type And Values ${resp} 201 ServiceSecurity +Get Number Of Services + ${resp}= Get Request Capif + ... /helper/getServices + ... server=${CAPIF_HTTPS_URL} + ... verify=ca.crt + ... username=${SUPERADMIN_USERNAME} + + Log Dictionary ${resp.json()} + ${size}= Get Length ${resp.json()['services']} + + RETURN ${size} diff --git a/tests/resources/common/expectedMessages.robot b/tests/resources/common/expectedMessages.robot new file mode 100644 index 0000000000000000000000000000000000000000..128f9831e4dbc5f403a6e818e8b2c363c422c982 --- /dev/null +++ b/tests/resources/common/expectedMessages.robot @@ -0,0 +1,226 @@ +*** Settings *** +Documentation This resource file contains the basic requests used by Capif. NGINX_HOSTNAME and CAPIF_AUTH can be set as global variables, depends on environment used + +Library Collections +Library String +Library /opt/robot-tests/tests/libraries/bodyRequests.py + +*** Keywords *** +Create Events From InvocationLogs + [Arguments] + ... ${subscription_id} + ... ${invocation_log} + ... ${events_expected}=${NONE} + ... ${event_detail_expected}=${TRUE} + IF ${events_expected} == ${NONE} + ${events_expected}= Create List + END + + # Now we create the expected events received at notification server according to logs sent to loggin service in order to check if all are present. + ${invocation_log_base}= Copy Dictionary ${invocation_log} deepcopy=True + # Store log array because each log will be notified in one Event Notification + ${invocation_log_logs}= Copy List ${invocation_log_base['logs']} + # Remove logs array from invocationLog data + Remove From Dictionary ${invocation_log_base} logs + + FOR ${log} IN @{invocation_log_logs} + Log Dictionary ${log} + ${invocation_logs}= Copy Dictionary ${invocation_log_base} deepcopy=True + + # Get Event Enum for this result + ${event_enum}= Set Variable + IF ${log['result']} >= 200 and ${log['result']} < 300 + ${event_enum}= Set Variable SERVICE_API_INVOCATION_SUCCESS + ELSE + ${event_enum}= Set Variable SERVICE_API_INVOCATION_FAILURE + END + # Create a log array with only one component + ${log_list}= Create List ${log} + # Setup logs array with previously created list + Set To Dictionary ${invocation_logs} logs=${log_list} + IF "${event_detail_expected}" != "${TRUE}" + ${invocation_logs}= Set Variable ${NONE} + END + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... ${event_enum} + ... invocationLogs=${invocation_logs} + Append To List ${events_expected} ${event_expected} + END + + RETURN ${events_expected} + +Create Expected Events For Service API Notifications + [Arguments] + ... ${subscription_id} + ... ${service_api_available_resources}=${NONE} + ... ${service_api_unavailable_resources}=${NONE} + ... ${events_expected}=${NONE} + ... ${event_detail_expected}=${FALSE} + ... ${service_api_description_expected}=${FALSE} + ... ${service_api_description}=${NONE} + + IF ${events_expected} == ${NONE} + ${events_expected}= Create List + END + + ${service_api_description_to_use}= Set Variable ${NONE} + IF "${service_api_description_expected}" == "${TRUE}" + IF "${service_api_description}" == "${NONE}" + LOG service_api_description is expected but serviceApiDescription is set to None ERROR + Fail service_api_description is expected but serviceApiDescription is set to None, review Test ${TEST_NAME} + ELSE + ${service_api_description_to_use}= Set Variable ${service_api_description} + END + END + + IF "${service_api_available_resources}" != "${NONE}" + FOR ${service_api_available_resource} IN @{service_api_available_resources} + Log ${service_api_available_resource} + ${api_id}= Fetch From Right ${service_api_available_resource.path} / + + IF "${event_detail_expected}" != "${TRUE}" + ${api_id}= Set Variable ${NONE} + END + + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... SERVICE_API_AVAILABLE + ... apiIds=${api_id} + ... serviceAPIDescriptions=${service_api_description_to_use} + Append To List ${events_expected} ${event_expected} + END + END + + IF "${service_api_unavailable_resources}" != "${NONE}" + FOR ${service_api_unavailable_resource} IN @{service_api_unavailable_resources} + Log ${service_api_unavailable_resource} + ${api_id}= Fetch From Right ${service_api_unavailable_resource.path} / + IF "${event_detail_expected}" != "${TRUE}" + ${api_id}= Set Variable ${NONE} + END + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... SERVICE_API_UNAVAILABLE + ... apiIds=${api_id} + ... serviceAPIDescriptions=${service_api_description_to_use} + Append To List ${events_expected} ${event_expected} + END + END + + RETURN ${events_expected} + +Create Expected Api Invoker Events + [Arguments] + ... ${subscription_id} + ... ${api_invoker_id} + ... ${events_expected}=${NONE} + ... ${event_detail_expected}=${TRUE} + + IF ${events_expected} == ${NONE} + ${events_expected}= Create List + END + + ${api_invoker_id_used}= Set Variable ${api_invoker_id} + IF "${event_detail_expected}" != "${TRUE}" + ${api_invoker_id_used}= Set Variable ${NONE} + END + ## Create events expected + # Create Notification Events expected to be received for Onboard event + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... API_INVOKER_ONBOARDED + ... apiInvokerIds=${api_invoker_id_used} + Append To List ${events_expected} ${event_expected} + + # Create Notification Events expected to be received for Updated event + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... API_INVOKER_UPDATED + ... apiInvokerIds=${api_invoker_id_used} + Append To List ${events_expected} ${event_expected} + + # Create Notification Events expected to be received for Offboard event + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... API_INVOKER_OFFBOARDED + ... apiInvokerIds=${api_invoker_id_used} + Append To List ${events_expected} ${event_expected} + + RETURN ${events_expected} + +Create Expected Access Control Policy Update Event + [Arguments] + ... ${subscription_id} + ... ${service_api_id} + ... ${api_invoker_policies} + ... ${events_expected}=${NONE} + ... ${event_detail_expected}=${TRUE} + + IF ${events_expected} == ${NONE} + ${events_expected}= Create List + END + ${acc_ctrl_pol_list}= Create Dictionary apiId=${service_api_id} apiInvokerPolicies=${api_invoker_policies} + Check Variable ${acc_ctrl_pol_list} AccessControlPolicyListExt + + IF "${event_detail_expected}" != "${TRUE}" + ${acc_ctrl_pol_list}= Set Variable ${NONE} + END + + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... ACCESS_CONTROL_POLICY_UPDATE + ... accCtrlPolList=${acc_ctrl_pol_list} + Append To List ${events_expected} ${event_expected} + + RETURN ${events_expected} + +Create Expected Access Control Policy Unavailable + [Arguments] ${subscription_id} + ... ${events_expected}=${NONE} + + IF ${events_expected} == ${NONE} + ${events_expected}= Create List + END + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... ACCESS_CONTROL_POLICY_UNAVAILABLE + Append To List ${events_expected} ${event_expected} + + RETURN ${events_expected} + +Create Expected Api Invoker Authorization Revoked + [Arguments] ${subscription_id} ${events_expected}=${NONE} + IF ${events_expected} == ${NONE} + ${events_expected}= Create List + END + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... API_INVOKER_AUTHORIZATION_REVOKED + Append To List ${events_expected} ${event_expected} + RETURN ${events_expected} + +Create Expected Service Update Event + [Arguments] + ... ${subscription_id} + ... ${service_api_resource} + ... ${service_api_descriptions} + ... ${events_expected}=${NONE} + ... ${event_detail_expected}=${TRUE} + + IF ${events_expected} == ${NONE} + ${events_expected}= Create List + END + ${api_id}= Fetch From Right ${service_api_resource.path} / + Set To Dictionary ${service_api_descriptions} apiId=${api_id} + + IF "${event_detail_expected}" != "${TRUE}" + ${service_api_descriptions}= Set Variable ${NONE} + END + + ${event_expected}= Create Notification Event + ... ${subscription_id} + ... SERVICE_API_UPDATE + ... serviceAPIDescriptions=${service_api_descriptions} + Append To List ${events_expected} ${event_expected} + RETURN ${events_expected} diff --git a/tests/resources/common/httpServer.robot b/tests/resources/common/httpServer.robot deleted file mode 100644 index 7105dc1a1f2b504378735fd4002210a409f4c532..0000000000000000000000000000000000000000 --- a/tests/resources/common/httpServer.robot +++ /dev/null @@ -1,2 +0,0 @@ -*** Settings *** -Library HttpLibrary diff --git a/tests/resources/common/httpServerCtrl.robot b/tests/resources/common/httpServerCtrl.robot deleted file mode 100644 index 8782d192f8f2133808298ba01c6da635f419fd34..0000000000000000000000000000000000000000 --- a/tests/resources/common/httpServerCtrl.robot +++ /dev/null @@ -1,3 +0,0 @@ -*** Settings *** - -Library String diff --git a/tests/tasks/Dummy Info/populate.robot b/tests/tasks/Dummy Info/populate.robot index 9a61a4075a5085bb4d0a8a56a283f96ecb4113b1..da1247797a7a7087a7e147a39b9018471cb47d9c 100644 --- a/tests/tasks/Dummy Info/populate.robot +++ b/tests/tasks/Dummy Info/populate.robot @@ -10,7 +10,6 @@ Library ArchiveLibrary Library OperatingSystem Library DateTime -Suite Teardown Reset Testing Environment Test Setup Reset Testing Environment @@ -99,14 +98,13 @@ Remove Dummy Invokers and Providers Log ${username}=${entities_dictionary}[${username}] ${resource_url}= Set Variable ${entities_dictionary}[${username}][resource_url] ${management_cert}= Set Variable ${entities_dictionary}[${username}][management_cert] - Run Keyword And Ignore Error Remove Resource ${resource_url.path} ${management_cert} ${username} + Run Keyword And Continue On Failure Remove Resource ${resource_url.path} ${management_cert} ${username} END ${result}= Run Process ls -l Log Many ${result.stdout} - *** Keywords *** Get Provider [Arguments] ${index} ${entities_dictionary} diff --git a/tests/tasks/Users Management/__init__.robot b/tests/tasks/Users Management/__init__.robot new file mode 100644 index 0000000000000000000000000000000000000000..f2cd44ef13c3838e8196b6fa8cdacbf2be9aa1ca --- /dev/null +++ b/tests/tasks/Users Management/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Force Tags users_management \ No newline at end of file diff --git a/tests/tasks/Users Management/users.robot b/tests/tasks/Users Management/users.robot new file mode 100644 index 0000000000000000000000000000000000000000..64991b50efb2638a1495b081c9fc73744ca75dfa --- /dev/null +++ b/tests/tasks/Users Management/users.robot @@ -0,0 +1,112 @@ +*** Settings *** +Resource /opt/robot-tests/tests/resources/common.resource +Resource /opt/robot-tests/tests/resources/api_invoker_management_requests/apiInvokerManagementRequests.robot +Resource ../../resources/common.resource +Resource ../../resources/common/basicRequests.robot +Library /opt/robot-tests/tests/libraries/bodyRequests.py +Library Process +Library Collections +Library ArchiveLibrary +Library OperatingSystem +Library DateTime +Library String + + + +*** Variables *** +${TOTAL_USERS} 5 + +${BACKUP_DIRECTORY} backup +${RESULT_FOLDER} /opt/robot-tests/results +${OUTPUT_ZIP_FILE} users_loaded.zip + +${USER_PASSWORD} password +${USERNAME_PREFIX} user +${DESCRIPTION} Testing purpouse + + +*** Test Cases *** +Create Client Users + [Tags] create-users + ${entities_dictionary}= Create Dictionary + Create Directory ${BACKUP_DIRECTORY} + + FOR ${counter} IN RANGE ${TOTAL_USERS} + ${USERNAME}= Set Variable ${USERNAME_PREFIX}_${counter} + IF ${TOTAL_USERS} == 1 + ${USERNAME}= Set Variable ${USERNAME_PREFIX} + END + + ${resp}= Run Keyword And Continue On Failure Create User At Register + ... ${USERNAME} + ... ${USER_PASSWORD} + ... ${DESCRIPTION} + ... email="${USERNAME}@nobody.com" + + ${register_user_info}= Create Dictionary + + IF ${resp.status_code} == 201 + ${register_user_info}= Create Dictionary + ... user_uuid=${resp.json()['uuid']} + ... &{resp.json()} + ELSE + ${register_user_info}= Create Dictionary + ... ${resp.json()} + END + + Set To Dictionary ${entities_dictionary} ${USERNAME}=${register_user_info} + Copy Files *${USERNAME}* ${BACKUP_DIRECTORY}/ + END + + Write Dictionary ${BACKUP_DIRECTORY}/registers.json ${entities_dictionary} + ${date}= Get Current Date result_format=%Y_%m_%d_%H_%M_%S + Create Zip From Files In Directory ${BACKUP_DIRECTORY} ${RESULT_FOLDER}/${date}_${OUTPUT_ZIP_FILE} + + ${result}= Run Process ls -l + + Log Many ${result.stdout} + +Remove Client Users + [Tags] remove-users + ${files}= List Files In Directory ${RESULT_FOLDER} *${OUTPUT_ZIP_FILE} + ${sorted_list}= Copy List ${files} + + Sort List ${sorted_list} + Log To Console message + ${last_backup}= Get From List ${sorted_list} -1 + + Copy File ${RESULT_FOLDER}/${last_backup} ./ + Extract Zip File ${last_backup} + + ${entities_dictionary}= Read Dictionary registers.json + + Log Dictionary ${entities_dictionary} + + FOR ${username} IN @{entities_dictionary} + Log ${username}=${entities_dictionary}[${username}] + Run Keyword And Continue On Failure Delete User At Register username=${username} + END + + ${result}= Run Process ls -l + + Log Many ${result.stdout} + + +Remove Client Users By Prefix + [Tags] remove-users-by-prefix + + ${users}= Get List of Users At Register + + ${users_to_remove}= Filter Users By Prefix Username users=${users} prefix=${USERNAME_PREFIX} + + Log Dictionary ${users_to_remove} + + FOR ${username} IN @{users_to_remove} + Log Removing ${username} + Run Keyword And Continue On Failure Delete User At Register username=${username} + END + + ${result}= Run Process ls -l + + Log Many ${result.stdout} + diff --git a/tools/base_images_scripts/common.sh b/tools/base_images_scripts/common.sh new file mode 100755 index 0000000000000000000000000000000000000000..b0d212b9d9f243360125b6016d0008bdd5c176f1 --- /dev/null +++ b/tools/base_images_scripts/common.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# Directories variables setup (no modification needed) +export IMAGE_SCRIPTS_DIR=$(dirname "$(readlink -f "$0")") +export TOOLS_DIR=$(dirname "$IMAGE_SCRIPTS_DIR") +export CAPIF_BASE_DIR=$(dirname "$TOOLS_DIR") \ No newline at end of file diff --git a/tools/base_images_scripts/create_and_push_robot_image.sh b/tools/base_images_scripts/create_and_push_robot_image.sh new file mode 100755 index 0000000000000000000000000000000000000000..b2c3159810b052f8c935e7967bec21fc968141a8 --- /dev/null +++ b/tools/base_images_scripts/create_and_push_robot_image.sh @@ -0,0 +1,23 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/common.sh + +DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image +DOCKER_ROBOT_IMAGE_VERSION=1.0 + +TEST_FOLDER=$CAPIF_BASE_DIR/tests +RESULT_FOLDER=$CAPIF_BASE_DIR/results +ROBOT_DOCKER_FILE_FOLDER=$TOOLS_DIR/robot + +cd $ROBOT_DOCKER_FILE_FOLDER +docker login labs.etsi.org:5050 + +docker build --no-cache --platform linux/amd64 -t ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-amd64 . +docker push ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-amd64 + +docker build --no-cache --platform linux/arm64 -t ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-arm64 . +docker push ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-arm64 + +docker manifest create ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \ + --amend ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-amd64 \ + --amend ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-arm64 +docker manifest push ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} diff --git a/tools/base_images_scripts/push_base_images_ocf.sh b/tools/base_images_scripts/push_base_images_ocf.sh new file mode 100755 index 0000000000000000000000000000000000000000..0407dae67c19f89983742ec5b14781cd4af9aa84 --- /dev/null +++ b/tools/base_images_scripts/push_base_images_ocf.sh @@ -0,0 +1,32 @@ +#!/bin/bash +source $(dirname "$(readlink -f "$0")")/common.sh + +PLATFORMS=("linux/arm64" +"linux/amd64") + +BASIC_IMAGES=("python:3-slim-bullseye" +"nginx:1.27.1" +"vault:1.13.2" +"ubuntu:20.04") + + +docker login labs.etsi.org:5050 +for basic_image in "${BASIC_IMAGES[@]}"; do + echo "$basic_image processing" + MANIFEST_AMEND="" + for platform in "${PLATFORMS[@]}";do + docker pull $basic_image --platform $platform + echo "$basic_image pulled for platform $platform" + tag=$(echo $platform | awk -F'/' '{print $NF}') + docker tag $basic_image labs.etsi.org:5050/ocf/capif/$basic_image-$tag + echo "labs.etsi.org:5050/ocf/capif/$basic_image-$tag tagged" + docker push labs.etsi.org:5050/ocf/capif/$basic_image-$tag + echo "labs.etsi.org:5050/ocf/capif/$basic_image-$tag pushed" + MANIFEST_AMEND="$MANIFEST_AMEND --amend labs.etsi.org:5050/ocf/capif/$basic_image-$tag" + done + + docker manifest create labs.etsi.org:5050/ocf/capif/$basic_image $MANIFEST_AMEND + echo "labs.etsi.org:5050/ocf/capif/$basic_image Manifest created with amend $MANIFEST_AMEND" + docker manifest push labs.etsi.org:5050/ocf/capif/$basic_image + echo "labs.etsi.org:5050/ocf/capif/$basic_image Manifest pushed" +done diff --git a/tools/robot/Dockerfile b/tools/robot/Dockerfile index 347f226da0bf93d5e1f8a9adaa18901c5dafc000..a7e18f87e260e8ad840cc867c2352c1dacfc4582 100644 --- a/tools/robot/Dockerfile +++ b/tools/robot/Dockerfile @@ -1,4 +1,4 @@ -FROM harbor.elevenpaths.com/dockerhub-proxy/library/ubuntu:20.04 +FROM labs.etsi.org:5050/ocf/capif/ubuntu:20.04 LABEL maintainer="Jorge Moratinos Salcines " LABEL version="2.0" LABEL description="Docker to run Robot Framework" diff --git a/tools/robot/basicRequirements.txt b/tools/robot/basicRequirements.txt index 06e5cc276ee6b6b950d1e1cff0cb272deee5a0b6..2f6ea98a11f13f7960afdfb32f71dd1ea43ddfc5 100644 --- a/tools/robot/basicRequirements.txt +++ b/tools/robot/basicRequirements.txt @@ -70,7 +70,7 @@ rellu == 0.7 requests == 2.28.1 rfc3987 == 1.3.8 robotframework == 7.0 -robotframework-archivelibrary == 0.4.2 +robotframework-archivelibrary == 0.4.2 robotframework-httpctrl == 0.3.1 robotframework-lint == 1.1 robotframework-mongodb-library == 3.2 diff --git a/tools/robot/entrypoint.sh b/tools/robot/entrypoint.sh index d889a7aa00c1c94988752e7810b356b24bca3289..75f39b5594aa4dd6953f880d85134aa335094f7e 100644 --- a/tools/robot/entrypoint.sh +++ b/tools/robot/entrypoint.sh @@ -8,6 +8,8 @@ TESTS_REQ_FILE=ROBOT_TESTS_DIRECTORY/requirements.txt ARGUMENTS= OPTIONS= +timestamp=$(date +"%Y%m%d_%H%M%S") + while [ -n "$1" ]; do # while loop starts case "$1" in @@ -45,4 +47,4 @@ then fi pip install -r $BASE_REQ_FILE -robot -d ROBOT_RESULTS_DIRECTORY --xunit xunit.xml $OPTIONS $ARGUMENTS +robot -d ROBOT_RESULTS_DIRECTORY/$timestamp --xunit xunit.xml $OPTIONS $ARGUMENTS